Cleanup subdermal implant code (#39755)
This commit is contained in:
@@ -27,7 +27,7 @@ public sealed class MindShieldSystem : EntitySystem
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<MindShieldImplantComponent, ImplantImplantedEvent>(OnImplantImplanted);
|
||||
SubscribeLocalEvent<MindShieldImplantComponent, EntGotRemovedFromContainerMessage>(OnImplantDraw);
|
||||
SubscribeLocalEvent<MindShieldImplantComponent, ImplantRemovedEvent>(OnImplantRemoved);
|
||||
}
|
||||
|
||||
private void OnImplantImplanted(Entity<MindShieldImplantComponent> ent, ref ImplantImplantedEvent ev)
|
||||
@@ -35,8 +35,8 @@ public sealed class MindShieldSystem : EntitySystem
|
||||
if (ev.Implanted == null)
|
||||
return;
|
||||
|
||||
EnsureComp<MindShieldComponent>(ev.Implanted.Value);
|
||||
MindShieldRemovalCheck(ev.Implanted.Value, ev.Implant);
|
||||
EnsureComp<MindShieldComponent>(ev.Implanted);
|
||||
MindShieldRemovalCheck(ev.Implanted, ev.Implant);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,9 +58,9 @@ public sealed class MindShieldSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnImplantDraw(Entity<MindShieldImplantComponent> ent, ref EntGotRemovedFromContainerMessage args)
|
||||
private void OnImplantRemoved(Entity<MindShieldImplantComponent> ent, ref ImplantRemovedEvent args)
|
||||
{
|
||||
RemComp<MindShieldComponent>(args.Container.Owner);
|
||||
RemComp<MindShieldComponent>(args.Implanted);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user