RoosterDragon
595717fff0
Enable Code Quality Rules
...
Enforces a variety of CAxxxx rules that do not have existing violations.
For the benefit of dotnet_code_quality.CA2241.try_determine_additional_string_formatting_methods_automatically = true, rename parameters of methods that forward to string.Format so format issues will get detected automatically.
2023-04-08 23:15:40 +02:00
RoosterDragon
14c0d011ea
Fix SA1414
2023-04-08 16:51:51 +03:00
RoosterDragon
a167f9680f
Fix SA1316
2023-04-08 16:51:51 +03:00
RoosterDragon
062dc2bd40
Fix SA1141
2023-04-08 16:51:51 +03:00
RoosterDragon
1ce9acd442
Fix IDE0110
2023-04-08 16:51:51 +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
bd2b3d9793
Fix IDE0074
2023-04-08 16:51:51 +03:00
RoosterDragon
cbd0583289
Fix IDE0062
2023-04-08 16:51:51 +03:00
RoosterDragon
023d80b94d
Fix IDE0057
2023-04-08 16:51:51 +03:00
RoosterDragon
5254348819
Fix IDE0056
2023-04-08 16:51:51 +03:00
Gustas
e4ba9733fe
Add sequences linting to ingame lobby
2023-04-07 16:23:30 +01: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
9dd4f938da
Cache reflection calls when running utility lints and commands.
...
Reduces runtime of --check-yaml command to 70% of original.
2023-04-05 00:25:32 +02:00
RoosterDragon
95f675becd
Improve performance of ActorInfo.TraitsInConstructOrder.
...
Avoid redundant enumerations of the more and unresolved enumerables. This gives an approx 3x speedup for this function.
2023-04-03 17:29:08 +03:00
RoosterDragon
dc40442118
Fix doc comment on CanKickClient.
2023-03-27 20:55:44 +02:00
Gustas
bf00577d33
Allow kicking dead players
2023-03-27 20:15:17 +02:00
RoosterDragon
8a4303cc94
Rework PriorityQueue for performance.
...
- Providing the comparer as a type argument that is a struct allows the calls to be devirtualised, leading to approx a 3x performance improvement.
- Use a single backing array, rather than a list of arrays.
2023-03-25 18:50:09 +01: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
RoosterDragon
98c4eaca83
Fix IDE0032
2023-03-14 13:41:25 +02: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
Paul Chote
c35ab081ff
Rewrite sequence loading logic.
...
Multiple layers of Lazy<T>ness are replaced with
an explicit two-part loading scheme.
Sequences are parsed immediately, without the need
for the sprite assets, and tell the SpriteCache
which frames they need. Use-cases that want the
actual sprites can then tell the SpriteCache to
load the frames and the sequences to resolve the
sprites.
2023-03-10 20:11:33 +02:00
Paul Chote
a6f3db0a45
Allow all sprites to use interpolated facings.
2023-03-10 20:11:33 +02:00
Paul Chote
b051211842
Remove internal state from ISpriteSequence API.
2023-03-10 20:11:33 +02:00
Paul Chote
7cd4272350
Access sequences from Map.
2023-03-10 20:11:33 +02:00
Gustas
dab3ca0025
Add support for dark player colors
2023-03-10 15:43:24 +02:00
RoosterDragon
939f715e3c
Fix IDE0053
2023-03-07 13:18:13 +02:00
RoosterDragon
c916a00624
Remove workaround for old versions of mono.
2023-03-07 12:51:06 +02:00
RoosterDragon
53e9f44972
Spelling fixes
2023-03-02 20:11:54 +02:00
RoosterDragon
52fd564eac
Fix some whitespace formatting issues: stray tabs or spaces.
...
Wrap some long lines on affected code.
2023-03-02 20:02:45 +02:00
Matthias Mailänder
edaf11cb89
Update thirdparty dependencies.
2023-03-01 23:52:59 +01:00
RoosterDragon
ad122c8e32
When running a server, don't load minimap previews into memory.
2023-03-02 00:13:46 +02:00
RoosterDragon
8ee6957e6a
Fix IDE0048
2023-03-01 21:56:28 +02:00
Gustas
422a228cea
Fix PlayerColorRemap expecting colors in linear space
...
PlayerColorRemap expected colors in linear space yet we provided them in gamma. We fix this by instead expecting gamma space colors and then converting them into linear space ourselves.
2023-02-28 23:26:37 +02:00
RoosterDragon
0b01b73111
Fix IDE0060
2023-02-28 21:21:40 +02:00
RoosterDragon
5b70d344cc
Fix IDE0038
2023-02-28 21:21:40 +02:00
RoosterDragon
71ce515d6d
Fix IDE0004
2023-02-28 21:21:40 +02:00
RoosterDragon
d4135d608e
Fix IDE0039
2023-02-27 10:09:11 +01:00
Gustas
e64c77fdde
Use pattern matching to avoid is check followed by a cast (with variable)
2023-02-27 08:36:47 +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
5a2a448c32
Fix IDE0250
2023-02-24 22:00:25 +02:00
RoosterDragon
bf960b6eae
Fix IDE0120
2023-02-24 22:00:25 +02:00
RoosterDragon
3402031399
Fix IDE0071
2023-02-24 22:00:25 +02:00
RoosterDragon
837c70f857
Fix IDE0061
2023-02-24 22:00:25 +02:00
RoosterDragon
2d4119e88d
Fix IDE0051
2023-02-24 22:00:25 +02:00
RoosterDragon
67ba3e55de
Fix IDE0020
2023-02-24 22:00:25 +02:00
RoosterDragon
b0dca05e50
Fix IDE0002
2023-02-24 22:00:25 +02:00
RoosterDragon
8b4500146f
Fix IDE0001
2023-02-24 22:00:25 +02:00
Andre Mohren
3f0c3a8b9c
Allow mods to control how looped sounds are used.
2023-02-18 16:18:20 +01:00