Merge pull request #14770 from keronshb/spaceadaptaura

Changes Space Adapt to a proper animated outline so it doesn't look awful.
This commit is contained in:
silicons
2021-06-13 15:19:08 -07:00
committed by GitHub

View File

@@ -8,23 +8,24 @@
time_coeff = 5
instability = 30
/datum/mutation/human/space_adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
..()
if(!(type in visual_indicators))
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "space_adapt", -MUTATIONS_LAYER))
/datum/mutation/human/space_adaptation/get_visual_indicator()
return visual_indicators[type][1]
/datum/mutation/human/space_adaptation/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance")
owner.add_filter("space_glow", 2, list("type" = "outline", "color" = "#ffe46bd8", "size" = 1))
addtimer(CALLBACK(src, .proc/glow_loop, owner), rand(1,19))
/datum/mutation/human/space_adaptation/proc/glow_loop(mob/living/carbon/human/owner)
var/filter = owner.get_filter("space_glow")
if(filter)
animate(filter, alpha = 190, time = 15, loop = -1)
animate(alpha = 110, time = 25)
/datum/mutation/human/space_adaptation/on_losing(mob/living/carbon/human/owner)
if(..())
return
REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance")
owner.remove_filter("space_glow")