mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
# Description Ports Security buffs from [/Goob-Station#953](https://github.com/Goob-Station/Goob-Station/pull/953) ## Once Again, I am John Combat I don't have the energy today for the witty PR jokes. Apologies, people. # TODO * [x] Oil floats on water * [x] Cover yourself in oil * [x] Wait for it to rain * [x] :trollface: # Media # Changelog 🆑 Eagle * add: Flashbangs now stun and knockdown people. Wear over-ear headset or combat hardsuit helmet to reduce flashbang effective range. * add: All sec and command members received over-ear headsets. * add: Wearing security, ert, syndie or deathsquad gas mask blocks smoke inhalation even if internals are off. * tweak: Epinephrine now speeds up by 10%. * add: Jackboots, combat and mercenary boots now reduce all stun and knockdown times by 20%. * add: Combat hardsuit helmets now protect from flashes. * tweak: Tear gas is now stronger. * tweak: Stamcrit stun time is once again 6 seconds. * tweak: Security hardsuits now have heat resistance. --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: Aviu00 <93730715+Aviu00@users.noreply.github.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com> (cherry picked from commit 9bae47bc6d3e44fba8b86e18c78e6b0f3fe00ed6)
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using Content.Shared.Examine;
|
|
using Content.Shared.Inventory;
|
|
|
|
namespace Content.Shared.Stunnable;
|
|
|
|
public sealed class ClothingModifyStunTimeSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<ClothingModifyStunTimeComponent, InventoryRelayedEvent<ModifyStunTimeEvent>>(OnModifyStunTime);
|
|
SubscribeLocalEvent<ClothingModifyStunTimeComponent, ExaminedEvent>(OnExamined);
|
|
}
|
|
|
|
private void OnExamined(Entity<ClothingModifyStunTimeComponent> ent, ref ExaminedEvent args)
|
|
{
|
|
args.PushMarkup(Loc.GetString("clothing-modify-stun-time-examine", ("mod", MathF.Round((1f - ent.Comp.Modifier) * 100))));
|
|
}
|
|
|
|
private void OnModifyStunTime(Entity<ClothingModifyStunTimeComponent> ent, ref InventoryRelayedEvent<ModifyStunTimeEvent> args)
|
|
{
|
|
args.Args.Modifier *= ent.Comp.Modifier;
|
|
}
|
|
|
|
public float GetModifier(EntityUid uid)
|
|
{
|
|
var ev = new ModifyStunTimeEvent(1f);
|
|
RaiseLocalEvent(uid, ref ev);
|
|
return ev.Modifier;
|
|
}
|
|
}
|
|
|
|
[ByRefEvent]
|
|
public record struct ModifyStunTimeEvent(float Modifier) : IInventoryRelayEvent
|
|
{
|
|
public SlotFlags TargetSlots => SlotFlags.WITHOUT_POCKET;
|
|
}
|