From eaaa4f9bd848abfb8a8107daefc21fe07b6766fd Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 6 Feb 2025 21:05:49 -0500 Subject: [PATCH] Possible door config fix --- core/src/mindustry/world/blocks/defense/Door.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/world/blocks/defense/Door.java b/core/src/mindustry/world/blocks/defense/Door.java index 3cad24224f..7a48b6bb09 100644 --- a/core/src/mindustry/world/blocks/defense/Door.java +++ b/core/src/mindustry/world/blocks/defense/Door.java @@ -36,10 +36,15 @@ public class Door extends Wall{ consumesTap = true; config(Boolean.class, (DoorBuild base, Boolean open) -> { - doorSound.at(base); - base.effect(); + if(!world.isGenerating()){ + doorSound.at(base); + base.effect(); + } - for(DoorBuild entity : base.chained){ + doorQueue.clear(); + doorQueue.add(base); + + for(DoorBuild entity : base.chained.isEmpty() ? doorQueue : base.chained){ //skip doors with things in them if((Units.anyEntities(entity.tile) && !open) || entity.open == open){ continue; @@ -47,7 +52,7 @@ public class Door extends Wall{ if(chainEffect) entity.effect(); entity.open = open; - pathfinder.updateTile(entity.tile()); + if(!world.isGenerating()) pathfinder.updateTile(entity.tile()); } }); }