Fix StrippableSystem blunders (#26166)

* Fixes target hand check when no hands were needed.

* Adds missing CanStripX checks.

* Whitespace.

* Fixed bad math causing instant strips.
This commit is contained in:
Krunklehorn
2024-03-15 23:50:53 -04:00
committed by GitHub
parent 23e6d537a4
commit 8ecb78ee5a
2 changed files with 13 additions and 7 deletions

View File

@@ -35,11 +35,11 @@ namespace Content.Shared.Strip.Components
public abstract class BaseBeforeStripEvent(TimeSpan initialTime, bool stealth = false) : EntityEventArgs, IInventoryRelayEvent
{
public readonly TimeSpan InitialTime = initialTime;
public TimeSpan Multiplier = TimeSpan.FromSeconds(1f);
public float Multiplier = 1f;
public TimeSpan Additive = TimeSpan.Zero;
public bool Stealth = stealth;
public TimeSpan Time => TimeSpan.FromSeconds(MathF.Max(InitialTime.Seconds * Multiplier.Seconds + Additive.Seconds, 0f));
public TimeSpan Time => TimeSpan.FromSeconds(MathF.Max(InitialTime.Seconds * Multiplier + Additive.Seconds, 0f));
public SlotFlags TargetSlots { get; } = SlotFlags.GLOVES;
}