From 82d61c476b0052e22b8b8c1754ff053f3bf0ca7e Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 2 May 2023 20:48:24 +0100 Subject: [PATCH] [MIRROR] Adds a game log for enslaving [MDB IGNORE] (#20853) * 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: * Adds a game log for enslaving --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- 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 91bc65a44d1..8f0e26f04df 100644 --- a/code/datums/mind/antag.dm +++ b/code/datums/mind/antag.dm @@ -217,6 +217,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()