Nerf airlock deconstruction (#6343)

This commit is contained in:
metalgearsloth
2022-02-07 14:06:11 +11:00
committed by GitHub
parent 9724cda65e
commit 7728b907c5
5 changed files with 17 additions and 10 deletions

View File

@@ -61,7 +61,7 @@ namespace Content.Server.Construction
if (attempt.Cancelled) if (attempt.Cancelled)
return false; 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);
} }
/// <summary> /// <summary>

View File

@@ -1,4 +1,3 @@
using Content.Shared.Interaction;
using Content.Shared.Tools; using Content.Shared.Tools;
using Robust.Shared.Analyzers; using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
@@ -8,7 +7,6 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Construction.Components namespace Content.Server.Construction.Components
{ {
// TODO: Move this component's logic to an EntitySystem.
[RegisterComponent, Friend(typeof(AnchorableSystem))] [RegisterComponent, Friend(typeof(AnchorableSystem))]
public class AnchorableComponent : Component public class AnchorableComponent : Component
{ {
@@ -18,6 +16,13 @@ namespace Content.Server.Construction.Components
[DataField("snap")] [DataField("snap")]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public bool Snap { get; private set; } = true; public bool Snap { get; private set; } = true;
/// <summary>
/// Base delay to use for anchoring.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("delay")]
public float Delay = 0.5f;
} }
public abstract class BaseAnchoredAttemptEvent : CancellableEntityEventArgs public abstract class BaseAnchoredAttemptEvent : CancellableEntityEventArgs

View File

@@ -22,6 +22,7 @@
- MobImpassable - MobImpassable
- VaultImpassable - VaultImpassable
- type: Anchorable - type: Anchorable
delay: 2
- type: Pullable - type: Pullable
- type: Transform - type: Transform
anchored: true anchored: true

View File

@@ -5,6 +5,7 @@
components: components:
- type: InteractionOutline - type: InteractionOutline
- type: Anchorable - type: Anchorable
delay: 2
- type: Physics - type: Physics
bodyType: Static bodyType: Static
- type: Fixtures - type: Fixtures

View File

@@ -27,7 +27,7 @@
steps: steps:
- material: Cable - material: Cable
amount: 5 amount: 5
doAfter: 1 doAfter: 2.5
- to: start - to: start
conditions: conditions:
- !type:EntityAnchored - !type:EntityAnchored
@@ -39,7 +39,7 @@
- !type:DeleteEntity {} - !type:DeleteEntity {}
steps: steps:
- tool: Welding - tool: Welding
doAfter: 2 doAfter: 3
- node: wired - node: wired
entity: AirlockAssembly entity: AirlockAssembly
@@ -54,7 +54,7 @@
icon: icon:
sprite: "Objects/Misc/module.rsi" sprite: "Objects/Misc/module.rsi"
state: "door_electronics" state: "door_electronics"
doAfter: 1 doAfter: 3
- to: assembly - to: assembly
completed: completed:
- !type:SpawnPrototype - !type:SpawnPrototype
@@ -62,7 +62,7 @@
amount: 5 amount: 5
steps: steps:
- tool: Cutting - tool: Cutting
doAfter: 1 doAfter: 2.5
- node: electronics - node: electronics
edges: edges:
@@ -71,7 +71,7 @@
- !type:EntityAnchored {} - !type:EntityAnchored {}
steps: steps:
- tool: Screwing - tool: Screwing
doAfter: 2 doAfter: 2.5
- node: airlock - node: airlock
entity: Airlock entity: Airlock
@@ -89,7 +89,7 @@
- !type:EmptyAllContainers {} - !type:EmptyAllContainers {}
steps: steps:
- tool: Prying - tool: Prying
doAfter: 1 doAfter: 5
- to: wired # TODO ShadowCommander: Remove when board spawning is implemented in ServerDoorComponent.cs. Needs a map update. - to: wired # TODO ShadowCommander: Remove when board spawning is implemented in ServerDoorComponent.cs. Needs a map update.
conditions: conditions:
- !type:EntityAnchored {} - !type:EntityAnchored {}
@@ -104,4 +104,4 @@
prototype: DoorElectronics prototype: DoorElectronics
steps: steps:
- tool: Prying - tool: Prying
doAfter: 1 doAfter: 5