RoosterDragon
2ab3917f29
Clean up usage of DomainIndex
...
- When a path search is being performed the path search will not attempt route to inaccessible cells, so domain index checks to avoid inaccessible cells in the search predicate are redundant and can be removed.
- DomainIndex is a required world trait, so we don't need to use TraitOrDefault and therefore can avoid dealing with the null case.
2022-01-30 16:22:26 +01:00
penev92
0d24ccc47a
Fixed unnecessary zero-length array allocations
...
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
2022-01-20 22:10:28 +01:00
Mustafa Alperen Seki
d149624b84
Add Lua Scripting for Carryall.
2022-01-12 14:24:13 +01:00
Matthias Mailänder
b147da388a
Mark fields readonly.
2021-12-06 13:19:28 +01:00
Matthias Mailänder
9d905d8291
Remove unused parameters and variables.
2021-12-06 13:19:28 +01:00
Matthias Mailänder
07815143f1
Fix CA1825 warnings on empty array initialisation.
2021-12-06 13:19:28 +01:00
Matthias Mailänder
98b25ddd5e
Check for dead actors when searching for exits.
2021-11-18 20:52:05 +01:00
penev92
8ba6d13b2f
Removed unused using directives
2021-10-15 13:12:33 +02:00
RoosterDragon
df9398a871
Use named pathfinding constants.
...
- Rename CostForInvalidCell to PathCostForInvalidPath
- Add MovementCostForUnreachableCell
- Update usages of int.MaxValue and short.Maxvalue to use named constants where relevant.
- Update costs on ICustomMovementLayer to return short, for consistency with costs from Locomotor.
- Rename some methods to distinguish between path/movement cost.
2021-10-10 17:09:38 +02:00
abcdefg30
d370cb48c5
Remove unreachable code in TransformsIntoTransforms
2021-10-02 21:34:51 +01:00
Paul Chote
7f94d67d39
Replace Map.CustomTerrain radar colors with IRadarTerrainLayer.
...
* TSVeinsRenderer now shows border cells on the radar
* BuildableTerrainLayer now uses the radar colors defined on the individual tiles
* CliffBackImpassabilityLayer no longer overrides the underlying terrain color.
2021-08-21 14:16:02 +02:00
Paul Chote
b08117dc93
Don't report "Primary Building Selected" when nothing changes.
2021-07-29 16:19:53 +02:00
Paul Chote
99322cee8f
Set the closest production to Primary when force-targeting rallypoints.
2021-07-29 16:19:53 +02:00
Andre Mohren
6810469634
Updated copyright years.
2021-06-29 18:33:21 -05:00
abc013
8fede9d6ba
Add ValidStances checks to BlocksProjectiles and Gate.
2021-05-27 21:37:37 +02:00
Matthias Mailänder
6876fe45e1
Use nameof for additional robustness in trait documentation.
2021-05-22 23:22:31 +01:00
teinarss
10676be377
Replace F extension with string interpolation
2021-05-08 22:20:59 +02:00
Paul Chote
8d2ec78713
Replace TerrainType.CustomCursor with Mobile.TerrainCursors.
2021-05-04 11:56:23 +02:00
Paul Chote
01371f2c65
Expose TransformsIntoAircraft move cursor to yaml.
2021-05-04 11:56:23 +02:00
Matthias Mailänder
5a0bcc01a6
Add a lint check for trait placement on hardcoded actor names.
2021-04-11 20:20:00 +02:00
Paul Chote
a1df91b665
Allow BuildingInfluence to track overlapping buildings in the same cell.
2021-04-10 14:28:31 +02:00
Paul Chote
bc286b78bf
Add AnyBuildingAt method to BuildingInfluence.
2021-04-10 14:28:31 +02:00
Paul Chote
19c7e14393
Simplify BuildingInfo.IsCloseEnoughToBase adjacency checks.
2021-04-10 14:28:31 +02:00
teinarss
8b0a3ea680
Remove our own impl of ReadOnlyList and update usages
2021-04-03 11:33:31 +02:00
teinarss
e12ff2c59d
Remove our own ReadOnlyDictionary and update usages
2021-04-03 11:33:31 +02:00
teinarss
d60c05eff3
Change to use pattern matching
2021-03-27 17:29:20 +01:00
Matthias Mailänder
bbbed49f82
Add a lint check for cursor definitions.
2021-03-20 17:37:16 +01:00
Paul Chote
0bdd46451e
Overhaul resource layer logic:
...
* ResourceType trait has been removed.
* Simulation-related data is now defined on the
ResourceLayer (which mods can subclass/replace).
* Support non-money resources by moving the resource
values to the PlayerResources trait.
* Allow mods to disable the neighbour density override
and instead always use the map-defined densities.
* Allow mods to define their own resource placement
logic (e.g. allow resources on slopes) by subclassing
(Editor)ResourceLayer.
* Improve ability to subclass/override ResourceRenderer
by exposing more virtual methods.
2021-03-20 16:45:41 +01:00
Paul Chote
80e92849da
Replace ResourceType with strings in interfaces/public methods.
2021-03-20 16:45:41 +01:00
Paul Chote
dcd8eccee4
Replace ResourceLayer references with IResourceLayer in traits/warheads.
2021-03-20 16:45:41 +01:00
Paul Chote
1dc26a9b8e
Pass resource type and count to IAcceptResources instead of the value.
2021-03-20 16:45:41 +01:00
Paul Chote
d52ba83f96
Replace terniary null checks with coalescing.
2021-03-08 18:11:25 +01:00
teinarss
4a1e4f3e16
Use expression body syntax
2021-03-07 13:00:52 +00:00
teinarss
53b781960c
Change FieldLoader.LoadUsing to use nameof
2021-02-28 18:43:51 +01:00
Paul Chote
0975102e92
Add Alpha support to sequences.
...
Alpha can specify a single value for the sequence
or values for each frame in the sequence.
AlphaFade: True can be specified to linearly fade
to transparent over the length of the animation.
2021-02-24 19:20:48 +01:00
Paul Chote
d09476c603
Remove custom palettes from building placement previews.
2021-02-12 02:08:30 +01:00
Paul Chote
82a9809192
Remove RenderSprites.Scale.
2021-01-21 18:22:11 +01:00
Paul Chote
53db1230ab
Move default tileset parsing to Mods.Common.
2021-01-11 21:57:55 +01:00
Paul Chote
2782620081
Add ITemplatedTerrainInfo interface.
2021-01-11 21:57:55 +01:00
Paul Chote
87790069e9
Add ITerrainInfo interface.
2021-01-11 21:57:55 +01:00
Paul Chote
0a374e2264
Move ownership of tile sprites to the terrain renderer.
2021-01-11 21:57:55 +01:00
Paul Chote
8edd9de278
Replace ITintableRenderable with IModifyableRenderable.
2021-01-06 00:06:51 +01:00
Paul Chote
b88495c689
Remove palettes from base IRenderable.
2021-01-06 00:06:51 +01:00
Paul Chote
2fee62af4d
Fix exit priority ordering.
2021-01-02 15:43:03 +01:00
Paul Chote
7a256dcafa
Fix rally point target line exit display.
2020-12-11 17:25:30 +01:00
Paul Chote
5a2f91be1c
Fix building bibs not blocking placement.
2020-12-05 17:06:04 +00:00
Paul Chote
582e2774ac
Revert "Remove BuildingInfluence from building adjacency check."
...
This reverts commit 33a1ca5965d10079f89bd9aa1e33f1b07db72a48.
2020-12-05 17:06:04 +00:00
Paul Chote
5a52ce5330
Revert "Remove BuildingInfluence trait."
...
This reverts commit 34bf14332887267e206d217956aab143720fc87d.
2020-12-05 17:06:04 +00:00
Paul Chote
da5c94858f
Evaluate exit distance from the exit cell instead of the spawn position.
2020-12-01 22:35:43 +01:00
Paul Chote
3b1f4ba07f
Fix production exit desync.
2020-11-28 17:49:36 +01:00