Small changes for crit mobs to be able to gasp and dead mobs to show dead on examine (#5828)

* [ADD] changes to be able to identify living downed players

* [FIX] format of tryGetComponent, fixed string

* [CHANGE] PR mind component suggestions

* [CHANGE] trycomp based on qa feedback

* [CHANGE] Condensed mindcomponent as per feedback

Co-authored-by: fishfish458 <fishfish458>
This commit is contained in:
Fishfish458
2021-12-19 16:45:47 -06:00
committed by GitHub
parent a51b102949
commit 026f2ee313
4 changed files with 23 additions and 22 deletions

View File

@@ -137,22 +137,23 @@ namespace Content.Server.Mind.Components
_entMan.TryGetComponent<MobStateComponent?>(Owner, out var state) &&
state.IsDead();
if (!HasMind)
if (dead)
{
var aliveText =
$"[color=purple]{Loc.GetString("comp-mind-examined-catatonic", ("ent", Owner))}[/color]";
var deadText = $"[color=red]{Loc.GetString("comp-mind-examined-dead", ("ent", Owner))}[/color]";
message.AddMarkup(dead ? deadText : aliveText);
if (Mind?.Session == null) {
// Player has no session attached and dead
message.AddMarkup($"[color=yellow]{Loc.GetString("mind-component-no-mind-and-dead-text", ("ent", Owner))}[/color]");
} else {
// Player is dead with session
message.AddMarkup($"[color=red]{Loc.GetString("comp-mind-examined-dead", ("ent", Owner))}[/color]");
}
}
else if (!HasMind)
{
message.AddMarkup($"[color=purple]{Loc.GetString("comp-mind-examined-catatonic", ("ent", Owner))}[/color]");
}
else if (Mind?.Session == null)
{
if (dead) return;
var text =
$"[color=yellow]{Loc.GetString("comp-mind-examined-ssd", ("ent", Owner))}[/color]";
message.AddMarkup(text);
message.AddMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-ssd", ("ent", Owner))}[/color]");
}
}
}