This commit is contained in:
simon
2017-12-30 10:30:18 -05:00
parent 9e402fe8a1
commit fd73a47796
4 changed files with 32 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ public class ComPort extends CpuHardware {
//Get object directly in front of the Cubot
Point frontTile = cubot.getFrontTile();
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsAt(frontTile.x, frontTile.y);
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsBlockingAt(frontTile.x, frontTile.y);
if (objects.size() > 0 && objects.get(0) instanceof Programmable) {

View File

@@ -46,7 +46,7 @@ public class CubotLaser extends CpuHardware {
Point frontTile = cubot.getFrontTile();
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsAt(frontTile.x, frontTile.y);
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsBlockingAt(frontTile.x, frontTile.y);
if (cubot.getCurrentAction() == Action.IDLE && objects.size() > 0) {