Removed pointless playerTargetFlags field
This commit is contained in:
@@ -44,7 +44,7 @@ public class FlyingAI extends AIController{
|
|||||||
return core;
|
return core;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var flag : unit.team.isAI() ? unit.type.targetFlags : unit.type.playerTargetFlags){
|
for(var flag : unit.type.targetFlags){
|
||||||
if(flag == null){
|
if(flag == null){
|
||||||
Teamc result = target(x, y, range, air, ground);
|
Teamc result = target(x, y, range, air, ground);
|
||||||
if(result != null) return result;
|
if(result != null) return result;
|
||||||
|
|||||||
@@ -965,8 +965,6 @@ public class UnitTypes{
|
|||||||
health = 70;
|
health = 70;
|
||||||
engineOffset = 5.75f;
|
engineOffset = 5.75f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
//as default AI, flares are not very useful in core rushes, they attack nothing in the way
|
|
||||||
playerTargetFlags = new BlockFlag[]{null};
|
|
||||||
targetFlags = new BlockFlag[]{BlockFlag.generator, null};
|
targetFlags = new BlockFlag[]{BlockFlag.generator, null};
|
||||||
hitSize = 7;
|
hitSize = 7;
|
||||||
itemCapacity = 15;
|
itemCapacity = 15;
|
||||||
@@ -1000,8 +998,6 @@ public class UnitTypes{
|
|||||||
range = 140f;
|
range = 140f;
|
||||||
faceTarget = false;
|
faceTarget = false;
|
||||||
armor = 3f;
|
armor = 3f;
|
||||||
//do not rush core, attack closest
|
|
||||||
playerTargetFlags = new BlockFlag[]{null};
|
|
||||||
targetFlags = new BlockFlag[]{BlockFlag.factory, null};
|
targetFlags = new BlockFlag[]{BlockFlag.factory, null};
|
||||||
circleTarget = true;
|
circleTarget = true;
|
||||||
ammoType = new ItemAmmoType(Items.graphite);
|
ammoType = new ItemAmmoType(Items.graphite);
|
||||||
|
|||||||
@@ -107,8 +107,6 @@ public class UnitType extends UnlockableContent{
|
|||||||
public Seq<Ability> abilities = new Seq<>();
|
public Seq<Ability> abilities = new Seq<>();
|
||||||
/** Flags to target based on priority. Null indicates that the closest target should be found. The closest enemy core is used as a fallback. */
|
/** Flags to target based on priority. Null indicates that the closest target should be found. The closest enemy core is used as a fallback. */
|
||||||
public BlockFlag[] targetFlags = {null};
|
public BlockFlag[] targetFlags = {null};
|
||||||
/** targetFlags, as an override for "non-AI" teams. By default, units of this type will rush the core. */
|
|
||||||
public BlockFlag[] playerTargetFlags = {BlockFlag.core, null};
|
|
||||||
/** Target items to mine. Used in MinerAI */
|
/** Target items to mine. Used in MinerAI */
|
||||||
public Seq<Item> mineItems = Seq.with(Items.copper, Items.lead, Items.titanium, Items.thorium);
|
public Seq<Item> mineItems = Seq.with(Items.copper, Items.lead, Items.titanium, Items.thorium);
|
||||||
|
|
||||||
@@ -116,7 +114,6 @@ public class UnitType extends UnlockableContent{
|
|||||||
/** The default AI controller to assign on creation. */
|
/** The default AI controller to assign on creation. */
|
||||||
public Prov<? extends UnitController> aiController = () -> !flying ? new GroundAI() : new FlyingAI();
|
public Prov<? extends UnitController> aiController = () -> !flying ? new GroundAI() : new FlyingAI();
|
||||||
/** Function that chooses AI controller based on unit entity. */
|
/** Function that chooses AI controller based on unit entity. */
|
||||||
//TODO -name is too long
|
|
||||||
public Func<Unit, ? extends UnitController> defaultController = u -> !playerControllable || (u.team.isAI() && !u.team.rules().rtsAi) ? aiController.get() : new CommandAI();
|
public Func<Unit, ? extends UnitController> defaultController = u -> !playerControllable || (u.team.isAI() && !u.team.rules().rtsAi) ? aiController.get() : new CommandAI();
|
||||||
|
|
||||||
public Color outlineColor = Pal.darkerMetal;
|
public Color outlineColor = Pal.darkerMetal;
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ public class PayloadLoader extends PayloadBlock{
|
|||||||
return liquids.current() == liquid || liquids.currentAmount() < 0.2f;
|
return liquids.current() == liquid || liquids.currentAmount() < 0.2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
Draw.rect(region, x, y);
|
Draw.rect(region, x, y);
|
||||||
|
|||||||
Reference in New Issue
Block a user