From 64777746d021da1ae0aec7edb98bd6e7eb4dce37 Mon Sep 17 00:00:00 2001
From: DetectiveEnotsky <87281888+DetectiveEnotsky@users.noreply.github.com>
Date: Tue, 16 Jan 2024 14:37:03 +0300
Subject: [PATCH] Update mob_helpers.dm
---
code/modules/mob/mob_helpers.dm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index cdad94cf3f..9ea7f89f13 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -600,3 +600,26 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return
return TRUE
+/mob/proc/checkloadappearance()
+ var/mob/living/carbon/human/H = src
+ //This will be where the person gets to select their appearance instead of the random character
+ if (H.canloadappearance)
+ SEND_SOUND(H, 'sound/misc/server-ready.ogg')
+ to_chat(H, "This ghost role allows you to select your loaded character's appearance.")
+ if(alert(H, "Would you like to load your currently loaded character's appearance?", "Yes", "No") == "Yes")
+ if(alert(H, "You should only load a character that has not currently died in the round. Do you accept this?", "Warning", "Yes", "No") == "Yes")
+ H.client.prefs.copy_to(H)
+ H.real_name = H.client.prefs.real_name
+ H.mind.name = H.real_name //Makes sure to change their mind name to their real name.
+ SSquirks.AssignQuirks(H, H.client, TRUE, FALSE, H.job, FALSE)//This Assigns the selected character's quirks
+ H.dna.update_dna_identity() //This makes sure their DNA is updated.
+ var/obj/item/card/id/idCard = H.get_idcard() //Time to change their ID card as well if they have one.
+ if (idCard != null)
+ idCard.update_label(H.real_name, idCard.assignment)
+ idCard.registered_name = H.real_name
+ ADD_TRAIT(H,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT) //Makes sure they are exempt from health events.
+ SEND_SOUND(H, 'sound/magic/charge.ogg') //Fluff
+ to_chat(H, "Your head aches for a second. You feel like this is how things should have been.")
+ log_game("[key_name(H)] has loaded their default appearance for a ghost role.")
+ message_admins("[ADMIN_LOOKUPFLW(H)] has loaded their default appearance for a ghost role.")
+ return