Commit Graph

7210 Commits

Author SHA1 Message Date
dnqbob
98160512b8 Fix LeavesTrails add effect at where actor removed 2023-10-21 22:21:12 +03:00
Gustas
cbd6b67456 Add automated chrome string extractor. 2023-10-21 19:35:00 +02:00
Gustas
1f0e73906e Fix static linting 2023-10-21 19:35:00 +02:00
dnqbob
3bc4a6c9dc Add GrantConditionWhenDock pair 2023-10-21 19:47:28 +03:00
dnqbob
8b96b75960 LeavesTrails only works when actor inworld 2023-10-21 18:43:45 +02:00
dnqbob
d69dbd2793 FloatingSpriteEmitter only works when actor inworld 2023-10-21 18:43:45 +02:00
Jakub Vesely
cd5eb89ebc TS: EMP Cannon should only be able to fire via the support power. Fixes #20828 2023-10-21 18:36:48 +02:00
Paul Chote
20c683fb4f Enforce stricter checks on sequence Facings. 2023-10-21 18:23:37 +03:00
dnqbob
c427e24360 DetectCloaked: actor should be in world 2023-10-17 20:17:26 +03:00
Gustas
feced5505a Remove the possibility of ReloadDelay becoming 0 with modifiers 2023-10-17 14:18:35 +02:00
Pavel Penev
806eebd269 Deprecated DateTimeGlobal.IsHalloween 2023-10-17 14:04:39 +02:00
Pavel Penev
b394e15998 Added current datetime properties to the Lua API
Also deprecated the IsHalloween property in favour of them.
2023-10-17 14:04:39 +02:00
Pavel Penev
7515c180b9 Added missing deprecation notices to Lua docs 2023-10-16 19:48:03 +02:00
Pavel Penev
c0f3f97811 Suppressed unused function parameter warning 2023-10-14 22:12:47 +02:00
Pavel Penev
4e72026ff9 Fixed table fields all being treated as readonly
A recent update in the Lua extension makes it consider all fields that are defined as table entries annotated with @type to be readonly (providing a somewhat misleading warning saying that they don't exist). Defining them as @field annotations on the class makes it tread them normally.
This affects ScriptActorProperties and ScriptPlayerProperties.
2023-10-14 22:12:47 +02:00
Pavel Penev
74df2d22da Fixed initTable warnings about missing properties
The Lua extension would report missing/uninitialized fields on actor creation because it thought they were required. This makes them all optional, except for OwnerInit, which is special.
2023-10-14 22:12:47 +02:00
dnqbob
68d053336b Fix AutoCrusher uneffective. 2023-10-14 20:39:12 +03:00
abcdefg30
876b66b295 Fix AutoCrusher not being conditional 2023-10-13 15:38:36 +03:00
abcdefg30
5eb6ba6e5c Revert "Remove an outdated comment from AutoCrusher.cs"
This reverts commit c8779e2a6b
2023-10-13 15:38:36 +03:00
abcdefg30
1dc14ed9f1 Make AutoCrusher aware of Cloak and Disguise 2023-10-13 15:38:36 +03:00
dnqbob
13a6e027ef Add LandOffset for ProductionAirdrop 2023-10-13 14:41:23 +03:00
dnqbob
fc77c3ce48 Add LandingTick to ProductionAirdrop 2023-10-13 14:41:23 +03:00
abcdefg30
85c8f6c446 Fix ProductionBar visually glitching for units without value 2023-10-11 12:10:05 +03:00
abcdefg30
c8779e2a6b Remove an outdated comment from AutoCrusher.cs 2023-10-10 14:44:00 +03:00
dnqbob
b55606c37f ReinforceWithTransport: no hardcoded land facing 2023-10-09 19:16:56 +03:00
michaeldgg2
12fb091bbc Added callback in Passenger during unload from cargo just before the actor is added back to the world 2023-10-09 18:21:04 +03:00
dnqbob
bc37d7169d GrantConditionOnDeployWithCharge requires no IMove 2023-10-09 17:59:49 +03:00
michaeldgg2
9ae26f2645 FireWarheads: play weapon report sound in Tick() not in FrameEndTask 2023-10-09 17:55:31 +03:00
michaeldgg2
6367729f98 Remove redundant dependency of FireWarheads on IMove 2023-10-09 17:55:31 +03:00
abcdefg30
9f96d0c772 Add NotBefore<SpawnStartingUnitsInfo> to LuaScriptInfo 2023-10-06 15:01:46 +03:00
Gustas
d5c940ba4c Close the ingame menu upon voting 2023-09-27 10:41:13 +03:00
Gustas
144e716cdf Add vote kick 2023-09-27 10:41:13 +03:00
Gustas
686040a316 Turn ModelRenderer and VoxelCache into traits 2023-09-23 19:12:51 +02:00
Gustas
d427072cc9 Extract StoresResources from Harvester 2023-09-23 19:06:07 +02:00
Gustas
60a446123b Fix TakeOffOnCreation 2023-09-23 18:39:58 +02:00
Gustas
4dec79a5fb Fix Armament not working properly with value 0 in BurstDelays 2023-09-23 14:33:27 +02:00
RoosterDragon
b7e0ed9b87 Improve lookups of nodes by key in MiniYaml.
When handling the Nodes collection in MiniYaml, individual nodes are located via one of two methods:

// Lookup a single key with linear search.
var node = yaml.Nodes.FirstOrDefault(n => n.Key == "SomeKey");

// Convert to dictionary, expecting many key lookups.
var dict = nodes.ToDictionary();

// Lookup a single key in the dictionary.
var node = dict["SomeKey"];

To simplify lookup of individual keys via linear search, provide helper methods NodeWithKeyOrDefault and NodeWithKey. These helpers do the equivalent of Single{OrDefault} searches. Whilst this requires checking the whole list, it provides a useful correctness check. Two duplicated keys in TS yaml are fixed as a result. We can also optimize the helpers to not use LINQ, avoiding allocation of the delegate to search for a key.

Adjust existing code to use either lnear searches or dictionary lookups based on whether it will be resolving many keys. Resolving few keys can be done with linear searches to avoid building a dictionary. Resolving many keys should be done with a dictionary to avoid quaradtic runtime from repeated linear searches.
2023-09-23 14:31:04 +02:00
Gustas
90aeb38427 Fix potential crash if attempted to unload outside of the map 2023-09-23 13:34:44 +02:00
Gustas
6040187844 Fix CurrentAdjacentCells cache not acting as a cache 2023-09-23 13:34:44 +02:00
Gustas
e72d0ed2c6 Nudge self after being ejected 2023-09-23 13:34:44 +02:00
Gustas
c3b4e2b237 Fix EjectOnDeath checks 2023-09-23 13:34:44 +02:00
Gustas
b25146265d Fix units considering terrain when entering other actors 2023-09-22 17:06:00 +02:00
Gustas
29eaab59be Add backup ExplicitSequenceFilenames to update rules 2023-09-18 11:05:19 +03:00
Avlas
bdcf754d34 Bullet explodes on impact when hitting target 2023-09-14 16:39:02 +03:00
RoosterDragon
a67e85e092 Improve AI squad pathing and regrouping behavior.
Ensure the target location can be pathed to by all units in the squad, so the squad won't get stuck if some units can't make it. Improve the choice of leader for the squad. We attempt to a choose a leader whose locomotor is the most restrictive in terms of passable terrain. This maximises the chance that the squad will be able to follow the leader along the path to the target. We also keep this choice of leader as the squad advances, this avoids the squad constantly switching leaders and regrouping backwards in some cases.
2023-09-11 14:56:59 +03:00
dnqbob
24536fa296 Fix Air Squad danger detection broken in RA 2023-09-11 14:33:32 +03:00
dnqbob
38ed21edd2 StateBase: More accurate way to check rearming 2023-09-11 14:33:32 +03:00
dnqbob
5d2f2bdd1d Add TraitLocation to all bot modules. 2023-09-11 14:33:32 +03:00
Gustas
4eb683ab46 Add TS mobile EMP 2023-09-09 16:53:22 +02:00
Gustas
9d7feb176a Add offset to WithVoxelBody 2023-09-09 16:53:22 +02:00