]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Change ``GetPryTimeModifierEvent.BaseTime`` to the TimeSpan (#40419)
authorWinkarst-cpu <74284083+Winkarst-cpu@users.noreply.github.com>
Wed, 17 Sep 2025 13:03:51 +0000 (16:03 +0300)
committerGitHub <noreply@github.com>
Wed, 17 Sep 2025 13:03:51 +0000 (15:03 +0200)
* Cleanup

* Update

Content.Shared/Doors/Components/DoorComponent.cs
Content.Shared/Prying/Components/PryingComponent.cs
Content.Shared/Prying/Systems/PryingSystem.cs

index 64b4ab1857ef38f05c7a8cb0ff171dcd103cc9f7..e413f472e0098560bd730d4a1445fdd9b792c549 100644 (file)
@@ -264,8 +264,8 @@ public sealed partial class DoorComponent : Component
     /// <summary>
     /// Default time that the door should take to pry open.
     /// </summary>
-    [DataField, ViewVariables(VVAccess.ReadWrite)]
-    public float PryTime = 1.5f;
+    [DataField]
+    public TimeSpan PryTime = TimeSpan.FromSeconds(1.5f);
 
     [DataField]
     public bool ChangeAirtight = true;
index 93713e52c67f73e7c01f465018fa6fd57ad7ff69..8bd85d020f9a9a8425c138adc81f3a0401f1f122 100644 (file)
@@ -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)
     {
index 10c80cfab594d6afec2137eb53bf250ee1f69874..a09400d880e07d17819f7a068b556bdf72e4cc0c 100644 (file)
@@ -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,