Fixed Biomass pickup problem

This commit is contained in:
simon 2017-12-28 15:33:28 -05:00
parent 21ec4ae704
commit e96b7982c8

View File

@ -49,7 +49,7 @@ public class CubotLaser extends CpuHardware {
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsAt(frontTile.x, frontTile.y); ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsAt(frontTile.x, frontTile.y);
if (cubot.getAction() != Action.IDLE && objects.size() > 0) { if (cubot.getAction() == Action.IDLE && objects.size() > 0) {
//FIXME: Problem here if more than 1 object //FIXME: Problem here if more than 1 object
if (objects.get(0) instanceof InventoryHolder) { if (objects.get(0) instanceof InventoryHolder) {
if (((InventoryHolder) objects.get(0)).canTakeItem(b)) { if (((InventoryHolder) objects.get(0)).canTakeItem(b)) {