Files
Bubberstation/code/datums/mutations/adaptation.dm
SkyratBot 6e029611ac [MIRROR] Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test [MDB IGNORE] (#19959)
* Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test

* MISSED MIRROR https://github.com/tgstation/tgstation/pull/71606

* Update modules_supply.dm

* Update tgstation.dme

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-27 03:26:52 +01:00

54 lines
2.3 KiB
Plaintext

/datum/mutation/human/temperature_adaptation
name = "Temperature Adaptation"
desc = "A strange mutation that renders the host immune to damage from extreme temperatures. Does not protect from vacuums."
quality = POSITIVE
difficulty = 16
text_gain_indication = "<span class='notice'>Your body feels warm!</span>"
instability = 25
conflicts = list(/datum/mutation/human/pressure_adaptation)
/datum/mutation/human/temperature_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', "fire", -MUTATIONS_LAYER))
/datum/mutation/human/temperature_adaptation/get_visual_indicator()
return visual_indicators[type][1]
/datum/mutation/human/temperature_adaptation/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_traits(list(TRAIT_RESISTCOLD, TRAIT_RESISTHEAT), GENETIC_MUTATION)
/datum/mutation/human/temperature_adaptation/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_traits(list(TRAIT_RESISTCOLD, TRAIT_RESISTHEAT), GENETIC_MUTATION)
/datum/mutation/human/pressure_adaptation
name = "Pressure Adaptation"
desc = "A strange mutation that renders the host immune to damage from both low and high pressure environments. Does not protect from temperature, including the cold of space."
quality = POSITIVE
difficulty = 16
text_gain_indication = "<span class='notice'>Your body feels numb!</span>"
instability = 25
conflicts = list(/datum/mutation/human/temperature_adaptation)
/datum/mutation/human/pressure_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', "pressure", -MUTATIONS_LAYER))
/datum/mutation/human/pressure_adaptation/get_visual_indicator()
return visual_indicators[type][1]
/datum/mutation/human/pressure_adaptation/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
owner.add_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTHIGHPRESSURE), GENETIC_MUTATION)
/datum/mutation/human/pressure_adaptation/on_losing(mob/living/carbon/human/owner)
if(..())
return
owner.remove_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTHIGHPRESSURE), GENETIC_MUTATION)