mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-27 16:00:51 -07:00
when and why was this hardcoded (#6289)
This commit is contained in:
parent
921c113375
commit
a438be7fcd
3 changed files with 6 additions and 6 deletions
|
|
@ -25,7 +25,7 @@ public class MinerAI extends AIController{
|
|||
|
||||
if(mining){
|
||||
if(timer.get(timerTarget2, 60 * 4) || targetItem == null){
|
||||
targetItem = unit.team.data().mineItems.min(i -> indexer.hasOre(i) && unit.canMine(i), i -> core.items.get(i));
|
||||
targetItem = unit.type.mineItems.min(i -> indexer.hasOre(i) && unit.canMine(i), i -> core.items.get(i));
|
||||
}
|
||||
|
||||
//core full of the target item, do nothing
|
||||
|
|
@ -75,4 +75,4 @@ public class MinerAI extends AIController{
|
|||
circle(core, unit.type.range / 1.8f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -234,8 +234,6 @@ public class Teams{
|
|||
public Queue<BlockPlan> blocks = new Queue<>();
|
||||
/** The current command for units to follow. */
|
||||
public UnitCommand command = UnitCommand.attack;
|
||||
/** Target items to mine. */
|
||||
public Seq<Item> mineItems = Seq.with(Items.copper, Items.lead, Items.titanium, Items.thorium);
|
||||
|
||||
/** Quadtree for all buildings of this team. Null if not active. */
|
||||
@Nullable
|
||||
|
|
@ -370,4 +368,4 @@ public class Teams{
|
|||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -88,6 +88,8 @@ public class UnitType extends UnlockableContent{
|
|||
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 */
|
||||
public Seq<Item> mineItems = Seq.with(Items.copper, Items.lead, Items.titanium, Items.thorium);
|
||||
|
||||
public Color outlineColor = Pal.darkerMetal;
|
||||
public int outlineRadius = 3;
|
||||
|
|
@ -965,4 +967,4 @@ public class UnitType extends UnlockableContent{
|
|||
|
||||
//endregion
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue