Adds a game log for enslaving (#75038)

## About The Pull Request

A mob being enslaved to another is now logged in game logs. This hits
sentience potions, guardians, and Golems. This helps admins know through
logs who made/used what.

## Why It's Good For The Game

I was told that it's pretty hard to tell who made Golems because this
type of info isn't logged, so you can't check it post-round. This should
help admins with that.

## Changelog

🆑
admin: Enslaving mobs is now logged in game.log
/🆑
This commit is contained in:
John Willard
2023-04-30 12:04:41 -06:00
committed by GitHub
parent fb60c65619
commit fe1e9706c1
2 changed files with 5 additions and 3 deletions
@@ -59,6 +59,8 @@
to_chat(new_spawn, "Build golem shells in the autolathe, and feed refined mineral sheets to the shells to bring them to life! \
You are generally a peaceful group unless provoked.")
try_keep_home(new_spawn)
new_spawn.log_message("possessed a free golem shell.", LOG_GAME)
log_admin("[key_name(new_spawn)] possessed a free golem shell.")
else if(new_spawn.mind)
new_spawn.mind.enslave_mind_to_creator(real_owner)
@@ -66,9 +68,6 @@
else
stack_trace("[type] created a golem without a mind.")
new_spawn.log_message("possessed a golem shell[real_owner ? " enslaved to [key_name(real_owner)]" : ""].", LOG_GAME)
log_admin("[key_name(new_spawn)] possessed a golem shell[real_owner ? " enslaved to [key_name(real_owner)]" : ""].")
if(ishuman(new_spawn))
var/mob/living/carbon/human/human_spawn = new_spawn
human_spawn.set_cloned_appearance()