diff --git a/jollystation.dme b/jollystation.dme index 608718ed30f3..8c6d94ddc2ff 100644 --- a/jollystation.dme +++ b/jollystation.dme @@ -3862,6 +3862,10 @@ #include "jollystation_modules\code\datums\id_trim\jobs.dm" #include "jollystation_modules\code\datums\keybinding\communication.dm" #include "jollystation_modules\code\datums\mood_events\reagent_mood_events.dm" +#include "jollystation_modules\code\datums\mutations\cold_adaptation.dm" +#include "jollystation_modules\code\datums\mutations\hot_adaptation.dm" +#include "jollystation_modules\code\datums\mutations\space_adapt.dm" +#include "jollystation_modules\code\datums\mutations\vacuum_immunity.dm" #include "jollystation_modules\code\datums\pain\pain.dm" #include "jollystation_modules\code\datums\pain\pain_helpers.dm" #include "jollystation_modules\code\datums\quirks\_quirk_blacklist.dm" @@ -3875,6 +3879,7 @@ #include "jollystation_modules\code\game\objects\unique_examine_items.dm" #include "jollystation_modules\code\game\objects\effects\landmarks.dm" #include "jollystation_modules\code\game\objects\effects\decals\turfdecal\textured.dm" +#include "jollystation_modules\code\game\objects\items\dna_injector.dm" #include "jollystation_modules\code\game\objects\items\locker_spawners.dm" #include "jollystation_modules\code\game\objects\items\devices\PDA\PDA_types.dm" #include "jollystation_modules\code\game\objects\items\devices\radio\encryptionkey.dm" diff --git a/jollystation_modules/code/__DEFINES/DNA.dm b/jollystation_modules/code/__DEFINES/DNA.dm index cce26d5192f6..6b676c305473 100644 --- a/jollystation_modules/code/__DEFINES/DNA.dm +++ b/jollystation_modules/code/__DEFINES/DNA.dm @@ -1,4 +1,10 @@ //the real memes +//Species Defines #define SPECIES_SKRELL "skrell" #define SPECIES_REPLOID "reploid" + +//Mutation Defines +#define COLD_IMMUNITY /datum/mutation/human/cold_adaptation +#define HOT_IMMUNITY /datum/mutation/human/heat_adaptation +#define VACUUM_IMMUNITY /datum/mutation/human/vacuum_adaptation diff --git a/jollystation_modules/code/__DEFINES/pain_defines.dm b/jollystation_modules/code/__DEFINES/pain_defines.dm index 9fc553dd2d22..c6efe0ba71d2 100644 --- a/jollystation_modules/code/__DEFINES/pain_defines.dm +++ b/jollystation_modules/code/__DEFINES/pain_defines.dm @@ -48,6 +48,7 @@ #define PAIN_MOD_QUIRK "quirk" #define PAIN_MOD_SPECIES "species" #define PAIN_MOD_OFF_STATION "off-station-pain-resistance" +#define PAIN_MOD_GENETICS "gene" /// ID for traits and modifiers gained by pain #define PAIN_LIMB_PARALYSIS "pain_paralysis" @@ -55,3 +56,17 @@ #define ACTIONSPEED_ID_PAIN "pain_actionspeed" #define TRAIT_EXTRA_PAIN "extra_pain" #define TRAIT_OFF_STATION_PAIN_RESISTANCE "pain_resistance_off_station" + +//Originally in pain_helpers.dm, moved here for superseding issues +/// Cause [amount] pain of default (BRUTE) damage type to [target_zone] +#define cause_pain(target_zone, amount) pain_controller?.adjust_bodypart_pain(target_zone, amount) +/// Cause [amount] pain of [type] damage type to [target_zone] +#define cause_typed_pain(target_zone, amount, dam_type) pain_controller?.adjust_bodypart_pain(target_zone, amount, dam_type) +/// Do pain related [emote] from a mob, and start a [cooldown] long cooldown before a pain emote can be done again. +#define pain_emote(emote, cooldown) pain_controller?.do_pain_emote(emote, cooldown) +/// Increase the minimum amount of pain [zone] can have for [time] +#define apply_min_pain(target_zone, amount, time) apply_status_effect(STATUS_EFFECT_MIN_PAIN, target_zone, amount, time) +/// Set [id] pain mod to [amount] +#define set_pain_mod(id, amount) pain_controller?.set_pain_modifier(id, amount) +/// Unset [id] pain mod +#define unset_pain_mod(id) pain_controller?.unset_pain_modifier(id) diff --git a/jollystation_modules/code/datums/mutations/_combined.dm b/jollystation_modules/code/datums/mutations/_combined.dm new file mode 100644 index 000000000000..da72852057c0 --- /dev/null +++ b/jollystation_modules/code/datums/mutations/_combined.dm @@ -0,0 +1,5 @@ +//Gene combos +//Space adaptaion is a gene combo now +/datum/generecipe/space_adapt + required = "/datum/mutation/human/cold_adaptation; /datum/mutation/human/vacuum_adaptation" + result = SPACEMUT diff --git a/jollystation_modules/code/datums/mutations/cold_adaptation.dm b/jollystation_modules/code/datums/mutations/cold_adaptation.dm new file mode 100644 index 000000000000..d9d082c6c771 --- /dev/null +++ b/jollystation_modules/code/datums/mutations/cold_adaptation.dm @@ -0,0 +1,22 @@ +//Cold immunity +/datum/mutation/human/cold_adaptation + name = "Frigid Adaptation" + desc = "A pecuilar mutation that allows the host to be completely resistant to absolute zero." + quality = POSITIVE + difficulty = 32 + text_gain_indication = "Your body feels warm!" + time_coeff = 5 + instability = 20 + + +/datum/mutation/human/cold_adaptation/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + ADD_TRAIT(owner, TRAIT_RESISTCOLD, GENETIC_MUTATION) + owner.physiology.heat_mod *= 2 + +/datum/mutation/human/cold_adaptation/on_losing(mob/living/carbon/human/owner) + if(..()) + return + REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, GENETIC_MUTATION) + owner.physiology.heat_mod /= 2 diff --git a/jollystation_modules/code/datums/mutations/hot_adaptation.dm b/jollystation_modules/code/datums/mutations/hot_adaptation.dm new file mode 100644 index 000000000000..f0c243030232 --- /dev/null +++ b/jollystation_modules/code/datums/mutations/hot_adaptation.dm @@ -0,0 +1,22 @@ +//Heat immunity +/datum/mutation/human/heat_adaptation + name = "Swealtering Adaptation" + desc = "A pecuilar mutation that allows the host to be completely resistant to the hottest tempeatures known to man." + quality = POSITIVE + difficulty = 32 + text_gain_indication = "Your body feels cool!" + time_coeff = 5 + instability = 20 + + +/datum/mutation/human/heat_adaptation/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + ADD_TRAIT(owner, TRAIT_RESISTHEAT, GENETIC_MUTATION) + owner.physiology.cold_mod *= 2 + +/datum/mutation/human/heat_adaptation/on_losing(mob/living/carbon/human/owner) + if(..()) + return + REMOVE_TRAIT(owner, TRAIT_RESISTHEAT, GENETIC_MUTATION) + owner.physiology.cold_mod /= 2 diff --git a/jollystation_modules/code/datums/mutations/space_adapt.dm b/jollystation_modules/code/datums/mutations/space_adapt.dm new file mode 100644 index 000000000000..add93b3f1ad1 --- /dev/null +++ b/jollystation_modules/code/datums/mutations/space_adapt.dm @@ -0,0 +1,4 @@ +//Extends space adaptation for modular access + +/datum/mutation/human/space_adaptation + locked = TRUE //Should block this mutation from appearing in the consoles diff --git a/jollystation_modules/code/datums/mutations/vacuum_immunity.dm b/jollystation_modules/code/datums/mutations/vacuum_immunity.dm new file mode 100644 index 000000000000..97c5eb8688d8 --- /dev/null +++ b/jollystation_modules/code/datums/mutations/vacuum_immunity.dm @@ -0,0 +1,24 @@ +//Vacuum immunity +/datum/mutation/human/vacuum_adaptation + name = "Vacuum Adaptation" + desc = "A mysterious mutation that allows the host to be completely resistant the impervious vacuum of space." + quality = POSITIVE + difficulty = 24 + text_gain_indication = "Your body feels hollow!" + time_coeff = 5 + instability = 30 + + +/datum/mutation/human/vacuum_adaptation/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, GENETIC_MUTATION) + owner.physiology.oxy_mod *= 2.5 + owner.set_pain_mod(PAIN_MOD_GENETICS, 1.75) + +/datum/mutation/human/vacuum_adaptation/on_losing(mob/living/carbon/human/owner) + if(..()) + return + REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, GENETIC_MUTATION) + owner.physiology.oxy_mod /= 2.5 + owner.unset_pain_mod(PAIN_MOD_GENETICS) diff --git a/jollystation_modules/code/datums/pain/pain.dm b/jollystation_modules/code/datums/pain/pain.dm index 0106d19ce5b4..806fa3a44723 100644 --- a/jollystation_modules/code/datums/pain/pain.dm +++ b/jollystation_modules/code/datums/pain/pain.dm @@ -710,7 +710,7 @@ parent.remove_status_effect(STATUS_EFFECT_SHARP_PAIN) parent.remove_status_effect(STATUS_EFFECT_MIN_PAIN) for(var/mod in pain_mods) - if(mod == PAIN_MOD_QUIRK || mod == PAIN_MOD_SPECIES) + if(mod == PAIN_MOD_QUIRK || mod == PAIN_MOD_SPECIES || mod == PAIN_MOD_GENETICS) continue unset_pain_modifier(mod) diff --git a/jollystation_modules/code/datums/pain/pain_helpers.dm b/jollystation_modules/code/datums/pain/pain_helpers.dm index a827884ab25a..3352a0cdc4d0 100644 --- a/jollystation_modules/code/datums/pain/pain_helpers.dm +++ b/jollystation_modules/code/datums/pain/pain_helpers.dm @@ -15,19 +15,6 @@ QDEL_NULL(pain_controller) return ..() -/// Cause [amount] pain of default (BRUTE) damage type to [target_zone] -#define cause_pain(target_zone, amount) pain_controller?.adjust_bodypart_pain(target_zone, amount) -/// Cause [amount] pain of [type] damage type to [target_zone] -#define cause_typed_pain(target_zone, amount, dam_type) pain_controller?.adjust_bodypart_pain(target_zone, amount, dam_type) -/// Do pain related [emote] from a mob, and start a [cooldown] long cooldown before a pain emote can be done again. -#define pain_emote(emote, cooldown) pain_controller?.do_pain_emote(emote, cooldown) -/// Increase the minimum amount of pain [zone] can have for [time] -#define apply_min_pain(target_zone, amount, time) apply_status_effect(STATUS_EFFECT_MIN_PAIN, target_zone, amount, time) -/// Set [id] pain mod to [amount] -#define set_pain_mod(id, amount) pain_controller?.set_pain_modifier(id, amount) -/// Unset [id] pain mod -#define unset_pain_mod(id) pain_controller?.unset_pain_modifier(id) - /* * Cause [amount] of [dam_type] sharp pain to [target_zones]. * Sharp pain is for sudden spikes of pain that go away after [duration] deciseconds. diff --git a/jollystation_modules/code/game/objects/items/dna_injector.dm b/jollystation_modules/code/game/objects/items/dna_injector.dm new file mode 100644 index 000000000000..858047c8a142 --- /dev/null +++ b/jollystation_modules/code/game/objects/items/dna_injector.dm @@ -0,0 +1,38 @@ +//Mutators +//Cold mutator +/obj/item/dnainjector/coldmut + name = "\improper Cold Immunity injector" + desc = "Take a stroll on the Ice planet." + add_mutations = list(COLD_IMMUNITY) + +//Hot mutator +/obj/item/dnainjector/hotmut + name = "\improper Heat Immunity injector" + desc = "Take a stroll on Lavaland." + add_mutations = list(HOT_IMMUNITY) + +//Vacuum mutator +/obj/item/dnainjector/spacemut + name = "\improper Vacuum Immunity injector" + desc = "Take a stroll through space. Lungs required." + add_mutations = list(VACUUM_IMMUNITY) + +//Anti-Mutators; Main code has these so why not? + +//AntiCold mutator +/obj/item/dnainjector/anticoldmut + name = "\improper Anti-Cold Immunity injector" + desc = "Freeze to death." + remove_mutations = list(COLD_IMMUNITY) + +//AntiHot mutator +/obj/item/dnainjector/antihotmut + name = "\improper Anti-Heat Immunity injector" + desc = "Burn to Hell." + remove_mutations = list(HOT_IMMUNITY) + +//AntiVacuum mutator +/obj/item/dnainjector/antispacemut + name = "\improper Anti-Vacuum Immunity injector" + desc = "Crumble up like a used juice pouch." + remove_mutations = list(VACUUM_IMMUNITY)