From ff918ced7e955581a77c8fbaa22b35153ec7cc97 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 22 Jun 2024 00:21:11 +1000 Subject: [PATCH] Tweaking to skeletal tails and icons. --- code/modules/mob/living/human/update_icons.dm | 22 ++++++++++++------ code/modules/organs/external/tail.dm | 4 ++++ mods/species/drakes/icons/skeleton.dmi | Bin 4209 -> 4237 bytes 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/human/update_icons.dm b/code/modules/mob/living/human/update_icons.dm index 6b53f860cbf..0109853188c 100644 --- a/code/modules/mob/living/human/update_icons.dm +++ b/code/modules/mob/living/human/update_icons.dm @@ -137,7 +137,7 @@ Please contact me on #coderbus IRC. ~Carn x // We are somehow updating with no torso, or a torso with no bodytype (probably gibbing). No point continuing. if(!root_bodytype) return - + var/matrix/M = matrix() if(current_posture?.prone && (root_bodytype.prone_overlay_offset[1] || root_bodytype.prone_overlay_offset[2])) M.Translate(root_bodytype.prone_overlay_offset[1], root_bodytype.prone_overlay_offset[2]) @@ -412,6 +412,14 @@ Please contact me on #coderbus IRC. ~Carn x return var/tail_state = tail_organ.get_tail() + if(tail_organ.limb_flags & ORGAN_FLAG_SKELETAL) + if(!tail_organ.bodytype?.skeletal_icon) + return + var/tail_cache_key = "[tail_state][tail_organ.bodytype.skeletal_icon]_skeletal" + if(!global.tail_icon_cache[tail_cache_key]) + global.tail_icon_cache[tail_cache_key] = icon(tail_organ.bodytype.skeletal_icon, tail_state) + return global.tail_icon_cache[tail_cache_key] + var/tail_icon = tail_organ.get_tail_icon() if(!tail_state || !tail_icon) return // No tail data! @@ -451,7 +459,7 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/human/proc/set_tail_state(var/t_state) var/obj/item/organ/external/tail/tail_organ = get_organ(BP_TAIL, /obj/item/organ/external/tail) - if(!tail_organ) + if(!tail_organ || (tail_organ.limb_flags & ORGAN_FLAG_SKELETAL)) return null var/image/tail_overlay = get_current_tail_image() if(tail_overlay && check_state_in_icon(tail_overlay.icon, t_state)) @@ -465,7 +473,7 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/human/proc/animate_tail_once(var/update_icons=1) var/obj/item/organ/external/tail/tail_organ = get_organ(BP_TAIL, /obj/item/organ/external/tail) - if(!tail_organ) + if(!tail_organ || (tail_organ.limb_flags & ORGAN_FLAG_SKELETAL)) return var/t_state = "[tail_organ.get_tail()]_once" @@ -486,7 +494,7 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/human/proc/animate_tail_start(var/update_icons=1) var/obj/item/organ/external/tail/tail_organ = get_organ(BP_TAIL, /obj/item/organ/external/tail) - if(!tail_organ) + if(!tail_organ || (tail_organ.limb_flags & ORGAN_FLAG_SKELETAL)) return var/tail_states = tail_organ.get_tail_states() if(tail_states) @@ -496,7 +504,7 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/human/proc/animate_tail_fast(var/update_icons=1) var/obj/item/organ/external/tail/tail_organ = get_organ(BP_TAIL, /obj/item/organ/external/tail) - if(!tail_organ) + if(!tail_organ || (tail_organ.limb_flags & ORGAN_FLAG_SKELETAL)) return var/tail_states = tail_organ.get_tail_states() if(tail_states) @@ -506,7 +514,7 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/human/proc/animate_tail_reset(var/update_icons=1) var/obj/item/organ/external/tail/tail_organ = get_organ(BP_TAIL, /obj/item/organ/external/tail) - if(!tail_organ) + if(!tail_organ || (tail_organ.limb_flags & ORGAN_FLAG_SKELETAL)) return var/tail_states = tail_organ.get_tail_states(src) if(stat != DEAD && tail_states) @@ -519,7 +527,7 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/human/proc/animate_tail_stop(var/update_icons=1) var/obj/item/organ/external/tail/tail_organ = get_organ(BP_TAIL, /obj/item/organ/external/tail) - if(!tail_organ) + if(!tail_organ || (tail_organ.limb_flags & ORGAN_FLAG_SKELETAL)) return set_tail_state("[tail_organ.get_tail()]_static") diff --git a/code/modules/organs/external/tail.dm b/code/modules/organs/external/tail.dm index 0425e7de994..09ba736bec2 100644 --- a/code/modules/organs/external/tail.dm +++ b/code/modules/organs/external/tail.dm @@ -28,6 +28,10 @@ /// How many random tail states are available for animations. var/tail_states = 1 +/obj/item/organ/external/tail/skeletonize() + . = ..() + owner?.update_tail_showing() + /obj/item/organ/external/tail/do_uninstall(in_place, detach, ignore_children, update_icon) var/mob/living/human/H = owner if(!(. = ..())) diff --git a/mods/species/drakes/icons/skeleton.dmi b/mods/species/drakes/icons/skeleton.dmi index 437a72a4b65afe2021c4c47ecbbc4498dea4477e..074776b10d6a2d0e8a02165fec62db15e84d25ef 100644 GIT binary patch delta 3915 zcmY+Ec|6qZ`o~qHX;F$KTT`}dkzJO?Fl0?0N;FjVNFM7jmTyt^u`gj5G0D~_OJo}= zjBOB+buyD>#+EINF>{_@zjMy>ocoXakNfqyU$6J|zOL)Db^(3yt@{Cho7)%;vkt;6 zPxS{<>UqHTO#{iQYBxysCQ;xkPsb*{FTL)^*;*;T0R%Sp&t*u8>#b}f=9H4M~%mxRE0EjusN>8GO&Xxu$k|g`mNUFHG3i`gTTrenI4VALIuv{y^&8=tJcWe z>kPq~(pl9KP4Dn&)c|>NyNnAl$gFcaVPw#Ynd}bYeDV4NZDXg+HPE%BKCjqW+q!~sjT=JJkgt6G zIWohgGMfABgn)oeDO2pw|C|4PhkEx$e!5XrkI%01*S^9wG!hznKf^a1In!*bsH;3T z7nJM3eN*xJ#v!;Zl{;_?QRh4S65t(cX})&%hQ}wq!QfeLJSgBuw>U{jsF2dH#mk*l z`b{=1xxXbXA#Ua2-Cd{DYTe}7^!n>h<+x)#KzHl#{Kx4AM)J?#+0LZZ>3nD?U&=k1^o@a?Tj8LH@#oND*?2ehIT{q0?PQQbSYiZ1BLFs*@&W zMpHhuDb~L7Gw3K)Bq4suEm?kIAfBX2Y~E#P5r58CE;PpBF}Y4+-|BG3>>0VKdlUv| zK_aq?qeET zgedXi|1}n>PVEB-03=%m~7#nr&ia`KQzF{DB<5I;$f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