From 095a26e1d9ba6eceb07de65ffb860be0eddb204e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 7 Mar 2024 21:30:12 -0600 Subject: [PATCH] 30 minute mine windows --- src/engine/objects/Mine.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 6ac9259e..dbd29bc4 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -316,16 +316,8 @@ public class Mine extends AbstractGameObject { mineOpenTime = mineOpenTime.plusDays(1); mineCloseTime = mineCloseTime.plusDays(1); } - String aMpMOPEN = "AM"; - String aMpMCLOSE = "AM"; - if(mineOpenTime.isAfter(LocalDateTime.now().withHour(11).withMinute(59))){ - aMpMOPEN = "PM"; - } - if(mineCloseTime.isAfter(LocalDateTime.now().withHour(11).withMinute(59))){ - aMpMCLOSE = "PM"; - } - writer.putString(mineOpenTime.getHour() + ":" + mineOpenTime.getMinute() + " " + aMpMOPEN); - writer.putString(mineCloseTime.getHour() + ":" + mineCloseTime.getMinute() + " " + aMpMCLOSE); + writer.putLocalDateTime(mineOpenTime); + writer.putLocalDateTime(mineCloseTime); writer.put(mine.isActive ? (byte) 0x01 : (byte) 0x00); Building mineTower = BuildingManager.getBuilding(mine.buildingID);