using Content.Server.Bible.Components; using Content.Shared.Hands; using Content.Shared.Inventory.Events; using Content.Shared.NullRod.Components; namespace Content.Server.NullRod; public sealed class NullRodSystem : EntitySystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnDidEquip); SubscribeLocalEvent(OnHandEquipped); SubscribeLocalEvent(OnDidUnequip); SubscribeLocalEvent(OnHandUnequipped); } private void OnDidEquip(Entity ent, ref GotEquippedEvent args) { if (!HasComp(args.Equipee) || HasComp(args.Equipee)) return; EnsureComp(args.Equipee); } private void OnHandEquipped(Entity ent, ref GotEquippedHandEvent args) { if (!HasComp(args.User) || HasComp(args.User)) return; EnsureComp(args.User); } private void OnDidUnequip(Entity ent, ref GotUnequippedEvent args) { if (!HasComp(args.Equipee)) return; RemComp(args.Equipee); } private void OnHandUnequipped(Entity ent, ref GotUnequippedHandEvent args) { if (!HasComp(args.User)) return; RemComp(args.User); } }