From c82a41456762054ba4516c1d21d941ecfacf0016 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 20 Jan 2023 08:38:13 -0500 Subject: [PATCH] Serialization tweak. --- src/engine/objects/Mine.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 1d429f97..372bb3af 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -287,12 +287,15 @@ public class Mine extends AbstractGameObject { int guildWOO = mineOwnerGuild.getNation().getMineTime(); LocalDateTime guildMineTime = mineOpenTime.withHour(guildWOO); - if (mineOpenTime.isAfter(guildMineTime) || mine.wasClaimed == true) + if (mineOpenTime.isAfter(guildMineTime)) mineOpenTime = guildMineTime.plusDays(1); else mineOpenTime = guildMineTime; - // Mines + // Mines can only open once per cycle + + if (mine.wasClaimed == true) + mineOpenTime = guildMineTime.plusDays(1); } writer.putLocalDateTime(mineOpenTime);