Commit Graph

259 Commits

Author SHA1 Message Date
Gustas
7ef1dccdcf Add ContrailEndWidth 2023-04-21 17:58:42 +02:00
darkademic
265f915442 Resurrected old colour picker. 2023-04-08 18:05:20 +03:00
RoosterDragon
8a285f9b19 Fix IDE0090 2023-04-08 16:51:51 +03:00
RoosterDragon
164abfdae1 Fix IDE0083 2023-04-08 16:51:51 +03:00
RoosterDragon
023d80b94d Fix IDE0057 2023-04-08 16:51:51 +03:00
RoosterDragon
83561d639d Update LangVersion to C# 9.
mono was the bottleneck restricting our ability to use a newer C# version. mono 6.12 is currently available. Although poorly documented on their website, this supports C# 9. https://www.mono-project.com/docs/about-mono/versioning/#mono-source-versioning indicates mono 6.12 uses Roslyn 3.9.0. https://github.com/dotnet/roslyn/blob/main/docs/wiki/NuGet-packages.md#versioning indicates Roslyn 3.9.0 supports C# 9.

This unlocks C# 8 and C# 9 features previously unavailable to us.
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-80
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-9

A newer version of StyleCop is required to avoid rules tripping up on the new syntax. Currently only prerelease versions are available but their use is encouraged https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3420#issuecomment-994899135

Fix style rule violations on existing rules where the newer language version makes some existing casts redundant or allows use of the null coalescing assignment operator.
2023-04-05 15:27:41 +03:00
RoosterDragon
bcfa0c9ae9 Review StyleCop rules.
- Enforce SA1604 ElementDocumentationShouldHaveSummary.
- Enforce SA1629 DocumentationTextShouldEndWithAPeriod.
- Turn off some rules covered by IDExxxx rules.
- Remaining rules are treated as part of OpenRA style.
2023-03-18 12:46:10 +02:00
abcdefg30
cb8921dc22 Fix the sequence filename update rule node placement 2023-03-11 20:56:32 +01:00
Paul Chote
992ba1a9a2 Remove HasEmbeddedPalette from sequences. 2023-03-10 20:11:33 +02:00
Matthias Mailänder
37afd6094e Rename GiveMcvCrateAction to GiveBaseBuilderCrateAction. 2023-03-07 12:53:31 +02:00
RoosterDragon
53e9f44972 Spelling fixes 2023-03-02 20:11:54 +02:00
abcdefg30
65e28d5562 Retire the release-20200202 update path 2023-03-01 20:02:01 +01:00
RoosterDragon
555aac3f64 Fix IDE0042 2023-02-28 21:21:40 +02:00
Gustas
8d0fe52dd8 Remove unnecessary parentheses 2023-02-27 08:36:47 +02:00
Gustas
157d1b32dc Use null propagation 2023-02-27 08:36:47 +02:00
RoosterDragon
63aa34cb35 Fix CS1570 2023-02-24 22:00:25 +02:00
Gustas
049d0283f9 Remove TiberianSunRefinery
Also add IDockClientBody interface,
move WithDockingOverlay cnc -> common,
remove HarvesterDockSequence implementing classes
2023-02-18 16:35:15 +01:00
abcdefg30
4a554431ff Remove redundant jumps and other style nits from the update rules 2023-02-18 00:41:07 +02:00
michaeldgg2
ca7e7c2304 ProductionTabsWidget: allow specifying different panels for left/right scroll button and tab buttons. 2023-01-27 12:30:38 +02:00
Paul Chote
8be3ac863b Only update changed files when saving maps. 2023-01-27 07:43:25 +01:00
penev92
474de014f8 Move RenameEngineerRepair to its proper folder 2023-01-25 12:00:57 +01:00
Matthias Mailänder
f67b6f6cad Give EngineerRepair(able) more generic names 2023-01-24 23:26:14 +01:00
Paul Chote
5b8f148c50 Simplify tileset-specific sequence definitions.
All magic behaviour for constructing sprite filenames
has been removed in favour of an explicit Filename
(and TilesetFilenames for tileset-specific sequences)
property.
2023-01-22 22:10:48 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Gustas
80b92fb667 Fixed UnhardcodeBaseBuilderBotModule update rule
Update rules should should not read `modData.DefaultRules`
2023-01-10 18:02:24 +02:00
Gustas
29d21545a6 Fixed UnhardcodeSquadManager update rule
Update rules should should not read `modData.DefaultRules`
2023-01-10 18:02:24 +02:00
Paul Chote
129db98a2f Add BeforeUpdate* methods for update rules.
These make it possible to write more advanced update
rules that query state across multiple actors, or
based on resolved state.
2023-01-10 18:02:24 +02:00
penev92
15fe2d5594 Added an update rule for adding ControlGroups 2023-01-10 00:15:00 +01:00
penev92
e3e012a9ed Added an update rule for DomainIndex removal
Also for adding the new HPF-related PathFinderOverlay and HierarchicalPathFinderOverlay that were added at the same time.
2023-01-10 00:15:00 +01:00
Ivaylo Draganov
614603089e Define and measure duration for text notifications in milliseconds
During a game notification duration should be the same regardless of
game speed. Switch to using wall-clock time defined in milliseconds 
instead of game ticks. Also use the opportunity to rename the field 
to "Duration" because "RemoveTime" is not so clear.
2022-12-15 23:28:46 +01:00
Gustas
64908c8e70 Fix RenameContrailProperties UpdateRule 2022-11-03 23:35:57 +01:00
Matthias Mailänder
6bd631618c Remove unnecessary value assignment (IDE0059) 2022-10-01 14:15:33 +03:00
Gustas
1809817b3f Add ContrailEndColor and Contrail transparency control 2022-09-24 13:19:22 +02:00
RoosterDragon
70c2ec15d3 Change spaces to tabs.
To follow code style.
2022-09-19 23:36:30 +02:00
abcdefg30
f88b6d78ff Move update rules from 20201213 to 20210321 2022-09-10 17:52:19 +02:00
Mustafa Alperen Seki
54340591e3 Unhardcode VeteranProductionIconOverlay. 2022-08-16 15:08:51 +03:00
dnqbob
8d3ff9d2fc UnhardcodeBaseBuilderBotModule rule update 2022-08-03 11:22:59 +02:00
abcdefg30
90ea611cee Rename the 20201213 update rules directory to 20210321 2022-07-05 16:44:17 +02:00
Paul Chote
2037e37d4e Replace Sequence EmbeddedPalette with HasEmbeddedPalette. 2022-07-02 14:10:52 +03:00
penev92
07db77fb8d Fix RemoveTurnToDock update rule 2022-06-24 21:16:26 +01:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Eduardo Cáceres
cae43808d9 Optimize string comparison 2022-05-18 11:42:36 -05:00
Eduardo Cáceres
79f321cb44 .Any(), .Count() -> .Count or .Length 2022-05-18 11:42:36 -05:00
Matthias Mailänder
af3362c62f Use string.Contains(char) instead of string.Contains(string)
with single characters
2022-04-13 20:09:57 +02:00
Mustafa Alperen Seki
60b123c641 Split NukePower MissileImage from MissileWeapon. 2022-04-12 21:52:29 +02:00
abcdefg30
e685731b33 Add an update rule for the removal of AttackFrontal's FacingTolerance 2022-03-13 11:16:47 +01:00
dnqbob
6c33d47ef3 Update rule on renaming 'CloakTypes' to 'DetectionTypes' 2022-02-12 19:30:21 +01: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
abcdefg30
f3bc450e20 Fix an oversight in the update rule for AttackBomber's FacingTolerance 2022-01-11 18:09:05 +01:00
abcdefg30
6556b33cef Move update rules to the correct subfolders and paths 2022-01-11 18:09:05 +01:00