Turn MiningRange into a UnitType variable. (#5112)

* Turn MiningRange into a UnitType variable.

Long range mining go brrrrr

* Anuke Approved
This commit is contained in:
MEEP of Faith
2021-04-16 17:57:40 -07:00
committed by GitHub
parent d9b6ada0b3
commit fbddc0abc9
4 changed files with 5 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ public class MinerAI extends AIController{
if(!(unit.canMine()) || core == null) return;
if(unit.mineTile != null && !unit.mineTile.within(unit, unit.type.range)){
if(unit.mineTile != null && !unit.mineTile.within(unit, unit.type.miningRange)){
unit.mineTile(null);
}
@@ -44,9 +44,9 @@ public class MinerAI extends AIController{
}
if(ore != null){
moveTo(ore, unit.type.range / 2f, 20f);
moveTo(ore, unit.type.miningRange / 2f, 20f);
if(unit.within(ore, unit.type.range)){
if(unit.within(ore, unit.type.miningRange)){
unit.mineTile = ore;
}