Merge pull request #3292 from VOREStation/aro-resizefix2

Fix HUD alignment on non-1.0 spawn scales
This commit is contained in:
Aronai Sieyes
2018-03-18 19:46:28 -04:00
committed by GitHub
2 changed files with 6 additions and 4 deletions
@@ -41,13 +41,12 @@
pref.size_multiplier = initial(pref.size_multiplier)
/datum/category_item/player_setup_item/vore/size/copy_to_mob(var/mob/living/carbon/human/character)
character.size_multiplier = pref.size_multiplier
character.weight = pref.weight_vr
character.weight_gain = pref.weight_gain
character.weight_loss = pref.weight_loss
character.fuzzy = pref.fuzzy
character.appearance_flags -= pref.fuzzy*PIXEL_SCALE
character.update_transform()
character.resize(pref.size_multiplier, animate = FALSE)
/datum/category_item/player_setup_item/vore/size/content(var/mob/user)
. += "<br>"
+5 -2
View File
@@ -64,6 +64,8 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
/mob/living/proc/resize(var/new_size, var/animate = TRUE)
if(size_multiplier == new_size)
return 1
size_multiplier = new_size //Change size_multiplier so that other items can interact with them
if(animate)
var/change = new_size - size_multiplier
var/duration = (abs(change)+0.25) SECONDS
@@ -79,7 +81,8 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
var/aura_loops = round((duration)/aura_anim_duration)
animate_aura(src, color = aura_color, offset = aura_offset, anim_duration = aura_anim_duration, loops = aura_loops, grow_to = aura_grow_to)
size_multiplier = new_size //Change size_multiplier so that other items can interact with them
else
update_transform() //Lame way
/mob/living/carbon/human/resize(var/new_size, var/animate = TRUE)
if(..()) return 1
@@ -90,7 +93,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
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)
/mob/living/carbon/human/dummy/mannequin/resize(var/new_size, var/animate = TRUE)
size_multiplier = new_size
/**