From 7728b907c5c3515ce0cb2ffab9dc10a9e94c7118 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 7 Feb 2022 14:06:11 +1100 Subject: [PATCH] Nerf airlock deconstruction (#6343) --- Content.Server/Construction/AnchorableSystem.cs | 2 +- .../Construction/Components/AnchorableComponent.cs | 9 +++++++-- .../Structures/Doors/Airlocks/assembly.yml | 1 + .../Structures/Machines/base_structuremachines.yml | 1 + .../Construction/Graphs/structures/airlock.yml | 14 +++++++------- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Content.Server/Construction/AnchorableSystem.cs b/Content.Server/Construction/AnchorableSystem.cs index b62c26f4e0..a263b65048 100644 --- a/Content.Server/Construction/AnchorableSystem.cs +++ b/Content.Server/Construction/AnchorableSystem.cs @@ -61,7 +61,7 @@ namespace Content.Server.Construction if (attempt.Cancelled) return false; - return await _toolSystem.UseTool(usingUid, userUid, uid, 0f, 0.5f + attempt.Delay, anchorable.Tool, toolComponent:usingTool); + return await _toolSystem.UseTool(usingUid, userUid, uid, 0f, anchorable.Delay + attempt.Delay, anchorable.Tool, toolComponent:usingTool); } /// diff --git a/Content.Server/Construction/Components/AnchorableComponent.cs b/Content.Server/Construction/Components/AnchorableComponent.cs index 78b1720e69..2b174529a1 100644 --- a/Content.Server/Construction/Components/AnchorableComponent.cs +++ b/Content.Server/Construction/Components/AnchorableComponent.cs @@ -1,4 +1,3 @@ -using Content.Shared.Interaction; using Content.Shared.Tools; using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; @@ -8,7 +7,6 @@ using Robust.Shared.ViewVariables; namespace Content.Server.Construction.Components { - // TODO: Move this component's logic to an EntitySystem. [RegisterComponent, Friend(typeof(AnchorableSystem))] public class AnchorableComponent : Component { @@ -18,6 +16,13 @@ namespace Content.Server.Construction.Components [DataField("snap")] [ViewVariables(VVAccess.ReadWrite)] public bool Snap { get; private set; } = true; + + /// + /// Base delay to use for anchoring. + /// + [ViewVariables(VVAccess.ReadWrite)] + [DataField("delay")] + public float Delay = 0.5f; } public abstract class BaseAnchoredAttemptEvent : CancellableEntityEventArgs diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml index 1105a1c3fb..d1fb56ad6d 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml @@ -22,6 +22,7 @@ - MobImpassable - VaultImpassable - type: Anchorable + delay: 2 - type: Pullable - type: Transform anchored: true diff --git a/Resources/Prototypes/Entities/Structures/Machines/base_structuremachines.yml b/Resources/Prototypes/Entities/Structures/Machines/base_structuremachines.yml index 2ef9417bdc..342046556f 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/base_structuremachines.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/base_structuremachines.yml @@ -5,6 +5,7 @@ components: - type: InteractionOutline - type: Anchorable + delay: 2 - type: Physics bodyType: Static - type: Fixtures diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml index 7bdeee72ce..67b06f7ff9 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/airlock.yml @@ -27,7 +27,7 @@ steps: - material: Cable amount: 5 - doAfter: 1 + doAfter: 2.5 - to: start conditions: - !type:EntityAnchored @@ -39,7 +39,7 @@ - !type:DeleteEntity {} steps: - tool: Welding - doAfter: 2 + doAfter: 3 - node: wired entity: AirlockAssembly @@ -54,7 +54,7 @@ icon: sprite: "Objects/Misc/module.rsi" state: "door_electronics" - doAfter: 1 + doAfter: 3 - to: assembly completed: - !type:SpawnPrototype @@ -62,7 +62,7 @@ amount: 5 steps: - tool: Cutting - doAfter: 1 + doAfter: 2.5 - node: electronics edges: @@ -71,7 +71,7 @@ - !type:EntityAnchored {} steps: - tool: Screwing - doAfter: 2 + doAfter: 2.5 - node: airlock entity: Airlock @@ -89,7 +89,7 @@ - !type:EmptyAllContainers {} steps: - tool: Prying - doAfter: 1 + doAfter: 5 - to: wired # TODO ShadowCommander: Remove when board spawning is implemented in ServerDoorComponent.cs. Needs a map update. conditions: - !type:EntityAnchored {} @@ -104,4 +104,4 @@ prototype: DoorElectronics steps: - tool: Prying - doAfter: 1 + doAfter: 5