Fix suicide logs (#31661)

Make suicide logs include the username, as well as the character(where possible)
This commit is contained in:
nikthechampiongr
2024-08-31 08:26:52 +00:00
committed by GitHub
parent f22db1fa1b
commit 99db9ea39d
2 changed files with 20 additions and 5 deletions

View File

@@ -571,14 +571,14 @@ namespace Content.Server.Ghost
}
}
if (playerEntity != null)
_adminLogger.Add(LogType.Mind, $"{EntityManager.ToPrettyString(playerEntity.Value):player} ghosted{(!canReturn ? " (non-returnable)" : "")}");
var ghost = SpawnGhost((mindId, mind), position, canReturn);
if (ghost == null)
return false;
if (playerEntity != null)
_adminLogger.Add(LogType.Mind, $"{EntityManager.ToPrettyString(playerEntity.Value):player} ghosted{(!canReturn ? " (non-returnable)" : "")}");
return true;
}
}