Browse Source

universal mines round 2

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
c8310ec5ba
  1. 4
      src/engine/objects/Mine.java
  2. 25
      src/engine/objects/MineProduction.java

4
src/engine/objects/Mine.java

@ -73,7 +73,7 @@ public class Mine extends AbstractGameObject {
super(rs); super(rs);
//this.mineType = MineProduction.getByName(rs.getString("mine_type")); //this.mineType = MineProduction.getByName(rs.getString("mine_type"));
this.mineType = MineProduction.ALL; this.mineType = MineProduction.LUMBER;
int ownerUID = rs.getInt("mine_ownerUID"); int ownerUID = rs.getInt("mine_ownerUID");
this.buildingID = rs.getInt("mine_buildingUID"); this.buildingID = rs.getInt("mine_buildingUID");
@ -282,7 +282,7 @@ public class Mine extends AbstractGameObject {
for (Mine mine : serverMines) { for (Mine mine : serverMines) {
Mine.mineMap.put(mine, mine.buildingID); Mine.mineMap.put(mine, mine.buildingID);
Mine.towerMap.put(mine.buildingID, mine); Mine.towerMap.put(mine.buildingID, mine);
mine.mineType = MineProduction.ALL; mine.mineType = MineProduction.LUMBER;
} }
try { try {

25
src/engine/objects/MineProduction.java

@ -13,7 +13,7 @@ import java.util.HashMap;
public enum MineProduction { public enum MineProduction {
LUMBER("Lumber Camp", new HashMap<>(), Resource.WORMWOOD, 1618637196, 1663491950), LUMBER("Universal Mine", new HashMap<>(), Resource.WORMWOOD, 1618637196, 1663491950),
ORE("Ore Mine", new HashMap<>(), Resource.OBSIDIAN, 518103023, -788976428), ORE("Ore Mine", new HashMap<>(), Resource.OBSIDIAN, 518103023, -788976428),
GOLD("Gold Mine", new HashMap<>(), Resource.GALVOR, -662193002, -1227205358), GOLD("Gold Mine", new HashMap<>(), Resource.GALVOR, -662193002, -1227205358),
MAGIC("Magic Mine", new HashMap<>(), Resource.BLOODSTONE, 504746863, -1753567069), MAGIC("Magic Mine", new HashMap<>(), Resource.BLOODSTONE, 504746863, -1753567069),
@ -36,11 +36,33 @@ public enum MineProduction {
public static void addResources() { public static void addResources() {
if (MineProduction.LUMBER.resources.size() == 0) { if (MineProduction.LUMBER.resources.size() == 0) {
// MineProduction.LUMBER.resources.put(7, Resource.GOLD);
// MineProduction.LUMBER.resources.put(1580004, Resource.LUMBER);
// MineProduction.LUMBER.resources.put(1580005, Resource.OAK);
// MineProduction.LUMBER.resources.put(1580006, Resource.BRONZEWOOD);
// MineProduction.LUMBER.resources.put(1580007, Resource.MANDRAKE);
MineProduction.LUMBER.resources.put(7, Resource.GOLD); MineProduction.LUMBER.resources.put(7, Resource.GOLD);
MineProduction.LUMBER.resources.put(1580004, Resource.LUMBER); MineProduction.LUMBER.resources.put(1580004, Resource.LUMBER);
MineProduction.LUMBER.resources.put(1580005, Resource.OAK); MineProduction.LUMBER.resources.put(1580005, Resource.OAK);
MineProduction.LUMBER.resources.put(1580006, Resource.BRONZEWOOD); MineProduction.LUMBER.resources.put(1580006, Resource.BRONZEWOOD);
MineProduction.LUMBER.resources.put(1580007, Resource.MANDRAKE); MineProduction.LUMBER.resources.put(1580007, Resource.MANDRAKE);
MineProduction.LUMBER.resources.put(1580012, Resource.AZOTH);
MineProduction.LUMBER.resources.put(1580013, Resource.ORICHALK);
MineProduction.LUMBER.resources.put(1580014, Resource.ANTIMONY);
MineProduction.LUMBER.resources.put(1580015, Resource.SULFUR);
MineProduction.LUMBER.resources.put(1580016, Resource.QUICKSILVER);
MineProduction.LUMBER.resources.put(1580000, Resource.STONE);
MineProduction.LUMBER.resources.put(1580008, Resource.COAL);
MineProduction.LUMBER.resources.put(1580009, Resource.AGATE);
MineProduction.LUMBER.resources.put(1580010, Resource.DIAMOND);
MineProduction.LUMBER.resources.put(1580011, Resource.ONYX);
MineProduction.LUMBER.resources.put(1580001, Resource.TRUESTEEL);
MineProduction.LUMBER.resources.put(1580002, Resource.IRON);
MineProduction.LUMBER.resources.put(1580003, Resource.ADAMANT);
MineProduction.LUMBER.resources.put(1580018, Resource.WORMWOOD);
MineProduction.LUMBER.resources.put(1580020, Resource.BLOODSTONE);
MineProduction.LUMBER.resources.put(1580019, Resource.OBSIDIAN);
MineProduction.LUMBER.resources.put(1580017, Resource.GALVOR);
} }
if (MineProduction.ORE.resources.size() == 0) { if (MineProduction.ORE.resources.size() == 0) {
MineProduction.ORE.resources.put(7, Resource.GOLD); MineProduction.ORE.resources.put(7, Resource.GOLD);
@ -48,6 +70,7 @@ public enum MineProduction {
MineProduction.ORE.resources.put(1580001, Resource.TRUESTEEL); MineProduction.ORE.resources.put(1580001, Resource.TRUESTEEL);
MineProduction.ORE.resources.put(1580002, Resource.IRON); MineProduction.ORE.resources.put(1580002, Resource.IRON);
MineProduction.ORE.resources.put(1580003, Resource.ADAMANT); MineProduction.ORE.resources.put(1580003, Resource.ADAMANT);
} }
if (MineProduction.GOLD.resources.size() == 0) { if (MineProduction.GOLD.resources.size() == 0) {
MineProduction.GOLD.resources.put(7, Resource.GOLD); MineProduction.GOLD.resources.put(7, Resource.GOLD);

Loading…
Cancel
Save