Universal Height Toggle

This commit is contained in:
Alphas00
2025-01-26 19:55:58 +01:00
parent 410f86be72
commit 9ee85193a0
3 changed files with 51 additions and 0 deletions
@@ -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()
@@ -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")
+1
View File
@@ -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"