From fb4e53165f5a673efd52b1b0e72ea73b613f4eac Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Fri, 7 Nov 2025 22:42:48 +0100 Subject: [PATCH] Hotfix FixedFlagStorage.clear and FixedGlobalFlagStorage.clear --- .../steamwar/bausystem/region/fixed/FixedFlagStorage.java | 7 ++++++- .../bausystem/region/fixed/FixedGlobalFlagStorage.java | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java index 293e0121..c902f941 100644 --- a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedFlagStorage.java @@ -84,7 +84,12 @@ public class FixedFlagStorage implements FlagStorage { @Override public void clear() { - flagMap.clear(); + for (Flag flag : Flag.getFlags()) { + if (flag == Flag.TESTBLOCK) continue; + if (flag == Flag.COLOR) continue; + if (flag == Flag.CHANGED) continue; + flagMap.remove(flag); + } } @Override diff --git a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java index 1fc4be27..69766fee 100644 --- a/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java +++ b/BauSystem/BauSystem_RegionFixed/src/de/steamwar/bausystem/region/fixed/FixedGlobalFlagStorage.java @@ -91,7 +91,12 @@ public class FixedGlobalFlagStorage implements FlagStorage { @Override public void clear() { - flagMap.clear(); + for (Flag flag : Flag.getFlags()) { + if (flag == Flag.TESTBLOCK) continue; + if (flag == Flag.COLOR) continue; + if (flag == Flag.CHANGED) continue; + flagMap.remove(flag); + } } @Override