Commit Graph

7210 Commits

Author SHA1 Message Date
RoosterDragon
d83e579dfe Fix CA1305 2023-08-07 21:38:09 +02:00
RoosterDragon
486a07602b Fix CA1304 2023-08-07 21:38:09 +02:00
RoosterDragon
949ba589c0 MiniYaml becomes an immutable data structure.
This changeset is motivated by a simple concept - get rid of the MiniYaml.Clone and MiniYamlNode.Clone methods to avoid deep copying yaml trees during merging. MiniYaml becoming immutable allows the merge function to reuse existing yaml trees rather than cloning them, saving on memory and improving merge performance. On initial loading the YAML for all maps is processed, so this provides a small reduction in initial loading time.

The rest of the changeset is dealing with the change in the exposed API surface. Some With* helper methods are introduced to allow creating new YAML from existing YAML. Areas of code that generated small amounts of YAML are able to transition directly to the immutable model without too much ceremony. Some use cases are far less ergonomic even with these helper methods and so a MiniYamlBuilder is introduced to retain mutable creation functionality. This allows those areas to continue to use the old mutable structures. The main users are the update rules and linting capabilities.
2023-08-07 21:57:10 +03:00
Matthias Mailänder
b6a5d19871 Evaluate read only dictionaries. 2023-08-06 17:12:34 +03:00
Gustas
9c3e366d03 Fix out of bounds cells not being randomised 2023-08-06 13:53:22 +02:00
Gustas
bb96e22e64 Fix low power notification never triggering 2023-08-05 19:03:15 +02:00
Gustas
a691f2ebac Give husks the ability to crush 2023-08-05 14:27:51 +02:00
Gustas
7638822e49 Disable force start panel start button when unable to start the game 2023-08-05 14:18:15 +02:00
Gustas
a9cf728ee1 Refactor MapPreviewLogic
and add a states for updating map via MapCache.GetUpdatedMap
2023-08-05 14:18:15 +02:00
Gustas
2c4a135c2b Grant condition to units closest to the crate 2023-08-05 13:32:51 +02:00
Gustas
d686634c0b Fix aircraft jittering 2023-08-05 13:27:32 +02:00
Matthias Mailänder
f2a242b09a Let all lobby sounds be optional. 2023-08-04 21:47:28 +03:00
Matthias Mailänder
a1efb28f0b Add lobby sounds for leave, join and option change 2023-08-04 21:47:28 +03:00
Gustas
31840328b7 Exit game save with escape 2023-08-03 15:49:33 +02:00
Gustas
54547a11d0 Trigger a button sound when saving a game with enter 2023-08-03 15:49:33 +02:00
Gustas
f99db8d754 Fix lua sanity check crashing on dedicated servers 2023-08-03 15:34:05 +02:00
Vapre
1ce916182d RingBuffer primitive. 2023-08-02 19:42:31 +03:00
dnqbob
2ac85ac61d Add InstantlyRepairsProperties 2023-08-01 12:21:19 +02:00
dnqbob
44e024a94e Make InstantRepair public 2023-08-01 12:21:19 +02:00
Gustas
462a3ef3c0 Make yaml node resolving optional 2023-07-30 20:39:21 +02:00
Gustas
d4e6815f64 Fix AutoTarget ignoring frozen actor bot targeting hack
Mirrors check of the function Recalculate which is found it TargetExtensions class
2023-07-30 20:32:18 +02:00
Gustas
723ffdf33d Revert Hunt to move within 2 cells of the target
Otherwise infantry get stuck within weapon range but outside of vision range
2023-07-30 20:26:41 +02:00
dnqbob
a3c5945f2a Set BackwardDuration to -1 means ignore the time and set MaxBackwardCells to -1 means ignore the distance. 2023-07-29 18:01:40 +03:00
dnqbob
d7ef22d64f Add MaxBackwardCells for moving backward control 2023-07-29 18:01:40 +03:00
michaeldgg2
d907192be0 Added GrantConditionOnMinelaying trait
Uses INotifyMineLaying callbacks
2023-07-28 12:55:06 +03:00
michaeldgg2
74f8db0578 LayMines: render minefield cells only if the planned minefield has more than 1 cell 2023-07-28 12:55:06 +03:00
Gustas
c093e7c90b Fix hunt incorrectly pathing to uncrushable targets 2023-07-27 16:14:29 +03:00
michaeldgg2
66cf912da0 LayMines: fixed occasional incorrect mine position when using BeginMinefield order
When laying mine with PreLayDelay > 0, end activity's tick immediately. That means don't try to immediately move to next cell.

This change unifies the behavior with scenario when a mine is laid without any PreLayDelay.
2023-07-26 22:05:42 +03:00
Gustas
42baa0c42f Rename update rule folder to 20230225 2023-07-26 20:00:54 +02:00
Gustas
305ba1c567 Add missing rule to UpdatePath 2023-07-26 20:00:54 +02:00
Gustas
a84b7591f6 Fix invalid color adjuster not considering saturation and V as mutable 2023-07-26 20:00:54 +02:00
Gustas
9d8f0634b1 Revert color validator 2023-07-26 20:00:54 +02:00
Gustas
4cd4e1f8ea Move PlayerExperience from Infiltrates to InfiltrateFor 2023-07-25 21:15:14 +02:00
Gustas
3207d01cf2 Consider AutoTarget ScanRadius when attack moving 2023-07-25 19:48:57 +02:00
Gustas
9fc0f79703 Add a description for AttackBomber 2023-07-25 13:11:17 +02:00
michaeldgg2
1a2d43fc99 WorldRenderer: use string.IsNullOrEmpty for check in Palette method
Unified usage of WorldRenderer.Palette method when it comes to appending player name (in case of player palette)
2023-07-25 13:33:11 +03:00
EoralMilk
b944b21325 Aircraft won't take off on terrain height change when idle 2023-07-25 12:48:50 +03:00
Gustas
c7e0bc4c08 Add missing carryall checks 2023-07-25 10:02:46 +03:00
Gustas
a69417f0a6 Fix caryall not removing influence when cargo dies 2023-07-25 10:02:46 +03:00
Gustas
c36609cc9f Don't call DetachCarryable every tick 2023-07-25 10:02:46 +03:00
Gustas
1edf313090 Don't calculate range when it is unused 2023-07-25 10:02:46 +03:00
Gustas
9caf12d133 Add an option to order maps by size 2023-07-17 23:34:38 +02:00
Gustas
de5bcbbca5 Add an option to order maps by title 2023-07-17 23:34:38 +02:00
michaeldgg2
8aa548f70c Minelayer: extract creating BeginMinefield order so it can be triggered from outside 2023-07-17 20:18:52 +02:00
michaeldgg2
ce6e73dc92 Minelayer: supports specifying both mine laying and post laying delays 2023-07-17 20:18:52 +02:00
RoosterDragon
58e8b123db Avoid some allocations during loading.
- In FieldLoader, cache boxed bools and some boxed ints.
- In FieldLoader, presize collections when parsing a List, HashSet or Dictionary.
- In FieldLoader, don't allocate a list of missing items until required.
- In FieldLoader, when a string value is passed, avoid wrapping this in a MiniYaml object by allowing both strings and yaml to be passed in the GetValue overload that does the real work.
- In Animation, avoid allocating no-op actions.
- In VxlReader, use EnsureCapcity to better size the Dictionary.
- In VxlReader change VxlElement to a struct.
- In Locomotor, presize TerrainSpeeds dictionary.
2023-07-16 23:21:20 +02:00
Gustas
659ec5e335 Make phase transport uncloak on loading cargo 2023-07-14 17:25:30 +02:00
michaeldgg2
433d69af7a Make Voiced trait conditional 2023-07-10 18:05:56 +03:00
RoosterDragon
1c0885c636 Improve loading performance for loader/compression classes.
- In RLEZerosCompression use dedicated Array.Clear method instead of open-coded loop.
- In VoxelLoader.GenerateSlicePlanes.Get use TryGetValue to avoid repeated array and dictionary lookups.
- In TmpTSLoader.UnpackTileData use ReadBytes to populate array with less overhead compared to repeated one byte reads.
- Resolve TODO in VqaVideo.
2023-07-07 22:36:54 +03:00
michaeldgg2
dccb3ce9ce Added extensibility points to LayMines activity:
Provides two callbacks using INotifyMineLaying interface: MineLaying (just before laying a mine), MineLaid after mine actor has been created (in FrameEndTask)
2023-07-04 23:52:25 +02:00