Commit Graph

686 Commits

Author SHA1 Message Date
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
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
RoosterDragon
dd9aca83dd Expose the default font and cursor sheet size settings to mod.yaml 2024-08-27 19:25:07 +03:00
chacha
e5a7b6e795 Do not keep map pakages loaded on Game start to reduce memory impact 2024-04-30 11:06:17 +03:00
RoosterDragon
2c96f6ec8b Inject platform dependency in SpriteFont.
This avoids needing to access the global Game.Renderer.
2024-04-24 15:28:28 +03:00
RoosterDragon
acca837142 Fix RCS1246 2023-11-19 19:28:57 +02:00
Paul Chote
3f4f9e7354 Introduce ServerType.Skirmish. 2023-11-17 10:28:52 +02:00
Svetlin Georfiev
a086fdaa5b A simplification done according to de Morgan's laws. 2023-11-15 19:41:45 +02:00
RoosterDragon
b97d1a4c6c Fix IDE0090 2023-11-15 19:13:17 +02:00
RoosterDragon
399cef8fb2 Reset FPS counter on game start.
This avoids this displayed counter being dragged down by lower FPS during loading prior to the game starting.
2023-11-15 19:04:35 +02:00
RoosterDragon
31c37662cf Play game started audio notifications just as the game starts.
Previously the StartGameNotification and MusicPlaylist traits used the IWorldLoaded interface to play an audio notification and begin music when the game started. However this interface is used by many traits to perform initial loading whilst the load screen was visible, and this loading can take time. Since the traits could run in any order, then audio notification might fire before another trait with a long loading time. This is not ideal as we want the time between the audio notification occurring and the player being able to interact to be as short and reliable as possible.

Now, we introduce a new IPostWorldLoaded which runs after all other loading activity, and we switch StartGameNotification and MusicPlaylist to use it. This allows timing sensitive traits that want to run right at the end of loading to fire reliably and with minimal delay. The player perception of hearing the notification and being able to interact is now much snappier.
2023-11-12 20:18:41 +02:00
RoosterDragon
57a452a705 Ensure PerfHistory is reset when starting a new game.
Ensure stale perf history data, to ensure the data is useful and the perf graph widget displays useful information.
- Remove stale data from the previous game when starting a new game. This avoids the graph showing values from the previous game when a new game starts.
- Remove data that was collected during loading. This avoids displaying data points that were collected whilst the loading screen was visible. Data collected whilst loading is not relevant to the in-game performance graph.

The performance graph when starting a new game will now display accurate information from the first tick of the game, whereas previously it displayed some stale information as well.
2023-11-12 20:18:41 +02:00
Gustas
144e716cdf Add vote kick 2023-09-27 10:41:13 +03:00
Gustas
686040a316 Turn ModelRenderer and VoxelCache into traits 2023-09-23 19:12:51 +02:00
RoosterDragon
93a97d5d6f Fix CA1851, assume_method_enumerates_parameters = true 2023-08-20 20:41:27 +02:00
Matthias Mailänder
68eec52cef Add TranslationProvider 2023-04-22 19:23:41 +02:00
RoosterDragon
8a285f9b19 Fix IDE0090 2023-04-08 16:51:51 +03:00
RoosterDragon
023d80b94d Fix IDE0057 2023-04-08 16:51:51 +03:00
Paul Chote
f0cf728825 Dispose SequenceSet when we're done with it.
Utility rules that do something on a map and exit
are left without explicit disposing, as they will
be cleaned up immediately anyway.
2023-03-10 20:11:33 +02:00
RoosterDragon
939f715e3c Fix IDE0053 2023-03-07 13:18:13 +02:00
RoosterDragon
d4135d608e Fix IDE0039 2023-02-27 10:09:11 +01:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Paul Chote
80945cd08a Report CPU arch in logs and sysinfo. 2022-12-23 12:54:06 +02:00
Ivaylo Draganov
a0f17b15ec Refactor translation files
- Add prefixes to all message keys to provide context
- Use messages with attributes for some UI elements (dropdowns, dialogs, checkboxes, menus)
- Rename some class fields for consistency with translation keys
2022-12-19 22:04:54 +13:00
Matthias Mailänder
760a1245c5 Mark non-moddable translation strings as constant. 2022-12-07 18:40:26 +02:00
Matthias Mailänder
44aaf4dd07 Localise text notifications. 2022-10-21 17:08:16 +02:00
reaperrr
145f6abc09 Add option to limit render fps to game tick rate
This helps slow systems that struggle to render 2 frames per game tick.
2022-09-04 17:00:37 +03:00
Gustas
6bcf194874 Add map update tracking to MapCache and fix crash when restarting a game 2022-07-17 22:23:13 +02:00
tomas
5f4ed5f16b Update TextNotificationsManager to use Ui.Send 2022-07-15 19:19:09 +03:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Paul Chote
a152bf7324 Replace custom mono defines with toolchain-provided defines. 2022-04-24 20:31:47 +02:00
Matthias Mailänder
648c56bca1 Don't crash when joining a game after asset installation. 2022-04-17 00:27:36 +03:00
Matthias Mailänder
0f90713aba Added addition error logging to graphics.log when SDL fails 2022-04-16 22:37:05 +02:00
RoosterDragon
9cd55df584 Ensure editorconfig naming styles align with StyleCop SA13XX style rules.
Aligns the naming conventions defined in editorconfig (dotnet_naming_style, dotnet_naming_symbols, dotnet_naming_rule) which are reported under the IDE1006 rule with the existing StyleCop rules from the SA13XX range.

This ensures the two rulesets agree when rejecting and accepting naming conventions within the IDE, with a few edges cases where only one ruleset can enforce the convention. IDE1006 allows use to specify a naming convention for type parameters, const locals and protected readonly fields which SA13XX cannot enforce. Some StyleCop SA13XX rules such as SA1309 'Field names should not begin with underscore' are not possible to enforce with the naming rules of IDE1006.

Therefore we enable the IDE1006 as a build time warning to enforce conventions and extend them. We disable SA13XX rules that can now be covered by IDE1006 to avoid double-reporting but leave the remaining SA13XX rules that cover additional cases enabled.

We also re-enable the SA1311 rule convention but enforce it via IDE1006, requiring some violations to be fixed or duplication of existing suppressions. Most violations fixes are trivial renames with the following exception. In ActorInitializer.cs, we prefer to make the fields private instead. ValueActorInit provides a publicly accessible property for access and OwnerInit provides a publicly accessible method. Health.cs is adjusted to access the property base instead when overriding. The reflection calls must be adjusted to target the base class specifically, as searching for a private field from the derived class will fail to locate it on the base class.

Unused suppressions were removed.
2022-02-07 19:14:45 +01:00
penev92
bf332b6619 Fixed fields missing the readonly modifier 2022-01-22 18:47:06 +00:00
Matthias Mailänder
07815143f1 Fix CA1825 warnings on empty array initialisation. 2021-12-06 13:19:28 +01:00
GeorgeD64
e00efbf53d Added map name support to Launch.Map command line parameter
Fixed code based on feedback

Replaced try/catch block with a null check and exception throw

Fixed code based on feedback

Fixed code based on feedback

Simplified Launch.Map parameter to use map name directly
2021-11-28 23:06:26 +01:00
abcdefg30
93c45255f1 Move a using into the Mono specific code path 2021-11-07 00:26:15 +01:00
Paul Chote
5d83706eae Require an explicit launch path for mod registrations.
This also removes a workaround that allowed the current mod to be
registered even if it defined a bogus path. Uses of Game.ExternalMods
should therefore always use TryGetValue and correctly handle it
returning false.
2021-11-06 11:21:13 +01:00
teinarss
1a56cee9a1 Add Tick scale plumbing 2021-10-26 22:40:15 +02:00
Paul Chote
2424ddc79a Move NetTickScale (now NetFrameInterval) control to the server. 2021-09-21 15:12:36 +02:00
Matthias Mailänder
f08a0b113e Allow mods to customize application title. 2021-09-19 22:29:50 +02:00
Vapre
5ae4662f08 RunUnsynced, do not recalculate sync hash on reentry. Cache debug settings. 2021-09-12 10:06:44 +02:00
abcdefg30
0b75991fbc Make the editor use an EchoConnection instead of a local server 2021-09-07 20:45:50 +02:00
Paul Chote
e0e219793f Fix shellmap OrderManager use after dispose. 2021-09-02 23:23:23 +02:00
Paul Chote
8f412f869d Move order latency control to the server. 2021-09-02 23:23:23 +02:00
teinarss
f3777a25e6 Refactor send and receive Orders loop 2021-07-10 23:35:47 +02:00
teinarss
5e1468facb Fix NRE with ConnectionStateChanged 2021-07-08 01:12:05 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00