From 1a01a327b9f4460cc026a198febf3e7fb1d8260b Mon Sep 17 00:00:00 2001 From: Dip Date: Thu, 17 Sep 2020 17:41:47 -0300 Subject: [PATCH] Fixes shitcode:tm: --- code/game/objects/structures/mirror.dm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 38696231..c241b054 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -25,18 +25,20 @@ var/mob/living/carbon/human/H = user //Jay's mirror code suggestion //This will be where the person gets to select their appearance instead of the random character - if (world.time <= (user.time_initialized + 900) && user.mirrorcanloadappearance == TRUE) - to_chat(user, "You peer into the mirror. Make sure you have your ID in your ID slot, if you have one.") - if(alert(user, "Would you like to load your currently loaded character's appearance?", "This can only be done up until 90s after you spawn.", "Yes", "No") == "Yes" && world.time <= (user.time_initialized + 900)) - user.client.prefs.copy_to(user) - user.real_name = user.client.prefs.real_name + if (world.time <= (H.time_initialized + 900) && H.mirrorcanloadappearance == TRUE) + to_chat(H, "You peer into the mirror. Make sure you have your ID in your ID slot, if you have one.") + if(alert(user, "Would you like to load your currently loaded character's appearance?", "This can only be done up until 90s after you spawn.", "Yes", "No") == "Yes" && world.time <= (H.time_initialized + 900)) + H.client.prefs.copy_to(user) + H.real_name = H.client.prefs.real_name + H.mind.name = H.real_name + H.dna.update_dna_identity() var/obj/item/card/id/idCard = user.get_idcard() if (idCard != null) - idCard.update_label(user.real_name, idCard.assignment) - idCard.registered_name = user.real_name - user.mirrorcanloadappearance = FALSE - SEND_SOUND(user, 'sound/magic/charge.ogg') - to_chat(user, "Your head aches for a second. You feel like this is how things should have been.") + idCard.update_label(H.real_name, idCard.assignment) + idCard.registered_name = H.real_name + H.mirrorcanloadappearance = FALSE + SEND_SOUND(H, 'sound/magic/charge.ogg') + to_chat(H, "Your head aches for a second. You feel like this is how things should have been.") log_game("[key_name(user)] has loaded their default appearance for a ghost role.") message_admins("[ADMIN_LOOKUPFLW(user)] has loaded their default appearance for a ghost role.") return