Don't hardcode enemy aircraft ignorance.
This commit is contained in:
committed by
abcdefg30
parent
24ed5f7a1a
commit
943751547e
@@ -144,7 +144,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
// Use for proactive targeting.
|
// Use for proactive targeting.
|
||||||
public bool IsPreferredEnemyUnit(Actor a)
|
public bool IsPreferredEnemyUnit(Actor a)
|
||||||
{
|
{
|
||||||
if (a == null || a.IsDead || Player.RelationshipWith(a.Owner) != PlayerRelationship.Enemy || a.Info.HasTraitInfo<HuskInfo>() || a.Info.HasTraitInfo<AircraftInfo>())
|
if (a == null || a.IsDead || Player.RelationshipWith(a.Owner) != PlayerRelationship.Enemy || a.Info.HasTraitInfo<HuskInfo>())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var targetTypes = a.GetEnabledTargetTypes();
|
var targetTypes = a.GetEnabledTargetTypes();
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ Player:
|
|||||||
ConstructionYardTypes: fact
|
ConstructionYardTypes: fact
|
||||||
AirUnitsTypes: heli, orca
|
AirUnitsTypes: heli, orca
|
||||||
ProtectionTypes: fact, fact.gdi, fact.nod, nuke, nuk2, proc, silo, pyle, hand, afld, weap, hpad, hq, fix, eye, tmpl, gun, sam, obli, gtwr, atwr, mcv, harv, miss
|
ProtectionTypes: fact, fact.gdi, fact.nod, nuke, nuk2, proc, silo, pyle, hand, afld, weap, hpad, hq, fix, eye, tmpl, gun, sam, obli, gtwr, atwr, mcv, harv, miss
|
||||||
|
IgnoredEnemyTargetTypes: Air
|
||||||
UnitBuilderBotModule@cabal:
|
UnitBuilderBotModule@cabal:
|
||||||
RequiresCondition: enable-cabal-ai
|
RequiresCondition: enable-cabal-ai
|
||||||
UnitQueues: Vehicle.Nod, Vehicle.GDI, Infantry.Nod, Infantry.GDI, Aircraft.Nod, Aircraft.GDI
|
UnitQueues: Vehicle.Nod, Vehicle.GDI, Infantry.Nod, Infantry.GDI, Aircraft.Nod, Aircraft.GDI
|
||||||
@@ -259,6 +260,7 @@ Player:
|
|||||||
ConstructionYardTypes: fact
|
ConstructionYardTypes: fact
|
||||||
AirUnitsTypes: heli, orca
|
AirUnitsTypes: heli, orca
|
||||||
ProtectionTypes: fact, fact.gdi, fact.nod, nuke, nuk2, proc, silo, pyle, hand, afld, weap, hpad, hq, fix, eye, tmpl, gun, sam, obli, gtwr, atwr, mcv, harv, miss
|
ProtectionTypes: fact, fact.gdi, fact.nod, nuke, nuk2, proc, silo, pyle, hand, afld, weap, hpad, hq, fix, eye, tmpl, gun, sam, obli, gtwr, atwr, mcv, harv, miss
|
||||||
|
IgnoredEnemyTargetTypes: Air
|
||||||
UnitBuilderBotModule@watson:
|
UnitBuilderBotModule@watson:
|
||||||
RequiresCondition: enable-watson-ai
|
RequiresCondition: enable-watson-ai
|
||||||
UnitQueues: Vehicle.Nod, Vehicle.GDI, Infantry.Nod, Infantry.GDI, Aircraft.Nod, Aircraft.GDI
|
UnitQueues: Vehicle.Nod, Vehicle.GDI, Infantry.Nod, Infantry.GDI, Aircraft.Nod, Aircraft.GDI
|
||||||
@@ -290,6 +292,7 @@ Player:
|
|||||||
ConstructionYardTypes: fact
|
ConstructionYardTypes: fact
|
||||||
AirUnitsTypes: heli, orca
|
AirUnitsTypes: heli, orca
|
||||||
ProtectionTypes: fact, fact.gdi, fact.nod, nuke, nuk2, proc, silo, pyle, hand, afld, weap, hpad, hq, fix, eye, tmpl, gun, sam, obli, gtwr, atwr, mcv, harv, miss
|
ProtectionTypes: fact, fact.gdi, fact.nod, nuke, nuk2, proc, silo, pyle, hand, afld, weap, hpad, hq, fix, eye, tmpl, gun, sam, obli, gtwr, atwr, mcv, harv, miss
|
||||||
|
IgnoredEnemyTargetTypes: Air
|
||||||
UnitBuilderBotModule@hal9001:
|
UnitBuilderBotModule@hal9001:
|
||||||
RequiresCondition: enable-hal9001-ai
|
RequiresCondition: enable-hal9001-ai
|
||||||
UnitQueues: Vehicle.Nod, Vehicle.GDI, Infantry.Nod, Infantry.GDI, Aircraft.Nod, Aircraft.GDI
|
UnitQueues: Vehicle.Nod, Vehicle.GDI, Infantry.Nod, Infantry.GDI, Aircraft.Nod, Aircraft.GDI
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ Player:
|
|||||||
MaxBaseRadius: 40
|
MaxBaseRadius: 40
|
||||||
ExcludeFromSquadsTypes: harvester, mcv, carryall, carryall.reinforce, ornithopter
|
ExcludeFromSquadsTypes: harvester, mcv, carryall, carryall.reinforce, ornithopter
|
||||||
ConstructionYardTypes: construction_yard
|
ConstructionYardTypes: construction_yard
|
||||||
IgnoredEnemyTargetTypes: Creep
|
IgnoredEnemyTargetTypes: Creep, Air
|
||||||
ProtectionTypes: mcv, harvester, construction_yard, conyard.atreides, conyard.harkonnen, conyard.ordos, wind_trap, barracks, refinery, silo, light_factory, heavy_factory, outpost, starport, medium_gun_turret, large_gun_turret, repair_pad, high_tech_factory, research_centre, palace, mcv.starport, harvester.starport
|
ProtectionTypes: mcv, harvester, construction_yard, conyard.atreides, conyard.harkonnen, conyard.ordos, wind_trap, barracks, refinery, silo, light_factory, heavy_factory, outpost, starport, medium_gun_turret, large_gun_turret, repair_pad, high_tech_factory, research_centre, palace, mcv.starport, harvester.starport
|
||||||
UnitBuilderBotModule@omnius:
|
UnitBuilderBotModule@omnius:
|
||||||
RequiresCondition: enable-omnius-ai
|
RequiresCondition: enable-omnius-ai
|
||||||
@@ -269,7 +269,7 @@ Player:
|
|||||||
MaxBaseRadius: 40
|
MaxBaseRadius: 40
|
||||||
ExcludeFromSquadsTypes: harvester, mcv, carryall, carryall.reinforce, ornithopter
|
ExcludeFromSquadsTypes: harvester, mcv, carryall, carryall.reinforce, ornithopter
|
||||||
ConstructionYardTypes: construction_yard
|
ConstructionYardTypes: construction_yard
|
||||||
IgnoredEnemyTargetTypes: Creep
|
IgnoredEnemyTargetTypes: Creep, Air
|
||||||
ProtectionTypes: mcv, harvester, construction_yard, conyard.atreides, conyard.harkonnen, conyard.ordos, wind_trap, barracks, refinery, silo, light_factory, heavy_factory, outpost, starport, medium_gun_turret, large_gun_turret, repair_pad, high_tech_factory, research_centre, palace, mcv.starport, harvester.starport
|
ProtectionTypes: mcv, harvester, construction_yard, conyard.atreides, conyard.harkonnen, conyard.ordos, wind_trap, barracks, refinery, silo, light_factory, heavy_factory, outpost, starport, medium_gun_turret, large_gun_turret, repair_pad, high_tech_factory, research_centre, palace, mcv.starport, harvester.starport
|
||||||
UnitBuilderBotModule@vidious:
|
UnitBuilderBotModule@vidious:
|
||||||
RequiresCondition: enable-vidious-ai
|
RequiresCondition: enable-vidious-ai
|
||||||
@@ -309,7 +309,7 @@ Player:
|
|||||||
MaxBaseRadius: 40
|
MaxBaseRadius: 40
|
||||||
ExcludeFromSquadsTypes: harvester, mcv, carryall, carryall.reinforce, ornithopter
|
ExcludeFromSquadsTypes: harvester, mcv, carryall, carryall.reinforce, ornithopter
|
||||||
ConstructionYardTypes: construction_yard
|
ConstructionYardTypes: construction_yard
|
||||||
IgnoredEnemyTargetTypes: Creep
|
IgnoredEnemyTargetTypes: Creep, Air
|
||||||
ProtectionTypes: mcv, harvester, construction_yard, conyard.atreides, conyard.harkonnen, conyard.ordos, wind_trap, barracks, refinery, silo, light_factory, heavy_factory, outpost, starport, medium_gun_turret, large_gun_turret, repair_pad, high_tech_factory, research_centre, palace, mcv.starport, harvester.starport
|
ProtectionTypes: mcv, harvester, construction_yard, conyard.atreides, conyard.harkonnen, conyard.ordos, wind_trap, barracks, refinery, silo, light_factory, heavy_factory, outpost, starport, medium_gun_turret, large_gun_turret, repair_pad, high_tech_factory, research_centre, palace, mcv.starport, harvester.starport
|
||||||
UnitBuilderBotModule@gladius:
|
UnitBuilderBotModule@gladius:
|
||||||
RequiresCondition: enable-gladius-ai
|
RequiresCondition: enable-gladius-ai
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ Player:
|
|||||||
ExcludeFromSquadsTypes: harv, mcv
|
ExcludeFromSquadsTypes: harv, mcv
|
||||||
NavalUnitsTypes: dd, ca, lst, pt
|
NavalUnitsTypes: dd, ca, lst, pt
|
||||||
ConstructionYardTypes: fact
|
ConstructionYardTypes: fact
|
||||||
|
IgnoredEnemyTargetTypes: AirborneActor
|
||||||
UnitBuilderBotModule@campaign:
|
UnitBuilderBotModule@campaign:
|
||||||
RequiresCondition: ai-active
|
RequiresCondition: ai-active
|
||||||
UnitsToBuild:
|
UnitsToBuild:
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ Player:
|
|||||||
ConstructionYardTypes: fact
|
ConstructionYardTypes: fact
|
||||||
AirUnitsTypes: mig, yak, heli, hind, mh60
|
AirUnitsTypes: mig, yak, heli, hind, mh60
|
||||||
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
||||||
|
IgnoredEnemyTargetTypes: AirborneActor
|
||||||
McvManagerBotModule:
|
McvManagerBotModule:
|
||||||
RequiresCondition: enable-rush-ai || enable-normal-ai || enable-turtle-ai || enable-naval-ai
|
RequiresCondition: enable-rush-ai || enable-normal-ai || enable-turtle-ai || enable-naval-ai
|
||||||
McvTypes: mcv
|
McvTypes: mcv
|
||||||
@@ -323,6 +324,7 @@ Player:
|
|||||||
NavalProductionTypes: spen, syrd
|
NavalProductionTypes: spen, syrd
|
||||||
AirUnitsTypes: mig, yak, heli, hind, mh60
|
AirUnitsTypes: mig, yak, heli, hind, mh60
|
||||||
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
||||||
|
IgnoredEnemyTargetTypes: AirborneActor
|
||||||
UnitBuilderBotModule@normal:
|
UnitBuilderBotModule@normal:
|
||||||
RequiresCondition: enable-normal-ai
|
RequiresCondition: enable-normal-ai
|
||||||
UnitsToBuild:
|
UnitsToBuild:
|
||||||
@@ -367,6 +369,7 @@ Player:
|
|||||||
NavalProductionTypes: spen, syrd
|
NavalProductionTypes: spen, syrd
|
||||||
AirUnitsTypes: mig, yak, heli, hind, mh60
|
AirUnitsTypes: mig, yak, heli, hind, mh60
|
||||||
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
||||||
|
IgnoredEnemyTargetTypes: AirborneActor
|
||||||
UnitBuilderBotModule@turtle:
|
UnitBuilderBotModule@turtle:
|
||||||
RequiresCondition: enable-turtle-ai
|
RequiresCondition: enable-turtle-ai
|
||||||
UnitsToBuild:
|
UnitsToBuild:
|
||||||
@@ -411,6 +414,7 @@ Player:
|
|||||||
NavalProductionTypes: spen, syrd
|
NavalProductionTypes: spen, syrd
|
||||||
AirUnitsTypes: mig, yak, heli, hind, mh60
|
AirUnitsTypes: mig, yak, heli, hind, mh60
|
||||||
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
ProtectionTypes: harv, mcv, mslo, gap, spen, syrd, iron, pdox, tsla, agun, dome, pbox, hbox, gun, ftur, sam, atek, weap, fact, proc, silo, hpad, afld, afld.ukraine, powr, apwr, stek, barr, kenn, tent, fix, fpwr, tenf, syrf, spef, weaf, domf, fixf, fapw, atef, pdof, mslf, facf
|
||||||
|
IgnoredEnemyTargetTypes: AirborneActor
|
||||||
UnitBuilderBotModule@naval:
|
UnitBuilderBotModule@naval:
|
||||||
RequiresCondition: enable-naval-ai
|
RequiresCondition: enable-naval-ai
|
||||||
UnitsToBuild:
|
UnitsToBuild:
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ Player:
|
|||||||
ConstructionYardTypes: gacnst
|
ConstructionYardTypes: gacnst
|
||||||
AirUnitsTypes: orca, orcab, scrin, apache, jumpjet
|
AirUnitsTypes: orca, orcab, scrin, apache, jumpjet
|
||||||
ProtectionTypes: gapowr, gapowrup, gapile, gaweap, gahpad, gadept, garadr, gatech, gaplug, gagate_a, gagate_b, gactwr, gavulc, garock, gacsam, napowr, naapwr, nahand, naweap, nahpad, naradr, natech, nastlh, natmpl, namisl, nawast, nagate_a, nagate_b, nalasr, naobel, nasam, weed, gacnst, proc, gasilo, napuls, mcv, harv
|
ProtectionTypes: gapowr, gapowrup, gapile, gaweap, gahpad, gadept, garadr, gatech, gaplug, gagate_a, gagate_b, gactwr, gavulc, garock, gacsam, napowr, naapwr, nahand, naweap, nahpad, naradr, natech, nastlh, natmpl, namisl, nawast, nagate_a, nagate_b, nalasr, naobel, nasam, weed, gacnst, proc, gasilo, napuls, mcv, harv
|
||||||
|
IgnoredEnemyTargetTypes: Air
|
||||||
UnitBuilderBotModule@test:
|
UnitBuilderBotModule@test:
|
||||||
RequiresCondition: enable-test-ai
|
RequiresCondition: enable-test-ai
|
||||||
UnitQueues: Vehicle, Infantry, Air
|
UnitQueues: Vehicle, Infantry, Air
|
||||||
|
|||||||
Reference in New Issue
Block a user