From e7ccab2ad9d79e70353748690cc3bbc3740a6ee9 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Tue, 9 May 2023 14:31:43 +0000 Subject: [PATCH] Fixed construction issue that would cause objects to become inaccessible (note this does not fix a similar issue related to rotation) Simplified the region contract for construction --- .../content/global/skill/construction/HouseManager.java | 9 ++------- Server/src/main/core/game/world/map/Region.java | 2 ++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Server/src/main/content/global/skill/construction/HouseManager.java b/Server/src/main/content/global/skill/construction/HouseManager.java index e219ac44b..7c8bc5d35 100644 --- a/Server/src/main/content/global/skill/construction/HouseManager.java +++ b/Server/src/main/content/global/skill/construction/HouseManager.java @@ -454,15 +454,10 @@ public final class HouseManager { using(target), fillWith(defaultChunk) .from(from) - .onPlanes(0) - .onCondition((destX, destY, plane) -> rooms[plane][destX][destY] == null), - fillWith((RegionChunk) null) - .from(from) - .onPlanes(1,2) - .onCondition((destX, destY, plane) -> rooms[plane][destX][destY] == null), + .onPlanes(0), fillWith(defaultSkyChunk) .from(from) - .onPlanes(3), + .onPlanes(1,2,3), loadRooms .from(from) .onPlanes(0,1,2) diff --git a/Server/src/main/core/game/world/map/Region.java b/Server/src/main/core/game/world/map/Region.java index fc52f472f..c615df34a 100644 --- a/Server/src/main/core/game/world/map/Region.java +++ b/Server/src/main/core/game/world/map/Region.java @@ -374,6 +374,8 @@ public class Region { } } } + if (r.isBuild()) + r.setLoaded(false); r.activityPulse.stop(); return true; }