diff --git a/GainStation13/code/modules/mob/living/species.dm b/GainStation13/code/modules/mob/living/species.dm index 5ab43d3b93..ab129d5a62 100644 --- a/GainStation13/code/modules/mob/living/species.dm +++ b/GainStation13/code/modules/mob/living/species.dm @@ -271,7 +271,13 @@ fatness_delay = min(fatness_delay, delay_cap) return fatness_delay +/datum/species/proc/grant_resize_others(mob/living/carbon/human/H) + if(!H.resize_others) + H.resize_others = new(src) + H.resize_others.Grant(H) + /datum/species/proc/handle_fatness(mob/living/carbon/human/H) + grant_resize_others(H) handle_helplessness(H) H.handle_modular_items() diff --git a/GainStation13/code/modules/resize/height_limits.dm b/GainStation13/code/modules/resize/height_limits.dm new file mode 100644 index 0000000000..fa2f40f059 --- /dev/null +++ b/GainStation13/code/modules/resize/height_limits.dm @@ -0,0 +1,44 @@ +/mob/ + var/datum/action/resize_others/resize_others + var/see_resized_others = FALSE + +/datum/action/resize_others + name = "Toggle Others' Giant Sprites" + desc = "Others will now look small to you." + icon_icon = 'icons/mob/screen_gen_old.dmi' + button_icon_state = "health1" //You can change this if you want + background_icon_state = "bg_alien" //But keep this as a distinct background + var/small = FALSE + var/image/small_icon + +/datum/action/resize_others/Trigger() + ..() + owner.see_resized_others = !owner.see_resized_others + return TRUE + +/datum/atom_hud/alternate_appearance/basic/showSmall + +/datum/atom_hud/alternate_appearance/basic/showSmall/New() + ..() + for(var/mob in GLOB.player_list) + if(mobShouldSee(mob)) + add_hud_to(mob) + +/datum/atom_hud/alternate_appearance/basic/blessedAware/mobShouldSee(mob/M) + if(M.mind) + if(M.see_resized_others == TRUE) + return TRUE + return FALSE + +/datum/action/sizecode_resize/Grant(mob/M, safety=FALSE) + if(ishuman(M) && !safety) //this probably gets called before a person gets overlays on roundstart, so try again + if(!LAZYLEN(M.overlays)) + addtimer(CALLBACK(src,PROC_REF(Grant), M, TRUE), 5) //https://www.youtube.com/watch?v=QQ-aYZzlDeo + return + + ..() + if(!owner) + return + + owner.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/showSmall, "gscode_smallsprite", small_icon, FALSE) + message_admins("generated") diff --git a/tgstation.dme b/tgstation.dme index e6836a43b0..35cccafc22 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4075,6 +4075,7 @@ #include "GainStation13\code\modules\research\designs\nutri_designs.dm" #include "GainStation13\code\modules\research\nanites\nanite_programs\fattening.dm" #include "GainStation13\code\modules\research\techweb\nutritech_nodes.dm" +#include "GainStation13\code\modules\resize\height_limits.dm" #include "GainStation13\code\modules\surgery\organs\augments.dm" #include "GainStation13\code\modules\surgery\organs\tongue.dm" #include "GainStation13\code\modules\vehicles\grocery_cart_scooter.dm"