]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Show "departed and moved on" for when a ghost role is taken (#21092)
authorcrazybrain23 <44417085+crazybrain23@users.noreply.github.com>
Fri, 27 Oct 2023 02:27:36 +0000 (03:27 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Oct 2023 02:27:36 +0000 (22:27 -0400)
* fix ghost role not counting for "departed and moved on"

* I don't think that bit was needed so away it goes

* hopefully finish the upsream merge

Content.Shared/Mind/SharedMindSystem.cs

index 6fc1c01dc23d1ed6aeadcab598bd6a09f9a0a9c8..9f5c51ac6e5b6c05f4c6d8ce7251b53cae656375 100644 (file)
@@ -147,15 +147,16 @@ public abstract class SharedMindSystem : EntitySystem
             return;
 
         var dead = _mobState.IsDead(uid);
+        var hasUserId = CompOrNull<MindComponent>(mindContainer.Mind)?.UserId;
         var hasSession = CompOrNull<MindComponent>(mindContainer.Mind)?.Session;
 
-        if (dead && !mindContainer.HasMind)
+        if (dead && hasUserId == null)
             args.PushMarkup($"[color=mediumpurple]{Loc.GetString("comp-mind-examined-dead-and-irrecoverable", ("ent", uid))}[/color]");
         else if (dead && hasSession == null)
             args.PushMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-dead-and-ssd", ("ent", uid))}[/color]");
         else if (dead)
             args.PushMarkup($"[color=red]{Loc.GetString("comp-mind-examined-dead", ("ent", uid))}[/color]");
-        else if (!mindContainer.HasMind)
+        else if (hasUserId == null)
             args.PushMarkup($"[color=mediumpurple]{Loc.GetString("comp-mind-examined-catatonic", ("ent", uid))}[/color]");
         else if (hasSession == null)
             args.PushMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-ssd", ("ent", uid))}[/color]");