Commit Graph

7176 Commits

Author SHA1 Message Date
Matthias Mailänder
c9dddc342c Extract editor brush texts. 2023-05-23 19:45:15 +02:00
Matthias Mailänder
8433bc0948 Throw early when Lua function parameters are null. 2023-05-23 17:30:03 +03:00
RoosterDragon
2fe7e1bff9 Fix HierarchicalPathFinder pathing from inaccessible source locations.
When a search is initiated from an inaccessible source location, a path is still allowed if there is an adjacent, accessible location the unit can move into. The local pathfinder and HierarchicalPathFinder already account for this logic, but HPF has some bugs.

Firstly, when the HierarchicalPathFinder heuristic is being evaluated, it assumes all cells being explored are accessible - this is important for performance as it avoids constantly rechecking the accessibility of cells. Although this fact holds true for cells explored by the path search, it does not hold true for cells being added as the initial starting points of the search.

Secondly, when checking for adjacent locations to an inaccessible source cell, we checked only if these were still on the map. This is insufficient - we need to know if movement between the source cell and the adjacent cell is possible.

The fixes resolve this by:
- Teaching the heuristic an extra parameter to know if the location is known to be accessible. This allow an accessibility check to be performed for starting locations which stops HPF mistakenly assuming the abstract node for that location is the one we need to consider, and to correctly check the adjacent locations and their abstract nodes instead. The parameter means will can still skip the accessibility check in the typical case where the path search is being expanded, preserving performance.
- When adjacent cells are considered we now check if movement to them is possible. This stops HPF from allowing jumps over height discontinuities (i.e. no magically jumping up or down cliffs) and thinking a path is possible when it is not.
2023-05-21 16:56:16 +02:00
Matthias Mailänder
0fb5853b7a Fallback to normal difficulty when none is set. 2023-05-21 15:46:20 +03:00
Matthias Mailänder
b30285e38d Officially deprecate this function. 2023-05-21 15:46:20 +03:00
dnqbob
6af14c16c9 Fix a rare crash when actor in IBotRespondToAttack is dead 2023-05-21 10:40:21 +02:00
abcdefg30
6b536ca88a Add a Lua function to concat two tables 2023-05-20 18:56:58 +02:00
Matthias Mailänder
445b736885 Replace sandbox wrapper scripts. 2023-05-20 13:19:48 +02:00
dnqbob
e8dd85419f add Autocrusher for baby visc 2023-05-20 12:53:29 +02:00
Gustas
ade27ad8b9 Fail CI on lint warnings 2023-05-19 17:25:03 +02:00
Gustas
34bcae9abb Translation keys should not be required 2023-05-19 17:25:03 +02:00
Gustas
8894fdeaf9 Add map translation parse error linting 2023-05-19 17:25:03 +02:00
Gustas
b5ef9c29cf Improve spawnpoint lint 2023-05-19 17:25:03 +02:00
Gustas
f344ccb714 Improve visibility lint 2023-05-19 17:25:03 +02:00
Gustas
9b71317280 Improve lint error wording 2023-05-19 17:25:03 +02:00
Gustas
1ac6912c2a Fix lint error formatting 2023-05-19 17:25:03 +02:00
Gustas
3188532e59 Add punctuation to lint comments 2023-05-19 17:25:03 +02:00
abcdefg30
d9d8c23c63 Enable the restart button when we encounter a script error 2023-05-19 17:02:06 +02:00
IceReaper
0751b30d33 Fixed duplicate asset selection in asset browser. 2023-05-19 10:26:32 +03:00
abcdefg30
ce7f9e71c1 DefaultSpriteSequence: Avoid an extra allocation and LINQ when adding shadow frames 2023-05-16 22:57:33 +03:00
abcdefg30
05f21fcbe2 DefaultSpriteSequence: Merge if statements for readability 2023-05-16 22:57:33 +03:00
abcdefg30
00f2ba1a53 DefaultSpriteSequence: Remove redundant modulo operations
frame is already bounded by length.Value
2023-05-16 22:57:33 +03:00
abcdefg30
991e0a4c9a DefaultSpriteSequence: Use .Count == 0 over !.Any() 2023-05-16 22:57:33 +03:00
abcdefg30
aa28881726 DefaultSpriteSequence: Use List.Find instead of LINQ's FirstOrDefault 2023-05-16 22:57:33 +03:00
dnqbob
0d98405bdc Make ActorFacingModifier privately set 2023-05-11 17:27:18 +02:00
dnqbob
69441a4fee Add TurnsWhileMoving to Mobile 2023-05-11 17:27:18 +02:00
dnqbob
a65bb17d68 Cache the notifyAttacks in AttackGarrisoned 2023-05-09 22:49:41 +02:00
Matthias Mailänder
6e6bf1ca81 Translate labels with parameters. 2023-05-09 20:14:52 +03:00
RoosterDragon
0b4a54ab54 TechTree.GatherOwnedPrerequisites performance improvements.
- Consuming methods cared only about the count and not the actual actors, so only counts the actors rather that creating lists.
- ProvidesPrerequisites implementations return cached objects rather then allocating new enumerables on each call.
2023-05-06 20:07:35 +03:00
Matthias Mailänder
65c0cf1065 Deprecate string format shorthand. 2023-05-05 19:03:09 +02:00
Matthias Mailänder
1c2ce0dcc0 Deprecate string format log shorthand. 2023-05-05 19:03:09 +02:00
Matthias Mailänder
9e659cacf2 Fix rally point sprites not being truely optional. 2023-05-04 22:13:59 +03:00
Matthias Mailänder
c5e9567875 Fix a null reference exception upon empty Fluent strings. 2023-05-02 22:25:51 +02:00
Gustas
44f1af7059 Move TileScale to MapGrid 2023-05-02 16:37:30 +03:00
Matthias Mailänder
4f7a01a291 Localize difficulty settings. 2023-04-25 21:33:02 +03:00
Matthias Mailänder
af6330b1bd Allow localisation of dictionary values. 2023-04-25 21:33:02 +03:00
Matthias Mailänder
55ff0ac1f4 Inline variables. 2023-04-25 21:33:02 +03:00
Matthias Mailänder
0d36bc19c6 Document radar appear trait and fields. 2023-04-22 23:24:24 +02:00
Gustas
a9a7777293 Report linguini parse errors
Reports duplicate keys
2023-04-22 19:23:41 +02:00
Gustas
bf66068557 Add per map linting 2023-04-22 19:23:41 +02:00
Matthias Mailänder
68eec52cef Add TranslationProvider 2023-04-22 19:23:41 +02:00
Gustas
a065e6a47c Fix map level lobby options not being translated 2023-04-22 19:23:41 +02:00
Gustas
dc390a7301 Add IMove.MoveOntoTarget interface
In `TraitsInterfaces` we expose offset as WPos instead of CPos. In an upcoming PR we'll translate the same change to yaml.
2023-04-21 18:29:43 +02:00
Gustas
ad683d9226 Add MoveOnto Activity
No functional changes to `MoveWithinRange` nor `MoveAdjacentTo`. I've just
moved around code to for allow better overwriting.
2023-04-21 18:29:43 +02:00
Gustas
1c2eaa2654 Use nameof for ContrailEndColor description 2023-04-21 17:58:42 +02:00
Gustas
7ef1dccdcf Add ContrailEndWidth 2023-04-21 17:58:42 +02:00
RoosterDragon
7507333cd3 Fix missing Flags attribute on CABFlags enum. 2023-04-17 00:05:12 +02:00
RoosterDragon
a120b9d37e Fix CA2208 2023-04-17 00:05:12 +02:00
RoosterDragon
1b1b9dc29b Fix CA2215 2023-04-17 00:05:12 +02:00
RoosterDragon
ef04e2e1e8 Fix CA2019 2023-04-17 00:05:12 +02:00