Fix not removing RevolutionaryRoleComponent from minds on mindshield application (#20832)
* Fix not removing RevolutionaryRoleComponent from minds on mindshield application * Simplify other part of the mindshield code * Fix being able to mindshield head revs * Other way around
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Content.Shared.Revolutionary.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Mindshield.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Revolutionary.Components;
|
||||
using Content.Shared.Stunnable;
|
||||
|
||||
namespace Content.Shared.Revolutionary;
|
||||
@@ -22,7 +22,13 @@ public sealed class SharedRevolutionarySystem : EntitySystem
|
||||
/// </summary>
|
||||
private void MindShieldImplanted(EntityUid uid, MindShieldComponent comp, MapInitEvent init)
|
||||
{
|
||||
if (HasComp<RevolutionaryComponent>(uid) && !HasComp<HeadRevolutionaryComponent>(uid))
|
||||
if (HasComp<HeadRevolutionaryComponent>(uid))
|
||||
{
|
||||
RemCompDeferred<MindShieldComponent>(uid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasComp<RevolutionaryComponent>(uid))
|
||||
{
|
||||
var stunTime = TimeSpan.FromSeconds(4);
|
||||
var name = Identity.Entity(uid, EntityManager);
|
||||
@@ -30,9 +36,5 @@ public sealed class SharedRevolutionarySystem : EntitySystem
|
||||
_sharedStun.TryParalyze(uid, stunTime, true);
|
||||
_popupSystem.PopupEntity(Loc.GetString("rev-break-control", ("name", name)), uid);
|
||||
}
|
||||
else if (HasComp<HeadRevolutionaryComponent>(uid))
|
||||
{
|
||||
RemCompDeferred<MindShieldComponent>(uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user