Browse Source

Update to list based lookup

bugfix-slot-update-2
MagicBot 9 months ago
parent
commit
bd370097ab
  1. 4
      src/engine/gameManager/BuildingManager.java

4
src/engine/gameManager/BuildingManager.java

@ -55,7 +55,7 @@ public enum BuildingManager { @@ -55,7 +55,7 @@ public enum BuildingManager {
for (int i = 0; i < numOfSlots; i++) {
if (building.hirelings.get(i) != null)
if (building.hirelings.get(i) == null)
return i;
}
return -1;
@ -75,7 +75,7 @@ public enum BuildingManager { @@ -75,7 +75,7 @@ public enum BuildingManager {
for (int i = numOfSlots - 1; i >= 0; i--) {
if (!building.hirelings.contains(i))
if (building.hirelings.get(i) == null)
return i;
}
return -1;

Loading…
Cancel
Save