Commit Graph

30715 Commits

Author SHA1 Message Date
Matthias Mailänder
a542767720 Deduplicate replay translation strings. 2026-01-19 14:47:35 +02:00
Paul Chote
c3f902ebcf Fix sequence lint checks for map-defined actors. 2026-01-19 14:32:30 +02:00
Paul Chote
34e1e05dd8 Revise several TD encyclopedia images. 2026-01-13 11:56:16 +02:00
Ashley Newson
df20709158 Rename "Experimental" map generator to "Classic"
Renames the "Experimental" map generator to "Classic" in internal
code, configuration, and user-facing text.

Additionally, replace the user-facing names for the Experimental and
D2K map generators (as seen in the map editor tools dropdown) with
"Map Generator".
2026-01-12 22:23:50 +02:00
Ashley Newson
2cf2d7eed7 Place map generator spawns more intuitively
The map generators previously placed spawns in an order that was
somewhat arbitrary and unintuitive to users.

This change provides and makes use of a Terraformer utility to reorder
spawns, based on their location, so that they typically make more
sense to users selecting spawns from a lobby.

Added to ExperimentalMapGenerator (RA, CnC), and D2kMapGenerator.

Note that as this changes the output of the map generator for a given
selection of settings. (Replays using generated maps from older
versions will lose compatibility and no longer load.)
2026-01-12 16:22:36 +02:00
Gustas
1300ecc18f Fix TS copy paste 2026-01-04 12:58:59 +00:00
Gustas
dcd4c41d81 Transition blits to CellCoordsRegion 2026-01-04 12:58:59 +00:00
Dominic Renaud
032f20b622 Fix selection cursor behaviour
Fix erroneous minimap selection cursor when not in classic mode

Fix selection cursor not showing up with units selected when not in classic mouse style
2026-01-04 12:35:35 +00:00
Dominic Renaud
4c2f52a465 Fix playing sounds when not adding new units to selection 2026-01-04 12:35:35 +00:00
Dominic Renaud
f8eefe310c Add input style to match other, non-C&C, RTS games
Uses left-click for targeted orders (attack move, guard, selecting movement types from the command bar, etc.) and right-click for contextual ones. Works like basically all non-C&C games

Removed GameSettings.UseClassicMouseStyle, as it is replaced by MouseControlStyle


Changed Minelayer and Chronotank teleport to UnitOrderGenerator

Fixes bug with Modern controls issuing a move order cancelling a mine field order

Better organizes all unit orders into a single order generator base class, rather than having their logic spread across multiple base classes, which required some hacks to get the control logic to match
2026-01-04 12:35:35 +00:00
RoosterDragon
c47ebfbb52 Fix tileset templates to appear in the map editor in their order in YAML.
Fixes regression from 649e7e8c28. When the Templates was changed from a Dictionary to a FrozenDictionary, this caused the items to be reordered. Some code was relying on the previous behaviour where the Dictionary ordering would happen to remain the same as the YAML input.

Fix this by creating a TemplatesInDefinitionOrder which can be used to iterate in the same ordering as given in YAML. Code that depends on the ordering can use this, and other code that does lookups can use the FrozenDictionary.
2026-01-04 12:13:34 +00:00
Matthias Mailänder
2c0a4f5873 Extract briefings for localisation. 2026-01-03 11:31:48 +02:00
Matthias Mailänder
81147bc3f3 Externalize briefing strings. 2026-01-03 11:31:48 +02:00
dnqbob
efa673d999 BaseBuilderBotModule: add cash constrain on expansion 2026-01-03 11:22:18 +02:00
Paul Chote
9e1f7cad55 Fix duplicated text notifications when sound device is not available. 2026-01-01 18:05:56 +02:00
Gustas
9fccc35046 Add cancel and exit keybinds to selection 2026-01-01 12:47:51 +00:00
Gustas
afc6532aa8 Add more robust input handling 2026-01-01 12:47:51 +00:00
Gustas
8869533d07 Fix error label being mispositioned 2026-01-01 12:47:51 +00:00
Pavel Penev
b198eec753 Fixed ExtractSpriteSequenceDocsCommand properties
This broke when SpriteSequenceField became a record.
2025-12-31 11:28:21 +02:00
Pavel Penev
f590e806a1 Added filenames to enum documentation 2025-12-31 11:28:21 +02:00
Pavel Penev
3f53abc4c4 Misc housekeeping
These popped up while testing the trait documentation extraction.
2025-12-31 11:28:21 +02:00
Pavel Penev
5de04b0db9 Renamed Utilities -> UtiliyHelpers for readability 2025-12-31 11:28:21 +02:00
Pavel Penev
0c1875db07 Reworked source file name lookups from PDBs 2025-12-31 11:28:21 +02:00
Gustas
638c0d7db1 Fix menu effects ignoring annotations 2025-12-30 22:57:55 +00:00
Gustas
6e98d7f73e Make sure trimmed frames never have floating point offset frames 2025-12-30 22:48:07 +00:00
Gustas
ec7e5021ae Selection can be null 2025-12-30 22:39:24 +00:00
Ashley Newson
b2f32f8907 Add "Plots" terrain type for RA and CnC map generation
Some common feedback about preview generated maps is that they are too
chokey. This change aims to add a new terrain type called "Plots" that
retains the variety of terrain features present in the Gardens
terrain, but opens up the play area a bit more. In essence, it strikes
a balance between the densely packed Gardens terrain type and the
loosely packed Plains and Parks terrain types.

This new terrain type notably uses a smaller noise feature size to
provide smaller but more regular map structure, and expands the
pathway cutouts and contour spacings for forests and cliffs.

The new Plots terrain type is made available for both RA and CNC and
becomes the new default.

This is an additive configuration-only change. Replay and multiplayer
map generation retains forward/backward compatibility.
2025-12-30 09:21:09 +02:00
Gustas
ed3f809982 Fix animations having wrong offsets 2025-12-29 23:11:24 +00:00
Gustas
e5cca8d0b4 Fix d2k crash 2025-12-29 23:05:44 +00:00
Paul Chote
f173b6f604 Account for fractional offsets in world-px to view-px conversion. 2025-12-29 20:57:16 +02:00
Gustas
e495f4eca0 Fix empty move commands being commited 2025-12-29 18:03:40 +00:00
Gustas
c07af73eae Fix viewport zoom repositioning ignoring map bounds 2025-12-29 17:57:39 +00:00
Paul Chote
eb09870a10 Fix landing altitude checks.
Both GetPosition and LandPosition were trying to solve the problem
of dynamic altitude offsets for carryalls with different-sized cargo.

However, because they both apply the offsets, when the two are used
together the two sets of offsets cancel to 0, producing incorrect behaviour.

GetPosition is removed in favor of using CenterPosition with the dynamic
LandAltitude. Fly.Tick and Carryall ignore the z coordinate so their
behaviour is unchanged. Land and Aircraft.AtLandAltitude now return
the correct result.
2025-12-29 16:19:57 +02:00
Paul Chote
0f22e3d4e4 Fix mission options peeking below the FMV playback. 2025-12-29 15:13:56 +02:00
Paul Chote
af199a3a37 Remove long-obsolete reference to the mod chooser. 2025-12-29 15:13:56 +02:00
Paul Chote
330f438a18 Support [IncludeFluentReferences] on non-enumerable custom types. 2025-12-29 15:13:56 +02:00
Paul Chote
c7e67529b5 Expose SDL_OpenURL to mod code. 2025-12-29 15:13:56 +02:00
Paul Chote
de952e6caf Provide the manifest to IFileSystemLoader.Mount. 2025-12-29 15:13:56 +02:00
Paul Chote
2246922118 Fix lobby crash if a map's DefaultCash isn't Selectable. 2025-12-29 13:53:13 +02:00
Paul Chote
fdb4ce4e0f Save map generation args in replays/saves instead of full map. 2025-12-28 16:19:14 +02:00
Paul Chote
0d479e7c18 Move settings tabs to fluent. 2025-12-28 15:53:16 +02:00
Paul Chote
4436f07fbf Move settings to Gameplay tab. 2025-12-28 15:53:16 +02:00
Paul Chote
27fbd3ddeb Restore lobby UI when a force-start is rejected by the server. 2025-12-28 15:35:39 +02:00
Paul Chote
6ae03038cf Fix crash if the host force-starts a game while in the Invalid state. 2025-12-28 15:35:39 +02:00
Paul Chote
17210c1088 Fix Carryalls attempting to deliver units that they aren't carrying. 2025-12-28 15:07:46 +02:00
RoosterDragon
827f4682a5 ActorReference takes MiniYaml as input instead of a Dict.
As the InitDict is lazy, this removes the possibility for a mutable collection to be used but the values not to be consumed until later, which would be confusing. As all existing callers actually create a throw-away dictionary from MiniYaml, this is an easy switch.
2025-12-28 14:12:02 +02:00
RoosterDragon
a546ca2f92 Tweaks for map generator performance.
The map generator is already performant, but we can remove a few rough edges from infrastructure it interacts with.

- Add TypeDictionary constructor to clone from an existing copy. The map editor infrastructure relies heavily on cloning ActorReferences and the underlying dictionaries. A dedicated clone method avoids reflection overhead for CreateTypeContainer on a fresh instance.
- Use ThrowIndexOutOfRangeException helper. This allows the Index method to be inlined.
- Reuse lists in FloodFill. This avoids allocating and resizing new lists on each loop when we can reuse the existing capacity.
- Manage CellEntryChanged at the layer rather than individual previews. We only need to attach/detach from the delegate once at the layer, rather than many times as previews are added and removed.
2025-12-28 14:12:02 +02:00
RoosterDragon
3ea5b08848 Fix usage of MapGeneratorMultiChoiceOption.Default
When this switched to an ImmutableArray, this expression has to be updated as the struct is not nullable. It supports an overloaded equals (==) but not a null-conditional (?.) operator. This expression was rewritten incorrectly and failed to use the first valid choice as a fallback in all cases. Update the code to do this.

Fixes regression from 649e7e8c28.
2025-12-23 20:35:45 +02:00
Gustas
4aec67c0c6 Display map name first 2025-12-22 23:05:07 +00:00
Paul Chote
bca1dd599d Remove remaining non-fluent server->client messages. 2025-12-22 23:05:07 +00:00