Browse Source

Mines can only be claimed once a cycle.

master
MagicBot 2 years ago
parent
commit
f51bfc6d2b
  1. 3
      src/engine/objects/Mine.java
  2. 5
      src/engine/workthreads/HourlyJobThread.java

3
src/engine/objects/Mine.java

@ -46,6 +46,8 @@ public class Mine extends AbstractGameObject { @@ -46,6 +46,8 @@ public class Mine extends AbstractGameObject {
private String zoneName;
private Resource production;
private boolean isActive = false;
public boolean wasClaimed = false;
private float latitude;
private float longitude;
private float altitude;
@ -526,6 +528,7 @@ public class Mine extends AbstractGameObject { @@ -526,6 +528,7 @@ public class Mine extends AbstractGameObject {
mineBuilding.setRank(mineBuilding.getRank());
this.lastClaimer = null;
this.setActive(false);
this.wasClaimed = true;
return true;
}

5
src/engine/workthreads/HourlyJobThread.java

@ -103,6 +103,11 @@ public class HourlyJobThread implements Runnable { @@ -103,6 +103,11 @@ public class HourlyJobThread implements Runnable {
for (Mine mine : mines) {
try {
// Mines can only be claimed once a cycle
if (mine.wasClaimed == true)
continue;;
// Open Errant Mines
if (mine.getOwningGuild().isErrant()) {

Loading…
Cancel
Save