Commit Graph

30312 Commits

Author SHA1 Message Date
Matthias Mailänder
d379258afb Define app brand colors. 2025-03-04 09:22:04 +02:00
Matthias Mailänder
e4ec2dfb4a Quiet the chocolatey install. 2025-03-04 09:10:35 +02:00
Paul Chote
e06d74b417 Simplify map generator naming. 2025-03-04 09:05:59 +02:00
Paul Chote
ab3b6a0e43 Cache Fluent queries. 2025-03-04 09:05:59 +02:00
Paul Chote
e022744b0a Remove Map requirement from IMapGeneratorInfo.GetSettings. 2025-03-04 09:05:59 +02:00
Paul Chote
23b7b56c28 Combine IMapGenerator interfaces.
This removes the need to instantiate a dummy
trait instance and is more idiomatic.
2025-03-04 09:05:59 +02:00
Gustas
7ee79a0e64 Additional punctuation fixup 2025-03-03 21:01:46 +00:00
test1232156
8f59ddff5d Remove unnecessary punctuation from descriptions 2025-03-02 18:58:18 +02:00
RoosterDragon
db90cfb259 Show current pan behaviour & zoom modifier in input settings.
Fixes regression from 0338258b45.
2025-03-02 11:04:05 +02:00
JovialFeline
c892666b8f Fix soviet-06 harvester production crash 2025-02-26 23:40:34 +02:00
Paul Chote
541cf3b720 Sanitize saved skirmish factions. 2025-02-22 15:31:51 +02:00
RoosterDragon
0338258b45 Fix IDE0200 2025-02-22 14:56:25 +02:00
RoosterDragon
ce3ad6fbb3 Some improvements for SpatiallyPartitioned.
- Tweak the Update and Remove methods to reduce the number of dictionary lookups required.
- Change the Update method to an indexer, this allows simplifying callers who wanted to AddOrUpdate a value.
- Implement IDictionary<T, Rectangle>, since the class already implements these semantics by providing a backing store of the bounds for each item.
- Clean up some naming to use the generic `item` instead of `actor`.
- Make the MutateBins action methods static.
2025-02-22 14:50:15 +02:00
RoosterDragon
1b2c119b58 Fix RCS1257, RCS1258, RCS1261, RCS1262, RCS1265, RCS1266, RCS1267 2025-02-22 14:35:57 +02:00
RoosterDragon
a324af1afd Fix CA2024 2025-02-21 16:07:56 +02:00
RoosterDragon
715d882456 Update LangVersion to C# 12.
Now that we have moved to net 8 from net 6, and with us no longer supporting the mono runtime, we can raise the C# version to match that supported by the net 8 runtime.

This unlocks C# 10, C# 11 and C# 12 features previously unavailable to us.
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-10
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-11
- https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-version-history#c-version-12

A newer version of StyleCop is required to avoid rules tripping up on the new syntax.

Enable a handful of style rules that don't have many violations.
2025-02-20 12:54:12 +02:00
Ashley Newson
39a7e477c6 Add tooltips to some map generator settings
Adds tooltip descriptions for a few map generator settings. The tooltips
are limited to dropdown choices. No tooltips are added for the options
containing the choices or any non-dropdown settings.

- Terrain type
- Bounds shape
- Buildings

The "Square" bounds shape is rephrased as "Rectangle" for consistency
with the added description.

This is UI-only change.
2025-02-20 12:49:16 +02:00
Gustas
85999d7a40 vs seems more standard 2025-02-19 21:01:26 +00:00
Gustas
6ac33befe5 Adjust to a 4 space standard 2025-02-19 20:50:36 +00:00
RoosterDragon
cfde11556f Enable Net 7 and Net 8 style rules. 2025-02-16 20:01:50 +02:00
Gustas
71ae0aedfb Add z offset to TeslaZap 2025-02-16 12:55:40 +01:00
Gustas
6193da6899 Allow passing map author as an argument 2025-02-16 12:50:28 +01:00
JovialFeline
459bbf0025 Annotate campaign.lua 2025-02-16 12:48:23 +01:00
RoosterDragon
96de59f75a Run spell check over solution. 2025-02-16 12:45:19 +01:00
Gustas
ebf90970b2 Re-add a mini lobby options menu to missionbrowser 2025-02-16 12:39:23 +01:00
Gustas
747f41a8c3 Tooltips should not have punctuation 2025-02-16 12:39:23 +01:00
RoosterDragon
639dc7c288 Fix a bad comparison against Target.Invalid.
Target.Invalid acts like a NaN, and will not compare equal with itself. Compare against the TargetType instead, which performs the intended comparison.
2025-02-15 13:22:23 +00:00
Gustas
6ee274be6b Update SDL to 2.32.0 2025-02-15 13:19:22 +00:00
Gustas
017e645557 Upgrade unit testing 2025-02-15 08:56:24 +00:00
Gustas
bcbf88719f Upgrade NuGet packages 2025-02-15 08:56:24 +00:00
michaeldgg2
81aa068b15 Upgrade to .NET 8.0 and remove/migrate obsolete stuff 2025-02-15 08:56:24 +00:00
michaeldgg2
2a3ef8f910 Drop win-x86 build 2025-02-15 08:56:24 +00:00
Ashley Newson
0d30b19b1b Remove fields, railmine, and snowhut from RA map generation 2025-02-11 12:57:04 +02:00
Ashley Newson
98fe3c98ab Refine civilian building placement and multibrushes 2025-02-11 12:57:04 +02:00
Ashley Newson
cc632660eb Add decorative civilian buildings to random maps
Allows the random map generator to optionally place civilian buildings
around the map for extra decoration. Buildings are placed last with
lowest priority to avoid competing for play area and resources.

Depends on #21738
2025-02-11 12:57:04 +02:00
Ashley Newson
1f65fd234b Use long in CellLayerUtils.CalibrateQuantileInPlace index calculation
This is similar to #21727, but in CellLayerUtils instead of MatrixUtils.
Note that the lack of long does not result in any overflows/crashes in
existing code, but can cause crashes for new features requiring larger
calculations.
2025-02-08 14:11:05 +02:00
JovialFeline
052c74e2d7 Add Lua documentation details 2025-02-08 14:02:12 +02:00
Ashley Newson
611ac8ce54 Add fuzzer for map generator testing
Adds a fuzzer that iterates through map generation settings combinations
to either discover crashes or measure the frequency of rejected maps.

All generated maps are in-memory only and discarded immediately after
generation.

Running the fuzzer on anything other than a small combination of
settings is time expensive. It is added only as a utility for manual
invocation and is not integrated into the regular set of tests.
2025-02-06 14:23:01 +02:00
Ashley Newson
c6d5a1a182 Yield focus for map generator text settings
Makes any selected text-based map generator settings (currently just the
seed input) yield keyboard focus when the user presses escape or enter.
2025-02-06 14:06:04 +02:00
Gustas
09259be796 Match the check inside .CenterPosition 2025-02-01 20:31:07 +00:00
Gustas
409efe7f4a Allow tileset to be entered in lower case 2025-02-01 20:22:43 +00:00
Gustas
0ea4bb10a1 Fix utility commands losing data 2025-02-01 20:22:43 +00:00
Gustas
56109b0ca1 Fix bot harvesters crashing 2025-02-01 17:39:40 +02:00
Ashley Newson
1fda679b9f Refine map generator spawn placement rules
Spawn generation generally tries to place spawns:

- In spacious areas
- Away from the center (true center or mirror lines)
- Away from a symmetry-projected spawn
- Away from previously placed spawns

This commit introduces the following adjustments:

- The spacing between sequentially placed spawns is relaxed.
- Fix spawn mines contributing too much to the space reservation.
- Factor rotations into anti-center biasing calculation.
- Preserve spacing information in center space fallback decisions.
- Use a linear (instead of binary) falloff for anti-center biasing.
- Enforce that spawns have a minimum buildable area around them.
- Enforce that symmetry-projected spawns have as much separation as
  sequentially placed spawns would.
- Allow spawns on or near roads.
2025-01-31 13:58:20 +02:00
JovialFeline
440987c0a4 Fix unrepairable desert bridge 2025-01-30 14:10:09 +02:00
Ashley Newson
cdbcfb9e20 Fix illegal ore rings popping up around spawns in generated maps
Reorders and groups selective clearing of the resource placement plan to
-int.MaxValue to avoid subsequent code from inappropriately trying to
use it in arithmetic, which may just underflow to some completely wrong
value and lead to resources in illegal places.
2025-01-29 13:34:49 +02:00
Ashley Newson
19585ec7ac Fix overflow when calculating array quantile index
Fixes a crash which happens when trying to generate very large maps,
such as 256x256.

```
Exception of type `System.IndexOutOfRangeException`: Index was outside the bounds of the array.
   at OpenRA.Mods.Common.MapGenerator.MatrixUtils.CalibrateQuantileInPlace(Matrix`1 matrix, Int32 target, Int32 count, Int32 outOf) in /home/ashley/devel/OpenRA/OpenRA.Mods.Common/MapGenerator/MatrixUtils.cs:line 719
   at OpenRA.Mods.Common.Traits.RaMapGenerator.Generate(Map map, MiniYaml settings) in /home/ashley/devel/OpenRA/OpenRA.Mods.Common/Traits/World/RaMapGenerator.cs:line 755
...
```
2025-01-28 22:10:52 +02:00
JovialFeline
ddfdfcfee3 D2k shellmap: Hide pickup indicators 2025-01-28 19:04:04 +02:00
JovialFeline
49fd39b4b6 Fix some campaign Fluent keys 2025-01-28 18:57:39 +02:00
JovialFeline
55787fb7b7 Restore StartGameNotification in missions 2025-01-28 16:23:23 +02:00