make fire not burn through hardsuits (#27161)
* add FireProtection system and event * minor optimisation + make flammable use fire protection event * add fire protection values to some things, nerf firesuit heat resistance * bruh * unrevert laser nerfs, make elite hardsuit fully fireproof --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Inventory;
|
||||
|
||||
namespace Content.Shared.Clothing.EntitySystems;
|
||||
|
||||
/// <summary>
|
||||
/// Handles reducing fire damage when wearing clothing with <see cref="FireProtectionComponent"/>.
|
||||
/// </summary>
|
||||
public sealed class FireProtectionSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<FireProtectionComponent, InventoryRelayedEvent<GetFireProtectionEvent>>(OnGetProtection);
|
||||
}
|
||||
|
||||
private void OnGetProtection(Entity<FireProtectionComponent> ent, ref InventoryRelayedEvent<GetFireProtectionEvent> args)
|
||||
{
|
||||
args.Args.Reduce(ent.Comp.Reduction);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user