Commit Graph

30648 Commits

Author SHA1 Message Date
dependabot[bot]
7cef83c51c Bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 14:40:21 +01:00
Gustas
493cf3f1eb Update TD map pool 2025-12-12 23:05:10 +00:00
Paul Chote
3c7389f582 Implement InstallShieldPackage.OpenPackage. 2025-12-12 12:39:21 +02:00
Paul Chote
374166e9d3 Add a minimal iso9660 package reader. 2025-12-12 12:39:21 +02:00
Paul Chote
31607bd0cf Stop passing around partially constructed ModData instances. 2025-12-12 12:32:10 +02:00
Paul Chote
2b6977d53f Remove legacy SpriteSequenceLoader metadata plumbing. 2025-12-12 12:32:10 +02:00
Paul Chote
a04cfaec78 Move GlobalModData state to ModData. 2025-12-12 12:32:10 +02:00
Paul Chote
13313b4270 Finish removing GraphicSettings.SheetSize/BatchSize. 2025-12-12 12:32:10 +02:00
Paul Chote
7175e9062d Initialize mod using its manifest. 2025-12-12 12:32:10 +02:00
Paul Chote
94177848a8 Remove CursorProvider. 2025-12-12 12:32:10 +02:00
RoosterDragon
9e548fd0f0 Freeze non-mutable readonly static dictionaries.
Since these will live for the lifetime of the process, it is worth freezing them on creation to improve lookup performance. If the dictionaries were iterated, change to an immutable array instead to preserve the order.
2025-12-12 09:51:27 +02:00
Gustas
f4eb5739d6 Fix PauseShellmap not pausing 2025-12-10 21:42:34 +00:00
Paul Chote
637d8689f5 Fix invalid cast. 2025-12-08 21:37:57 +02:00
Gustas
a3ee6645c1 Fix units being picked up when they no longer want it 2025-12-08 18:04:01 +00:00
RoosterDragon
649e7e8c28 Change classes that use FieldLoader to use read-only collections. 2025-12-08 17:39:28 +00:00
RoosterDragon
797c71e500 Add FieldLoader/Saver support for ImmutableArray, FrozenSet, FrozenDictionary.
As config is often meant to be loaded and then never modified, it is helpful to support collections that are read-only after creation. This allows various classes that load config from YAML and elsewhere to deserialize straight into read-only collections and enforce invariants around data mutation.
2025-12-08 17:39:28 +00:00
Gustas
e53f2b6044 Fix templete palette overwrites not working 2025-12-08 17:32:05 +00:00
Gustas
2b2e2d6fe3 Fix itch integration ruining commander's name 2025-12-06 14:05:09 +02:00
Gustas
027e38ee69 Handle race conditions and manage package ownership 2025-12-05 18:17:15 +02:00
Gustas
9e926b0f53 Fix large dropdowns overlapping 2025-12-05 18:17:15 +02:00
Gustas
f9bce6252c Don't generate maps when not needed 2025-12-05 18:17:15 +02:00
Gustas
dd1528bd4a No need for virtualization 2025-12-05 18:17:15 +02:00
Paul Chote
79567f3f8a Move content mod switching to IFileSystemExternalContent interface. 2025-12-04 14:01:46 +02:00
RoosterDragon
8b8651dcf7 Improve audio parsing performance.
- Improve the AudReader and WavReader by performing fewer, larger stream reads to consume bytes more efficiently.
- Improve ImaAdpcmReader.LoadImaAdpcmSound by accepting an output buffer rather than allocating a new array.
- Improve StreamExts.ReadAllBytes by using MemoryStream.CopyTo. This internally rents a much larger buffer from the array pool, allowing for fewer, larger stream reads.
2025-12-03 12:35:42 +02:00
Gustas
b429ca7879 Don't paste when empty 2025-12-02 22:05:38 +02:00
Gustas
1ad1d18abf Don't copy tiles when empty 2025-12-02 22:05:38 +02:00
Gustas
93602c7c95 Make copy paste message more accurate 2025-12-02 22:05:38 +02:00
dnqbob
62e692063a Add NewProductionChance so bot won't only build production when too much cash 2025-12-01 14:55:22 +02:00
Ashley Newson
9478548bdb Allow empty MultiBrush with Replaceability.Any
Painting a MultiBrush previously required it to be non-empty. When
using Replaceability.Any, this is unlikely to be the desire behavior,
as some utilities (such as the upcoming LatTiler and RampTiler) may
reasonably generate an empty MultiBrush as output.

This changes painting MultiBrushes using Replaceability.Any to be
effectively no-ops. The .Tile and .Actor cases still use checks, as
these still plausibly represent mistakes.
2025-12-01 14:07:28 +02:00
dnqbob
8dc75eec34 Allow bot repairs all buildings. 2025-12-01 14:00:02 +02:00
dnqbob
3e7e4df2ed Bot's GetNearbyIndicesThreat: fix the wrong parameter passing 2025-12-01 11:52:32 +02:00
Gustas
7e8f4a3479 Truncate less of the player name, adda tooltip 2025-11-24 17:43:12 +02:00
Gustas
86a4fb1d6f Fix illegal resources being placed by pasting 2025-11-24 17:41:06 +02:00
Gustas
5ff7c9f269 Fix scaling issues 2025-11-24 12:33:53 +02:00
Gustas
b340c42ab1 We get get sprites earlier 2025-11-24 12:33:53 +02:00
Gustas
ec7461f09f Remove redundant fields 2025-11-24 12:33:53 +02:00
RoosterDragon
ba632fbf8b Revert "In RemoveCellsFromPlayerShroud, don't call RemoveSource unless required."
This reverts commit 86b9227577.

This commit relied on the relationship not changing, but when a player is defeated their relationship can change due to becoming a spectator. This can cause a crash if the shroud is not removed. Revert the commit to resolve this crash.
2025-11-24 12:14:53 +02:00
Gustas
89a4823a83 Add a lint test for running update rules 2025-11-24 11:52:56 +02:00
Gustas
bd53aa734e Handle comments when merging yaml 2025-11-24 11:52:56 +02:00
Ashley Newson
cde5208c54 Add basic Path Tiling for TS
This introduces basic Path Tiler map editor tool functionality to TS
with some segmented MultiBrush definitions. The included MultiBrush
definitions cover both the Temperate and Snow tilesets's Beach, Cliff,
and WaterCliff tiles.

MultiBrush now incorporates Height and Ramp information. Some
associated Terraformer utilities are updated with the API surface
change.

There are some known limitations that are not addressed in this PR:
- The path laying UI doesn't account for the map's current heights.
- The preview does not use a correct height or Z-ordering.
2025-11-23 14:31:31 +02:00
RoosterDragon
e652f95be9 Remove Exts.Enum<T>
This functionality is now built in. We can rely on the built in functions rather than a custom class.
2025-11-23 13:34:31 +02:00
Ashley Newson
00cd438190 Create coordinate system conversion wrapper around Mirror
The Symmetry.Mirror enum was previously documented as defined in terms
of the WPos system, which happens to align with CPos for Rectangular
grid types. However, the existing code gets confused when attempting
to support RectangularIsometric, due to a lack of appropriate
conversion logic.

This change makes Mirror agnostic to specific coordinate systems and
introduces a WMirror wrapper that provides getters for the correct
Mirror configuration given the coordinate system being used.
2025-11-23 13:25:49 +02:00
Ashley Newson
91ddfd6fc1 Fix various map generator bounds and size related issues
- If generating a RectangularIsometric map via lobby, make the height
  twice the width so that the map is approximately world-square.
- Use equal top and bottom cordons for RectangularIsometric maps.
- Change some map bounds checking.
- Check that actors are at least partially inside map.Contains before
  placing. (To avoid frozen actor crashes.)
- Fix editor generated map blitting for RectangularIsometric.
2025-11-23 13:16:29 +02:00
dependabot[bot]
915ad36ddc Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 15:03:29 +01:00
Ashley Newson
56e6a9e6dc Improve MultiBrush collection shorthands
This expands upon the limited FromTemplates MultiBrush collection
shorthand:

- Adds a corresponding FromActors shorthand.
- Allows FromTemplates and FromActors to mix in additional properties,
  such as weights and backing tiles.
- Updates the MultiBrush collections used across the official mods to
  make use of these shorthands.

Note that this reorders some MultiBrush definitions for
conciseness. This partially (cosmetically) re-randomizes map generator
output.
2025-11-16 21:01:29 +02:00
RoosterDragon
bc1a901f54 Add tests for FieldLoader and FieldSaver
Test coverage for these classes will help prevent regressions. Major breaking changes are avoided since config files may already rely on various aspects of the behaviour, but some small breaking changes are made:

- Use `value.Split(Comma, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)` consistently for all comma-separated parsing.
- Rename LoadField to LoadFieldOrProperty for clarity - since this is the one method that cares about properties in a class otherwise focused only on fields.
- Use TryParse instead of Parse and ensure to call InvalidValueAction from all parsers so we throw the intended exception when badly formatted data is encountered.
- BooleanExpression/IntegerExpression exception message updated to align with the generic one.
- Remove FromYamlKey, and update the only user SkirmishLogic to perform this logic manually instead.
- Remove unused includePrivateByDefault parameter on GetTypeLoadInfo.
- Remove unused AllowEmptyEntriesAttribute.
2025-11-16 20:52:54 +02:00
RoosterDragon
7d0340ad41 Add new .NET 10 rules to editorconfig. 2025-11-16 20:29:21 +02:00
RoosterDragon
42ac32dace Fix CA1515 2025-11-16 20:29:21 +02:00
RoosterDragon
24c19f64c9 Fix IDE0350 2025-11-16 20:29:21 +02:00
RoosterDragon
af326bfeb8 Fix IDE0031 2025-11-16 20:29:21 +02:00