mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-15 19:30:51 -07:00
Possible door config fix
This commit is contained in:
parent
e630f21aae
commit
eaaa4f9bd8
1 changed files with 9 additions and 4 deletions
|
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue