Browse Source

zone loading

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
3c5f510969
  1. 5
      src/engine/objects/Mine.java

5
src/engine/objects/Mine.java

@ -81,7 +81,9 @@ public class Mine extends AbstractGameObject {
this.buildingID = rs.getInt("mine_buildingUID"); this.buildingID = rs.getInt("mine_buildingUID");
this.flags = rs.getInt("flags"); this.flags = rs.getInt("flags");
//int parent = rs.getInt("parent"); //int parent = rs.getInt("parent");
if(BuildingManager.getBuildingFromCache(rs.getInt("mine_buildingUID")) != null) {
Building tower = BuildingManager.getBuildingFromCache(rs.getInt("mine_buildingUID")); Building tower = BuildingManager.getBuildingFromCache(rs.getInt("mine_buildingUID"));
for (Zone zone : ZoneManager.getAllZonesIn(tower.loc)) { for (Zone zone : ZoneManager.getAllZonesIn(tower.loc)) {
if (zone.isMacroZone()) { if (zone.isMacroZone()) {
this.parentZone = zone; this.parentZone = zone;
@ -114,6 +116,7 @@ public class Mine extends AbstractGameObject {
this.production = Resource.valueOf(rs.getString("mine_resource")); this.production = Resource.valueOf(rs.getString("mine_resource"));
this.lastClaimer = null; this.lastClaimer = null;
} }
}
public static void SetTimes(){ public static void SetTimes(){
EuroMines.get(0).liveTime = 16; EuroMines.get(0).liveTime = 16;
@ -150,7 +153,7 @@ public class Mine extends AbstractGameObject {
AmericaMines.get(10).liveTime = 1; AmericaMines.get(10).liveTime = 1;
AmericaMines.get(11).liveTime = 1; AmericaMines.get(11).liveTime = 1;
AmericaMines.get(12).liveTime = 1; AmericaMines.get(12).liveTime = 1;
AmericaMines.get(13).liveTime = 1; //AmericaMines.get(13).liveTime = 1;
int count = 1; int count = 1;

Loading…
Cancel
Save