Fix ControlMob on already controlled mob (#3868)
This commit is contained in:
@@ -85,7 +85,6 @@ namespace Content.Server.Administration
|
||||
// TODO VERB ICON control mob icon
|
||||
verb.Act = () =>
|
||||
{
|
||||
targetMind.Mind?.TransferTo(null);
|
||||
player.ContentData()?.Mind?.TransferTo(args.Target, ghostCheckOverride: true);
|
||||
};
|
||||
args.Verbs.Add(verb);
|
||||
|
||||
@@ -60,7 +60,6 @@ namespace Content.Server.Administration.Commands
|
||||
|
||||
DebugTools.AssertNotNull(mind);
|
||||
|
||||
mindComponent.Mind?.TransferTo(null);
|
||||
mind!.TransferTo(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Objectives;
|
||||
@@ -254,8 +255,7 @@ namespace Content.Server.Mind
|
||||
}
|
||||
else if (component.HasMind)
|
||||
{
|
||||
// TODO: Kick them out, maybe?
|
||||
throw new ArgumentException("That entity already has a mind.", nameof(entity));
|
||||
EntitySystem.Get<GameTicker>().OnGhostAttempt(component.Mind!, false);
|
||||
}
|
||||
|
||||
if (entity.TryGetComponent(out ActorComponent? actor))
|
||||
|
||||
Reference in New Issue
Block a user