From 75f967bd8868264e0d8442b9284d3a61cfc5c8c9 Mon Sep 17 00:00:00 2001 From: BoxyBoy Date: Thu, 29 Oct 2020 21:55:42 -0600 Subject: [PATCH] Character Size Examine Text Adds a line of examine text when examining a character and gives an aproximation of their height. --- code/modules/mob/living/carbon/human/examine.dm | 12 +++++++++++- hyperstation/code/modules/resize/resizing.dm | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index f155ff62..9f1584d3 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -7,6 +7,7 @@ var/t_has = p_have() var/t_is = p_are() var/obscure_name + var/dispSize = round(12*size_multiplier) // gets the character's sprite size percent and converts it to the nearest half foot if(isliving(user)) var/mob/living/L = user @@ -106,6 +107,15 @@ if(!isnull(effects_exam)) . += effects_exam + //Approximate character height based on current sprite scale + if(dispSize % 2) + dispSize = dispSize - 1 //makes it even + dispSize = dispSize / 2 //turns it into it's approximation in feet + . += "[t_He] appears to be around [dispSize] and a half feet tall." + else + dispSize = dispSize / 2 + . += "[t_He] appears to be around [dispSize] feet tall." + //Can be picked up? if(can_be_held) . += "[t_He] might be able to be picked up with Alt+Click!\n" @@ -333,7 +343,7 @@ if (length(msg)) . += "[msg.Join("")]" - + var/traitstring = get_trait_string() if(ishuman(user)) var/mob/living/carbon/human/H = user diff --git a/hyperstation/code/modules/resize/resizing.dm b/hyperstation/code/modules/resize/resizing.dm index 45b0a7ee..9d798592 100644 --- a/hyperstation/code/modules/resize/resizing.dm +++ b/hyperstation/code/modules/resize/resizing.dm @@ -1,4 +1,5 @@ //I am not a coder. Please fucking tear apart my code, and insult me for how awful I am at coding. Please and thank you. -Dahlular +//alright bet -BoxBoy var/const/RESIZE_MACRO = 6 var/const/RESIZE_HUGE = 4 var/const/RESIZE_BIG = 2