Change `GetPryTimeModifierEvent.BaseTime` to the TimeSpan (#40419)
* Cleanup * Update
This commit is contained in:
@@ -264,8 +264,8 @@ public sealed partial class DoorComponent : Component
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default time that the door should take to pry open.
|
/// Default time that the door should take to pry open.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField]
|
||||||
public float PryTime = 1.5f;
|
public TimeSpan PryTime = TimeSpan.FromSeconds(1.5f);
|
||||||
|
|
||||||
[DataField]
|
[DataField]
|
||||||
public bool ChangeAirtight = true;
|
public bool ChangeAirtight = true;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public record struct GetPryTimeModifierEvent
|
|||||||
{
|
{
|
||||||
public readonly EntityUid User;
|
public readonly EntityUid User;
|
||||||
public float PryTimeModifier = 1.0f;
|
public float PryTimeModifier = 1.0f;
|
||||||
public float BaseTime = 5.0f;
|
public TimeSpan BaseTime = TimeSpan.FromSeconds(5);
|
||||||
|
|
||||||
public GetPryTimeModifierEvent(EntityUid user)
|
public GetPryTimeModifierEvent(EntityUid user)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public sealed class PryingSystem : EntitySystem
|
|||||||
var modEv = new GetPryTimeModifierEvent(user);
|
var modEv = new GetPryTimeModifierEvent(user);
|
||||||
|
|
||||||
RaiseLocalEvent(target, ref modEv);
|
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,
|
BreakOnDamage = true,
|
||||||
BreakOnMove = true,
|
BreakOnMove = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user