Move crater critter creator
This commit is contained in:
@@ -103,6 +103,15 @@ public class CraterUnit extends GroundUnit{
|
|||||||
return false; // it has its own logic
|
return false; // it has its own logic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static CraterUnit on(Tile tile){ // summons a crater on said tile
|
||||||
|
CraterUnit crater = (CraterUnit)UnitTypes.crater.create(tile.getTeam());
|
||||||
|
crater.set(tile.drawx(), tile.drawy());
|
||||||
|
crater.rotation = tile.rotation() * 90;
|
||||||
|
crater.add();
|
||||||
|
Events.fire(new UnitCreateEvent(crater));
|
||||||
|
return crater;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean on(Track track){
|
public boolean on(Track track){
|
||||||
return track.check.get(on());
|
return track.check.get(on());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,11 +71,7 @@ public class CompressedConveyor extends ArmoredConveyor{
|
|||||||
if(entity.crater == null || entity.crater.dead || !entity.crater.loading() || entity.crater.on() != tile){
|
if(entity.crater == null || entity.crater.dead || !entity.crater.loading() || entity.crater.on() != tile){
|
||||||
if(entity.reload > 0) return false;
|
if(entity.reload > 0) return false;
|
||||||
entity.reload = cooldown;
|
entity.reload = cooldown;
|
||||||
entity.crater = (CraterUnit)UnitTypes.crater.create(tile.getTeam());
|
entity.crater = CraterUnit.on(tile);
|
||||||
entity.crater.set(tile.drawx(), tile.drawy());
|
|
||||||
entity.crater.rotation = tile.rotation() * 90;
|
|
||||||
entity.crater.add();
|
|
||||||
Events.fire(new UnitCreateEvent(entity.crater));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity.crater.acceptItem(item);
|
return entity.crater.acceptItem(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user