Use construction graphs for hacking protections (#20265)

This commit is contained in:
chromiumboy
2023-10-05 22:15:03 -05:00
committed by GitHub
parent 8eeedb2427
commit acc9c8940b
20 changed files with 363 additions and 581 deletions

View File

@@ -18,7 +18,6 @@ public sealed class AirlockSystem : SharedAirlockSystem
[Dependency] private readonly WiresSystem _wiresSystem = default!;
[Dependency] private readonly PowerReceiverSystem _power = default!;
[Dependency] private readonly DoorBoltSystem _bolts = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public override void Initialize()
{
@@ -153,8 +152,8 @@ public sealed class AirlockSystem : SharedAirlockSystem
{
if (TryComp<WiresPanelComponent>(uid, out var panel) &&
panel.Open &&
_prototypeManager.TryIndex<WiresPanelSecurityLevelPrototype>(panel.CurrentSecurityLevelID, out var securityLevelPrototype) &&
securityLevelPrototype.WiresAccessible &&
TryComp<WiresPanelSecurityComponent>(uid, out var wiresPanelSecurity) &&
wiresPanelSecurity.WiresAccessible &&
TryComp<ActorComponent>(args.User, out var actor))
{
_wiresSystem.OpenUserInterface(uid, actor.PlayerSession);