mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Make hud resize more robust for empty lists (manequins)
This commit is contained in:
@@ -82,12 +82,13 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
|
||||
size_multiplier = new_size //Change size_multiplier so that other items can interact with them
|
||||
|
||||
/mob/living/carbon/human/resize(var/new_size, var/animate = TRUE)
|
||||
if(..()) return 1
|
||||
var/new_y_offset = 32 * (size_multiplier - 1)
|
||||
for(var/index = 1 to hud_list.len)
|
||||
var/image/HI = grab_hud(index)
|
||||
HI.pixel_y = new_y_offset
|
||||
apply_hud(index, HI)
|
||||
. = ..()
|
||||
if(LAZYLEN(hud_list) && has_huds)
|
||||
var/new_y_offset = 32 * (size_multiplier - 1)
|
||||
for(var/index = 1 to hud_list.len)
|
||||
var/image/HI = grab_hud(index)
|
||||
HI.pixel_y = new_y_offset
|
||||
apply_hud(index, HI)
|
||||
|
||||
// Optimize mannequins - never a point to animating or doing HUDs on these.
|
||||
/mob/living/carbon/human/dummy/mannequin/resize(var/new_size)
|
||||
|
||||
Reference in New Issue
Block a user