Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spatison committed Oct 12, 2024
1 parent 6096831 commit a7109e3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ private void OnGetStatusIconsEvent(
|| !TryComp(_player.LocalEntity, out MindSlaveComponent? ownerMindSlave))
return;

var mindSlaveIcon = MindslaveIcon(uid, ownerMindSlave);
var mindSlaveIcon = MindSlaveIcon(uid, ownerMindSlave);
args.StatusIcons.AddRange(mindSlaveIcon);
}

private IEnumerable<StatusIconPrototype> MindslaveIcon(EntityUid uid, MindSlaveComponent mindSlave)
private IEnumerable<StatusIconPrototype> MindSlaveIcon(EntityUid uid, MindSlaveComponent mindSlave)
{
var result = new List<StatusIconPrototype>();
string iconType;
Expand Down
22 changes: 13 additions & 9 deletions Content.Server/_White/Implants/ImplantsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,23 @@ private void MindSlaveRemoved(EntityUid user, EntityUid target)
/// </summary>
private bool MindSlaveCheck(EntityUid user, EntityUid target)
{
string? message = null;
string message;
if (target == user)
{
message = Loc.GetString("mindslave-target-self");

if (HasComp<MindShieldComponent>(target)
|| HasComp<RevolutionaryComponent>(target)
|| !_mind.TryGetMind(target, out _, out _)
|| (TryComp<MindSlaveComponent>(target, out var mindSlave)
&& mindSlave.Master.HasValue))
}
else if (HasComp<MindShieldComponent>(target)
|| HasComp<RevolutionaryComponent>(target)
|| !_mind.TryGetMind(target, out _, out _)
|| (TryComp<MindSlaveComponent>(target, out var mindSlave)
&& mindSlave.Master.HasValue))
{
message = Loc.GetString("mindslave-cant-insert");

if (message == null)
}
else
{
return true;
}

_popup.PopupEntity(message, target, user);
return false;
Expand Down

0 comments on commit a7109e3

Please sign in to comment.