Revert "Fix unintentional inventory relayed event handling " (#12182)

This commit is contained in:
Emisse
2022-10-24 09:06:04 -06:00
committed by GitHub
parent 145471be2d
commit 80fd37041f
9 changed files with 15 additions and 53 deletions

View File

@@ -1,8 +1,7 @@
using Content.Shared.Damage;
using Content.Shared.Damage;
using Content.Server.Examine;
using Content.Shared.Verbs;
using Robust.Shared.Utility;
using Content.Shared.Inventory;
namespace Content.Server.Armor
{
@@ -15,13 +14,13 @@ namespace Content.Server.Armor
{
base.Initialize();
SubscribeLocalEvent<ArmorComponent, InventoryRelayedEvent<DamageModifyEvent>>(OnDamageModify);
SubscribeLocalEvent<ArmorComponent, DamageModifyEvent>(OnDamageModify);
SubscribeLocalEvent<ArmorComponent, GetVerbsEvent<ExamineVerb>>(OnArmorVerbExamine);
}
private void OnDamageModify(EntityUid uid, ArmorComponent component, InventoryRelayedEvent<DamageModifyEvent> args)
private void OnDamageModify(EntityUid uid, ArmorComponent component, DamageModifyEvent args)
{
args.Args.Damage = DamageSpecifier.ApplyModifierSet(args.Args.Damage, component.Modifiers);
args.Damage = DamageSpecifier.ApplyModifierSet(args.Damage, component.Modifiers);
}
private void OnArmorVerbExamine(EntityUid uid, ArmorComponent component, GetVerbsEvent<ExamineVerb> args)

View File

@@ -8,7 +8,6 @@ using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Explosion;
using Content.Shared.GameTicking;
using Content.Shared.Inventory;
using Content.Shared.Throwing;
using Robust.Server.Player;
using Robust.Shared.Audio;
@@ -64,10 +63,6 @@ public sealed partial class ExplosionSystem : EntitySystem
SubscribeLocalEvent<GridRemovalEvent>(OnGridRemoved);
SubscribeLocalEvent<GridStartupEvent>(OnGridStartup);
SubscribeLocalEvent<ExplosionResistanceComponent, GetExplosionResistanceEvent>(OnGetResistance);
// as long as explosion-resistance mice are never added, this should be fine (otherwise a mouse-hat will transfer it's power to the wearer).
SubscribeLocalEvent<ExplosionResistanceComponent, InventoryRelayedEvent<GetExplosionResistanceEvent>>((e, c, ev) => OnGetResistance(e, c, ev.Args));
SubscribeLocalEvent<TileChangedEvent>(OnTileChanged);
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnReset);