From 1a01a327b9f4460cc026a198febf3e7fb1d8260b Mon Sep 17 00:00:00 2001 From: Dip Date: Thu, 17 Sep 2020 17:41:47 -0300 Subject: [PATCH 1/4] 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 From 7249a077b4d8d072b0e07d9b33d3eeadfd7e62af Mon Sep 17 00:00:00 2001 From: Dip Date: Thu, 17 Sep 2020 23:09:32 -0300 Subject: [PATCH 2/4] quirk fix --- code/game/objects/structures/mirror.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index c241b054..389f38f4 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -30,14 +30,15 @@ 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() + H.mind.name = H.real_name //Makes sure to change their mind name to their real name. + H.dna.update_dna_identity() //This makes sure their DNA is updated. + SSquirks.AssignQuirks(H, H.client, TRUE, FALSE, H.job, FALSE)//This Assigns the selected character's quirks + var/obj/item/card/id/idCard = user.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 - H.mirrorcanloadappearance = FALSE - SEND_SOUND(H, 'sound/magic/charge.ogg') + H.mirrorcanloadappearance = FALSE //Prevents them from using the mirror again. + 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(user)] has loaded their default appearance for a ghost role.") message_admins("[ADMIN_LOOKUPFLW(user)] has loaded their default appearance for a ghost role.") From c6f85670b2fe52e2a11725e5a3f9ff8dd206879b Mon Sep 17 00:00:00 2001 From: Dip Date: Thu, 17 Sep 2020 23:12:47 -0300 Subject: [PATCH 3/4] DUH. --- code/game/objects/structures/mirror.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 389f38f4..9403f59c 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -31,8 +31,8 @@ H.client.prefs.copy_to(user) 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. - H.dna.update_dna_identity() //This makes sure their DNA is updated. 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 = user.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) From 7165bc1892be7e721042c45dd551e7da9a82b3fb Mon Sep 17 00:00:00 2001 From: Dip Date: Fri, 18 Sep 2020 13:07:51 -0300 Subject: [PATCH 4/4] Assign body size + extras --- code/game/objects/structures/mirror.dm | 48 ++++++++++++----------- code/modules/antagonists/nukeop/nukeop.dm | 1 + code/modules/events/operative.dm | 1 + 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 9403f59c..e3478b08 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -23,30 +23,9 @@ if(ishuman(user)) 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 <= (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 //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 = user.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 - H.mirrorcanloadappearance = FALSE //Prevents them from using the mirror again. - 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(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 - else return + checkloadappearance(H, user) //see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments! //this is largely copypasted from there. - //handle facial hair (if necessary) if(H.gender == MALE) var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list @@ -66,6 +45,31 @@ H.update_hair() +/obj/structure/mirror/proc/checkloadappearance(mob/living/carbon/human/H, mob/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 <= (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(H) + if (H.custom_body_size) //Do they have a custom size set? + H.resize(H.custom_body_size * 0.01) + 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 = user.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 + H.mirrorcanloadappearance = FALSE //Prevents them from using the mirror again. + 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(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 + else return + /obj/structure/mirror/examine_status(mob/user) if(broken) return // no message spam diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm index 800448c0..e0e457af 100644 --- a/code/modules/antagonists/nukeop/nukeop.dm +++ b/code/modules/antagonists/nukeop/nukeop.dm @@ -36,6 +36,7 @@ H.set_species(/datum/species/human) //Plasamen burn up otherwise, and lizards are vulnerable to asimov AIs H.equipOutfit(nukeop_outfit) + H.mirrorcanloadappearance = TRUE //Also gives them the option to use a mirror to load their custom character. Good luck if they use a plasma. return TRUE /datum/antagonist/nukeop/greet() diff --git a/code/modules/events/operative.dm b/code/modules/events/operative.dm index 7fca4188..9008d9b1 100644 --- a/code/modules/events/operative.dm +++ b/code/modules/events/operative.dm @@ -32,6 +32,7 @@ Mind.active = 1 Mind.transfer_to(operative) Mind.add_antag_datum(/datum/antagonist/nukeop/lone) + operative.mirrorcanloadappearance = TRUE //If they can get to a mirror in time, good luck partner message_admins("[ADMIN_LOOKUPFLW(operative)] has been made into lone operative by an event.") log_game("[key_name(operative)] was spawned as a lone operative by an event.")