Greytide Virus station event (#33547)

* proof of concept

* full implementation

* I commited a crime

* t

* min players increase
This commit is contained in:
slarticodefast
2024-11-26 14:50:20 +01:00
committed by GitHub
parent d5225d1f46
commit 470c869ce2
5 changed files with 176 additions and 0 deletions

View File

@@ -396,6 +396,25 @@ public abstract partial class SharedDoorSystem : EntitySystem
Dirty(uid, door);
}
/// <summary>
/// Opens and then bolts a door.
/// Different from emagging this does not remove the access reader, so it can be repaired by simply unbolting the door.
/// </summary>
public bool TryOpenAndBolt(EntityUid uid, DoorComponent? door = null, AirlockComponent? airlock = null)
{
if (!Resolve(uid, ref door, ref airlock))
return false;
if (IsBolted(uid) || !airlock.Powered || door.State != DoorState.Closed)
{
return false;
}
SetState(uid, DoorState.Emagging, door);
return true;
}
#endregion
#region Closing