Skip to content

Commit

Permalink
size examine refractor
Browse files Browse the repository at this point in the history
  • Loading branch information
MosleyTheMalO committed Oct 27, 2024
1 parent b5fc9a4 commit 46a1b4b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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...")

Expand Down
11 changes: 11 additions & 0 deletions modular_zzplurt/code/modules/mob/living/carbon/examine.dm
Original file line number Diff line number Diff line change
@@ -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."
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 46a1b4b

Please sign in to comment.