From f468e4940a2cdcb322d2f5684fc3fe1caea31dfb Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Mon, 26 Oct 2020 20:33:46 +0000 Subject: [PATCH] typo --- code/datums/dna.dm | 14 ++++++++------ code/modules/client/preferences.dm | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 45a9ec3bb3..3ca7f08fa7 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -699,11 +699,13 @@ //new size detected holder.resize = features["body_size"] / old_size holder.update_transform() - var/penalty_threshold = CONFIG_GET(number/threshold_body_size_penalty) - if(features["body_size"] < penalty_threshold && old_size >= penalty_threshold) - holder.maxhealth -= 10 //reduce the maxhealth - else - if(old_size < penalty_threshold && features["body_size"] >= penalty_threshold) - holder.maxhealth += 10 //give the maxhealth back + if(iscarbon(holder)) + var/mob/living/carbon/C = holder + var/penalty_threshold = CONFIG_GET(number/threshold_body_size_penalty) + if(features["body_size"] < penalty_threshold && old_size >= penalty_threshold) + C.maxHealth -= 10 //reduce the maxhealth + else + if(old_size < penalty_threshold && features["body_size"] >= penalty_threshold) + C.maxHealth += 10 //give the maxhealth back diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c2c4120925..4bd6122b5c 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2246,7 +2246,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("body_size") var/new_body_size = input(user, "Choose your desired sprite size: (90-125%)\nWarning: This may make your character look distorted. Additionally, any size under 100% takes a 10% maximum health penalty", "Character Preference", features["body_size"]*100) as num|null if(new_body_size) - body_size = clamp(new_body_size * 0.01, CONFIG_GET(number/body_size_min), CONFIG_GET(number/body_size_max)) + features["body_size"] = clamp(new_body_size * 0.01, CONFIG_GET(number/body_size_min), CONFIG_GET(number/body_size_max)) if("tongue") var/selected_custom_tongue = input(user, "Choose your desired tongue (none means your species tongue)", "Character Preference") as null|anything in GLOB.roundstart_tongues @@ -2695,7 +2695,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/old_size = character.dna.features["body_size"] if(isdwarf(character)) character.dna.features["body_size"] = RESIZE_DEFAULT_SIZE - old_size = 1 + old_size = RESIZE_DEFAULT_SIZE if((parent && parent.can_have_part("meat_type")) || pref_species.mutant_bodyparts["meat_type"]) character.type_of_meat = GLOB.meat_types[features["meat_type"]]