Commit Graph

30265 Commits

Author SHA1 Message Date
Gustas
53218414f8 Extract translations from modcontent chrome 2024-10-17 17:10:57 +01:00
RoosterDragon
ef1390bbdf Improve the context when logging missing translation fields. 2024-10-17 15:10:59 +03:00
RoosterDragon
6bd64677ec Use short context names in hotkey yaml, generate translation key at runtime. 2024-10-17 15:10:59 +03:00
RoosterDragon
559a76be8d Lowercase all hotkey-description- translation keys. 2024-10-17 15:10:59 +03:00
RoosterDragon
6f6fb5b393 Expose hotkeys to localisation.
Allows the Settings > Hotkeys screen to be localised, including hotkey decriptions, groups and contexts.

The hotkey names are exposed to localisation via KeycodeExts. Hotkey modifiers are similarly exposed via ModifersExts.

The Settings > Input screen has a Zoom Modifier dropdown, which shows the localised modifier name.

The --check-yaml utility command is taught to recognise all hotkey translation, so it can validate their usage.
2024-10-17 15:10:59 +03:00
Paul Chote
10856ccfd0 Fix weather overlay viewport size for spectators. 2024-10-17 14:27:31 +03:00
Paul Chote
8f14dd6113 Fix crash when a sequences defines both Alpha and Reverses. 2024-10-15 10:53:05 +03:00
Ivaylo Draganov
791595e3ae Extract player profile loading chrome logic to a dedicated class 2024-10-15 10:14:32 +03:00
Ivaylo Draganov
ca3ab78cf8 Rename file to match class name and extract other classes out of it for readability 2024-10-15 10:14:32 +03:00
Gustas
67855f2adf Don't crash if 2 DockHosts overlap 2024-10-13 14:35:59 +01:00
Gustas
f06d7d29ef Add support for not displaying target lines 2024-10-13 14:35:59 +01:00
Gustas
b72d4ab7c6 Fix clients acquiring hosts on order creations 2024-10-13 14:35:59 +01:00
Gustas
d22bdbe944 Only allow docking to allied refineries if directly ordered 2024-10-13 14:35:59 +01:00
Gustas
d24533d561 Simplify IDockHost interface 2024-10-13 14:35:59 +01:00
Gustas
1334575ba9 Add RequireForceMoveCondition to DockClientManager 2024-10-13 14:35:59 +01:00
Gustas
9c6cb501a4 We should notify host even when it's not in world 2024-10-13 14:35:59 +01:00
Gustas
5048a50403 Fix refineries not uncloaking on dock 2024-10-13 14:35:59 +01:00
darkademic
d450ef43c6 Download failure error. 2024-10-12 14:34:04 +03:00
Gregor Kališnik
6dd076b27f Improve NAT logging (#21611) 2024-10-07 21:00:07 +02:00
Ivaylo Draganov
79ae71a517 Rename *_RIGHT to *_WIDTH and *_BOTTOM to *_HEIGHT in integer expressions for widgets
The terms "width" and "height" are clearer and they match what the values actually represent (window or parent width/height). The YAML changes are generated with the update rule.
2024-10-07 12:59:25 +03:00
RoosterDragon
bb17cfa179 Expose mod.yaml content to localisation.
Mod metadata, load screens and mod content is all now sourced from ftl files, allowing these items to be translated.

Translations are now initialized as part of ModData creation, as currently they are made available too late for the usage we need here.

The "modcontent" mod learns a new parameter for "Content.TranslationFile" - this allows a mod to provide the path of a translation file to the mod which it can load. This allows mods such as ra, cnc, d2k, ts to own the translations for their ModContent, yet still make them accessible to the modcontent mod.

CheckFluentReference learns to validate all these new fields to ensure translations have been set.
2024-10-07 12:38:40 +03:00
RoosterDragon
d1583e8587 Fix LabelWidget positioning of text when WordWrap is true.
If WordWrap is enabled, the wrapping must be applied before any TextAlign is applied, or the final position will be incorrect.

Introduce a IncreaseHeightToFitCurrentText to make such WordWrap labels easier to use, and apply to CreditsLogic.
2024-10-07 12:38:40 +03:00
RoosterDragon
86b9227577 In RemoveCellsFromPlayerShroud, don't call RemoveSource unless required.
Since AddCellsToPlayerShroud only adds for players with a valid relationship, we can skip a dictionary lookup in RemoveSource by only attempting the remove if the relationship check passes as well.
2024-10-07 12:14:45 +03:00
RoosterDragon
d010157611 Improve performance of FrozenActorLayer.Tick
By adding a UpdateVisibilityNextTick flag against every FrozenActor to track when a visibility update is required, we can remove the dirtyFrozenActorIds set in FrozenActorLayer. In the Tick method we can now avoid a set lookup.

Also, don't create the frozenActorsToRemove list until we need one to avoid an allocation.
2024-10-05 21:17:59 +02:00
MHecker-code
6794b2dc40 Update OrderEffects.cs
Pass order name to OrderEffects
2024-10-05 10:06:33 +01:00
Gustas
00f504f6aa Don't create an unnecessary HPF layer 2024-10-04 21:02:29 +01:00
Gustas
014bca449f Automated fixup 2024-10-04 20:54:23 +01:00
Paul Chote
464e0dc7d2 Rename Localized to Fluent. 2024-10-04 15:11:27 +03:00
Paul Chote
d6285affec Remove FluentBundle.Arguments helper method. 2024-10-04 15:11:27 +03:00
Paul Chote
b29b685058 Rename Fluent-related code to be more precise. 2024-10-04 15:11:27 +03:00
Ivaylo Draganov
771b9ddfda Remove key handling from ContainerWidget
It has no business handling key input. This was used only for opening the ingame chat and replacing it with a `LogicKeyListener` was trivial.
2024-10-04 14:32:21 +03:00
Ivaylo Draganov
a69ea79d83 Remove PARENT_TOP and PARENT_LEFT from integer expressions for widgets
PARENT_TOP and PARENT_LEFT should be 0 so they are not very useful substitutions. They are replaced with 0 or removed if that was the whole value for a field.
2024-10-03 18:37:13 +03:00
Ivaylo Draganov
c0839d4521 Extract version label chrome logic to a dedicated class 2024-10-03 13:26:30 +03:00
Paul Chote
fff41a44ed Make Mod Content button optional. 2024-10-02 18:37:46 +03:00
Paul Chote
eac6d4b617 Route content check via FileSystemLoader.
This allows mods with custom content requirements
to use the default load screen implementations.
2024-10-02 18:37:46 +03:00
Paul Chote
720b925fd5 Move file system mounting into mod code. 2024-10-02 18:37:46 +03:00
Paul Chote
b60b1e369a Extract ObjectCreator.GetLoader for single objects. 2024-10-02 18:37:46 +03:00
Paul Chote
014cbc0cbd Remove FileSystem.ResolveAssemblyPath 2024-10-02 18:37:46 +03:00
Ivaylo Draganov
806f0fd270 Fix being able to click through some areas of the production palette in RA
The production palette in RA is assembled from a foreground and a background. The foreground provides most of the visible graphics (such as the metallic chrome) but it has to let clicks go through to the production icons. The background is the one that has to stop the clicks then but it was not wide enough (because the art is only for the background behind production icons and not the whole chrome). Trying to fix that by wrapping the image in wider container that has `ClickThrough` set to `false` revealed that there is a bug with the cloning logic for `ContainerWidget`. It simply did not copy the `ClickThrough` field and it was always `true` for cloned widgets. So the value in YAML was lost when the template was cloned.
2024-10-02 11:44:03 +03:00
Ivaylo Draganov
4e9ef7a334 Adjust width of command bar widget so it matches the artwork and the mouse cursor cannot click through it 2024-10-02 11:44:03 +03:00
Ivaylo Draganov
a44e956ed9 Simplify mouse input handling check in BakgroundWidget
Make it the same as in `ContainerWidget`.
2024-09-29 12:37:00 +03:00
Ivaylo Draganov
6bcfc20533 Remove drag support from BackgroundWidget
This was not used anywhere, was somewhat buggy and could be implemented in a better way when needed.
2024-09-29 12:37:00 +03:00
Smittytron
e1db0b89bd Assign bleep5 in notifications 2024-09-29 12:16:11 +03:00
Smittytron
168d5171f4 Add Allies13 2024-09-29 12:16:11 +03:00
RoosterDragon
b4882a8b03 Avoid some allocations in MiniYaml.Merge.
During the merge operation, it is quite common to be dealing with a node that has no child nodes. When there are no such nodes, we can return early from some functions to avoid allocating new collections that will not be used.

In the MergePartial operation, reuse a dictionary as scratch space when checking for conflicts. We introduce a IntoDictionaryWithConflictLog helper to allow this. This avoids allocating a new dictionary for the conflict log that gets thrown away at each check.
2024-09-23 16:18:00 +02:00
Gustas
03dd99699b Fix missile having no facing set on spawn 2024-09-21 00:06:55 +02:00
michaeldgg2
9524db20fe RenderMouseBounds: debug trait for tweaking mouse bounds of Interactable/Selectable trait 2024-09-20 23:38:26 +02:00
michaeldgg2
96235654f1 Interactable: allow specifying arbitrary 2D polygon for mouse interaction. 2024-09-20 23:38:26 +02:00
RoosterDragon
833e6bd652 Fix CreditsLogic to word-wrap the text.
This allows the text to be word-wrapped automatically, rather than the current approach of manually wrapping the source text.
2024-09-20 23:23:34 +02:00
michaeldgg2
073ce4a718 Editor: ActorEditLogic: support for dynamic generation of items in dropdown 2024-09-20 15:03:06 +03:00