Commit Graph

71 Commits

Author SHA1 Message Date
dnqbob
ca8341d432 Avoid WaterCheck crash in base builder 2020-10-10 11:44:43 +02:00
reaperrr
8d1f72c104 Fix for SquadManagerBotModule
Aircraft and ships are immediately assigned a squad,
so adding them to `unitsHangingAroundTheBase` is bogus.
2020-10-04 00:31:35 +01:00
teinarss
9c4fd0e3d3 Use Null-Propagation Operator 2020-08-19 18:11:07 +01:00
teinarss
8d27d22100 Use discard syntax 2020-08-19 18:11:07 +01:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
Mustafa Alperen Seki
43388cb7fc Don't check HasAdequateRefineryCount if no RefineryTypes defined. 2020-08-05 11:29:22 +02:00
Mustafa Alperen Seki
4cc5104fde Unhardcode AI's MinimumRefineryCount numbers. 2020-08-05 11:29:22 +02:00
Matthias Mailänder
ea9992247d Reorder string placeholders. 2020-08-02 12:00:53 +02:00
Matthias Mailänder
b90fecff76 Remove the prefixed method name. 2020-08-02 12:00:53 +02:00
Matthias Mailänder
a4fc9fea3b Unify AIUtils.BotDebug prefixes. 2020-08-02 12:00:53 +02:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
darkademic
ae882b85a9 Make AI randomly scan map for targets for its air squads. 2020-07-02 23:05:49 +02:00
Alfred Lang
1c8c49dc8e Fix do allow AI do place plugbuildings like RBG Tower on GDI Component Tower 2020-06-27 10:35:06 +02:00
abcdefg30
27d0465891 Remove workarounds for querying the PlayerActor in Created 2020-05-30 19:47:29 +02:00
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
atlimit8
2dac16ee02 add SquadManagerBotModuleInfo.IgnoredEnemyTargetTypes 2020-05-17 22:02:32 +01:00
abcdefg30
10dc248f07 Remove unused usings from BaseBuilderBotModule 2020-05-02 14:05:44 -05:00
dnqbob
86394eb56c "FindEnemy" functions ignore hidden actors
(helped by reaperrr and abcdefg30)
2020-04-28 15:35:02 +02:00
dnqbob
2d7790f5e4 StateBase.cs modified:
1. Optimize & move "ammo" related function from "AirStates.cs" to StateBase.cs

2. Optimize & move "IsRearm" function from "AirStates.cs" to StateBase.cs, name changed to "IsRearming"

(optimized by reaperrr)
2020-04-28 15:35:02 +02:00
Paul Chote
b2f0ac15e8 Generalize RallyPointInfo.Offset to support arbitrary length paths. 2020-02-09 16:52:22 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
tovl
203fff0ab7 Allow queued structure rallypoints. 2019-12-13 23:51:03 +01:00
matjaeck
5ac9d2c2f1 Fix botmodules querying the Player actor before it is assigned. 2019-12-05 01:48:56 +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
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
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
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
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
Paul Chote
c30bb28210 Filter invalid actors when loading and saving games. 2019-10-05 17:50:10 +02:00
Paul Chote
3ad3c39b21 Replace actor list with count in UnitBuilderBotModule. 2019-10-05 17:50:10 +02:00
Paul Chote
865d8d77e0 Expire invalid instances from the SupportPowerBotModule cache. 2019-10-01 19:25:30 +02:00
Paul Chote
cf427f8cb3 Drop invalid power references when loading save games. 2019-10-01 19:25:30 +02:00
tovl
4a609bbee8 Allow units to give way when path is blocked by oncoming unit. 2019-09-15 17:51:34 +01:00
Paul Chote
815ea1e13b Make LastSearchFailed local to FindAndDeliverResources. 2019-08-25 17:20:38 +02:00
Paul Chote
8b0f2e1462 Fix NRE in SquadManagerBotModule. 2019-08-24 14:33:11 +02:00
tovl
8690a4a6ce CLean up type check in harvesterbotmodule. 2019-08-10 19:12:50 +01:00
tovl
1b4ab564fe Fix AI harvester not resuming after chronoshift. 2019-08-10 19:12:50 +01:00
teinarss
2ddf9fa826 Using Locomotor instead of Info for pathfinding 2019-07-26 15:54:22 +02:00
Paul Chote
674155a8dd Move ctor initializers to their own line. 2019-06-08 18:44:50 +02:00
Paul Chote
353db73381 Fix a collection of minor style violations.
This enables several new StyleCopAnalyzer rules to
be enabled immediately during migration.
2019-05-09 20:40:08 +02:00
Paul Chote
100ec17ef0 Implement IGameSaveTraitData on BotModules. 2019-05-05 09:30:58 +02:00
reaperrr
bc0d8ca015 Remove ResupplyAircraft and AllowYieldingReservation
The few extra things those two activities did can be done
in Resupply, making them redundant.
2019-04-29 01:40:52 +01:00
reaperrr
ba4b5738d7 Merge Rearm and Repair into Resupply activity
Allows parallel rearming and repairing.
2019-04-29 01:40:52 +01:00
tovl
ea4f24d0b7 Rework harvester automation. 2019-04-04 19:22:25 +02:00
Mustafa Alperen Seki
2aebb05cd0 Implement Building/UnitDelays 2019-03-14 01:36:44 +01:00
Paul Chote
c7d9d9613e Remove Order.TargetLocation from Harvester. 2019-03-04 18:08:42 +00:00
reaperrr
31f4b0a5c4 Fix D2k bots wasting cash on building repairs
D2k bots not repairing buildings when damaged due to placement
without concrete was intentional, and this was bleed's default behavior
before BuildingRepairBotModule got introduced, too.
2019-02-03 18:24:15 +01:00
Paul Chote
fd013ad9d0 Remove unnecessary trait queries from HarvesterBotModule 2019-02-03 15:54:07 +01:00
reaperrr
4da2d32bc5 Fix that bots don't re-use capturers
They were never removed from activeCapturers when their target becomes invalid,
preventing the bot from reusing them.
2019-02-03 12:12:34 +00:00