From 5713dab8cf987f51041a5d47709a7c055ca58c44 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 29 Feb 2024 21:59:45 -0600 Subject: [PATCH] hard set mine windows --- src/engine/objects/Mine.java | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 93600a36..20f02100 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -212,19 +212,6 @@ public class Mine extends AbstractGameObject { for (Mine mine : serverMines) { Mine.mineMap.put(mine, mine.buildingID); Mine.towerMap.put(mine.buildingID, mine); - if(mine.capSize == 5){ - mine.liveLength = 1800; - } - if(mine.capSize == 10){ - if(ThreadLocalRandom.current().nextInt(0,100) > 50){ - mine.liveLength = 1800; - } else{ - mine.liveLength = 3600; - } - } - if(mine.capSize == 20){ - mine.liveLength = 3600; - } } ChinaMines.add(serverMines.get(0)); @@ -293,7 +280,7 @@ public class Mine extends AbstractGameObject { writer.putInt(mine.production.hash); writer.putInt(mine.getModifiedProductionAmount()); writer.putInt(mine.getModifiedProductionAmount()); //TODO calculate range penalty here - writer.putInt(mine.liveLength); //window in seconds + writer.putInt(3600); //window in seconds // Errant mines are currently open. Set time to now. @@ -314,11 +301,7 @@ public class Mine extends AbstractGameObject { mineOpenTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(0).withSecond(0).withNano(0); writer.putLocalDateTime(mineOpenTime); - if(mine.liveLength == 3600) { - writer.putLocalDateTime(mineOpenTime.plusHours(1)); - } else{ - writer.putLocalDateTime(mineOpenTime.plusMinutes(30)); - } + writer.putLocalDateTime(mineOpenTime.plusHours(1)); writer.put(mine.isActive ? (byte) 0x01 : (byte) 0x00); Building mineTower = BuildingManager.getBuilding(mine.buildingID);