U_I Phase 2.1: Fix missing tails, now double tails

This commit is contained in:
Arokha Sieyes
2018-03-08 00:12:12 -05:00
parent 53a185f838
commit 3f13a89b89
2 changed files with 13 additions and 7 deletions

View File

@@ -123,6 +123,7 @@
hud_list[IMPTRACK_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK)
hud_list[SPECIALROLE_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL)
hud_list[STATUS_HUD_OOC] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC)
add_overlay(hud_list)
/mob/living/carbon/human/recalculate_vis()
if(!vis_enabled || !plane_holder)

View File

@@ -775,13 +775,12 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
return
remove_layer(TAIL_LAYER)
var/species_tail = species.get_tail(src)
//This one is actually not that bad I guess.
if(species_tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL))
var/icon/tail_s = get_tail_icon()
overlays_standing[TAIL_LAYER] = image(tail_s, icon_state = "[species_tail]_s")
overlays_standing[TAIL_LAYER] = image(icon = tail_s, icon_state = "[species_tail]_s", layer = BODY_LAYER+TAIL_LAYER)
animate_tail_reset()
apply_layer(TAIL_LAYER)
@@ -808,12 +807,16 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
/mob/living/carbon/human/proc/set_tail_state(var/t_state)
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
remove_layer(TAIL_LAYER)
if(tail_overlay && species.get_tail_animation(src))
tail_overlay.icon_state = t_state
apply_layer(TAIL_LAYER)
return tail_overlay
return null
if(tail_overlay)
overlays_standing[TAIL_LAYER] = tail_overlay
if(species.get_tail_animation(src))
tail_overlay.icon_state = t_state
. = tail_overlay
apply_layer(TAIL_LAYER)
//Not really once, since BYOND can't do that.
//Update this if the ability to flick() images or make looping animation start at the first frame is ever added.
@@ -827,7 +830,9 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
var/image/tail_overlay = overlays_standing[TAIL_LAYER]
if(tail_overlay && tail_overlay.icon_state == t_state)
return //let the existing animation finish
remove_layer(TAIL_LAYER)
tail_overlay = set_tail_state(t_state)
if(tail_overlay)
spawn(20)