From 46a1b4b9459734ce96d9622d399167a014fab5a0 Mon Sep 17 00:00:00 2001 From: Mosley <93835010+MosleyTheMalO@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:33:57 -0500 Subject: [PATCH] size examine refractor --- code/modules/mob/living/carbon/examine.dm | 6 ++++++ .../code/modules/mob/living/carbon/examine.dm | 11 +++++++++++ tgstation.dme | 1 + 3 files changed, 18 insertions(+) create mode 100644 modular_zzplurt/code/modules/mob/living/carbon/examine.dm diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index c3a4544e50718..fbd19dff25496 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -51,6 +51,12 @@ if (length(status_examines)) . += status_examines + //SPLURT EDIT ADDITION - Sizecode + var/list/size_examines = get_size_examine_info(user) + if (length(size_examines)) + . += size_examines + //SPLURT EDIT ADDITION END + if(get_bodypart(BODY_ZONE_HEAD) && !get_organ_by_type(/obj/item/organ/internal/brain)) . += span_deadsay("It appears that [t_his] brain is missing...") diff --git a/modular_zzplurt/code/modules/mob/living/carbon/examine.dm b/modular_zzplurt/code/modules/mob/living/carbon/examine.dm new file mode 100644 index 0000000000000..7ca47851a51c8 --- /dev/null +++ b/modular_zzplurt/code/modules/mob/living/carbon/examine.dm @@ -0,0 +1,11 @@ +/mob/living/carbon/proc/get_size_examine_info(mob/living/user) + . = list() + //Approximate character height based on current sprite scale + var/dispSize = round(12*get_size(src)) // gets the character's sprite size percent and converts it to the nearest half foot + if(dispSize % 2) // returns 1 or 0. 1 meaning the height is not exact and the code below will execute, 0 meaning the height is exact and the else will trigger. + dispSize = dispSize - 1 //makes it even + dispSize = dispSize / 2 //rounds it out + . += "[t_He] appear\s to be around [dispSize] and a half feet tall." + else + dispSize = dispSize / 2 + . += "[t_He] appear\s to be around [dispSize] feet tall." diff --git a/tgstation.dme b/tgstation.dme index 915a7956f7ae8..dd5089682bfcd 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9431,6 +9431,7 @@ #include "modular_zzplurt\code\modules\mob\living\living.dm" #include "modular_zzplurt\code\modules\mob\living\living_defines.dm" #include "modular_zzplurt\code\modules\mob\living\basic\space_fauna\wumborian_fugu\fugu_gland.dm" +#include "modular_zzplurt\code\modules\mob\living\carbon\examine.dm" #include "modular_zzplurt\code\modules\mob\living\carbon\human\_species.dm" #include "modular_zzplurt\code\modules\mob\living\carbon\human\human.dm" #include "modular_zzplurt\code\modules\mob\living\carbon\human\human_defense.dm"