mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 02:06:43 +00:00
Fixes #54
This commit is contained in:
parent
dab5cab602
commit
2fb7d2f73e
@ -149,6 +149,10 @@ public class Cubot extends GameObject implements Updatable, ControllableUnit {
|
||||
return lastAction;
|
||||
}
|
||||
|
||||
public Action getCurrentAction() {
|
||||
return currentAction;
|
||||
}
|
||||
|
||||
public void setHologram(char hologram) {
|
||||
this.hologram = hologram;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class CubotDrill extends CpuHardware {
|
||||
} else if (a == GATHER_SLOW || a == GATHER_FAST) {
|
||||
|
||||
if (cubot.spendEnergy(1400)) {
|
||||
if (cubot.getAction() == Action.IDLE) {
|
||||
if (cubot.getCurrentAction() == Action.IDLE) {
|
||||
int tile = cubot.getWorld().getTileMap().getTileAt(cubot.getX(), cubot.getY());
|
||||
|
||||
if (tile == TileMap.IRON_TILE) {
|
||||
|
@ -49,7 +49,7 @@ public class CubotLaser extends CpuHardware {
|
||||
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsAt(frontTile.x, frontTile.y);
|
||||
|
||||
|
||||
if (cubot.getAction() == Action.IDLE && objects.size() > 0) {
|
||||
if (cubot.getCurrentAction() == Action.IDLE && objects.size() > 0) {
|
||||
//FIXME: Problem here if more than 1 object
|
||||
if (objects.get(0) instanceof InventoryHolder) {
|
||||
if (((InventoryHolder) objects.get(0)).canTakeItem(b)) {
|
||||
@ -62,6 +62,8 @@ public class CubotLaser extends CpuHardware {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("\n\n\n\n\n It did it");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user