* Armor

* radiation tweaks

* asphyxiation ignore resistances
This commit is contained in:
mirrorcult
2021-10-18 16:24:37 -07:00
committed by GitHub
parent 47954e1565
commit 636a04eccd
13 changed files with 148 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.Atmos;
using Content.Server.Inventory.Components;
using Content.Shared.Damage;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
@@ -15,6 +16,7 @@ namespace Content.Server.Inventory
SubscribeLocalEvent<InventoryComponent, EntRemovedFromContainerMessage>(HandleInvRemovedFromContainer);
SubscribeLocalEvent<InventoryComponent, HighPressureEvent>(OnHighPressureEvent);
SubscribeLocalEvent<InventoryComponent, LowPressureEvent>(OnLowPressureEvent);
SubscribeLocalEvent<InventoryComponent, DamageModifyEvent>(OnDamageModify);
}
private static void HandleInvRemovedFromContainer(EntityUid uid, InventoryComponent component, EntRemovedFromContainerMessage args)
@@ -37,6 +39,14 @@ namespace Content.Server.Inventory
RelayPressureEvent(component, args);
}
private void OnDamageModify(EntityUid uid, InventoryComponent component, DamageModifyEvent args)
{
foreach (var equipped in component.GetAllHeldItems())
{
RaiseLocalEvent(equipped.Uid, args, false);
}
}
private void RelayPressureEvent<T>(InventoryComponent component, T args) where T : PressureEvent
{
foreach (var equipped in component.GetAllHeldItems())