From 0dd1733998322140f5bcceebaf30f0ab2d511a78 Mon Sep 17 00:00:00 2001 From: Winkarst-cpu <74284083+Winkarst-cpu@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:03:51 +0300 Subject: [PATCH] Change ``GetPryTimeModifierEvent.BaseTime`` to the TimeSpan (#40419) * Cleanup * Update --- Content.Shared/Doors/Components/DoorComponent.cs | 4 ++-- Content.Shared/Prying/Components/PryingComponent.cs | 2 +- Content.Shared/Prying/Systems/PryingSystem.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Doors/Components/DoorComponent.cs b/Content.Shared/Doors/Components/DoorComponent.cs index 64b4ab1857..e413f472e0 100644 --- a/Content.Shared/Doors/Components/DoorComponent.cs +++ b/Content.Shared/Doors/Components/DoorComponent.cs @@ -264,8 +264,8 @@ public sealed partial class DoorComponent : Component /// /// Default time that the door should take to pry open. /// - [DataField, ViewVariables(VVAccess.ReadWrite)] - public float PryTime = 1.5f; + [DataField] + public TimeSpan PryTime = TimeSpan.FromSeconds(1.5f); [DataField] public bool ChangeAirtight = true; diff --git a/Content.Shared/Prying/Components/PryingComponent.cs b/Content.Shared/Prying/Components/PryingComponent.cs index 93713e52c6..8bd85d020f 100644 --- a/Content.Shared/Prying/Components/PryingComponent.cs +++ b/Content.Shared/Prying/Components/PryingComponent.cs @@ -86,7 +86,7 @@ public record struct GetPryTimeModifierEvent { public readonly EntityUid User; public float PryTimeModifier = 1.0f; - public float BaseTime = 5.0f; + public TimeSpan BaseTime = TimeSpan.FromSeconds(5); public GetPryTimeModifierEvent(EntityUid user) { diff --git a/Content.Shared/Prying/Systems/PryingSystem.cs b/Content.Shared/Prying/Systems/PryingSystem.cs index 10c80cfab5..a09400d880 100644 --- a/Content.Shared/Prying/Systems/PryingSystem.cs +++ b/Content.Shared/Prying/Systems/PryingSystem.cs @@ -134,7 +134,7 @@ public sealed class PryingSystem : EntitySystem var modEv = new GetPryTimeModifierEvent(user); RaiseLocalEvent(target, ref modEv); - var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(modEv.BaseTime * modEv.PryTimeModifier / toolModifier), new DoorPryDoAfterEvent(), target, target, tool) + var doAfterArgs = new DoAfterArgs(EntityManager, user, modEv.BaseTime * modEv.PryTimeModifier / toolModifier, new DoorPryDoAfterEvent(), target, target, tool) { BreakOnDamage = true, BreakOnMove = true,