Commit Graph

3490 Commits

Author SHA1 Message Date
Gustas
84e7eb144b Move RearmTick to Rearmable 2023-01-20 11:43:12 +02:00
Gustas
12af8506f8 Fix Rearmable using the wrong interface 2023-01-20 10:43:18 +02:00
Gustas
0d24f2c08b Merge INotifyBeingResupplied into INotifyDockClient 2023-01-20 10:43:18 +02:00
Gustas
dca07d240c Add INotifyDockHost and INotifyDockClient interfaces
Rename INotifyDocking to INotifyDockHost and extract INotifyDockClient from INotifyHarvesterAction
2023-01-20 10:43:18 +02:00
RoosterDragon
faf12f93a4 Fix Locomotor cache coherency for disabled or paused mobile actors.
The cache in Locomotor that is populated via the UpdateCellBlocking method disagreed with the non-cached logic of IsBlockedBy when dealing with Mobile actors. The cache determined an actor to be moving if it was both movable and had horizontal movement types. IsBlockedBy determined an actor to be moving if it had horizontal movement types, but did not check if it was movable. This difference in checks could allow a mobile trait that was disabled or paused and which had horizontal movement to be treated differently be the two methods. UpdateCellBlocking would consider it not moving due to the disabled/paused trait. IsBlockedBy would consider it moving as it didn't care about the disabled/paused state of the trait.

Now, we unify the two methods to consider a mobile trait that is disabled/paused as not moving. This prevents HierarchicalPathFinder from crashing on the inconsistent state, i.e. when asked to path search through a cell of a mobile unit which has disabled or paused movement, but which has horizontal movement types from prior movement.
2023-01-17 18:58:22 +01:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
penev92
5f80e93aee Added ITilesetSpecificPaletteInfo for linting 2023-01-10 16:36:36 +00:00
Paul Chote
6d438a9d61 Allow mods to customise the default rendering scale. 2022-12-31 17:11:03 +01:00
Gustas
34543e2952 Add an option to guarantee actors on sell 2022-12-31 16:51:26 +01:00
Matthias Mailänder
19ecddcd86 Enforce use of 'var' instead of explicit type. 2022-12-28 23:02:04 +01:00
Matthias Mailänder
943751547e Don't hardcode enemy aircraft ignorance. 2022-12-25 22:24:57 +01:00
Matthias Mailänder
24ed5f7a1a Add linting to AI squad manager types. 2022-12-25 22:24:57 +01:00
abcdefg30
5a12f44a25 Fix map actors not being spawned with the correct owner 2022-12-24 11:20:35 +02:00
Matthias Mailänder
5ffb564376 Fix invalid actors not spawning in-game. 2022-12-23 18:33:55 +01:00
Matthias Mailänder
6bcf2f718c In map editor replace invalid actor owners with neutral. 2022-12-23 18:33:55 +01:00
Gustas
f3e44094a1 Fix contrail using the wrong colors 2022-12-21 19:35:52 +02:00
RoosterDragon
f4965915ee Fix PathFinderOverlay crash when deselecting actor moving along waypoints.
Set an actor moving along several waypoints whilst the /path-debug command is active, then deselect the actor. Each waypoint will add more information to the debugging overlay until it crashes with "Maximum two records permitted." This resolves the crash by no longer adding new debugging information once the actor is deselected.
2022-12-20 13:23:32 +13:00
Ivaylo Draganov
a0f17b15ec Refactor translation files
- Add prefixes to all message keys to provide context
- Use messages with attributes for some UI elements (dropdowns, dialogs, checkboxes, menus)
- Rename some class fields for consistency with translation keys
2022-12-19 22:04:54 +13:00
Matthias Mailänder
46caa2d889 Make RenderShroud/JammerCircle conditional. 2022-12-19 20:03:40 +13:00
Ivaylo Draganov
8513de0b47 Fix error in PlayerResources trait documentation
This was missed in #19295
2022-12-16 12:14:54 +02:00
Ivaylo Draganov
e280e0f31c Use an overload that already passes the second argument as true 2022-12-15 23:28:46 +01:00
Gustas
2b57b6be1d Don't cancel attack move cursor when holding shift 2022-12-12 23:20:45 +01:00
Matthias Mailänder
8297fcff30 Expose lobby options to localisation. 2022-12-07 18:40:26 +02:00
Matthias Mailänder
760a1245c5 Mark non-moddable translation strings as constant. 2022-12-07 18:40:26 +02:00
dnqbob
6fbdc2c221 HarvesterBotModule should not command harvesters that cannot be ordered 2022-11-24 23:09:22 +01:00
Gustas
f7286b525c Move AbortOnResupply from AttackAircraft to AttackFollow 2022-11-17 20:42:47 +01:00
abcdefg30
e54b88a6cb Remove dead code inside SupportPower.cs 2022-11-16 20:45:33 +02:00
RoosterDragon
b8a71215eb Fix Locomotor IsMoving checks.
The Locomotor IsMoving check was allowing us to consider another actor that moving as not a blocker. However for some reason it also considered the actor trying to path being mobile as sufficient for this check to pass which did not make sense. We remove that extra check and inline the method.

This was a regression from 4a609bbee8 which changed the method from IsMovingInMyDirection (which required the lookup of the mobile trait) to just IsMoving. It should have removed the lookup as not required.

This fixes a crash in HPF which was considered the location as blocked when Locomotor considered it unblocked because the logic was not aligned. Removing this check aligns the logic and resolves the crash.
2022-11-15 15:42:02 +02:00
RoosterDragon
a85ac26367 Pathing considers reachability of source cells consistently.
Using the local pathfinder, you could not find a path to an unreachable destination cell, but it was possible to find a path from an unreachable source cell if there was a reachable cells adjacent to it.

The hierarchical pathfinder did not have this behaviour and considering an unreachable source cell to block attempts to find a path.

Now, we unify the pathfinders to use a consistent behaviour, allowing paths from unreachable source cells to be found.
2022-11-13 19:59:36 +01:00
ThomasChr
6c348620f3 Use Stop button on (production) buildings to reset rally point fixes #20414 2022-11-09 08:44:09 +02:00
Matthias Mailänder
81020e70fa Fix actors with immobile actors that don't occupy space
to be placed everywhere way outside the map boundaries.
2022-11-05 21:41:39 +01:00
dnqbob
583d85cc2e Allow weapons with no damage warheads to be fired 2022-10-30 14:38:16 +01:00
notsinned
5242716887 Fix for turret following invisible unit
Fixed turret tracking invisible units after being attacked

Fix for turret following invisible unit

Fix for turrent following invisible unit
2022-10-30 14:08:29 +01:00
Gustas
57143087d7 Fix Aircraft not updating influence when changing height
Occupied cells was defined by height yet we didn't update actor map on changing height. This in some scenarios could have caused the aircraft to forget to remove its influence from actor map
2022-10-30 14:01:32 +01:00
Matthias Mailänder
efe65701e4 Expose game speeds to localisation. 2022-10-27 23:30:19 +02:00
Matthias Mailänder
8f415bc7af Localize developer debug cheats. 2022-10-21 17:08:16 +02:00
Matthias Mailänder
44aaf4dd07 Localise text notifications. 2022-10-21 17:08:16 +02:00
abcdefg30
6e6c828c85 Fix SquadManagerBotModule caching in RenderDebugState 2022-10-14 13:50:57 +03:00
abcdefg30
d8349a429a Remove unnecessary uses of Exts.IsTraitEnabled 2022-10-14 13:50:57 +03:00
abcdefg30
75f642bd09 Introduce FirstEnabledConditionalTraitOrDefault 2022-10-14 13:50:57 +03:00
Gustas
858d782af1 Simplify 'default' expression (IDE0034) 2022-10-11 17:40:05 +02:00
Gustas
7f677f1842 Allow driving under crates and crushable units 2022-10-07 21:06:04 +02:00
Gustas
5abbdc37cb Revert "Fix crushables and crates causing HPF to crash."
This reverts commit 5765e51c56.
2022-10-07 21:06:04 +02:00
Gustas
043e6f662f Make demolition conditional 2022-10-04 21:55:17 +02:00
Matthias Mailänder
6bd631618c Remove unnecessary value assignment (IDE0059) 2022-10-01 14:15:33 +03:00
RoosterDragon
3c66ca709a Fix some bugs in LongBitSet
- Use LongBitSetAllocator and not BitSetAllocator. Using the wrong allocator means all string based checks and displays would provide incorrect results.
- Remove LongBitSetAllocator.Mask which wasn't being calculated or Reset correctly. We can use world.AllPlayersMask to provide the same effect at use sites.
2022-09-29 21:58:17 +02:00
RoosterDragon
5765e51c56 Fix crushables and crates causing HPF to crash.
When crushables and crates change their Location/TopLeft, their crushability is cached, but when their CenterPosition is changed, their cached crushability is not refreshed. Since their CrushableBy functions depends on IsAtGroundLevel, which depends on the CenterPosition, this means that when the crushability is cached it will depend on the current height of the object. If the height of the object changes, the cache is not refreshed and now contains out of date information.

The Locomotor cache and the HPF both cache this same information, but at different times. HPF caches immediately, but Locomotor caches on demand which means there can be a delay. This means they can have inconsistent, differing views of the crushability information. This eventually surfaces in a "The abstract path should never be searched for an unreachable point." error from HPF when it detects the inconsistency.

The bug is that Locomotor was caching information without refreshing it when required. Fixing this to refresh the cache when the CenterPosition changes is likely to have negative performance impacts. As would removing crushability from the cache. These would both be fixes that address the underlying bug.

The high impacts of a proper fix lead us to a workaround instead. If we set the CenterPosition before setting the Location, then when the Location is set and the caches are refreshed, the new CenterPosition is available when caching the crushability information. This means logic depending on IsAtGroundLevel will get the new information and cache a more up-to-date view of things. This means when changing both the CenterPosition and Location together we now cache correct information. However calls that set only the CenterPosition and not the Location can still result in a bad cache state. Although this is imperfect it is an improvement over current affairs, and has less impact.
2022-09-24 15:15:53 +02:00
Gustas
1809817b3f Add ContrailEndColor and Contrail transparency control 2022-09-24 13:19:22 +02:00
Gustas
56b665f243 Add TrailDelay to Contrail 2022-09-24 13:19:22 +02:00
Shrooblord
70771da45a don't notify players a Harvester is under attack when it's actually healing
Co-authored-by: Gustas <37534529+PunkPun@users.noreply.github.com>
2022-09-17 18:57:59 +02:00