From 392454b4cb491adb8795d2dade645bc2a1998b17 Mon Sep 17 00:00:00 2001 From: 20kdc Date: Sun, 22 Nov 2020 06:47:56 +0000 Subject: [PATCH] Disable automatic on-touch activation of external airlocks (#2385) * Disable automatic on-touch activation of external airlocks It's a total pain to reliably get inside a two-door airlock without tripping the firelocks, and that's if you're *intending* to use it properly... People keep draining the entryway air on the sandbox servers (so people have to crowbar the firelocks open, and this reduces available air) * Disable automatic on-touch activation of external airlocks: Change auto_open to autoOpen * Change auto to bump Co-authored-by: Metal Gear Sloth --- .../Components/Doors/ServerDoorComponent.cs | 10 ++++++++++ .../Entities/Constructible/Doors/airlock_types.yml | 3 +++ 2 files changed, 13 insertions(+) diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index a54160d12d..f472399261 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -80,6 +80,10 @@ namespace Content.Server.GameObjects.Components.Doors public bool Occludes => _occludes; + [ViewVariables(VVAccess.ReadWrite)] private bool _bumpOpen; + + public bool BumpOpen => _bumpOpen; + [ViewVariables(VVAccess.ReadWrite)] public bool IsWeldedShut { @@ -112,6 +116,7 @@ namespace Content.Server.GameObjects.Components.Doors base.ExposeData(serializer); serializer.DataField(ref _occludes, "occludes", true); + serializer.DataField(ref _bumpOpen, "bumpOpen", true); serializer.DataField(ref _isWeldedShut, "welded", false); serializer.DataField(ref _canCrush, "canCrush", true); } @@ -147,6 +152,11 @@ namespace Content.Server.GameObjects.Components.Doors return; } + if (!_bumpOpen) + { + return; + } + // Disabled because it makes it suck hard to walk through double doors. if (entity.HasComponent()) diff --git a/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml b/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml index af5abe905c..fd89e37025 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml @@ -3,7 +3,10 @@ parent: Airlock id: AirlockExternal suffix: External + description: "It opens, it closes, it might crush you, and there might be only space behind it.\nHas to be manually activated." components: + - type: Airlock + bumpOpen: false - type: Sprite sprite: Constructible/Structures/Doors/airlock_external.rsi - type: Appearance