Docking system can no longer forcibly open welded doors. (#12149)

* Docking system can no longer forcibly open welded doors.

* bolt the doors after trying to open them

* more door logic
This commit is contained in:
Mervill
2022-11-08 12:22:50 -08:00
committed by GitHub
parent 1d153f8694
commit 615c57bf0b
2 changed files with 30 additions and 19 deletions

View File

@@ -316,6 +316,11 @@ public abstract class SharedDoorSystem : EntitySystem
if (!Resolve(uid, ref door))
return false;
// since both closing/closed and welded are door states, we need to prevent 'closing'
// a welded door or else there will be weird state bugs
if (door.State == DoorState.Welded)
return false;
var ev = new BeforeDoorClosedEvent(door.PerformCollisionCheck);
RaiseLocalEvent(uid, ev, false);
if (ev.Cancelled)