Commit Graph

10691 Commits

Author SHA1 Message Date
RoosterDragon
bd809e5af7 Prevent community mods from warning on unused translations in the common assets
Currently when linting translations, we check for any unused translation keys. This works fine for the default mods, which own the entire sets of translation files. For community mods, they often import the translation files from the common mod assets, but they may only use some of the translations provided. Currently, they would get warnings about not using translations from the common files they have imported.

Since the community mods don't own those translations, getting warnings about it is annoying. To solve this issue, introduce a AllowUnusedTranslationsInExternalPackages in the mod.yaml which defaults to true. This will prevent reporting of unused translation keys from external assets. Keys that are used for external assets will still be validated, and keys from the mod assets will be both validated and unused keys will be reported.

We default the new flag to true and don't provide an update rule. This means community mods will get the new behaviour. For the default mods, we do want to check the "external" assets, since we control those assets. So the default mods have their mod.yaml updated to disable the flag and retain the existing behaviour of checking everything.
2024-07-28 22:43:14 +03:00
JovialFeline
0aac5885fb Add base failure, Nod defense to gdi05b & gdi05c 2024-07-26 23:23:29 +03:00
RoosterDragon
bebe3f710b Remove duplicated definitions in utils.lua 2024-07-22 17:27:58 +02:00
RoosterDragon
0bfa53b58d Teach CheckTranslationReference about translations in Lua scripts
Using the glory of regex, we can scrape any Lua script files that a map includes and locate calls to the UserInterface.Translate method. We can then treat them in the same way as C# fields marked with a TranslationReferenceAttribute. This allows the lint check to validate the translation invoked in the .lua script has a matching entry in the translation .ftl files, with all the required arguments (if any).

We can also locate any calls to AddPrimaryObjective or AddSecondaryObjective defined by the utils.lua script, which also accept translation keys.

The are a couple of restrictions:
- When linting the map, we don't check for keys in the ftl file that are unused. This is because the linter doesn't load all the keys when checking maps.
- In order to validate translation arguments with the regex, we require the Lua script to pass the table of arguments inline at the callsite. If it does not, we raise a warning so the user can adjust the code.
2024-07-22 17:27:58 +02:00
JovialFeline
e8d5c005a2 Restore missions' barbed wire 2024-07-22 14:11:32 +03:00
JovialFeline
c58621e036 Add bombers, fixes to Production Disruption 2024-07-22 14:03:47 +03:00
JovialFeline
ff5b5149b3 Add navy orders, fixes to Soviet 06a 2024-07-22 14:03:14 +03:00
Gustas
7b01204eed Spawn aircraft landed and occupying land or at cruise altitude 2024-07-20 18:47:58 +02:00
Matthias Mailänder
5ddc7b1177 Localize the faction dropdown. 2024-07-18 22:10:03 +03:00
Matthias Mailänder
59f6a6a2c2 Fix localisation on case sensitive file systems. 2024-07-18 22:10:03 +03:00
RoosterDragon
3716ffb3b5 Fix the remap for sprites in d2k.
Follow-up from 34ff23d030, the previous `-Remap:` line was not working and has since been removed. Without the remap being unapplied, there are rendering artefacts introduced as a result. Fix this by explicitly setting the remap to something else instead.
2024-07-18 21:55:02 +03:00
RoosterDragon
4312a4d3f4 Make MiniYaml inherits and removal more flexible
- Previously the Inherits syntax was only resolved when used for top-level nodes. Now it is also resolved for nested nodes as well.
- Previously the MiniYAML Merge feature supported the ability to remove nodes, but this only worked within the context of inherited nodes. Now, we allow node removal to work outside of the inheritance context.
2024-07-18 21:55:02 +03:00
JovialFeline
0138bc9b3f Fix untranslated speakers 2024-07-17 19:39:17 +03:00
Tocho Tochev
fb420e88bd Fix Survival01 mission objective 2024-07-16 12:54:49 +03:00
Matthias Mailänder
387554acbb Fixed a crash on empty mission options. 2024-07-05 16:11:20 +03:00
N.N
06cc47847d Spicebloom refactor
- pieces represent Min and Max instead of random interval
- More control where spice spread
- fix AoE in  SpiceExplosion weapon
- delay interval between each pieces

Co-Authored-By: Gustas <37534529+PunkPun@users.noreply.github.com>
2024-06-29 00:09:13 +03:00
N.N
9302bac619 Replace BLOXMAS.R8 with R16 eqivalent
- file BLOXXMAS.R8 removed from mod content as its no longer needed
2024-06-08 22:11:50 +03:00
N.N
616046179f Fix engineer cannot restore ally vehicles 2024-06-03 12:46:44 +03:00
Gustas
64b2bd4735 Update to HTTPS 2024-06-03 10:25:06 +02:00
Matthias Mailänder
69d9bbb400 Unhardcode support power blocked cursor. 2024-05-19 14:43:59 +03:00
dnqbob
1a3d3cd31e Add Firestrom generator (incomplete) 2024-05-19 14:35:09 +03:00
Gustas
2af417bf49 Revert part of 377bb4b6cc 2024-05-11 22:14:38 +02:00
Matthias Mailänder
8c174551f5 Map pool update
- add Destroyable tiles into d2k mod
- add ability engineer to repair destroyed cliffs
2024-05-04 16:55:01 +02:00
Gustas
5fc36bd45f Make player stance colours universally respected 2024-05-04 16:31:35 +02:00
N.N
fa0254cb27 Add missing husk and visual improvements
- adjust husk color overlay
- engineer can capture husk
- balance changes to husk HP
2024-05-04 16:23:38 +02:00
JovialFeline
b48a74f065 Add polish to Intervention 2024-05-03 19:05:27 +03:00
JovialFeline
670067ae3a Add Negotiations mission (Red Alert) 2024-05-03 18:24:47 +03:00
dnqbob
c63be29770 TS: simplify Woverine 2024-04-30 21:17:24 +03:00
Matthias Mailänder
97c61e0068 Extract strings from resource renderer. 2024-04-30 11:27:46 +03:00
RoosterDragon
377bb4b6cc Tweak some UI Yaml files
- Increase space of some elements to fit their text.
- Remove editor text that aren't translation keys. The text will be set in code anyway.
- Remove some unused elements.
- Provide a translation key for the port separator, to avoid log warnings.
2024-04-24 15:28:28 +03:00
Matthias Mailänder
188f0e2451 Extract strings from support power name and description. 2024-04-03 11:38:08 +03:00
Gustas
0c43801a2c Remove hack fix 2024-03-30 15:51:13 +01:00
JovialFeline
ec09e618ff Correct landing craft passenger subcells 2024-03-29 11:07:46 +02:00
RoosterDragon
799c4c9e3c Fix map editor not removing an actor properly.
If you edit an actor name, then delete the actor - it fails to be removed from the map in the editor. This is because the actor previews are keyed by ID. Editing their name edits their ID and breaks the stability of their hash code. This unstable hash code means the preview will now fail to be removed from collections, even though it's the "same" object.

Fix this by making the ID immutable to ensure hash stability - this means that a preview can be added and removed from collections successfully. Now when we edit the ID in the UI, we can't update the ID in place on the preview. Instead we must generate a new preview with the correct ID and swap it with the preview currently in use.
2024-03-28 12:11:26 +02:00
David Wilson
25a6b4b6b9 Editor marker tiles layer 2024-03-21 13:11:04 +02:00
Paul Chote
714f2c6dc2 Add TUC Steam metadata for TS. 2024-03-16 20:53:55 +02:00
Paul Chote
e04439ea14 Add TUC Steam metadata for RA. 2024-03-16 20:53:55 +02:00
Paul Chote
24093fd0c5 Add TUC Steam metadata for TD. 2024-03-16 20:53:55 +02:00
N.N
d4457a4028 add join/leave/changeOption sounds into lobby 2024-03-12 13:18:50 +02:00
N.N
6c032bb8f7 Add unique beacon sound 2024-03-12 13:18:50 +02:00
Wojciech Walaszek
7b82d85b27 Editor actor move 2024-03-03 14:27:35 +02:00
JovialFeline
ac610c54eb Add bridge break, fixes to Soviet-06b 2024-03-02 17:02:10 -06:00
JovialFeline
ade07607a5 Add crash fix, minor polish to volkov-n-chitzkoi 2024-02-22 17:00:25 +01:00
JovialFeline
12e1d327ef Restore allies-05 prison self-targeting 2024-02-11 18:40:52 +01:00
JovialFeline
09834d3954 Add Pillbox, early dog attack to allies-02 2024-02-11 18:29:30 +02:00
Gustas
2fe13fe442 Manually review chrome translation keys and do some deduplication 2024-02-07 19:20:11 +01:00
David Wilson
d630a6ef7d Fix editor area/actor deselection bugs 2024-02-07 15:30:23 +02:00
N.N
4e031a6ea5 Selection info into Area selection tab
Selection info into Area selection tab

add Resource counter and measure info into Area selection tab
2024-02-03 12:26:21 +02:00
JovialFeline
53e4d0dd87 Add Turtle condition to RA bots' mine laying 2024-01-29 14:39:21 +01:00
David Wilson
2ced4abc24 Editor selection refactor pt1 2024-01-24 10:11:39 +02:00