Commit Graph

2915 Commits

Author SHA1 Message Date
tovl
203fff0ab7 Allow queued structure rallypoints. 2019-12-13 23:51:03 +01:00
tovl
3236499fb7 Increase IMove.MoveTo call flexibility. 2019-12-13 23:51:03 +01:00
Paul Chote
630ca0aefb Draw editor selection box using the UI renderers. 2019-12-11 11:02:04 +01:00
reaperrr
efc06a020b Move WithDeliveryAnimation to Mods.Common 2019-12-08 16:03:14 +00:00
reaperrr
fe1d3b3821 Move ProductionAirdrop to Mods.Common 2019-12-08 16:03:14 +00:00
abcdefg30
b1571ad17a Make Parachutable public 2019-12-05 23:13:35 +01:00
Paul Chote
2146dd29bb Add priority levels to Exit. 2019-12-05 18:01:09 +01:00
matjaeck
5ac9d2c2f1 Fix botmodules querying the Player actor before it is assigned. 2019-12-05 01:48:56 +01:00
reaperrr
c4597b5c6b Fix RA desert tree fire palette
By default WithDamageOverlay uses the actors'
palette, but RA's desert terrain uses the TD desert.pal
which isn't compatible with RA's fire animation shps.
2019-11-23 18:40:27 +01:00
abcdefg30
142f823e6f Explain that CanEnterCell ignores 'subCell' if there is a free subcell 2019-11-21 14:13:17 +01:00
abcdefg30
25b7386f0d Let Mobile's CanEnterCell consider ToSubCell 2019-11-21 14:13:17 +01:00
abcdefg30
4717e98c48 Add a subCell parameter to IPositionableInfo.CanEnterCell 2019-11-21 14:13:17 +01:00
abcdefg30
980c1e1b6a Fix McvManagerBotModule spamming deploy orders
Removes the 'activeMCVs' list since it was not useful.
The real bugfix is not iterating over 'activeMCVs' when issueing new orders
(this was previously needed for already discovered mcvs that stopped)
but over 'newMCVs' instead.
2019-11-20 16:44:39 +01:00
teinarss
a47f60d3a6 Add a trait PlayerRadarTerrain to track explored terrain 2019-11-20 16:24:56 +01:00
reaperrr
ee00954f2e Replace AmmoPool lookup methods with properties
And gave the more suitable names while at it.
This is more in line with how we do things in
other places.
2019-11-20 15:45:41 +01:00
teinarss
c77aa4c8f9 Add IsDead check to FerryUnit OnFirstRun 2019-11-19 15:59:27 +01:00
reaperrr
8181a452cb Fix some header dates
Seems these were overlooked or merged after
the dates of the other files were updated.
2019-11-17 22:32:51 +01:00
Paul Chote
f39b688c39 Add GrantPrerequisiteChargeDrainPower and DrainPrerequisitePowerOnDamage.
These traits implement the Firestorm defense charge/drain logic.
2019-11-17 17:06:29 +01:00
Paul Chote
1fa90c0474 Allow support powers to override the icon overlay/tooltip labels. 2019-11-17 17:06:29 +01:00
Paul Chote
70b020205d Rename *Time to *Ticks and increase internal resolution. 2019-11-17 17:06:29 +01:00
Paul Chote
e03abdc0da Add support for custom SupportPowerInstances. 2019-11-17 17:06:29 +01:00
Paul Chote
61c56dcb00 Fix DamageModifier crashes when an actor is demolished.
Demolish calls GetDamageModifier with a null Damage.
2019-11-17 17:06:29 +01:00
Paul Chote
6b1e81a7b5 Spawn ejected pilots inside a FrameEndTask. 2019-11-16 23:07:58 +01:00
RoosterDragon
04912ea996 Expose a setting for Weighted A*
Replace Constants.CellCost and Constants.DiagonalCellCost with a dynamically calculated value based on the lowest cost terrain to traverse. Using a fixed value meant the pathfinder heuristics would be incorrect.

In the four default mods, the minimum cost is in fact 100, not 125. This increase would essentially allow the pathfinder to return suboptimal paths up to 25% longer in the worst case, but it would be quicker to do so.

This is exactly what Weighted A* does - overestimate the heuristic by some factor in order to speed up the search by checking fewer routes. This makes the heuristic inadmissible and it may now return suboptimal paths, but their worst case length is bounded by the weight. A weight of 125% will never produce paths more than 25% longer than the shortest, optimal, path.

We set the default weight to 25% to effectively maintain the existing, suboptimal, behaviour due to the choice of the old constant - in future it may prove a useful tuning knob for performance.
2019-11-15 13:05:41 +01:00
blackhand1001
70b1df6ce7 Fix squadmanager adding naval units to ground attack forces.
Fix squadmanager adding naval units to ground attack forces. This was breaking the behavior of both naval and ground squads.
2019-11-09 11:19:09 +01:00
abcdefg30
a586f10875 Don't allow movement for actors without IMove
However, this does not check if any existing IMove traits are enabled.
2019-11-08 23:31:59 +01:00
abcdefg30
980c0c9cd4 Fix actors returning fire at invisible attackers 2019-11-08 23:31:59 +01:00
blackhand1001
d20182f158 Simplify for loop structure now that it only has one check
Simplify for loop structure now that it only has one check
2019-11-08 21:04:32 +01:00
blackhand1001
49d07e9d64 Fix MCV Manager glitch when restrict building area is enabled.
Fix MCV Manager glitch when restrict building area is enabled. It was checking if the location was close enough to the Base center instead of using the MCV Managers min and max ranges. This would cause it to often have no valid locations despite having a huge range.
2019-11-08 21:04:32 +01:00
matjaeck
ba73842747 Allow GrantCondition to grant conditions permanently. 2019-11-08 16:37:13 +01:00
Abdurrahmaan Iqbal
d2819dca77 Show dialogue only when there are unsaved changes 2019-11-07 20:33:43 +01:00
blackhand1001
780982dbe2 Add PlaceDefenseTowardsEnemyChance trait to basebuilderbotmodule
Add PlaceDefenseTowardsEnemyChance trait to basebuilderbotmodule. This defeaults to 100 which is the current behavior. This change now allows you to set the chance that bots will place defenses evenly around the base like the AI in stock red alert and Tiberian sun did.
2019-11-06 10:30:36 +01:00
reaperrr
2de51ae73c Cache IPathFinder in Mobile at creation
Avoiding look-ups on every move order,
as well as reducing line lengths.
2019-11-03 20:53:29 +01:00
Paul Chote
27205b30e5 Remove landing behaviour from force-move orders on selectable buildings. 2019-11-02 18:29:16 +00:00
Abdurrahmaan Iqbal
023750db06 Prevent showing wall connections in unexplored terrain 2019-11-01 22:13:38 +01:00
teinarss
c94cf61069 Fix OccupiedCells for units sharing cells 2019-10-31 21:49:07 +00:00
Paul Chote
5315f8603f Override selection if the mouse is over an already selected actor. 2019-10-30 14:53:23 +01:00
Paul Chote
0e4cb53ada Pass contextual information to TargetOverridesSelection. 2019-10-30 14:53:23 +01:00
Paul Chote
9d4f683d80 Remove WorldRenderer argument from InputOverridesSelection. 2019-10-30 14:53:23 +01:00
Paul Chote
230a0b330c Fix EjectOnDeath pilot spawning. 2019-10-29 23:03:11 +01:00
tovl
d2991247a3 Add separate condition to mobile for disabling nudging only. 2019-10-28 19:35:32 +01:00
tovl
38caadfdf0 Clean up nudging code. 2019-10-28 19:35:32 +01:00
tovl
c4d1468f62 Make locomotor cache and nudging logic aware of mobile trait status. 2019-10-28 19:35:32 +01:00
reaperrr
7e5b1abc0e Simplified initial Wanders countdown initialization
I don't see a technical reason for the old approach.
2019-10-27 18:03:34 +02:00
blackhand1001
9a9bf441ba Add UseResourceStorage trait to CashTrickler 2019-10-23 20:20:03 +02:00
Paul Chote
1599eac66c Rename SelectionBoxRenderable to SelectionBoxAnnotationRenderable. 2019-10-20 23:46:33 +02:00
Paul Chote
43e84c89ef Rename SelectionBarsRenderable to SelectionBarsAnnotationRenderable. 2019-10-20 23:46:33 +02:00
Paul Chote
8e280ef0a7 Rename RangeCircleRenderable to RangeCircleAnnotationRenderable. 2019-10-20 23:46:33 +02:00
Paul Chote
81d9b705a6 Rename DetectionCircleRenderable to DetectionCircleAnnotationRenderable. 2019-10-20 23:46:33 +02:00
Paul Chote
4ec0fa299d Rename TextRenderable to TextAnnotationRenderable. 2019-10-20 23:46:33 +02:00