space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.53k stars 3.14k forks source link

Airlock doors inconsistently work with Link "Door status" -> "Close" #26019

Open CrafterKolyan opened 5 months ago

CrafterKolyan commented 5 months ago

Description

Sometimes if you have two doors and you link them like "Door status" -> "Close" then it will simply not work (meaning that when one door opens, another wouldn't close). image

Reproduction The main problem is that I can't reproduce it in 100% cases but here is a video where I was able to reproduce it showing both bug and correct behaviour. When I open left, then right: left should close but it doesn't When I open right, then left: right should close and it does it https://github.com/space-wizards/space-station-14/assets/9883873/89e80fcb-32fc-4dba-90c7-7bdf6b0f549d

deltanedas commented 5 months ago

some sus thing that gets fixed by clearing and relinking, i think it has old removed links still stored in link source component

CrafterKolyan commented 5 months ago

I definitely was trying to play with links to make the bug appear. And I never use clear button, I just remove links "manually". So it can be true that links are still stored in link source component.

Another thing I am suspicious about are if statements in DoorSignalControlSystem

deltanedas commented 5 months ago

the if statements mean door status only has its rising edge used to open door (as soon as you click the door and it stops being closed) not when it finishes closing

pretty sure the bug is in links

CrafterKolyan commented 5 months ago

Thank you. Don't want to have a battle over where the problem is. I think you have much more expertise here. I saw the code today for the first time. Separately: if (state == Closed) seems should include if (state is Closed or Denying) to be similar with TryOpen function

deltanedas commented 5 months ago

isnt denying just for the beep beep boop sound + sprite, maybe the closing state would be better?