From fe1e9706c104c82bbb7477d60c798f2b44c9bdf6 Mon Sep 17 00:00:00 2001 From: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Date: Sun, 30 Apr 2023 14:04:41 -0400 Subject: [PATCH] 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 :cl: admin: Enslaving mobs is now logged in game.log /:cl: --- code/datums/mind/antag.dm | 3 +++ code/modules/mob_spawn/ghost_roles/golem_roles.dm | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/datums/mind/antag.dm b/code/datums/mind/antag.dm index b7ed150784c..ba449261131 100644 --- a/code/datums/mind/antag.dm +++ b/code/datums/mind/antag.dm @@ -216,6 +216,9 @@ current.faction |= creator.faction creator.faction |= current.faction + current.log_message("has been enslaved to [key_name(creator)].", LOG_GAME) + log_admin("[key_name(current)] has been enslaved to [key_name(creator)].") + if(creator.mind?.special_role) message_admins("[ADMIN_LOOKUPFLW(current)] has been created by [ADMIN_LOOKUPFLW(creator)], an antagonist.") to_chat(current, span_userdanger("Despite your creator's current allegiances, your true master remains [creator.real_name]. If their loyalties change, so do yours. This will never change unless your creator's body is destroyed.")) diff --git a/code/modules/mob_spawn/ghost_roles/golem_roles.dm b/code/modules/mob_spawn/ghost_roles/golem_roles.dm index 7df4e530a75..483646f98ad 100644 --- a/code/modules/mob_spawn/ghost_roles/golem_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/golem_roles.dm @@ -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()