Commit Graph

30479 Commits

Author SHA1 Message Date
Matthias Mailänder
88043e297b Allow IDumpSheetsTerrainInfo to be implemented by thirdparties. 2025-07-24 18:56:14 +03:00
Matthias Mailänder
f416e123f0 Replace custom JSON with MiniYAML. 2025-07-24 16:26:32 +03:00
Matthias Mailänder
ec206dc359 Fix serialisation from dictionary. 2025-07-24 16:26:32 +03:00
Ivan Perez
25be2149c1 Fixed bug where infinite production queue does not notify on ready 2025-07-24 12:29:16 +03:00
Paul Chote
44c6747dec Replace ITileCache with IDumpSheetsTerrainInfo. 2025-07-21 22:10:30 +03:00
Matthias Mailänder
5d8e35088f Avoid one letter abbreviations for variables. 2025-07-21 15:25:24 +03:00
Matthias Mailänder
e61db3faea Don't hardcode implementations in interfaces. 2025-07-21 15:25:24 +03:00
darkademic
0fac8d0d31 Add script tags to map editor actor properties. 2025-07-21 14:57:51 +03:00
Matthias Mailänder
53f959e4bf Use name of for exceptions. 2025-07-21 14:11:42 +03:00
Vapre
a4966bc299 TraitContainer, use span to iterate actors and traits. 2025-07-17 18:58:17 +03:00
Matthias Mailänder
fa5a347d2e Drop dependency on Newtonsoft.Json 2025-07-17 18:50:11 +03:00
Matthias Mailänder
3ca951930e Fix AppImage build. 2025-07-17 18:47:48 +03:00
Ashley Newson
5f407211ac Add D2K random map generator
Adds a random map generator tailored for the Dune 2000 mod,
D2kMapGenerator.

This map generator has some limitations compared to the RA/CnC
map generator (ExperimentalMapGenerator):

- Symmetry is far less accurate for non-trivial rotations.
- No circular map shapes.
- Unplayable regions are not obstructed and no symmetry corrections
  are applied. This is partly due to mod limitations (e.g., no
  decorative actors), but I've also considered it less important.
- Somewhat higher map generation failure rates, due to more extreme
  play-space requirements.

In order to support the map generator, some additional features are
added to common map generation utilties:

- A "FromTemplates" MultiBrush collection shorthand.
- Path partitioning logic in Terraformer, use to split paths into
  multiple TilingPaths with different segment types.
2025-07-17 18:43:54 +03:00
Ashley Newson
484784bd4d Refine lobby map generation logic
In early iterations of the lobby map generation logic, a for loop was
used to retry map generation with alternative seeds in case it
failed. This seed randomization logic didn't exist in the final merged
version, but the for loop wasn't cleanup up, and ends up repeating any
map generation failures 5 times deterministically.

Additionally, the logic caught Exception instead of the more specific
MapGenerationException, which is the only exception that is expected
to arise in healthy builds/configurations (due to bad luck rather than
bugs).

This change:

- removes the for loop;

- only catches MapGenerationException;

- adjusts the user-visible failure message to reflect that trying
  again (without adjusting settings) is a valid course of action (now
  that it's not done internally);
2025-07-17 10:42:27 +03:00
darkademic
77baa7a35f Implement ScrollableLineGraphWidget. 2025-07-17 10:34:35 +03:00
darkademic
3a5358ad7c Copy LineGraphWidget. 2025-07-17 10:34:35 +03:00
JovialFeline
74ead504ec Use support sequences for scripted powers 2025-07-14 22:04:08 +03:00
michaeldgg2
8833e95f21 PBOG: remove the resource check and let IsCellBuildable() extension method handle it 2025-07-14 21:52:41 +03:00
michaeldgg2
d657a72107 Remove BuildingInfo.AllowPlacementOnResources and use TerrainTypes to check whether a building can be placed on particular cell 2025-07-14 21:52:41 +03:00
michaeldgg2
abc3a79330 ResourceLayer: use BuildingInfo.TerrainTypes to check, if a resource can be placed underneath the building 2025-07-14 21:52:41 +03:00
Ashley Newson
25571df2b6 Refactor ExperimentalMapGenerator into reusable methods
This change lifts large portions of ExperimentalMapGenerator's logic
into a new "Terraformer" class with highly documented methods that can
theoretically be used by alternative map generator classes. Some
additional refactoring may occur in future, subject to the practical
needs of additional map generators. ClearMapGenerator is also
simplified.

This is not a pure refactor and contains some algorithmic and
behavioral changes, as well as few minor bug fixes. Notably:

- The logic for obstructing unreachable water has been somewhat
  replaced.

- In CnC, where water is already unplayable, EMG no longer obstructs
  water. (RA still does, as water is playable there.)

- Mountain (cliff) generation is now somewhat more effective. This
  increases the number of cliffs seen on many presets. Settings should
  no longer use "Mountains: 1000".

- PlayableSpace logic has been consolidated into Terraformer.

- PlayableSpace.Playability no longer exists as PartiallyPlayable
  became redundant. Its uses have been replaced with a simple
  boolean. Consequently, some defunct code and configuration has been
  removed.

- Adjust MultiBrush replaceability contract painting behavior to be
  more intuitive.

- Fix off-by-one error in map bounds computation.

- Fix some usages of mixed up MersenneTwisters.
2025-07-14 20:09:10 +03:00
Matthias Mailänder
e4f289921c Drop dependency on Newtonsoft.Json 2025-07-14 16:09:36 +03:00
toasted-dev
444e849241 Changelog: Fix typos.
Updated the Chinook Transport helicopter's description to correct the spelling of "detachment".

Corrected the description of the mutated lifeform by changing "expose" to "exposed" for grammatical accuracy.
2025-07-14 15:50:33 +03:00
Vapre
2e3a30c9ca Fix error IDE0028: Collection initialization can be simplified. 2025-07-07 20:33:59 +03:00
N.N
18870cbb03 D2k Starport
- OG fly path and Frigate behaviour
- BulkProductionQueue
- ProductionStarport trait
- OG palette widget behavior for Bulk queue
- Purchase button for each BulkProduction
- Delivery timer for each BulkProduction
2025-06-30 20:19:21 +03:00
N.N
fcae6a26d1 D2k Multibrush 2025-06-30 19:44:36 +03:00
Vapre
aa05081636 DensePathGraph, only traverse layers if enabled for locomotor. 2025-06-30 18:36:44 +03:00
Михаил Васильев
368ac277d0 Fix typo in NOD08a mission description 2025-06-17 15:36:54 +03:00
Михаил Васильев
631cbb1421 Fix 07a mission description 2025-06-17 15:23:35 +03:00
Gustas
6fe039f62e Add cursors to dump sheets command 2025-06-14 16:43:30 +02:00
Gustas
f5ecb9ad99 Add tileset to dump sheets 2025-06-14 16:43:30 +02:00
Gustas
84378969c3 Make palettes and tilesets optional 2025-06-14 16:43:30 +02:00
Gustas
4c04d4fa30 Add death types 2025-06-14 16:12:36 +02:00
Gustas
abec71c42d Use common util and unseal class 2025-06-14 16:12:36 +02:00
Gustas
03c24da611 Give XP to minelayer 2025-06-14 13:22:49 +02:00
Gustas
4be3add30a Dispose of old update rules 2025-06-14 11:58:49 +02:00
Gustas
c27511dd66 Add colors to verbose utilities 2025-06-14 11:56:16 +02:00
Gustas
12cb5997f0 Print the list of warnings 2025-06-14 11:56:16 +02:00
Ashley Newson
ad19506836 Fix TilingPath bugs affecting unofficial mods
TilingPath had some bugs when working with single-point segments,
which exist outside of the official mods. This change fixes a few
problems:

- Avoid unbounded length zero-cost, zero-progression loops that could
  be formed by an arbitrary number of single-point corners. These
  could pop up arbitrarily in the middle of paths.
- Avoid zero-progression loops short-circuiting looped paths.
- Fix missing end type matching during back-tracing stage.
- Enhance lint check to ensure starts/ends have a valid directions.
- Remove some dead code.
2025-06-13 18:52:05 +03:00
Matthias Mailänder
0b13ee3e49 Update to lowest supported Windows server image. 2025-06-12 20:04:35 +03:00
Ashley Newson
c92a6be4af Respect MultiBrush weights when path tiling
Allows biasing path tiling towards or away from using certain
MultiBrushes using their existing weight property. Note that the
probability of brush selection depends on multiple factors, not just
their direct weight.
2025-06-08 16:29:03 +03:00
Ashley Newson
561466d822 Fix Path Tiling tool rally confusion and crash
If the path being planned by the Path Tiling tool overlaps itself such
that a later rally intersects an earlier line, attempting to interact
with this later rally caused the UI to instead select the rally
associated with the earlier line. This at best leads to user confusion
and at worst leads to a crash if they then drag the rally over another
rally.

This commit fixes the UI logic to correctly identify the rally being
clicked on.
2025-06-08 16:14:50 +03:00
Ashley Newson
c6ed381085 Remove empty Path Tiling Tool dropdown tooltips
I'd accidentally copy-pasted the wrong item template in the original
TilingPathToolLogic implementation. This change uses the normal
tooltipless LABEL_DROPDOWN_TEMPLATE.
2025-06-08 16:03:05 +03:00
Bryan Quigley
aae2ec109b Add 2 obstacles to europe to help AI
AI likes to make a naval building in the top right tiny water area.
This PR adds 2 rocks to that area blocking any building so the AI
is not going to waste time on it.
2025-06-08 15:58:18 +03:00
Ashley Newson
9c8470d18e Preview clipboard when copy-pasting in the map editor 2025-05-31 10:39:39 +03:00
Ashley Newson
c4332c808b Fix copy-paste editor crash for RectangularIsometric
EditorBlit was incorrectly using CellRegion.Contains instead of
CellRegion.CellCoords.Contains (i.e. CellCoordsRegion.Contains). This
resulted in a crash upon attempting to paste within the editor for
RectangularIsometric maps (such as in TS).

This change updates the code to use the correct region type and fixes
the crash.
2025-05-31 10:31:23 +03:00
JovialFeline
1cdc823bca Add The Tiberium Strain mission (CnC) 2025-05-30 16:10:51 +03:00
Ashley Newson
5c7188be81 Avoid denoising unbiased resources in map generator
Resource placement is usually biased by mpspawns or resources spawns
(mines or blossom trees), which feed into a mutilplier for the
resource noise. Previously, all cells outside of the circle of
influence of a bias source got a multiplier of zero, essentially
giving them no noise pattern. This could lead to ugly horizontal
streaks of resources for which the layout was determined only by the
internals of PriorityArray.

This change fixes this by ensuring the noise multiplier has a
baseline value of 1.
2025-05-30 15:31:19 +03:00
Ashley Newson
2a0e787ae7 Check for and fix non-unit MultiBrush segment steps
TilingPath's algorithms are designed on the assumption that MultiBrush
segments use unit steps in their point sequences. Non-unit
sequences can result in incorrect or suboptimal tilings.

This change ensures point sequences are validated for unit steps, and
fixes a non-compliant cliff tile across all tilesets.
2025-05-30 15:22:53 +03:00
Ashley Newson
7538943f59 Convert Direction.cs to enums and extensions
- Converts OpenRA.Mods.Common/MapGenerator/Direction.cs over to using
  Direction and DirectionMask enums
- Moves direction-related utilities into Exts classes.
- Simplifies some direction utility logic.

Only very small numerical precision behavioral changes.
2025-05-30 15:15:15 +03:00