From 93461d7118718ccab554075b4046c6a2cf636967 Mon Sep 17 00:00:00 2001 From: QuoteFox <49098813+quotefox@users.noreply.github.com> Date: Sun, 5 Jul 2020 13:37:14 +0100 Subject: [PATCH] Body size cloner fix! When cloning, they will now apply your body size. No more forced resize on cloning! --- code/__DEFINES/citadel_defines.dm | 4 +++- code/game/machinery/cloning.dm | 3 ++- code/modules/client/preferences.dm | 4 ++-- code/modules/mob/dead/new_player/new_player.dm | 9 +++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 5c7c8776..d7e08081 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -69,7 +69,9 @@ #define BREASTS_SIZE_HUGE 16 #define BREASTS_SIZE_MASSIVE 17 #define BREASTS_SIZE_GIGA 25 - +//Bodysize Limits +#define MIN_BODYSIZE 90 +#define MAX_BODYSIZE 110 #define BREASTS_SIZE_MIN BREASTS_SIZE_A #define BREASTS_SIZE_DEF BREASTS_SIZE_D diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 855ede0e..9becb05f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -164,7 +164,8 @@ var/mob/living/carbon/human/H = new /mob/living/carbon/human(src) H.hardset_dna(ui, mutation_index, H.real_name, null, mrace, features) - + if (H.custom_body_size) + H.size_multiplier = (max(min( round((H.custom_body_size)), MAX_BODYSIZE),MIN_BODYSIZE)* 0.01) //set their size if they are cloning if(prob(50 - efficiency*10)) //Chance to give a bad mutation. H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) //100% bad mutation. Can be cured with mutadone. diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c565c44e..67247cdc 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2142,9 +2142,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) //Hyperstation Body Size if("bodysize") - var/new_bodysize = input(user, "Choose your desired sprite size:\n(85%-110%), Warning: May make your character look distorted!", "Character Preference") as num|null + var/new_bodysize = input(user, "Choose your desired sprite size:\n([MIN_BODYSIZE]-[MAX_BODYSIZE]), Warning: May make your character look distorted!", "Character Preference") as num|null if (new_bodysize) - body_size = max(min( round(text2num(new_bodysize)), 110),85) + body_size = max(min( round(text2num(new_bodysize)), MAX_BODYSIZE),MIN_BODYSIZE) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index bfe42b5a..7a027c69 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -578,12 +578,9 @@ mind.transfer_to(H) //won't transfer key since the mind is not active H.name = real_name - - - //h13 assign your characters custom height. - if (H.custom_body_size > 0) - H.size_multiplier = (H.custom_body_size * 0.01) - + //h13 assign your characters custom height. + if (H.custom_body_size) //Do they have it set? + H.size_multiplier = (max(min( round((H.custom_body_size)), MAX_BODYSIZE),MIN_BODYSIZE)* 0.01) //h13 give your starting impregchance (30%) if (H.breedable == TRUE) H.impregchance = 30