diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_syndidome.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_syndidome.dmm index 51b616bced9..e6393629158 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_syndidome.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_syndidome.dmm @@ -2473,7 +2473,7 @@ /obj/effect/turf_decal/siding/wideplating/dark{ dir = 5 }, -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /turf/open/floor/mineral/plastitanium/red, /area/ruin/syndibiodome) "DL" = ( @@ -3310,7 +3310,7 @@ /obj/effect/turf_decal/siding/wideplating/dark{ dir = 10 }, -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /obj/effect/decal/cleanable/dirt, diff --git a/_maps/RandomRuins/SpaceRuins/interdyne.dmm b/_maps/RandomRuins/SpaceRuins/interdyne.dmm index a6657902c13..6df9519ce8f 100644 --- a/_maps/RandomRuins/SpaceRuins/interdyne.dmm +++ b/_maps/RandomRuins/SpaceRuins/interdyne.dmm @@ -165,7 +165,7 @@ /turf/open/floor/mineral/plastitanium, /area/ruin/space/has_grav/interdyne) "hc" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 8 }, /turf/open/floor/mineral/plastitanium, @@ -1189,7 +1189,7 @@ /turf/open/floor/mineral/plastitanium/red, /area/ruin/space/has_grav/interdyne) "VR" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /turf/open/floor/mineral/plastitanium, diff --git a/_maps/RandomZLevels/research.dmm b/_maps/RandomZLevels/research.dmm index ae1814b7d70..1729b5bde99 100644 --- a/_maps/RandomZLevels/research.dmm +++ b/_maps/RandomZLevels/research.dmm @@ -2347,7 +2347,7 @@ /turf/open/floor/iron/white, /area/awaymission/research/interior/medbay) "ls" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /obj/effect/turf_decal/tile/purple/fourcorners, @@ -3902,7 +3902,7 @@ /turf/open/floor/plating, /area/awaymission/research/interior/escapepods) "TK" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /obj/effect/turf_decal/tile/purple/fourcorners, /obj/machinery/light/small/broken/directional/north, /turf/open/floor/iron/dark, diff --git a/_maps/map_files/Birdshot/birdshot.dmm b/_maps/map_files/Birdshot/birdshot.dmm index b9623993cef..bf5d70feb94 100644 --- a/_maps/map_files/Birdshot/birdshot.dmm +++ b/_maps/map_files/Birdshot/birdshot.dmm @@ -201,7 +201,7 @@ /area/station/command/corporate_showroom) "aeD" = ( /obj/effect/turf_decal/tile/neutral/fourcorners, -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /obj/effect/turf_decal/siding/purple{ @@ -23123,7 +23123,7 @@ /area/station/hallway/primary/aft) "hVY" = ( /obj/effect/turf_decal/tile/neutral/fourcorners, -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /obj/effect/turf_decal/siding/purple{ @@ -68302,7 +68302,7 @@ /area/station/security/checkpoint/customs) "wyy" = ( /obj/effect/turf_decal/tile/neutral/fourcorners, -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 8 }, /obj/effect/turf_decal/siding/purple{ diff --git a/_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm b/_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm index dec336206f8..85666dc7ec0 100644 --- a/_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm +++ b/_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm @@ -6334,7 +6334,7 @@ /turf/open/floor/iron/large, /area/station/hallway/primary/central) "bUa" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /turf/open/floor/iron/dark/textured_large, /area/station/science/genetics) "bUf" = ( @@ -78907,7 +78907,7 @@ /turf/open/floor/catwalk_floor, /area/station/engineering/main) "xDB" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /turf/open/floor/iron/dark/textured_large, diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index c6c6772599b..269132c4af0 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -5670,7 +5670,7 @@ /turf/open/floor/iron, /area/station/engineering/atmos/storage/gas) "buo" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /obj/effect/turf_decal/bot/left, @@ -18283,7 +18283,7 @@ /turf/open/floor/iron, /area/station/construction/mining/aux_base) "eAq" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 8 }, /obj/machinery/status_display/ai/directional/east, @@ -37794,7 +37794,7 @@ /turf/open/floor/iron/grimy, /area/station/security/detectives_office/private_investigators_office) "jpB" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /obj/effect/turf_decal/bot, /obj/structure/extinguisher_cabinet/directional/north, /obj/effect/turf_decal/tile/blue/anticorner/contrasted{ diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 3b888765e12..d95706c3457 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -52347,7 +52347,7 @@ /turf/open/floor/plating, /area/station/maintenance/starboard/fore) "oPP" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /turf/open/floor/iron/dark, @@ -78201,7 +78201,7 @@ /turf/open/floor/iron/white, /area/station/science/genetics) "wnR" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /obj/machinery/status_display/evac/directional/north, /turf/open/floor/iron/dark, /area/station/science/genetics) diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index b8ec9b75911..593d8fbad0c 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -4755,7 +4755,7 @@ /turf/open/floor/iron/white, /area/station/command/heads_quarters/cmo) "bEC" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /obj/effect/turf_decal/siding/purple{ @@ -13695,7 +13695,7 @@ /turf/open/floor/plating, /area/station/cargo/storage) "eOo" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 8 }, /obj/effect/turf_decal/siding/purple{ @@ -26946,7 +26946,7 @@ /turf/open/floor/iron/white, /area/station/medical/cryo) "jrb" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 8 }, /obj/effect/turf_decal/siding/purple{ diff --git a/_maps/map_files/NebulaStation/NebulaStation.dmm b/_maps/map_files/NebulaStation/NebulaStation.dmm index 6675af3f50e..7c4f8c0f877 100644 --- a/_maps/map_files/NebulaStation/NebulaStation.dmm +++ b/_maps/map_files/NebulaStation/NebulaStation.dmm @@ -19746,7 +19746,7 @@ /turf/open/floor/carpet, /area/station/medical/psychology) "cWV" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /obj/effect/turf_decal/bot, /turf/open/floor/iron/dark/textured, /area/station/science/genetics) @@ -77398,7 +77398,7 @@ }, /area/station/commons/toilet/restrooms) "luw" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /obj/effect/turf_decal/bot, @@ -143431,7 +143431,7 @@ /turf/open/floor/iron/dark/textured_half, /area/station/engineering/atmos) "vme" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /obj/effect/turf_decal/bot, diff --git a/_maps/map_files/debug/runtimestation.dmm b/_maps/map_files/debug/runtimestation.dmm index 11221d56dc6..3d67febd6ed 100644 --- a/_maps/map_files/debug/runtimestation.dmm +++ b/_maps/map_files/debug/runtimestation.dmm @@ -1881,7 +1881,7 @@ /turf/open/floor/iron, /area/station/cargo/storage) "DW" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /obj/effect/turf_decal/tile/blue{ diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index 170b721a26b..e29d1f99b02 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -24815,7 +24815,7 @@ /turf/open/floor/plating/elevatorshaft, /area/station/maintenance/tram/mid) "hRa" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 4 }, /obj/machinery/camera/directional/west{ @@ -39499,7 +39499,7 @@ /turf/open/misc/asteroid, /area/station/science/explab) "mRY" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 8 }, /obj/effect/turf_decal/tile/dark_green/fourcorners, diff --git a/_maps/map_files/wawastation/wawastation.dmm b/_maps/map_files/wawastation/wawastation.dmm index 04bfbd161eb..c62dac2ce5d 100644 --- a/_maps/map_files/wawastation/wawastation.dmm +++ b/_maps/map_files/wawastation/wawastation.dmm @@ -2787,7 +2787,7 @@ /turf/open/floor/iron, /area/station/command/gateway) "aVq" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /obj/machinery/light_switch/directional/north, /obj/effect/turf_decal/siding/purple, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -2909,7 +2909,7 @@ /turf/open/floor/iron/dark, /area/station/command/gateway) "aYS" = ( -/obj/machinery/computer/scan_consolenew, +/obj/machinery/computer/dna_console, /obj/item/toy/figure/geneticist{ pixel_y = 18 }, @@ -36867,7 +36867,7 @@ /turf/open/floor/iron, /area/station/engineering/main) "mPl" = ( -/obj/machinery/computer/scan_consolenew{ +/obj/machinery/computer/dna_console{ dir = 1 }, /obj/structure/railing, diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 9f37b53a842..706f2d760d5 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -16,13 +16,31 @@ #define MINOR_NEGATIVE 4 -//Mutation classes. Normal being on them, extra being additional mutations with instability and other being stuff you don't want people to fuck with like wizard mutate -/// A mutation that can be activated and deactivated by completing a sequence -#define MUT_NORMAL 1 -/// A mutation that is in the mutations tab, and can be given and taken away through though the DNA console. Has a 0 before its name in the mutation section of the dna console -#define MUT_EXTRA 2 -/// Cannot be interacted with by players through normal means. I.E. wizards mutate -#define MUT_OTHER 3 +//Mutation sources. As long as there is at least one, the mutation will stay up after a remove_mutation call +///Source for mutations that have been activated by completing a sequence or using an activator +#define MUTATION_SOURCE_ACTIVATED "activated" +///Source for mutations that have been added via mutators +#define MUTATION_SOURCE_MUTATOR "mutator" +///From timed dna injectors. +#define MUTATION_SOURCE_TIMED_INJECTOR "timed_injector" +///From mob/living/carbon/human/proc/crewlike_monkify() +#define MUTATION_SOURCE_CREW_MONKEY "crew_monkey" +#define MUTATION_SOURCE_MEDIEVAL_CTF "medieval_ctf" +#define MUTATION_SOURCE_DNA_VAULT "dna_vault" +///From the /datum/action/cooldown/spell/apply_mutations spell +#define MUTATION_SOURCE_SPELL "spell" +///From the heart eater component +#define MUTATION_SOURCE_HEART_EATER "heart_eater" +#define MUTATION_SOURCE_RAT_HEART "rat_heart" +#define MUTATION_SOURCE_CLOWN_CLUMSINESS "clown_clumsiness" +#define MUTATION_SOURCE_CHANGELING "changeling" +#define MUTATION_SOURCE_GHOST_ROLE "ghost_role" +#define MUTATION_SOURCE_WISHGRANTER "wishgranter" +#define MUTATION_SOURCE_VV "vv" +#define MUTATION_SOURCE_MANNITOIL "mannitoil" +#define MUTATION_SOURCE_MAINT_ADAPT "maint_adapt" +#define MUTATION_SOURCE_BURDENED_TRAUMA "burdened_trauma" +#define MUTATION_SOURCE_GENE_SYMPTOM "gene_symptom" //DNA - Because fuck you and your magic numbers being all over the codebase. #define DNA_BLOCK_SIZE 3 @@ -88,6 +106,14 @@ #define DNA_MUTATION_BLOCKS 8 #define DNA_UNIQUE_ENZYMES_LEN 32 +///flag for the transfer_flag argument from dna/proc/copy_dna(). This one makes it so the SE is copied too. +#define COPY_DNA_SE (1<<0) +///flag for the transfer_flag argument from dna/proc/copy_dna(). This one copies the species. +#define COPY_DNA_SPECIES (1<<1) +///flag for the transfer_flag argument from dna/proc/copy_dna(). This one copies the mutations. +#define COPY_DNA_MUTATIONS (1<<2) + + //organ slots #define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator" #define ORGAN_SLOT_APPENDIX "appendix" diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 6daa2a5ca7a..a017453108b 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -1,5 +1,5 @@ //faster than having to constantly loop for them -GLOBAL_LIST_EMPTY_TYPED(all_mutations, /datum/mutation/human) //type = initialized mutation +GLOBAL_LIST_EMPTY_TYPED(all_mutations, /datum/mutation) //type = initialized mutation GLOBAL_LIST_EMPTY(full_sequences) //type = correct sequence GLOBAL_LIST_EMPTY(bad_mutations) //bad initialized mutations GLOBAL_LIST_EMPTY(good_mutations) //good initialized mutations diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 7cc9813e3a5..e880bfc551b 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -231,7 +231,7 @@ return TRUE /obj/item/tk_grab/proc/check_if_focusable(obj/target) - if(!tk_user || !istype(tk_user) || QDELETED(target) || !istype(target) || !tk_user.dna.check_mutation(/datum/mutation/human/telekinesis)) + if(!tk_user || !istype(tk_user) || QDELETED(target) || !istype(target) || !tk_user.dna.check_mutation(/datum/mutation/telekinesis)) qdel(src) return if(!tkMaxRangeCheck(tk_user, target) || target.anchored || !isturf(target.loc)) diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index 3b62f241360..ad09a0caeb2 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -177,11 +177,11 @@ SUBSYSTEM_DEF(atoms) BadInitializeCalls = SSatoms.BadInitializeCalls /datum/controller/subsystem/atoms/proc/setupGenetics() - var/list/mutations = subtypesof(/datum/mutation/human) + var/list/mutations = subtypesof(/datum/mutation) shuffle_inplace(mutations) for(var/i in 1 to LAZYLEN(mutations)) var/path = mutations[i] //byond gets pissy when we do it in one line - var/datum/mutation/human/B = new path () + var/datum/mutation/B = new path () B.alias = "Mutation [i]" GLOB.all_mutations[B.type] = B GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks) diff --git a/code/datums/components/heart_eater.dm b/code/datums/components/heart_eater.dm index 3e6e0728031..1ef06559624 100644 --- a/code/datums/components/heart_eater.dm +++ b/code/datums/components/heart_eater.dm @@ -6,23 +6,23 @@ /// Remember last heart we ate and reset bites_taken counter if we start eat new one var/datum/weakref/last_heart_we_ate /// List of all mutations allowed to get. - var/static/list/datum/mutation/human/mutations_list = list( - /datum/mutation/human/adaptation/cold, - /datum/mutation/human/adaptation/heat, - /datum/mutation/human/adaptation/pressure, - /datum/mutation/human/adaptation/thermal, - /datum/mutation/human/chameleon, - /datum/mutation/human/cryokinesis, - /datum/mutation/human/pyrokinesis, - /datum/mutation/human/dwarfism, - /datum/mutation/human/cindikinesis, - /datum/mutation/human/insulated, - /datum/mutation/human/telekinesis, - /datum/mutation/human/telepathy, - /datum/mutation/human/thermal, - /datum/mutation/human/tongue_spike, - /datum/mutation/human/webbing, - /datum/mutation/human/xray, + var/static/list/datum/mutation/mutations_list = list( + /datum/mutation/adaptation/cold, + /datum/mutation/adaptation/heat, + /datum/mutation/adaptation/pressure, + /datum/mutation/adaptation/thermal, + /datum/mutation/chameleon, + /datum/mutation/cryokinesis, + /datum/mutation/pyrokinesis, + /datum/mutation/dwarfism, + /datum/mutation/cindikinesis, + /datum/mutation/insulated, + /datum/mutation/telekinesis, + /datum/mutation/telepathy, + /datum/mutation/thermal, + /datum/mutation/tongue_spike, + /datum/mutation/webbing, + /datum/mutation/xray, ) /datum/component/heart_eater/Initialize(...) @@ -94,8 +94,8 @@ ///Not Perfect heart give random mutation. /datum/component/heart_eater/proc/not_perfect_heart(mob/living/carbon/human/eater) - var/datum/mutation/human/new_mutation - var/list/datum/mutation/human/shuffle_mutation_list = shuffle(mutations_list) + var/datum/mutation/new_mutation + var/list/datum/mutation/shuffle_mutation_list = shuffle(mutations_list) for(var/mutation_in_list in shuffle_mutation_list) if(is_type_in_list(mutation_in_list, eater.dna.mutations)) continue @@ -104,7 +104,7 @@ if(isnull(new_mutation)) healing_heart(eater) return - eater.dna.add_mutation(new_mutation) + eater.dna.add_mutation(new_mutation, MUTATION_SOURCE_HEART_EATER) healing_heart(eater) to_chat(eater, span_warning("This heart is not right for you. You now have [new_mutation.name] mutation.")) diff --git a/code/datums/components/speechmod.dm b/code/datums/components/speechmod.dm index b20d1b32493..45b2a691268 100644 --- a/code/datums/components/speechmod.dm +++ b/code/datums/components/speechmod.dm @@ -18,7 +18,7 @@ var/datum/callback/should_modify_speech = null /datum/component/speechmod/Initialize(replacements = list(), end_string = "", end_string_chance = 100, slots, uppercase = FALSE, should_modify_speech) - if (!ismob(parent) && !isitem(parent) && !istype(parent, /datum/mutation/human)) + if (!ismob(parent) && !isitem(parent) && !istype(parent, /datum/mutation)) return COMPONENT_INCOMPATIBLE src.replacements = replacements @@ -28,7 +28,7 @@ src.uppercase = uppercase src.should_modify_speech = should_modify_speech - if (istype(parent, /datum/mutation/human)) + if (istype(parent, /datum/mutation)) RegisterSignal(parent, COMSIG_MUTATION_GAINED, PROC_REF(on_mutation_gained)) RegisterSignal(parent, COMSIG_MUTATION_LOST, PROC_REF(on_mutation_lost)) return diff --git a/code/datums/diseases/advance/symptoms/genetics.dm b/code/datums/diseases/advance/symptoms/genetics.dm index d80e41e3f26..0f4df037593 100644 --- a/code/datums/diseases/advance/symptoms/genetics.dm +++ b/code/datums/diseases/advance/symptoms/genetics.dm @@ -44,17 +44,20 @@ if(A.totalResistance() >= 14) //one does not simply escape Nurgle's grasp no_reset = TRUE -/datum/symptom/genetic_mutation/Activate(datum/disease/advance/A) +/datum/symptom/genetic_mutation/Activate(datum/disease/advance/disease) . = ..() if(!.) return - var/mob/living/carbon/C = A.affected_mob - if(!C.has_dna()) + var/mob/living/carbon/carbon = disease.affected_mob + if(!carbon.has_dna()) return - switch(A.stage) + switch(disease.stage) if(4, 5) - to_chat(C, span_warning("[pick("Your skin feels itchy.", "You feel light headed.")]")) - C.easy_random_mutate((NEGATIVE | MINOR_NEGATIVE | POSITIVE) - excludemuts, TRUE, TRUE, TRUE, mutadone_proof) + to_chat(carbon, span_warning("[pick("Your skin feels itchy.", "You feel light headed.")]")) + var/datum/mutation/mutation = carbon.get_random_mutation_path((NEGATIVE|MINOR_NEGATIVE|POSITIVE) & ~excludemuts) + if(!mutation) + return + carbon.dna.add_mutation((mutation.quality & mutadone_proof) ? MUTATION_SOURCE_GENE_SYMPTOM : MUTATION_SOURCE_ACTIVATED) /datum/symptom/genetic_mutation/End(datum/disease/advance/A) . = ..() @@ -63,4 +66,4 @@ if(!no_reset) var/mob/living/carbon/M = A.affected_mob if(M.has_dna()) - M.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), FALSE) + M.dna.remove_all_mutations(list(MUTATION_SOURCE_GENE_SYMPTOM, MUTATION_SOURCE_ACTIVATED)) diff --git a/code/datums/diseases/dna_spread.dm b/code/datums/diseases/dna_spread.dm index 6fd926f60d3..77f1b1a3cd2 100644 --- a/code/datums/diseases/dna_spread.dm +++ b/code/datums/diseases/dna_spread.dm @@ -60,7 +60,7 @@ to_chat(affected_mob, span_danger("You don't feel like yourself..")) var/datum/dna/transform_dna = strain_data["dna"] - transform_dna.transfer_identity(affected_mob, transfer_SE = 1) + transform_dna.copy_dna(affected_mob.dna, COPY_DNA_SE|COPY_DNA_SPECIES) affected_mob.real_name = affected_mob.dna.real_name affected_mob.updateappearance(mutcolor_update=1) affected_mob.domutcheck() @@ -71,7 +71,7 @@ /datum/disease/dnaspread/Destroy() if (original_dna && transformed && affected_mob) - original_dna.transfer_identity(affected_mob, transfer_SE = 1) + original_dna.copy_dna(affected_mob.dna, COPY_DNA_SE|COPY_DNA_SPECIES) affected_mob.real_name = affected_mob.dna.real_name affected_mob.updateappearance(mutcolor_update=1) affected_mob.domutcheck() diff --git a/code/datums/dna.dm b/code/datums/dna.dm index fbee431755f..c43efc3780e 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -49,6 +49,8 @@ GLOBAL_LIST_INIT(features_block_lengths, list( */ GLOBAL_LIST_INIT(total_ui_len_by_block, populate_total_ui_len_by_block()) +GLOBAL_LIST_INIT(standard_mutation_sources, list(MUTATION_SOURCE_ACTIVATED, MUTATION_SOURCE_MUTATOR, MUTATION_SOURCE_TIMED_INJECTOR)) + /proc/populate_total_ui_len_by_block() . = list() var/total_block_len = 1 @@ -110,7 +112,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) /datum/dna/Destroy() if (iscarbon(holder)) var/mob/living/carbon/as_carbon = holder - remove_all_mutations() // mutations hold a reference to the dna + for(var/datum/mutation/mutation as anything in mutations) + remove_mutation(mutation, mutation.sources) // mutations hold a reference to the dna, we need to delete them. if(as_carbon.dna == src) as_carbon.dna = null holder = null @@ -123,35 +126,16 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) return ..() -/datum/dna/proc/transfer_identity(mob/living/carbon/destination, transfer_SE = FALSE, transfer_species = TRUE) - if(!istype(destination)) - return - destination.dna.unique_enzymes = unique_enzymes - destination.dna.unique_identity = unique_identity - destination.set_blood_type(blood_type) - destination.dna.unique_features = unique_features - destination.dna.features = features.Copy() - destination.dna.real_name = real_name - destination.dna.temporary_mutations = temporary_mutations.Copy() - //SKYRAT EDIT ADDITION BEGIN - CUSTOMIZATION - destination.dna.mutant_bodyparts = mutant_bodyparts.Copy() - destination.dna.body_markings = body_markings.Copy() - destination.dna.update_body_size() - //SKYRAT EDIT ADDITION END - if(transfer_SE) - destination.dna.mutation_index = mutation_index - destination.dna.default_mutation_genes = default_mutation_genes - if(transfer_species) - //destination.set_species(species.type, icon_update=0) - ORIGINAL - destination.set_species(species.type, TRUE, FALSE, features.Copy(), mutant_bodyparts.Copy(), body_markings.Copy()) //SKYRAT EDIT CHANGE - CUSTOMIZATION - -/datum/dna/proc/copy_dna(datum/dna/new_dna) +///Copies the variables of a dna datum onto another. +/datum/dna/proc/copy_dna(datum/dna/new_dna, transfer_flags = COPY_DNA_SE|COPY_DNA_SPECIES) new_dna.unique_enzymes = unique_enzymes - new_dna.mutation_index = mutation_index - new_dna.default_mutation_genes = default_mutation_genes new_dna.unique_identity = unique_identity new_dna.unique_features = unique_features new_dna.features = features.Copy() + new_dna.real_name = real_name + new_dna.temporary_mutations = temporary_mutations.Copy() + new_dna.mutation_index = mutation_index + new_dna.default_mutation_genes = default_mutation_genes //SKYRAT EDIT ADDITION BEGIN - CUSTOMIZATION new_dna.mutant_bodyparts = mutant_bodyparts.Copy() new_dna.body_markings = body_markings.Copy() @@ -162,54 +146,91 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if (iscarbon(new_dna.holder)) var/mob/living/carbon/as_carbon = new_dna.holder as_carbon.set_blood_type(blood_type) - new_dna.holder.set_species(species.type, icon_update = 0) + if(transfer_flags & COPY_DNA_SPECIES) + new_dna.holder.set_species(species.type, icon_update = FALSE) else new_dna.blood_type = blood_type - new_dna.species = new species.type - new_dna.real_name = real_name - // Mutations aren't gc managed, but they still aren't templates - // Let's do a proper copy - for(var/datum/mutation/human/mutation in mutations) - new_dna.add_mutation(mutation, mutation.class, mutation.timeout) + if(transfer_flags & COPY_DNA_SPECIES) + new_dna.species = new species.type + if(transfer_flags & COPY_DNA_MUTATIONS && holder?.can_mutate()) + // Mutations aren't gc managed, but they still aren't templates + // Let's do a proper copy + for(var/datum/mutation/mutation in mutations) + var/list/valid_sources = mutation.sources & GLOB.standard_mutation_sources + if(!length(valid_sources)) + continue + new_dna.add_mutation(mutation, valid_sources) -//See mutation.dm for what 'class' does. 'time' is time till it removes itself in decimals. 0 for no timer -/datum/dna/proc/add_mutation(mutation, class = MUT_OTHER, time) - var/mutation_type = mutation - if(istype(mutation, /datum/mutation/human)) - var/datum/mutation/human/HM = mutation - mutation_type = HM.type - if(get_mutation(mutation_type)) - return - SEND_SIGNAL(holder, COMSIG_CARBON_GAIN_MUTATION, mutation_type, class) - return force_give(new mutation_type (class, time, copymut = mutation)) - -/datum/dna/proc/remove_mutation(datum/mutation/human/mutation_type, mutadone) - - var/datum/mutation/human/actual_mutation = get_mutation(mutation_type) +///Adds a mutation to the dna if possible. See defines/dna.dm for all sources. +/datum/dna/proc/add_mutation(mutation_to_add, list/sources) + if(!islist(sources)) + if(!sources) + CRASH("add_mutation() called without set source(s)") + sources = list(sources) + var/datum/mutation/actual_mutation = get_mutation(mutation_to_add) + var/list/sources_to_add = sources.Copy() //make sure not to modify the original if it's stored in a variable outside this proc if(!actual_mutation) - return FALSE + if(istype(mutation_to_add, /datum/mutation)) + var/datum/mutation/mutation_instance + actual_mutation = mutation_instance.make_copy() + else + actual_mutation = new mutation_to_add + SEND_SIGNAL(holder, COMSIG_CARBON_GAIN_MUTATION, actual_mutation.type, sources_to_add) + else + sources_to_add -= actual_mutation.sources + if(!length(sources_to_add)) //no new sources to add, don't do anything. + return + + if(!length(actual_mutation.sources)) + if(!actual_mutation.on_acquiring(holder)) + qdel(actual_mutation) + return + actual_mutation.setup() + + actual_mutation.sources |= sources + + if(MUTATION_SOURCE_ACTIVATED in sources) + set_se(1, actual_mutation) + + update_instability() + +/datum/dna/proc/remove_mutation(mutation_to_remove, list/sources) + if(!islist(sources)) + if(!sources) + CRASH("remove_mutation() called without set source(s)") + sources = list(sources) + + var/datum/mutation/actual_mutation = get_mutation(mutation_to_remove) + + if(!actual_mutation || !(sources & actual_mutation.sources)) + return + + actual_mutation.sources -= sources + + if(MUTATION_SOURCE_ACTIVATED in sources) + set_se(0, actual_mutation) // Check that it exists first before trying to remove it with mutadone - if(actual_mutation.mutadone_proof && mutadone) - return FALSE + if(!length(actual_mutation.sources)) + SEND_SIGNAL(holder, COMSIG_CARBON_LOSE_MUTATION, actual_mutation.type) + actual_mutation.on_losing(holder) + qdel(actual_mutation) - SEND_SIGNAL(holder, COMSIG_CARBON_LOSE_MUTATION, mutation_type) - return force_lose(actual_mutation) + update_instability(FALSE) /datum/dna/proc/check_mutation(mutation_type) return get_mutation(mutation_type) -/datum/dna/proc/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE) - remove_mutation_group(mutations, classes, mutadone) +/datum/dna/proc/remove_all_mutations(sources = GLOB.standard_mutation_sources) + remove_mutation_group(mutations, sources) scrambled = FALSE -/datum/dna/proc/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE) +/datum/dna/proc/remove_mutation_group(list/group, sources = GLOB.standard_mutation_sources) if(!group) return - for(var/datum/mutation/human/HM in group) - if((HM.class in classes) && !(HM.mutadone_proof && mutadone)) - remove_mutation(HM) + for(var/datum/mutation/mutation in group) + remove_mutation(mutation, sources) /datum/dna/proc/generate_unique_identity() . = "" @@ -299,10 +320,10 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) mutation_index.Cut() default_mutation_genes.Cut() shuffle_inplace(mutations_temp) - mutation_index[/datum/mutation/human/race] = create_sequence(/datum/mutation/human/race, FALSE) - default_mutation_genes[/datum/mutation/human/race] = mutation_index[/datum/mutation/human/race] + mutation_index[/datum/mutation/race] = create_sequence(/datum/mutation/race, FALSE) + default_mutation_genes[/datum/mutation/race] = mutation_index[/datum/mutation/race] for(var/i in 2 to DNA_MUTATION_BLOCKS) - var/datum/mutation/human/M = mutations_temp[i] + var/datum/mutation/M = mutations_temp[i] mutation_index[M.type] = create_sequence(M.type, FALSE, M.difficulty) default_mutation_genes[M.type] = mutation_index[M.type] shuffle_inplace(mutation_index) @@ -318,7 +339,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) //Used to create a chipped gene sequence /proc/create_sequence(mutation, active, difficulty) if(!difficulty) - var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation) //leaves the possibility to change difficulty mid-round + var/datum/mutation/A = GET_INITIALIZED_MUTATION(mutation) //leaves the possibility to change difficulty mid-round if(!A) return difficulty = A.difficulty @@ -433,31 +454,6 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) set_uni_feature_block(blocknumber, construct_block(SSaccessories.pod_hair_list.Find(features["pod_hair"]), length(SSaccessories.pod_hair_list))) if(DNA_FISH_TAIL_BLOCK) set_uni_feature_block(blocknumber, construct_block(SSaccessories.tails_list_fish.Find(features["fish_tail"]), length(SSaccessories.tails_list_fish))) -*/ -//SKYRAT EDIT REMOVAL END - -//Please use add_mutation or activate_mutation instead -/datum/dna/proc/force_give(datum/mutation/human/human_mutation) - if(!holder || !human_mutation) - return - if(human_mutation.class == MUT_NORMAL) - set_se(1, human_mutation) - . = human_mutation.on_acquiring(holder) - if(!.) - qdel(human_mutation) - return - human_mutation.setup() - update_instability() - -//Use remove_mutation instead -/datum/dna/proc/force_lose(datum/mutation/human/human_mutation) - if(!holder || !(human_mutation in mutations)) - return - set_se(0, human_mutation) - . = human_mutation.on_losing(holder) - if(!(human_mutation in mutations)) - qdel(human_mutation) // qdel mutations on removal - update_instability(FALSE) /** * Checks if two DNAs are practically the same by comparing their most defining features @@ -479,10 +475,11 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) return FALSE /datum/dna/proc/update_instability(alert=TRUE) + var/old_stability = stability stability = 100 - for(var/datum/mutation/human/M in mutations) - if(M.class == MUT_EXTRA || M.instability < 0) - stability -= M.instability * GET_MUTATION_STABILIZER(M) + for(var/datum/mutation/mutation in mutations) + if((MUTATION_SOURCE_MUTATOR in mutation.sources) || mutation.instability < 0) + stability -= mutation.instability * GET_MUTATION_STABILIZER(mutation) if(holder) var/message if(alert) @@ -501,7 +498,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) message = span_boldwarning("You can feel your DNA exploding, we need to do something fast!") if(stability <= 0) holder.apply_status_effect(/datum/status_effect/dna_melt) - if(message) + if(message && stability < old_stability) to_chat(holder, message) /// Updates the UI, UE, and UF of the DNA according to the features, appearance, name, etc. of the DNA / holder. @@ -545,16 +542,16 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) /datum/dna/stored //subtype used by brain mob's stored_dna and the crew manifest -/datum/dna/stored/add_mutation(mutation_name) //no mutation changes on stored dna. +/datum/dna/stored/add_mutation(mutation_name, list/sources) //no mutation changes on stored dna. return -/datum/dna/stored/remove_mutation(mutation_name, mutadone) +/datum/dna/stored/remove_mutation(mutation_name, list/sources) return /datum/dna/stored/check_mutation(mutation_name) return -/datum/dna/stored/remove_all_mutations(list/classes, mutadone = FALSE) +/datum/dna/stored/remove_all_mutations(list/classes, list/sources) return /datum/dna/stored/remove_mutation_group(list/group) @@ -651,7 +648,6 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) /// Sets the DNA of the mob to the given DNA. /mob/living/carbon/human/proc/hardset_dna(unique_identity, list/mutation_index, list/default_mutation_genes, newreal_name, newblood_type, datum/species/mrace, newfeatures, list/mutations, force_transfer_mutations) -//Do not use force_transfer_mutations for stuff like cloners without some precautions, otherwise some conditional mutations could break (timers, drill hat etc) if(newfeatures) dna.features = newfeatures dna.generate_unique_features() @@ -684,9 +680,11 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) update_body(is_creating = TRUE) update_mutations_overlay() - if(LAZYLEN(mutations) && force_transfer_mutations) - for(var/datum/mutation/human/mutation as anything in mutations) - dna.force_give(new mutation.type(mutation.class, copymut = mutation)) //using force_give since it may include exotic mutations that otherwise won't be handled properly + if(LAZYLEN(mutations) && force_transfer_mutations && can_mutate()) + for(var/datum/mutation/mutation as anything in mutations) + var/list/allowed_sources = mutation.sources & GLOB.standard_mutation_sources + if(allowed_sources) + dna.add_mutation(mutation, allowed_sources) /mob/living/carbon/proc/create_dna() dna = new /datum/dna(src) @@ -799,19 +797,24 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) update_mutations_overlay() -/datum/dna/proc/check_block(mutation) - var/datum/mutation/human/HM = get_mutation(mutation) - if(check_block_string(mutation)) - if(!HM) - . = add_mutation(mutation, MUT_NORMAL) +/datum/dna/proc/check_block(mutation_path) + var/datum/mutation/mutation = get_mutation(mutation_path) + if(check_block_string(mutation_path)) + if(!mutation) + . = add_mutation(mutation_path, MUTATION_SOURCE_ACTIVATED) return - return force_lose(HM) + if(MUTATION_SOURCE_ACTIVATED in mutation?.sources) + remove_mutation(mutation, MUTATION_SOURCE_ACTIVATED) //Return the active mutation of a type if there is one -/datum/dna/proc/get_mutation(A) - for(var/datum/mutation/human/HM in mutations) - if(istype(HM, A)) - return HM +/datum/dna/proc/get_mutation(mutation_path) + if(istype(mutation_path, /datum/mutation)) + var/datum/mutation/mutation = mutation_path + mutation_path = mutation.type + for(var/datum/mutation/mutation as anything in mutations) + if(mutation.type == mutation_path) + return mutation + return null /datum/dna/proc/check_block_string(mutation) if((LAZYLEN(mutation_index) > DNA_MUTATION_BLOCKS) || !(mutation in mutation_index)) @@ -821,7 +824,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) /datum/dna/proc/is_gene_active(mutation) return (mutation_index[mutation] == GET_SEQUENCE(mutation)) -/datum/dna/proc/set_se(on=TRUE, datum/mutation/human/HM) +/datum/dna/proc/set_se(on=TRUE, datum/mutation/HM) if(!HM || !(HM.type in mutation_index) || (LAZYLEN(mutation_index) < DNA_MUTATION_BLOCKS)) return . = TRUE @@ -837,12 +840,12 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(!mutation) return FALSE var/mutation_type = mutation - if(istype(mutation, /datum/mutation/human)) - var/datum/mutation/human/M = mutation - mutation_type = M.type + if(istype(mutation, /datum/mutation)) + var/datum/mutation/instance = mutation + mutation_type = instance.type if(!mutation_in_sequence(mutation_type)) //can't activate what we don't have, use add_mutation return FALSE - add_mutation(mutation, MUT_NORMAL) + add_mutation(mutation, MUTATION_SOURCE_ACTIVATED) return TRUE /////////////////////////// DNA HELPER-PROCS ////////////////////////////// @@ -850,23 +853,24 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) /datum/dna/proc/mutation_in_sequence(mutation) if(!mutation) return - if(istype(mutation, /datum/mutation/human)) - var/datum/mutation/human/HM = mutation + if(istype(mutation, /datum/mutation)) + var/datum/mutation/HM = mutation if(HM.type in mutation_index) return TRUE else if(mutation in mutation_index) return TRUE -/mob/living/carbon/proc/random_mutate(list/candidates, difficulty = 2) +/mob/living/carbon/proc/random_mutate(list/candidates) if(!has_dna()) CRASH("[src] does not have DNA") var/mutation = pick(candidates) - . = dna.add_mutation(mutation) + . = dna.add_mutation(mutation, MUTATION_SOURCE_MUTATOR) -/mob/living/carbon/proc/easy_random_mutate(quality = POSITIVE + NEGATIVE + MINOR_NEGATIVE, scrambled = TRUE, sequence = TRUE, exclude_monkey = TRUE, resilient = NONE) +///Returns a random mutation typepath based on the given arguments. By default, all available mutations in the dna sequence but the monkey one. +/mob/living/carbon/proc/get_random_mutation_path(quality = POSITIVE|NEGATIVE|MINOR_NEGATIVE, scrambled = TRUE, sequence = TRUE, list/excluded_mutations = list(/datum/mutation/race)) if(!has_dna()) - CRASH("[src] does not have DNA") + return null var/list/mutations = list() if(quality & POSITIVE) mutations += GLOB.good_mutations @@ -875,21 +879,21 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(quality & MINOR_NEGATIVE) mutations += GLOB.not_good_mutations var/list/possible = list() - for(var/datum/mutation/human/A in mutations) - if((!sequence || dna.mutation_in_sequence(A.type)) && !dna.get_mutation(A.type)) - possible += A.type - if(exclude_monkey) - possible.Remove(/datum/mutation/human/race) - if(LAZYLEN(possible)) - var/mutation = pick(possible) - . = dna.activate_mutation(mutation) - if(scrambled) - var/datum/mutation/human/HM = dna.get_mutation(mutation) - if(HM) - HM.scrambled = TRUE - if(HM.quality & resilient) - HM.mutadone_proof = TRUE - return TRUE + for(var/datum/mutation/mutation in mutations) + if((!sequence || dna.mutation_in_sequence(mutation.type)) && !dna.get_mutation(mutation.type)) + possible += mutation.type + possible -= excluded_mutations + return pick(possible) + +///Gives the mob a random mutation based on the given arguments. +/mob/living/carbon/proc/easy_random_mutate(quality = POSITIVE|NEGATIVE|MINOR_NEGATIVE, scrambled = TRUE, sequence = TRUE, list/excluded_mutations = list(/datum/mutation/race)) + var/mutation_path = get_random_mutation_path(quality, scrambled, sequence, excluded_mutations) + dna.add_mutation(mutation_path, MUTATION_SOURCE_ACTIVATED) + if(!scrambled) + return + var/datum/mutation/mutation = dna.get_mutation(mutation_path) + if(mutation) + mutation.scrambled = TRUE /mob/living/carbon/proc/random_mutate_unique_identity() if(!has_dna()) diff --git a/code/datums/mutations/_combined.dm b/code/datums/mutations/_combined.dm index d353e15b6c1..98f8927acaf 100644 --- a/code/datums/mutations/_combined.dm +++ b/code/datums/mutations/_combined.dm @@ -15,61 +15,61 @@ /* RECIPES */ /datum/generecipe/hulk - input_one = /datum/mutation/human/strong - input_two = /datum/mutation/human/radioactive - result = /datum/mutation/human/hulk + input_one = /datum/mutation/strong + input_two = /datum/mutation/radioactive + result = /datum/mutation/hulk /datum/generecipe/mindread - input_one = /datum/mutation/human/antenna - input_two = /datum/mutation/human/paranoia - result = /datum/mutation/human/mindreader + input_one = /datum/mutation/antenna + input_two = /datum/mutation/paranoia + result = /datum/mutation/mindreader /datum/generecipe/shock - input_one = /datum/mutation/human/insulated - input_two = /datum/mutation/human/radioactive - result = /datum/mutation/human/shock + input_one = /datum/mutation/insulated + input_two = /datum/mutation/radioactive + result = /datum/mutation/shock /datum/generecipe/cindikinesis - input_one = /datum/mutation/human/geladikinesis - input_two = /datum/mutation/human/fire // fiery sweat NOT fiery breath - result = /datum/mutation/human/cindikinesis + input_one = /datum/mutation/geladikinesis + input_two = /datum/mutation/fire // fiery sweat NOT fiery breath + result = /datum/mutation/cindikinesis /datum/generecipe/pyrokinesis - input_one = /datum/mutation/human/cryokinesis - input_two = /datum/mutation/human/fire // fiery sweat NOT fiery breath - result = /datum/mutation/human/pyrokinesis + input_one = /datum/mutation/cryokinesis + input_two = /datum/mutation/fire // fiery sweat NOT fiery breath + result = /datum/mutation/pyrokinesis /datum/generecipe/thermal_adaptation - input_one = /datum/mutation/human/adaptation/cold - input_two = /datum/mutation/human/adaptation/heat - result = /datum/mutation/human/adaptation/thermal + input_one = /datum/mutation/adaptation/cold + input_two = /datum/mutation/adaptation/heat + result = /datum/mutation/adaptation/thermal /datum/generecipe/antiglow - input_one = /datum/mutation/human/glow - input_two = /datum/mutation/human/void - result = /datum/mutation/human/glow/anti + input_one = /datum/mutation/glow + input_two = /datum/mutation/void + result = /datum/mutation/glow/anti /datum/generecipe/tonguechem - input_one = /datum/mutation/human/tongue_spike - input_two = /datum/mutation/human/stimmed - result = /datum/mutation/human/tongue_spike/chem + input_one = /datum/mutation/tongue_spike + input_two = /datum/mutation/stimmed + result = /datum/mutation/tongue_spike/chem /datum/generecipe/martyrdom - input_one = /datum/mutation/human/strong - input_two = /datum/mutation/human/stimmed - result = /datum/mutation/human/martyrdom + input_one = /datum/mutation/strong + input_two = /datum/mutation/stimmed + result = /datum/mutation/martyrdom /datum/generecipe/heckacious - input_one = /datum/mutation/human/wacky - input_two = /datum/mutation/human/stoner - result = /datum/mutation/human/heckacious + input_one = /datum/mutation/wacky + input_two = /datum/mutation/stoner + result = /datum/mutation/heckacious /datum/generecipe/ork - input_one = /datum/mutation/human/hulk - input_two = /datum/mutation/human/clumsy - result = /datum/mutation/human/hulk/ork + input_one = /datum/mutation/hulk + input_two = /datum/mutation/clumsy + result = /datum/mutation/hulk/ork /datum/generecipe/rock_absorber - input_one = /datum/mutation/human/rock_eater - input_two = /datum/mutation/human/stoner - result = /datum/mutation/human/rock_absorber + input_one = /datum/mutation/rock_eater + input_two = /datum/mutation/stoner + result = /datum/mutation/rock_absorber diff --git a/code/datums/mutations/_mutations.dm b/code/datums/mutations/_mutations.dm index eea511c2f7e..4fb170fadab 100644 --- a/code/datums/mutations/_mutations.dm +++ b/code/datums/mutations/_mutations.dm @@ -21,7 +21,7 @@ /datum/mutation var/name -/datum/mutation/human +/datum/mutation name = "mutation" /// Description of the mutation var/desc = "A mutation." @@ -55,14 +55,12 @@ var/blocks = 4 /// Amount of missing sequences. Sometimes it removes an entire pair for 2 points var/difficulty = 8 - /// Time between mutation creation and removal. If this exists, we have a timer - var/timeout /// 'Mutation #49', decided every round to get some form of distinction between undiscovered mutations var/alias /// Whether we can read it if it's active. To avoid cheesing with mutagen var/scrambled = FALSE - /// The class of mutation (MUT_NORMAL, MUT_EXTRA, MUT_OTHER) - var/class + /// The sources of the mutation (found in defines/dna.dm) + var/list/sources = list() /** * any mutations that might conflict. * put mutation typepath defines in here. @@ -80,8 +78,6 @@ var/can_chromosome = CHROMOSOME_NONE /// Name of the chromosome var/chromosome_name - /// Is this mutation mutadone proof - var/mutadone_proof = FALSE //Chromosome stuff - set to -1 to prevent people from changing it. Example: It'd be a waste to decrease cooldown on mutism /// genetic stability coeff @@ -97,23 +93,30 @@ /// List of traits that are added or removed by the mutation with GENETIC_TRAIT source. var/list/mutation_traits -/datum/mutation/human/New(class = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/New() . = ..() - src.class = class - if(timer) - addtimer(CALLBACK(src, PROC_REF(remove)), timer) - timeout = timer - if(copymut && istype(copymut, /datum/mutation/human)) - copy_mutation(copymut) - update_valid_chromosome_list() -/datum/mutation/human/Destroy() +/datum/mutation/Destroy() power_path = null dna = null owner = null return ..() -/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/proc/make_copy() + var/datum/mutation/copy = new type + + copy.chromosome_name = chromosome_name + copy.stabilizer_coeff = stabilizer_coeff + copy.synchronizer_coeff = synchronizer_coeff + copy.power_coeff = power_coeff + copy.energy_coeff = energy_coeff + can_chromosome = can_chromosome + copy.valid_chrom_list = valid_chrom_list + update_valid_chromosome_list() + + return copy + +/datum/mutation/proc/on_acquiring(mob/living/carbon/human/acquirer) if(!acquirer || !istype(acquirer) || acquirer.stat == DEAD || (src in acquirer.dna.mutations)) return FALSE // SKYRAT EDIT ADDITION @@ -126,7 +129,7 @@ return FALSE if(limb_req && !acquirer.get_bodypart(limb_req)) return FALSE - for(var/datum/mutation/human/mewtayshun as anything in acquirer.dna.mutations) //check for conflicting powers + for(var/datum/mutation/mewtayshun as anything in acquirer.dna.mutations) //check for conflicting powers if(!(mewtayshun.type in conflicts) && !(type in mewtayshun.conflicts)) continue to_chat(acquirer, span_warning("You feel your genes resisting something.")) @@ -150,13 +153,13 @@ owner.add_traits(mutation_traits, GENETIC_MUTATION) return TRUE -/datum/mutation/human/proc/get_visual_indicator() +/datum/mutation/proc/get_visual_indicator() return -/datum/mutation/human/proc/on_life(seconds_per_tick, times_fired) +/datum/mutation/proc/on_life(seconds_per_tick, times_fired) return -/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner) +/datum/mutation/proc/on_losing(mob/living/carbon/human/owner) if(!istype(owner) || !(owner.dna.mutations.Remove(src))) return TRUE . = FALSE @@ -179,9 +182,9 @@ return /mob/living/carbon/human/update_mutations_overlay() - for(var/datum/mutation/human/mutation in dna.mutations) + for(var/datum/mutation/mutation as anything in dna.mutations) if(mutation.species_allowed && !mutation.species_allowed.Find(dna.species.id)) - dna.force_lose(mutation) //shouldn't have that mutation at all + dna.remove_mutation(mutation, mutation.sources) //shouldn't have that mutation at all continue if(mutation.visual_indicators.len == 0) continue @@ -201,7 +204,7 @@ * Called after on_aquiring, or when a chromosome is applied. * returns the instance of 'power_path' for children calls to use without calling locate() again. */ -/datum/mutation/human/proc/setup() +/datum/mutation/proc/setup() if(!power_path || QDELETED(owner)) return var/datum/action/cooldown/modified_power = locate(power_path) in owner.actions @@ -210,34 +213,15 @@ modified_power.cooldown_time = initial(modified_power.cooldown_time) * GET_MUTATION_ENERGY(src) return modified_power -/datum/mutation/human/proc/copy_mutation(datum/mutation/human/mutation_to_copy) - if(!mutation_to_copy) - return - chromosome_name = mutation_to_copy.chromosome_name - stabilizer_coeff = mutation_to_copy.stabilizer_coeff - synchronizer_coeff = mutation_to_copy.synchronizer_coeff - power_coeff = mutation_to_copy.power_coeff - energy_coeff = mutation_to_copy.energy_coeff - mutadone_proof = mutation_to_copy.mutadone_proof - can_chromosome = mutation_to_copy.can_chromosome - valid_chrom_list = mutation_to_copy.valid_chrom_list - -/datum/mutation/human/proc/remove_chromosome() +/datum/mutation/proc/remove_chromosome() stabilizer_coeff = initial(stabilizer_coeff) synchronizer_coeff = initial(synchronizer_coeff) power_coeff = initial(power_coeff) energy_coeff = initial(energy_coeff) - mutadone_proof = initial(mutadone_proof) can_chromosome = initial(can_chromosome) chromosome_name = null -/datum/mutation/human/proc/remove() - if(dna) - dna.force_lose(src) - else - qdel(src) - -/datum/mutation/human/proc/grant_power() +/datum/mutation/proc/grant_power() if(!ispath(power_path) || !owner) return FALSE @@ -254,7 +238,7 @@ // Runs through all the coefficients and uses this to determine which chromosomes the // mutation can take. Stores these as text strings in a list. -/datum/mutation/human/proc/update_valid_chromosome_list() +/datum/mutation/proc/update_valid_chromosome_list() valid_chrom_list.Cut() if(can_chromosome == CHROMOSOME_NEVER) diff --git a/code/datums/mutations/active.dm b/code/datums/mutations/active.dm index b357f6fb0bb..6cb5478602e 100644 --- a/code/datums/mutations/active.dm +++ b/code/datums/mutations/active.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/adrenaline_rush +/datum/mutation/adrenaline_rush name = "Adrenaline Rush" desc = "Allows the host to trigger their body's adrenaline response at will." quality = POSITIVE @@ -10,7 +10,7 @@ synchronizer_coeff = 1 power_coeff = 1 -/datum/mutation/human/adrenaline_rush/setup() +/datum/mutation/adrenaline_rush/setup() . = ..() var/datum/action/cooldown/adrenaline/to_modify = . if(!istype(to_modify)) // null or invalid diff --git a/code/datums/mutations/adaptation.dm b/code/datums/mutations/adaptation.dm index 3d0fcf0f8e9..4228a59376c 100644 --- a/code/datums/mutations/adaptation.dm +++ b/code/datums/mutations/adaptation.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/adaptation +/datum/mutation/adaptation name = "Adaptation" desc = "A strange mutation that renders the host immune to damage from extreme temperatures. Does not protect from vacuums." quality = POSITIVE @@ -6,21 +6,21 @@ text_gain_indication = span_notice("Your body feels normal!") instability = NEGATIVE_STABILITY_MAJOR locked = TRUE // fake parent - conflicts = list(/datum/mutation/human/adaptation) + conflicts = list(/datum/mutation/adaptation) mutation_traits = list(TRAIT_WADDLING) /// Icon used for the adaptation overlay var/adapt_icon = "meow" -/datum/mutation/human/adaptation/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/adaptation/New(datum/mutation/copymut) ..() - conflicts = typesof(/datum/mutation/human/adaptation) + conflicts = typesof(/datum/mutation/adaptation) if(!(type in visual_indicators)) visual_indicators[type] = list(mutable_appearance('icons/mob/effects/genetics.dmi', adapt_icon, -MUTATIONS_LAYER)) -/datum/mutation/human/adaptation/get_visual_indicator() +/datum/mutation/adaptation/get_visual_indicator() return visual_indicators[type][1] -/datum/mutation/human/adaptation/cold +/datum/mutation/adaptation/cold name = "Cold Adaptation" desc = "A strange mutation that renders the host immune to damage from low temperature environments. It also prevents the host from slipping on ice." text_gain_indication = span_notice("Your body feels refreshingly cold.") @@ -29,7 +29,7 @@ adapt_icon = "cold" locked = FALSE -/datum/mutation/human/adaptation/heat +/datum/mutation/adaptation/heat name = "Heat Adaptation" desc = "A strange mutation that renders the host immune to damage from high temperature, including being set alight, though the flame itself still burns clothing. It also seems to make the host resist ash storms." text_gain_indication = span_notice("Your body feels invigoratingly warm.") @@ -38,7 +38,7 @@ adapt_icon = "fire" locked = FALSE -/datum/mutation/human/adaptation/thermal +/datum/mutation/adaptation/thermal name = "Thermal Adaptation" desc = "A strange mutation that renders the host immune to damage from both low and high temperature environments. Does not protect from high or low pressure environments." difficulty = 32 @@ -48,7 +48,7 @@ adapt_icon = "thermal" locked = TRUE // recipe -/datum/mutation/human/adaptation/pressure +/datum/mutation/adaptation/pressure 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." text_gain_indication = span_notice("Your body feels impressively pressurized.") diff --git a/code/datums/mutations/antenna.dm b/code/datums/mutations/antenna.dm index 2aa2eb551c1..7f564d6fa04 100644 --- a/code/datums/mutations/antenna.dm +++ b/code/datums/mutations/antenna.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/antenna +/datum/mutation/antenna name = "Antenna" desc = "The affected person sprouts an antenna. This is known to allow them to access common radio channels passively." quality = POSITIVE @@ -18,7 +18,7 @@ . = ..() radio.name = "internal antenna" -/datum/mutation/human/antenna/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/antenna/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -26,22 +26,22 @@ linked_radio.implant(owner, null, TRUE, TRUE) radio_weakref = WEAKREF(linked_radio) -/datum/mutation/human/antenna/on_losing(mob/living/carbon/human/owner) +/datum/mutation/antenna/on_losing(mob/living/carbon/human/owner) if(..()) return var/obj/item/implant/radio/antenna/linked_radio = radio_weakref.resolve() if(linked_radio) QDEL_NULL(linked_radio) -/datum/mutation/human/antenna/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/antenna/New(datum/mutation/copymut) ..() if(!(type in visual_indicators)) visual_indicators[type] = list(mutable_appearance('icons/mob/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1))//-MUTATIONS_LAYER+1 -/datum/mutation/human/antenna/get_visual_indicator() +/datum/mutation/antenna/get_visual_indicator() return visual_indicators[type][1] -/datum/mutation/human/mindreader +/datum/mutation/mindreader name = "Mind Reader" desc = "The affected person can look into the recent memories of others." quality = POSITIVE @@ -118,10 +118,10 @@ to_chat(owner, span_boldnotice("You find that their intent is to [carbon_cast_on.combat_mode ? "harm" : "help"]...")) to_chat(owner, span_boldnotice("You uncover that [carbon_cast_on.p_their()] true identity is [carbon_cast_on.mind.name].")) -/datum/mutation/human/mindreader/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/mindreader/New(datum/mutation/copymut) ..() if(!(type in visual_indicators)) visual_indicators[type] = list(mutable_appearance('icons/mob/effects/genetics.dmi', "antenna", -FRONT_MUTATIONS_LAYER+1)) -/datum/mutation/human/mindreader/get_visual_indicator() +/datum/mutation/mindreader/get_visual_indicator() return visual_indicators[type][1] diff --git a/code/datums/mutations/autotomy.dm b/code/datums/mutations/autotomy.dm index bb78ceb08dc..03575a8f039 100644 --- a/code/datums/mutations/autotomy.dm +++ b/code/datums/mutations/autotomy.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/self_amputation +/datum/mutation/self_amputation name = "Autotomy" desc = "Allows a creature to voluntary discard a random appendage." quality = POSITIVE diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index fcccf95b8e5..8910144e1b0 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -1,7 +1,7 @@ //These mutations change your overall "form" somehow, like size //Epilepsy gives a very small chance to have a seizure every life tick, knocking you unconscious. -/datum/mutation/human/epilepsy +/datum/mutation/epilepsy name = "Epilepsy" desc = "A genetic defect that sporadically causes seizures." instability = NEGATIVE_STABILITY_MODERATE @@ -10,11 +10,11 @@ synchronizer_coeff = 1 power_coeff = 1 -/datum/mutation/human/epilepsy/on_life(seconds_per_tick, times_fired) +/datum/mutation/epilepsy/on_life(seconds_per_tick, times_fired) if(SPT_PROB(0.5 * GET_MUTATION_SYNCHRONIZER(src), seconds_per_tick)) trigger_seizure() -/datum/mutation/human/epilepsy/proc/trigger_seizure() +/datum/mutation/epilepsy/proc/trigger_seizure() if(owner.stat != CONSCIOUS) return owner.visible_message(span_danger("[owner] starts having a seizure!"), span_userdanger("You have a seizure!")) @@ -23,24 +23,24 @@ owner.add_mood_event("epilepsy", /datum/mood_event/epilepsy) addtimer(CALLBACK(src, PROC_REF(jitter_less)), 9 SECONDS) -/datum/mutation/human/epilepsy/proc/jitter_less() +/datum/mutation/epilepsy/proc/jitter_less() if(QDELETED(owner)) return owner.set_jitter(20 SECONDS) -/datum/mutation/human/epilepsy/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/epilepsy/on_acquiring(mob/living/carbon/human/acquirer) . = ..() if(!.) return RegisterSignal(owner, COMSIG_MOB_FLASHED, PROC_REF(get_flashed_nerd)) -/datum/mutation/human/epilepsy/on_losing(mob/living/carbon/human/owner) +/datum/mutation/epilepsy/on_losing(mob/living/carbon/human/owner) if(..()) return UnregisterSignal(owner, COMSIG_MOB_FLASHED) -/datum/mutation/human/epilepsy/proc/get_flashed_nerd() +/datum/mutation/epilepsy/proc/get_flashed_nerd() SIGNAL_HANDLER if(!prob(30)) @@ -49,7 +49,7 @@ //Unstable DNA induces random mutations! -/datum/mutation/human/bad_dna +/datum/mutation/bad_dna name = "Unstable DNA" desc = "Strange mutation that causes the holder to randomly mutate." instability = NEGATIVE_STABILITY_MAJOR @@ -57,7 +57,7 @@ text_gain_indication = span_danger("You feel strange.") locked = TRUE -/datum/mutation/human/bad_dna/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/bad_dna/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -80,7 +80,7 @@ //Cough gives you a chronic cough that causes you to drop items. -/datum/mutation/human/cough +/datum/mutation/cough name = "Cough" desc = "A chronic cough." instability = NEGATIVE_STABILITY_MODERATE @@ -89,7 +89,7 @@ synchronizer_coeff = 1 power_coeff = 1 -/datum/mutation/human/cough/on_life(seconds_per_tick, times_fired) +/datum/mutation/cough/on_life(seconds_per_tick, times_fired) if(SPT_PROB(2.5 * GET_MUTATION_SYNCHRONIZER(src), seconds_per_tick) && owner.stat == CONSCIOUS) owner.drop_all_held_items() owner.emote("cough") @@ -98,7 +98,7 @@ var/turf/target = get_ranged_target_turf(owner, REVERSE_DIR(owner.dir), cough_range) owner.throw_at(target, cough_range, GET_MUTATION_POWER(src)) -/datum/mutation/human/paranoia +/datum/mutation/paranoia name = "Paranoia" desc = "Subject is easily terrified, and may suffer from hallucinations." instability = NEGATIVE_STABILITY_MODERATE @@ -106,23 +106,23 @@ text_gain_indication = span_danger("You feel screams echo through your mind...") text_lose_indication = span_notice("The screaming in your mind fades.") -/datum/mutation/human/paranoia/on_life(seconds_per_tick, times_fired) +/datum/mutation/paranoia/on_life(seconds_per_tick, times_fired) if(SPT_PROB(2.5, seconds_per_tick) && owner.stat == CONSCIOUS) owner.emote("scream") if(prob(25)) owner.adjust_hallucinations(40 SECONDS) //Dwarfism shrinks your body and lets you pass tables. -/datum/mutation/human/dwarfism +/datum/mutation/dwarfism name = "Dwarfism" desc = "A mutation believed to be the cause of dwarfism." quality = POSITIVE difficulty = 16 instability = POSITIVE_INSTABILITY_MINOR - conflicts = list(/datum/mutation/human/gigantism, /datum/mutation/human/acromegaly) + conflicts = list(/datum/mutation/gigantism, /datum/mutation/acromegaly) locked = TRUE // Default intert species for now, so locked from regular pool. -/datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/dwarfism/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -135,7 +135,7 @@ ADD_TRAIT(owner, TRAIT_DWARF, GENETIC_MUTATION) owner.visible_message(span_danger("[owner] suddenly shrinks!"), span_notice("Everything around you seems to grow..")) -/datum/mutation/human/dwarfism/on_losing(mob/living/carbon/human/owner) +/datum/mutation/dwarfism/on_losing(mob/living/carbon/human/owner) if(..()) return // SKYRAT EDIT BEGIN @@ -147,16 +147,16 @@ REMOVE_TRAIT(owner, TRAIT_DWARF, GENETIC_MUTATION) owner.visible_message(span_danger("[owner] suddenly grows!"), span_notice("Everything around you seems to shrink..")) -/datum/mutation/human/acromegaly +/datum/mutation/acromegaly name = "Acromegaly" desc = "A mutation believed to be the cause of acromegaly, or 'being unusually tall'." quality = MINOR_NEGATIVE difficulty = 16 instability = NEGATIVE_STABILITY_MODERATE synchronizer_coeff = 1 - conflicts = list(/datum/mutation/human/dwarfism) + conflicts = list(/datum/mutation/dwarfism) -/datum/mutation/human/acromegaly/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/acromegaly/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -165,7 +165,7 @@ RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(head_bonk)) owner.regenerate_icons() -/datum/mutation/human/acromegaly/on_losing(mob/living/carbon/human/owner) +/datum/mutation/acromegaly/on_losing(mob/living/carbon/human/owner) if(..()) return REMOVE_TRAIT(owner, TRAIT_TOO_TALL, GENETIC_MUTATION) @@ -174,7 +174,7 @@ owner.regenerate_icons() // This is specifically happening because they're not used to their new height and are stumbling around into machinery made for normal humans -/datum/mutation/human/acromegaly/proc/head_bonk(mob/living/parent) +/datum/mutation/acromegaly/proc/head_bonk(mob/living/parent) SIGNAL_HANDLER var/atom/movable/whacked_by = (locate(/obj/machinery/door/airlock) in parent.loc) || (locate(/obj/machinery/door/firedoor) in parent.loc) || (locate(/obj/structure/mineral_door) in parent.loc) if(!whacked_by || prob(100 - (8 * GET_MUTATION_SYNCHRONIZER(src)))) @@ -186,14 +186,14 @@ playsound(whacked_by, 'sound/effects/bang.ogg', 10, TRUE) parent.adjust_staggered_up_to(STAGGERED_SLOWDOWN_LENGTH, 10 SECONDS) -/datum/mutation/human/gigantism +/datum/mutation/gigantism name = "Gigantism" //negative version of dwarfism desc = "The cells within the subject spread out to cover more area, making the subject appear larger." quality = MINOR_NEGATIVE difficulty = 12 - conflicts = list(/datum/mutation/human/dwarfism) + conflicts = list(/datum/mutation/dwarfism) -/datum/mutation/human/gigantism/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/gigantism/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -207,7 +207,7 @@ owner.update_transform(1.25) owner.visible_message(span_danger("[owner] suddenly grows!"), span_notice("Everything around you seems to shrink..")) -/datum/mutation/human/gigantism/on_losing(mob/living/carbon/human/owner) +/datum/mutation/gigantism/on_losing(mob/living/carbon/human/owner) if(..()) return // SKYRAT EDIT BEGIN @@ -220,7 +220,7 @@ owner.visible_message(span_danger("[owner] suddenly shrinks!"), span_notice("Everything around you seems to grow..")) //Clumsiness has a very large amount of small drawbacks depending on item. -/datum/mutation/human/clumsy +/datum/mutation/clumsy name = "Clumsiness" desc = "A genome that inhibits certain brain functions, causing the holder to appear clumsy. Honk!" instability = NEGATIVE_STABILITY_MAJOR @@ -229,7 +229,7 @@ mutation_traits = list(TRAIT_CLUMSY) //Tourettes causes you to randomly stand in place and shout. -/datum/mutation/human/tourettes +/datum/mutation/tourettes name = "Tourette's Syndrome" desc = "A chronic twitch that forces the user to scream bad words." //definitely needs rewriting quality = NEGATIVE @@ -237,7 +237,7 @@ text_gain_indication = span_danger("You twitch.") synchronizer_coeff = 1 -/datum/mutation/human/tourettes/on_life(seconds_per_tick, times_fired) +/datum/mutation/tourettes/on_life(seconds_per_tick, times_fired) if(SPT_PROB(5 * GET_MUTATION_SYNCHRONIZER(src), seconds_per_tick) && owner.stat == CONSCIOUS && !owner.IsStun()) switch(rand(1, 3)) if(1) @@ -251,7 +251,7 @@ //Deafness makes you deaf. -/datum/mutation/human/deaf +/datum/mutation/deaf name = "Deafness" desc = "The holder of this genome is completely deaf." instability = NEGATIVE_STABILITY_MAJOR @@ -260,7 +260,7 @@ mutation_traits = list(TRAIT_DEAF) //Monified turns you into a monkey. -/datum/mutation/human/race +/datum/mutation/race name = "Monkified" desc = "A strange genome, believing to be what differentiates monkeys from humans." text_gain_indication = span_green("You feel unusually monkey-like.") @@ -269,11 +269,10 @@ instability = NEGATIVE_STABILITY_MAJOR // mmmonky remove_on_aheal = FALSE locked = TRUE //Species specific, keep out of actual gene pool - mutadone_proof = TRUE var/datum/species/original_species = /datum/species/human var/original_name -/datum/mutation/human/race/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/race/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -283,7 +282,7 @@ original_name = owner.real_name owner.monkeyize() -/datum/mutation/human/race/on_losing(mob/living/carbon/human/owner) +/datum/mutation/race/on_losing(mob/living/carbon/human/owner) if(owner.stat == DEAD) return . = ..() @@ -295,20 +294,20 @@ owner.fully_replace_character_name(null, original_name) owner.humanize(original_species) -/datum/mutation/human/glow +/datum/mutation/glow name = "Glowy" desc = "You permanently emit a light with a random color and intensity." quality = POSITIVE text_gain_indication = span_notice("Your skin begins to glow softly.") instability = POSITIVE_INSTABILITY_MINI power_coeff = 1 - conflicts = list(/datum/mutation/human/glow/anti) + conflicts = list(/datum/mutation/glow/anti) var/glow_power = 2 var/glow_range = 2.5 var/glow_color var/obj/effect/dummy/lighting_obj/moblight/glow -/datum/mutation/human/glow/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/glow/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -316,35 +315,35 @@ glow = owner.mob_light() // Override modify here without a parent call, because we don't actually give an action. -/datum/mutation/human/glow/setup() +/datum/mutation/glow/setup() if(!glow) return glow.set_light_range_power_color(glow_range * GET_MUTATION_POWER(src), glow_power, glow_color) -/datum/mutation/human/glow/on_losing(mob/living/carbon/human/owner) +/datum/mutation/glow/on_losing(mob/living/carbon/human/owner) . = ..() if(.) return QDEL_NULL(glow) /// Returns a color for the glow effect -/datum/mutation/human/glow/proc/get_glow_color() +/datum/mutation/glow/proc/get_glow_color() return pick(COLOR_RED, COLOR_BLUE, COLOR_YELLOW, COLOR_GREEN, COLOR_PURPLE, COLOR_ORANGE) -/datum/mutation/human/glow/anti +/datum/mutation/glow/anti name = "Anti-Glow" desc = "Your skin seems to attract and absorb nearby light creating 'darkness' around you." text_gain_indication = span_notice("The light around you seems to disappear.") - conflicts = list(/datum/mutation/human/glow) + conflicts = list(/datum/mutation/glow) instability = POSITIVE_INSTABILITY_MINOR locked = TRUE glow_power = -1.5 -/datum/mutation/human/glow/anti/get_glow_color() +/datum/mutation/glow/anti/get_glow_color() return COLOR_BLACK -/datum/mutation/human/strong +/datum/mutation/strong name = "Strength" desc = "The user's muscles slightly expand. Commonly seen in top-ranking boxers." quality = POSITIVE @@ -353,7 +352,7 @@ difficulty = 16 mutation_traits = list(TRAIT_STRENGTH) -/datum/mutation/human/stimmed +/datum/mutation/stimmed name = "Stimmed" desc = "The user's chemical balance is more robust. This mutation is known to slightly improve workout efficiency." quality = POSITIVE @@ -362,7 +361,7 @@ difficulty = 16 mutation_traits = list(TRAIT_STIMMED) -/datum/mutation/human/insulated +/datum/mutation/insulated name = "Insulated" desc = "The affected person does not conduct electricity." quality = POSITIVE @@ -372,34 +371,34 @@ instability = POSITIVE_INSTABILITY_MODERATE mutation_traits = list(TRAIT_SHOCKIMMUNE) -/datum/mutation/human/fire +/datum/mutation/fire name = "Fiery Sweat" desc = "The user's skin will randomly combust, but is generally a lot more resilient to burning." quality = NEGATIVE text_gain_indication = span_warning("You feel hot.") text_lose_indication = span_notice("You feel a lot cooler.") - conflicts = list(/datum/mutation/human/adaptation/heat) + conflicts = list(/datum/mutation/adaptation/heat) difficulty = 14 synchronizer_coeff = 1 power_coeff = 1 -/datum/mutation/human/fire/on_life(seconds_per_tick, times_fired) +/datum/mutation/fire/on_life(seconds_per_tick, times_fired) if(SPT_PROB((0.05+(100-dna.stability)/19.5) * GET_MUTATION_SYNCHRONIZER(src), seconds_per_tick)) owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src)) owner.ignite_mob() -/datum/mutation/human/fire/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/fire/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return owner.physiology.burn_mod *= 0.5 -/datum/mutation/human/fire/on_losing(mob/living/carbon/human/owner) +/datum/mutation/fire/on_losing(mob/living/carbon/human/owner) if(..()) return owner.physiology.burn_mod *= 2 -/datum/mutation/human/badblink +/datum/mutation/badblink name = "Spatial Instability" desc = "The victim of the mutation has a very weak link to spatial reality, and may be displaced. Often causes extreme nausea." quality = NEGATIVE @@ -412,7 +411,7 @@ power_coeff = 1 var/warpchance = 0 -/datum/mutation/human/badblink/on_life(seconds_per_tick, times_fired) +/datum/mutation/badblink/on_life(seconds_per_tick, times_fired) if(SPT_PROB(warpchance, seconds_per_tick)) var/warpmessage = pick( span_warning("With a sickening 720-degree twist of [owner.p_their()] back, [owner] vanishes into thin air."), @@ -429,7 +428,7 @@ else warpchance += 0.0625 * seconds_per_tick / GET_MUTATION_ENERGY(src) -/datum/mutation/human/acidflesh +/datum/mutation/acidflesh name = "Acidic Flesh" desc = "Subject has acidic chemicals building up underneath the skin. This is often lethal." instability = NEGATIVE_STABILITY_MAJOR @@ -440,7 +439,7 @@ /// The cooldown for the warning message COOLDOWN_DECLARE(msgcooldown) -/datum/mutation/human/acidflesh/on_life(seconds_per_tick, times_fired) +/datum/mutation/acidflesh/on_life(seconds_per_tick, times_fired) if(SPT_PROB(13, seconds_per_tick)) if(COOLDOWN_FINISHED(src, msgcooldown)) to_chat(owner, span_danger("Your acid flesh bubbles...")) @@ -450,7 +449,7 @@ owner.visible_message(span_warning("[owner]'s skin bubbles and pops."), span_userdanger("Your bubbling flesh pops! It burns!")) playsound(owner,'sound/items/weapons/sear.ogg', 50, TRUE) -/datum/mutation/human/spastic +/datum/mutation/spastic name = "Spastic" desc = "Subject suffers from muscle spasms." instability = NEGATIVE_STABILITY_MODERATE @@ -459,18 +458,18 @@ text_lose_indication = span_notice("Your flinching subsides.") difficulty = 16 -/datum/mutation/human/spastic/on_acquiring() +/datum/mutation/spastic/on_acquiring() . = ..() if(!.) return owner.apply_status_effect(/datum/status_effect/spasms) -/datum/mutation/human/spastic/on_losing() +/datum/mutation/spastic/on_losing() if(..()) return owner.remove_status_effect(/datum/status_effect/spasms) -/datum/mutation/human/extrastun +/datum/mutation/extrastun name = "Two Left Feet" desc = "A mutation that replaces the right foot with another left foot. Symptoms include kissing the floor when taking a step." instability = NEGATIVE_STABILITY_MODERATE @@ -479,20 +478,20 @@ text_lose_indication = span_notice("Your right foot feels alright.") difficulty = 16 -/datum/mutation/human/extrastun/on_acquiring() +/datum/mutation/extrastun/on_acquiring() . = ..() if(!.) return RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) -/datum/mutation/human/extrastun/on_losing() +/datum/mutation/extrastun/on_losing() . = ..() if(.) return UnregisterSignal(owner, COMSIG_MOVABLE_MOVED) ///Triggers on moved(). Randomly makes the owner trip -/datum/mutation/human/extrastun/proc/on_move() +/datum/mutation/extrastun/proc/on_move() SIGNAL_HANDLER if(prob(99.5)) //The brawl mutation @@ -502,7 +501,7 @@ to_chat(owner, span_danger("You trip over your own feet.")) owner.Knockdown(30) -/datum/mutation/human/martyrdom +/datum/mutation/martyrdom name = "Internal Martyrdom" desc = "A mutation that makes the body destruct when near death. Not damaging, but very, VERY disorienting." instability = NEGATIVE_STABILITY_MAJOR // free stability >:) @@ -511,19 +510,19 @@ text_gain_indication = span_warning("You get an intense feeling of heartburn.") text_lose_indication = span_notice("Your internal organs feel at ease.") -/datum/mutation/human/martyrdom/on_acquiring() +/datum/mutation/martyrdom/on_acquiring() . = ..() if(!.) return RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(bloody_shower)) -/datum/mutation/human/martyrdom/on_losing() +/datum/mutation/martyrdom/on_losing() . = ..() if(.) return TRUE UnregisterSignal(owner, COMSIG_MOB_STATCHANGE) -/datum/mutation/human/martyrdom/proc/bloody_shower(datum/source, new_stat) +/datum/mutation/martyrdom/proc/bloody_shower(datum/source, new_stat) SIGNAL_HANDLER if(new_stat != HARD_CRIT) @@ -550,7 +549,7 @@ owner.investigate_log("has been gibbed by the martyrdom mutation.", INVESTIGATE_DEATHS) owner.gib(DROP_ALL_REMAINS) -/datum/mutation/human/headless +/datum/mutation/headless name = "H.A.R.S." desc = "A mutation that makes the body reject the head, the brain receding into the chest. Stands for Head Allergic Rejection Syndrome. Warning: Removing this mutation is very dangerous, though it will regenerate non-vital head organs." instability = NEGATIVE_STABILITY_MAJOR @@ -558,7 +557,7 @@ quality = NEGATIVE //holy shit no eyes or tongue or ears text_gain_indication = span_warning("Something feels off.") -/datum/mutation/human/headless/on_acquiring() +/datum/mutation/headless/on_acquiring() . = ..() if(!.) return @@ -578,7 +577,7 @@ qdel(head) RegisterSignal(owner, COMSIG_ATTEMPT_CARBON_ATTACH_LIMB, PROC_REF(abort_attachment)) -/datum/mutation/human/headless/on_losing() +/datum/mutation/headless/on_losing() . = ..() if(.) return TRUE @@ -599,14 +598,14 @@ owner.visible_message(span_warning("[owner]'s head returns with a sickening crunch!"), span_warning("Your head regrows with a sickening crack! Ouch.")) new /obj/effect/gibspawner/generic(get_turf(owner), owner) -/datum/mutation/human/headless/proc/abort_attachment(datum/source, obj/item/bodypart/new_limb, special) //you aren't getting your head back +/datum/mutation/headless/proc/abort_attachment(datum/source, obj/item/bodypart/new_limb, special) //you aren't getting your head back SIGNAL_HANDLER if(istype(new_limb, /obj/item/bodypart/head)) return COMPONENT_NO_ATTACH // You bleed faster but regenerate blood faster -/datum/mutation/human/bloodier +/datum/mutation/bloodier name = "Hypermetabolic Blood" desc = "The subject's blood is hypermetabolic, causing it to be produced at a much faster rate." quality = POSITIVE @@ -624,7 +623,7 @@ /// Tracks if we've modified the physiology of the owner VAR_PRIVATE/physiology_modified = FALSE -/datum/mutation/human/bloodier/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/bloodier/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -633,7 +632,7 @@ owner.physiology.blood_regen_mod *= blood_regen_rate physiology_modified = TRUE -/datum/mutation/human/bloodier/on_losing(mob/living/carbon/human/owner) +/datum/mutation/bloodier/on_losing(mob/living/carbon/human/owner) . = ..() if(.) return @@ -642,7 +641,7 @@ owner.physiology.blood_regen_mod /= blood_regen_rate physiology_modified = FALSE // just in case -/datum/mutation/human/bloodier/setup() +/datum/mutation/bloodier/setup() if(owner && physiology_modified) owner.physiology.bleed_mod /= bleed_rate owner.physiology.blood_regen_mod /= blood_regen_rate @@ -658,7 +657,7 @@ return TRUE // You eat rocks -/datum/mutation/human/rock_eater +/datum/mutation/rock_eater name = "Rock Eater" desc = "The subject's body is able to digest rocks and minerals." quality = POSITIVE @@ -667,10 +666,10 @@ text_lose_indication = span_notice("You could go for a normal meal.") difficulty = 12 mutation_traits = list(TRAIT_ROCK_EATER) - conflicts = list(/datum/mutation/human/rock_absorber) + conflicts = list(/datum/mutation/rock_absorber) // You eat rock but also get buffs from them -/datum/mutation/human/rock_absorber +/datum/mutation/rock_absorber name = "Rock Absorber" desc = "The subject's body is able to digest rocks and minerals, taking on their properties." quality = POSITIVE @@ -678,10 +677,10 @@ text_gain_indication = span_notice("You feel a supreme craving for rocks.") text_lose_indication = span_notice("You could go for a normal meal.") mutation_traits = list(TRAIT_ROCK_EATER, TRAIT_ROCK_METAMORPHIC) - conflicts = list(/datum/mutation/human/rock_eater) + conflicts = list(/datum/mutation/rock_eater) locked = TRUE -/datum/mutation/human/rock_absorber/on_losing(mob/living/carbon/human/owner) +/datum/mutation/rock_absorber/on_losing(mob/living/carbon/human/owner) . = ..() if(. || QDELING(owner) || HAS_TRAIT(owner, TRAIT_ROCK_METAMORPHIC)) return @@ -689,7 +688,7 @@ owner.remove_status_effect(/datum/status_effect/golem_lightbulb) // Soft crit is disabed -/datum/mutation/human/inexorable +/datum/mutation/inexorable name = "Inexorable" desc = "Your body can push on beyond the limits of normal human endurance. \ However, pushing it too far can cause severe damage to your body." @@ -701,28 +700,28 @@ synchronizer_coeff = 1 mutation_traits = list(TRAIT_NOSOFTCRIT, TRAIT_ANALGESIA) -/datum/mutation/human/inexorable/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/inexorable/on_acquiring(mob/living/carbon/human/acquirer) . = ..() if(!.) return RegisterSignal(acquirer, COMSIG_LIVING_HEALTH_UPDATE, PROC_REF(check_health)) check_health() -/datum/mutation/human/inexorable/on_losing(mob/living/carbon/human/owner) +/datum/mutation/inexorable/on_losing(mob/living/carbon/human/owner) . = ..() if(.) return UnregisterSignal(owner, COMSIG_LIVING_HEALTH_UPDATE) REMOVE_TRAIT(owner, TRAIT_SOFTSPOKEN, REF(src)) -/datum/mutation/human/inexorable/proc/check_health(...) +/datum/mutation/inexorable/proc/check_health(...) SIGNAL_HANDLER if(owner.health > owner.crit_threshold || owner.stat != CONSCIOUS) REMOVE_TRAIT(owner, TRAIT_SOFTSPOKEN, REF(src)) else ADD_TRAIT(owner, TRAIT_SOFTSPOKEN, REF(src)) -/datum/mutation/human/inexorable/on_life(seconds_per_tick, times_fired) +/datum/mutation/inexorable/on_life(seconds_per_tick, times_fired) if(owner.health > owner.crit_threshold || owner.stat != CONSCIOUS || HAS_TRAIT(owner, TRAIT_STASIS)) return // Gives you 30 seconds of being in soft crit... give or take diff --git a/code/datums/mutations/chameleon.dm b/code/datums/mutations/chameleon.dm index a4ac6462661..ccae7afe644 100644 --- a/code/datums/mutations/chameleon.dm +++ b/code/datums/mutations/chameleon.dm @@ -1,5 +1,5 @@ //Chameleon causes the owner to slowly become transparent when not moving. -/datum/mutation/human/chameleon +/datum/mutation/chameleon name = "Chameleon" desc = "A genome that causes the holder's skin to become transparent over time." quality = POSITIVE @@ -9,7 +9,7 @@ instability = POSITIVE_INSTABILITY_MAJOR power_coeff = 1 -/datum/mutation/human/chameleon/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/chameleon/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -22,14 +22,14 @@ RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) RegisterSignal(owner, COMSIG_LIVING_UNARMED_ATTACK, PROC_REF(on_attack_hand)) -/datum/mutation/human/chameleon/on_life(seconds_per_tick, times_fired) +/datum/mutation/chameleon/on_life(seconds_per_tick, times_fired) /// SKYRAT EDIT BEGIN if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN)) owner.alpha = max(owner.alpha - (12.5 * (GET_MUTATION_POWER(src)) * seconds_per_tick), 0) /// SKYRAT EDIT END //Upgraded mutation of the base variant, used for changelings. No instability and better power_coeff -/datum/mutation/human/chameleon/changeling +/datum/mutation/chameleon/changeling instability = 0 power_coeff = 2.5 locked = TRUE @@ -44,7 +44,7 @@ * - forced: Whether the movement was caused by a forceMove or moveToNullspace. * - [old_locs][/list/atom]: The locations the host mob used to be in. */ -/datum/mutation/human/chameleon/proc/on_move(atom/movable/source, atom/old_loc, move_dir, forced, list/atom/old_locs) +/datum/mutation/chameleon/proc/on_move(atom/movable/source, atom/old_loc, move_dir, forced, list/atom/old_locs) SIGNAL_HANDLER /// SKYRAT EDIT BEGIN @@ -63,7 +63,7 @@ * - proximity: Whether the host mob can physically reach the thing that they clicked on. * - [modifiers][/list]: The set of click modifiers associated with this attack chain call. */ -/datum/mutation/human/chameleon/proc/on_attack_hand(mob/living/carbon/human/source, atom/target, proximity, list/modifiers) +/datum/mutation/chameleon/proc/on_attack_hand(mob/living/carbon/human/source, atom/target, proximity, list/modifiers) SIGNAL_HANDLER if(!proximity) //stops tk from breaking chameleon @@ -76,7 +76,7 @@ owner.alpha = 255 /// SKYRAT EDIT END -/datum/mutation/human/chameleon/on_losing(mob/living/carbon/human/owner) +/datum/mutation/chameleon/on_losing(mob/living/carbon/human/owner) if(..()) return owner.alpha = 255 diff --git a/code/datums/mutations/cold.dm b/code/datums/mutations/cold.dm index 7916b413723..340f5e9e10b 100644 --- a/code/datums/mutations/cold.dm +++ b/code/datums/mutations/cold.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/geladikinesis +/datum/mutation/geladikinesis name = "Geladikinesis" desc = "Allows the user to concentrate moisture and sub-zero forces into snow." quality = POSITIVE @@ -20,7 +20,7 @@ delete_old = FALSE delete_on_failure = FALSE -/datum/mutation/human/cryokinesis +/datum/mutation/cryokinesis name = "Cryokinesis" desc = "Draws negative energy from the sub-zero void to freeze surrounding temperatures at subject's will." quality = POSITIVE //upsides and downsides diff --git a/code/datums/mutations/farsight.dm b/code/datums/mutations/farsight.dm index e87197fa7b3..d246264bd12 100644 --- a/code/datums/mutations/farsight.dm +++ b/code/datums/mutations/farsight.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/farsight +/datum/mutation/farsight name = "Farsight" desc = "The subject's eyes are able to see further than normal." quality = POSITIVE @@ -9,7 +9,7 @@ power_coeff = 1 power_path = /datum/action/cooldown/spell/farsight -/datum/mutation/human/farsight/setup() +/datum/mutation/farsight/setup() . = ..() var/datum/action/cooldown/spell/farsight/to_modify = . if(istype(to_modify)) diff --git a/code/datums/mutations/fire_breath.dm b/code/datums/mutations/fire_breath.dm index c7d2ec2873e..4ced6bb6449 100644 --- a/code/datums/mutations/fire_breath.dm +++ b/code/datums/mutations/fire_breath.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/firebreath +/datum/mutation/firebreath name = "Fire Breath" desc = "An ancient mutation that gives lizards breath of fire." quality = POSITIVE @@ -11,7 +11,7 @@ energy_coeff = 1 power_coeff = 1 -/datum/mutation/human/firebreath/setup() +/datum/mutation/firebreath/setup() . = ..() var/datum/action/cooldown/spell/cone/staggered/fire_breath/to_modify = . if(!istype(to_modify)) // null or invalid diff --git a/code/datums/mutations/hot.dm b/code/datums/mutations/hot.dm index 74fa42e1edd..38e88d6b574 100644 --- a/code/datums/mutations/hot.dm +++ b/code/datums/mutations/hot.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/cindikinesis +/datum/mutation/cindikinesis name = "Cindikinesis" desc = "Allows the user to concentrate nearby heat into a pile of ash. Wow. Very interesting." quality = POSITIVE @@ -21,7 +21,7 @@ delete_old = FALSE delete_on_failure = FALSE -/datum/mutation/human/pyrokinesis +/datum/mutation/pyrokinesis name = "Pyrokinesis" desc = "Draws positive energy from the surroundings to heat surrounding temperatures at subject's will." quality = POSITIVE diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm index 6b70424b470..d8de1879f47 100644 --- a/code/datums/mutations/hulk.dm +++ b/code/datums/mutations/hulk.dm @@ -1,5 +1,5 @@ //Hulk turns your skin green, makes you strong, and allows you to shrug off stun effect. -/datum/mutation/human/hulk +/datum/mutation/hulk name = "Hulk" desc = "A poorly understood genome that causes the holder's muscles to expand, inhibit speech and gives the person a bad skin condition." quality = POSITIVE @@ -9,7 +9,7 @@ species_allowed = list(SPECIES_HUMAN) //no skeleton/lizard hulk health_req = 25 instability = POSITIVE_INSTABILITY_MAJOR - conflicts = list(/datum/mutation/human/hulk/ork) + conflicts = list(/datum/mutation/hulk/ork) var/scream_delay = 50 var/last_scream = 0 var/bodypart_color = COLOR_DARK_LIME @@ -21,14 +21,14 @@ TRAIT_STUNIMMUNE, ) -/datum/mutation/human/hulk/New(class, timer, datum/mutation/human/copymut) +/datum/mutation/hulk/New(datum/mutation/copymut) . = ..() add_speechmod() -/datum/mutation/human/hulk/proc/add_speechmod() +/datum/mutation/hulk/proc/add_speechmod() AddComponent(/datum/component/speechmod, replacements = list("." = "!"), end_string = "!!", uppercase = TRUE) -/datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/hulk/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return @@ -40,7 +40,7 @@ RegisterSignal(owner, COMSIG_MOB_CLICKON, PROC_REF(check_swing)) owner.add_movespeed_mod_immunities("hulk", /datum/movespeed_modifier/damage_slowdown) -/datum/mutation/human/hulk/proc/on_attack_hand(mob/living/carbon/human/source, atom/target, proximity, modifiers) +/datum/mutation/hulk/proc/on_attack_hand(mob/living/carbon/human/source, atom/target, proximity, modifiers) SIGNAL_HANDLER if(!source.combat_mode || !proximity || LAZYACCESS(modifiers, RIGHT_CLICK)) @@ -58,7 +58,7 @@ source.changeNext_move(CLICK_CD_MELEE) return COMPONENT_CANCEL_ATTACK_CHAIN -/datum/mutation/human/hulk/proc/scream_attack(mob/living/carbon/human/source) +/datum/mutation/hulk/proc/scream_attack(mob/living/carbon/human/source) source.say("WAAAAAAAAAAAAAAGH!", forced="hulk") /** @@ -70,7 +70,7 @@ *Arguments: *arg1 is the arm to evaluate damage of and possibly break. */ -/datum/mutation/human/hulk/proc/break_an_arm(obj/item/bodypart/arm) +/datum/mutation/hulk/proc/break_an_arm(obj/item/bodypart/arm) var/severity switch(arm.brute_dam) if(45 to 50) @@ -85,13 +85,13 @@ owner.cause_wound_of_type_and_severity(WOUND_BLUNT, arm, severity, wound_source = "hulk smashing") -/datum/mutation/human/hulk/on_life(seconds_per_tick, times_fired) +/datum/mutation/hulk/on_life(seconds_per_tick, times_fired) if(owner.health < owner.crit_threshold) on_losing(owner) to_chat(owner, span_danger("You suddenly feel very weak.")) qdel(src) -/datum/mutation/human/hulk/on_losing(mob/living/carbon/human/owner) +/datum/mutation/hulk/on_losing(mob/living/carbon/human/owner) if(..()) return for(var/obj/item/bodypart/part as anything in owner.bodyparts) @@ -106,7 +106,7 @@ #define HULK_TAILTHROW_STEPS 28 /// Run a barrage of checks to see if any given click is actually able to swing -/datum/mutation/human/hulk/proc/check_swing(mob/living/carbon/human/user, atom/clicked_atom, list/modifiers) +/datum/mutation/hulk/proc/check_swing(mob/living/carbon/human/user, atom/clicked_atom, list/modifiers) SIGNAL_HANDLER /// Basically, we only proceed if we're in throw mode with a tailed carbon in our grasp with at least a neck grab and we're not restrained in some way @@ -133,7 +133,7 @@ return(COMSIG_MOB_CANCEL_CLICKON) /// Do a short 2 second do_after before starting the actual swing -/datum/mutation/human/hulk/proc/setup_swing(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person) +/datum/mutation/hulk/proc/setup_swing(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person) var/original_dir = the_hulk.dir // so no matter if the hulk tries to mess up their direction, they always face where they started when they throw yeeted_person.forceMove(the_hulk.loc) @@ -167,7 +167,7 @@ * credit to: cogwerks, pistoleer, spyguy, angriestibm, marquesas, and stuntwaffle. * For each step of the swinging, with the delay getting shorter along the way. Checks to see we still have them in our grasp at each step. */ -/datum/mutation/human/hulk/proc/swing_loop(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person, step, original_dir) +/datum/mutation/hulk/proc/swing_loop(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person, step, original_dir) if(!yeeted_person || !the_hulk || the_hulk.incapacitated) return if(get_dist(the_hulk, yeeted_person) > 1 || !isturf(the_hulk.loc) || !isturf(yeeted_person.loc)) @@ -238,7 +238,7 @@ addtimer(CALLBACK(src, PROC_REF(swing_loop), the_hulk, yeeted_person, step, original_dir), delay) /// Time to toss the victim at high speed -/datum/mutation/human/hulk/proc/finish_swing(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person, original_dir) +/datum/mutation/hulk/proc/finish_swing(mob/living/carbon/human/the_hulk, mob/living/carbon/yeeted_person, original_dir) if(!yeeted_person || !the_hulk || the_hulk.incapacitated) return if(get_dist(the_hulk, yeeted_person) > 1 || !isturf(the_hulk.loc) || !isturf(yeeted_person.loc)) @@ -259,7 +259,7 @@ yeeted_person.throw_at(T, 10, 6, the_hulk, TRUE, TRUE) log_combat(the_hulk, yeeted_person, "has thrown by tail") -/datum/mutation/human/hulk/wizardly +/datum/mutation/hulk/wizardly name = "Hulk (Magical)" species_allowed = null //yes skeleton/lizard hulk - note that species that dont have skintone changing (like skellies) get custom handling health_req = 0 @@ -272,7 +272,7 @@ TRAIT_STUNIMMUNE, ) // no chunk -/datum/mutation/human/hulk/superhuman +/datum/mutation/hulk/superhuman name = "Hulk (Super)" health_req = 0 instability = 0 @@ -287,17 +287,17 @@ TRAIT_ANALGESIA, ) // fight till your last breath -/datum/mutation/human/hulk/superhuman/on_life(seconds_per_tick, times_fired) +/datum/mutation/hulk/superhuman/on_life(seconds_per_tick, times_fired) return -/datum/mutation/human/hulk/ork +/datum/mutation/hulk/ork name = "Ork" desc = "A mutation caused by a mixup of hulk genes which severely impacts speech centers in owners' brains." text_gain_indication = span_notice("You feel significantly dumber!") bodypart_color = COLOR_ASSISTANT_OLIVE - conflicts = list(/datum/mutation/human/hulk) + conflicts = list(/datum/mutation/hulk) -/datum/mutation/human/hulk/ork/add_speechmod() +/datum/mutation/hulk/ork/add_speechmod() AddComponent(/datum/component/speechmod, replacements = strings("ork_replacement.json", "ork"), end_string = "!!", uppercase = TRUE) #undef HULK_TAILTHROW_STEPS diff --git a/code/datums/mutations/olfaction.dm b/code/datums/mutations/olfaction.dm index c617f4d2c59..c9b6043872b 100644 --- a/code/datums/mutations/olfaction.dm +++ b/code/datums/mutations/olfaction.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/olfaction +/datum/mutation/olfaction name = "Transcendent Olfaction" desc = "Your sense of smell is comparable to that of a canine." quality = POSITIVE @@ -9,7 +9,7 @@ instability = POSITIVE_INSTABILITY_MODERATE synchronizer_coeff = 1 -/datum/mutation/human/olfaction/setup() +/datum/mutation/olfaction/setup() . = ..() var/datum/action/cooldown/spell/olfaction/to_modify = . if(!istype(to_modify)) // null or invalid diff --git a/code/datums/mutations/passive.dm b/code/datums/mutations/passive.dm index 88b1af1bbd4..c5ab54f66f3 100644 --- a/code/datums/mutations/passive.dm +++ b/code/datums/mutations/passive.dm @@ -1,20 +1,20 @@ -/datum/mutation/human/biotechcompat +/datum/mutation/biotechcompat name = "Biotech Compatibility" desc = "Subject is more compatibile with biotechnology such as skillchips." quality = POSITIVE instability = POSITIVE_INSTABILITY_MINI -/datum/mutation/human/biotechcompat/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/biotechcompat/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return owner.adjust_skillchip_complexity_modifier(1) -/datum/mutation/human/biotechcompat/on_losing(mob/living/carbon/human/owner) +/datum/mutation/biotechcompat/on_losing(mob/living/carbon/human/owner) owner.adjust_skillchip_complexity_modifier(-1) return ..() -/datum/mutation/human/clever +/datum/mutation/clever name = "Clever" desc = "Causes the subject to feel just a little bit smarter. Most effective in specimens with low levels of intelligence." quality = POSITIVE @@ -22,13 +22,13 @@ text_gain_indication = span_danger("You feel a little bit smarter.") text_lose_indication = span_danger("Your mind feels a little bit foggy.") -/datum/mutation/human/clever/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/clever/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return owner.add_traits(list(TRAIT_ADVANCEDTOOLUSER, TRAIT_LITERATE), GENETIC_MUTATION) -/datum/mutation/human/clever/on_losing(mob/living/carbon/human/owner) +/datum/mutation/clever/on_losing(mob/living/carbon/human/owner) if(..()) return owner.remove_traits(list(TRAIT_ADVANCEDTOOLUSER, TRAIT_LITERATE), GENETIC_MUTATION) diff --git a/code/datums/mutations/radioactive.dm b/code/datums/mutations/radioactive.dm index fd14c123912..d31b3393fce 100644 --- a/code/datums/mutations/radioactive.dm +++ b/code/datums/mutations/radioactive.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/radioactive +/datum/mutation/radioactive name = "Radioactivity" desc = "A volatile mutation that causes the host to sent out deadly beta radiation. This affects both the hosts and their surroundings." quality = NEGATIVE @@ -9,22 +9,22 @@ /// Weakref to our radiation emitter component var/datum/weakref/radioactivity_source_ref -/datum/mutation/human/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/radioactive/New(datum/mutation/copymut) . = ..() if(!(type in visual_indicators)) visual_indicators[type] = list(mutable_appearance('icons/mob/effects/genetics.dmi', "radiation", -MUTATIONS_LAYER)) -/datum/mutation/human/radioactive/get_visual_indicator() +/datum/mutation/radioactive/get_visual_indicator() return visual_indicators[type][1] -/datum/mutation/human/radioactive/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/radioactive/on_acquiring(mob/living/carbon/human/acquirer) . = ..() if(!.) return var/datum/component/radioactive_emitter/radioactivity_source = make_radioactive(acquirer) radioactivity_source_ref = WEAKREF(radioactivity_source) -/datum/mutation/human/radioactive/setup() +/datum/mutation/radioactive/setup() . = ..() if(!QDELETED(owner)) make_radioactive(owner) @@ -33,7 +33,7 @@ * Makes the passed mob radioactive, or if they're already radioactive, * update their radioactivity to the newly set values */ -/datum/mutation/human/radioactive/proc/make_radioactive(mob/living/carbon/human/who) +/datum/mutation/radioactive/proc/make_radioactive(mob/living/carbon/human/who) return who.AddComponent( /datum/component/radioactive_emitter, \ cooldown_time = 5 SECONDS, \ @@ -41,6 +41,6 @@ threshold = RAD_MEDIUM_INSULATION, \ ) -/datum/mutation/human/radioactive/on_losing(mob/living/carbon/human/owner) +/datum/mutation/radioactive/on_losing(mob/living/carbon/human/owner) QDEL_NULL(radioactivity_source_ref) return ..() diff --git a/code/datums/mutations/reach.dm b/code/datums/mutations/reach.dm index 03dae165d10..20b87c91b81 100644 --- a/code/datums/mutations/reach.dm +++ b/code/datums/mutations/reach.dm @@ -1,5 +1,5 @@ ///Telekinesis lets you interact with objects from range, and gives you a light blue halo around your head. -/datum/mutation/human/telekinesis +/datum/mutation/telekinesis name = "Telekinesis" desc = "A strange mutation that allows the holder to interact with objects through thought." quality = POSITIVE @@ -10,27 +10,28 @@ ///Typecache of atoms that TK shouldn't interact with var/static/list/blacklisted_atoms = typecacheof(list(/atom/movable/screen)) -/datum/mutation/human/telekinesis/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/telekinesis/New(datum/mutation/copymut) ..() if(!(type in visual_indicators)) visual_indicators[type] = list(mutable_appearance('modular_skyrat/master_files/icons/effects/tele_effects.dmi', "telekinesishead", -MUTATIONS_LAYER)) // SKYRAT EDIT CHANGE - ORIGINAL: visual_indicators[type] = list(mutable_appearance('icons/mob/effects/genetics.dmi', "telekinesishead", -MUTATIONS_LAYER)) -/datum/mutation/human/telekinesis/on_acquiring(mob/living/carbon/human/homan) + +/datum/mutation/telekinesis/on_acquiring(mob/living/carbon/human/homan) . = ..() if(!.) return RegisterSignal(homan, COMSIG_MOB_ATTACK_RANGED, PROC_REF(on_ranged_attack)) -/datum/mutation/human/telekinesis/on_losing(mob/living/carbon/human/homan) +/datum/mutation/telekinesis/on_losing(mob/living/carbon/human/homan) . = ..() if(.) return UnregisterSignal(homan, COMSIG_MOB_ATTACK_RANGED) -/datum/mutation/human/telekinesis/get_visual_indicator() +/datum/mutation/telekinesis/get_visual_indicator() return visual_indicators[type][1] ///Triggers on COMSIG_MOB_ATTACK_RANGED. Usually handles stuff like picking up items at range. -/datum/mutation/human/telekinesis/proc/on_ranged_attack(mob/source, atom/target) +/datum/mutation/telekinesis/proc/on_ranged_attack(mob/source, atom/target) SIGNAL_HANDLER if(is_type_in_typecache(target, blacklisted_atoms)) return @@ -38,7 +39,7 @@ return return target.attack_tk(source) -/datum/mutation/human/elastic_arms +/datum/mutation/elastic_arms name = "Elastic Arms" desc = "Subject's arms have become elastic, allowing them to stretch up to a meter away. However, this elasticity makes it difficult to wear gloves, handle complex tasks, or grab large objects." quality = POSITIVE @@ -48,7 +49,7 @@ difficulty = 32 mutation_traits = list(TRAIT_CHUNKYFINGERS, TRAIT_NO_TWOHANDING) -/datum/mutation/human/elastic_arms/on_acquiring(mob/living/carbon/human/homan) +/datum/mutation/elastic_arms/on_acquiring(mob/living/carbon/human/homan) . = ..() if(!.) return @@ -56,21 +57,21 @@ RegisterSignal(homan, COMSIG_LIVING_TRY_PUT_IN_HAND, PROC_REF(on_owner_equipping_item)) RegisterSignal(homan, COMSIG_LIVING_TRY_PULL, PROC_REF(on_owner_try_pull)) -/datum/mutation/human/elastic_arms/on_losing(mob/living/carbon/human/homan) +/datum/mutation/elastic_arms/on_losing(mob/living/carbon/human/homan) . = ..() if(.) return UnregisterSignal(homan, list(COMSIG_ATOM_CANREACH, COMSIG_LIVING_TRY_PUT_IN_HAND, COMSIG_LIVING_TRY_PULL)) /// signal sent when prompting if an item can be equipped -/datum/mutation/human/elastic_arms/proc/on_owner_equipping_item(mob/living/carbon/human/owner, obj/item/pick_item) +/datum/mutation/elastic_arms/proc/on_owner_equipping_item(mob/living/carbon/human/owner, obj/item/pick_item) SIGNAL_HANDLER if((pick_item.w_class > WEIGHT_CLASS_BULKY) && !(pick_item.item_flags & ABSTRACT|HAND_ITEM)) // cant decide if i should limit to huge or bulky. pick_item.balloon_alert(owner, "arms too floppy to wield!") return COMPONENT_LIVING_CANT_PUT_IN_HAND /// signal sent when owner tries to pull -/datum/mutation/human/elastic_arms/proc/on_owner_try_pull(mob/living/carbon/owner, atom/movable/target, force) +/datum/mutation/elastic_arms/proc/on_owner_try_pull(mob/living/carbon/owner, atom/movable/target, force) SIGNAL_HANDLER if(isliving(target)) var/mob/living/living_target = target @@ -84,7 +85,7 @@ return COMSIG_LIVING_CANCEL_PULL // probably buggy. let's enlist our players as bug testers -/datum/mutation/human/elastic_arms/proc/on_canreach(mob/source, atom/target) +/datum/mutation/elastic_arms/proc/on_canreach(mob/source, atom/target) SIGNAL_HANDLER var/distance = get_dist(target, source) diff --git a/code/datums/mutations/sight.dm b/code/datums/mutations/sight.dm index b552c89bea0..3bbf1a1f2e6 100644 --- a/code/datums/mutations/sight.dm +++ b/code/datums/mutations/sight.dm @@ -1,43 +1,43 @@ //Nearsightedness restricts your vision by several tiles. -/datum/mutation/human/nearsight +/datum/mutation/nearsight name = "Near Sightness" desc = "The holder of this mutation has poor eyesight." instability = NEGATIVE_STABILITY_MODERATE quality = MINOR_NEGATIVE text_gain_indication = span_danger("You can't see very well.") -/datum/mutation/human/nearsight/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/nearsight/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return owner.become_nearsighted(GENETIC_MUTATION) -/datum/mutation/human/nearsight/on_losing(mob/living/carbon/human/owner) +/datum/mutation/nearsight/on_losing(mob/living/carbon/human/owner) if(..()) return owner.cure_nearsighted(GENETIC_MUTATION) ///Blind makes you blind. Who knew? -/datum/mutation/human/blind +/datum/mutation/blind name = "Blindness" desc = "Renders the subject completely blind." instability = NEGATIVE_STABILITY_MAJOR quality = NEGATIVE text_gain_indication = span_danger("You can't seem to see anything.") -/datum/mutation/human/blind/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/blind/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return owner.become_blind(GENETIC_MUTATION) -/datum/mutation/human/blind/on_losing(mob/living/carbon/human/owner) +/datum/mutation/blind/on_losing(mob/living/carbon/human/owner) if(..()) return owner.cure_blind(GENETIC_MUTATION) ///Thermal Vision lets you see mobs through walls -/datum/mutation/human/thermal +/datum/mutation/thermal name = "Thermal Vision" desc = "The user of this genome can visually perceive the unique human thermal signature." quality = POSITIVE @@ -50,7 +50,7 @@ energy_coeff = 1 power_path = /datum/action/cooldown/spell/thermal_vision -/datum/mutation/human/thermal/on_losing(mob/living/carbon/human/owner) +/datum/mutation/thermal/on_losing(mob/living/carbon/human/owner) if(..()) return @@ -59,7 +59,7 @@ REMOVE_TRAIT(owner, TRAIT_THERMAL_VISION, GENETIC_MUTATION) owner.update_sight() -/datum/mutation/human/thermal/setup() +/datum/mutation/thermal/setup() . = ..() var/datum/action/cooldown/spell/thermal_vision/to_modify = . if(!istype(to_modify)) // null or invalid @@ -110,21 +110,21 @@ carbon_cast_on.adjustOrganLoss(ORGAN_SLOT_EYES, eye_damage) ///X-ray Vision lets you see through walls. -/datum/mutation/human/xray +/datum/mutation/xray name = "X Ray Vision" desc = "A strange genome that allows the user to see between the spaces of walls." //actual x-ray would mean you'd constantly be blasting rads, which might be fun for later //hmb text_gain_indication = span_notice("The walls suddenly disappear!") instability = POSITIVE_INSTABILITY_MAJOR locked = TRUE -/datum/mutation/human/xray/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/xray/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return ADD_TRAIT(owner, TRAIT_XRAY_VISION, GENETIC_MUTATION) owner.update_sight() -/datum/mutation/human/xray/on_losing(mob/living/carbon/human/owner) +/datum/mutation/xray/on_losing(mob/living/carbon/human/owner) if(..()) return REMOVE_TRAIT(owner, TRAIT_XRAY_VISION, GENETIC_MUTATION) @@ -132,7 +132,7 @@ ///Laser Eyes lets you shoot lasers from your eyes! -/datum/mutation/human/laser_eyes +/datum/mutation/laser_eyes name = "Laser Eyes" desc = "Reflects concentrated light back from the eyes." quality = POSITIVE @@ -142,28 +142,28 @@ layer_used = FRONT_MUTATIONS_LAYER limb_req = BODY_ZONE_HEAD -/datum/mutation/human/laser_eyes/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut) +/datum/mutation/laser_eyes/New(datum/mutation/copymut) ..() if(!(type in visual_indicators)) visual_indicators[type] = list(mutable_appearance('icons/mob/effects/genetics.dmi', "lasereyes", -FRONT_MUTATIONS_LAYER)) -/datum/mutation/human/laser_eyes/on_acquiring(mob/living/carbon/human/H) +/datum/mutation/laser_eyes/on_acquiring(mob/living/carbon/human/H) . = ..() if(!.) return RegisterSignal(H, COMSIG_MOB_ATTACK_RANGED, PROC_REF(on_ranged_attack)) -/datum/mutation/human/laser_eyes/on_losing(mob/living/carbon/human/H) +/datum/mutation/laser_eyes/on_losing(mob/living/carbon/human/H) . = ..() if(.) return UnregisterSignal(H, COMSIG_MOB_ATTACK_RANGED) -/datum/mutation/human/laser_eyes/get_visual_indicator() +/datum/mutation/laser_eyes/get_visual_indicator() return visual_indicators[type][1] ///Triggers on COMSIG_MOB_ATTACK_RANGED. Does the projectile shooting. -/datum/mutation/human/laser_eyes/proc/on_ranged_attack(mob/living/carbon/human/source, atom/target, modifiers) +/datum/mutation/laser_eyes/proc/on_ranged_attack(mob/living/carbon/human/source, atom/target, modifiers) SIGNAL_HANDLER if(!source.combat_mode) @@ -184,7 +184,7 @@ icon = 'icons/mob/effects/genetics.dmi' icon_state = "eyelasers" -/datum/mutation/human/illiterate +/datum/mutation/illiterate name = "Illiterate" desc = "Causes a severe case of Aphasia that prevents reading or writing." instability = NEGATIVE_STABILITY_MAJOR @@ -192,13 +192,13 @@ text_gain_indication = span_danger("You feel unable to read or write.") text_lose_indication = span_danger("You feel able to read and write again.") -/datum/mutation/human/illiterate/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/illiterate/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return ADD_TRAIT(owner, TRAIT_ILLITERATE, GENETIC_MUTATION) -/datum/mutation/human/illiterate/on_losing(mob/living/carbon/human/owner) +/datum/mutation/illiterate/on_losing(mob/living/carbon/human/owner) if(..()) return REMOVE_TRAIT(owner, TRAIT_ILLITERATE, GENETIC_MUTATION) diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm index 9d2a19b4269..7fd59cb1930 100644 --- a/code/datums/mutations/speech.dm +++ b/code/datums/mutations/speech.dm @@ -3,18 +3,18 @@ // no they arent bro -/datum/mutation/human/nervousness +/datum/mutation/nervousness name = "Nervousness" desc = "Causes the holder to stutter." instability = NEGATIVE_STABILITY_MINI quality = MINOR_NEGATIVE text_gain_indication = span_danger("You feel nervous.") -/datum/mutation/human/nervousness/on_life(seconds_per_tick, times_fired) +/datum/mutation/nervousness/on_life(seconds_per_tick, times_fired) if(SPT_PROB(5, seconds_per_tick)) owner.set_stutter_if_lower(20 SECONDS) -/datum/mutation/human/wacky +/datum/mutation/wacky name = "Wacky" desc = "You are not a clown. You are the entire circus." instability = NEGATIVE_STABILITY_MINI @@ -22,23 +22,23 @@ text_gain_indication = span_sans(span_notice("You feel an off sensation in your voicebox.")) text_lose_indication = span_notice("The off sensation passes.") -/datum/mutation/human/wacky/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/wacky/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return RegisterSignal(owner, COMSIG_MOB_SAY, PROC_REF(handle_speech)) -/datum/mutation/human/wacky/on_losing(mob/living/carbon/human/owner) +/datum/mutation/wacky/on_losing(mob/living/carbon/human/owner) if(..()) return UnregisterSignal(owner, COMSIG_MOB_SAY) -/datum/mutation/human/wacky/proc/handle_speech(datum/source, list/speech_args) +/datum/mutation/wacky/proc/handle_speech(datum/source, list/speech_args) SIGNAL_HANDLER speech_args[SPEECH_SPANS] |= SPAN_SANS -/datum/mutation/human/heckacious +/datum/mutation/heckacious name = "heckacious larincks" desc = "duge what is WISH your words man..........." quality = MINOR_NEGATIVE @@ -46,23 +46,23 @@ text_lose_indication = span_notice("The demonic entity possessing your larynx has finally released its grasp.") locked = TRUE -/datum/mutation/human/heckacious/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/heckacious/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return RegisterSignal(owner, COMSIG_LIVING_TREAT_MESSAGE, PROC_REF(handle_caps)) RegisterSignal(owner, COMSIG_MOB_SAY, PROC_REF(handle_speech)) -/datum/mutation/human/heckacious/on_losing(mob/living/carbon/human/owner) +/datum/mutation/heckacious/on_losing(mob/living/carbon/human/owner) if(..()) return UnregisterSignal(owner, list(COMSIG_LIVING_TREAT_MESSAGE, COMSIG_MOB_SAY)) -/datum/mutation/human/heckacious/proc/handle_caps(atom/movable/source, list/message_args) +/datum/mutation/heckacious/proc/handle_caps(atom/movable/source, list/message_args) SIGNAL_HANDLER message_args[TREAT_CAPITALIZE_MESSAGE] = FALSE -/datum/mutation/human/heckacious/proc/handle_speech(datum/source, list/speech_args) +/datum/mutation/heckacious/proc/handle_speech(datum/source, list/speech_args) var/message = speech_args[SPEECH_MESSAGE] if(!message) @@ -133,7 +133,7 @@ speech_args[SPEECH_MESSAGE] = message -/datum/mutation/human/mute +/datum/mutation/mute name = "Mute" desc = "Completely inhibits the vocal section of the brain." instability = NEGATIVE_STABILITY_MAJOR @@ -141,18 +141,18 @@ text_gain_indication = span_danger("You feel unable to express yourself at all.") text_lose_indication = span_danger("You feel able to speak freely again.") -/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/mute/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return ADD_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION) -/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner) +/datum/mutation/mute/on_losing(mob/living/carbon/human/owner) if(..()) return REMOVE_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION) -/datum/mutation/human/unintelligible +/datum/mutation/unintelligible name = "Unintelligible" desc = "Partially inhibits the vocal center of the brain, severely distorting speech." instability = NEGATIVE_STABILITY_MODERATE @@ -160,18 +160,18 @@ text_gain_indication = span_danger("You can't seem to form any coherent thoughts!") text_lose_indication = span_danger("Your mind feels more clear.") -/datum/mutation/human/unintelligible/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/unintelligible/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION) -/datum/mutation/human/unintelligible/on_losing(mob/living/carbon/human/owner) +/datum/mutation/unintelligible/on_losing(mob/living/carbon/human/owner) if(..()) return REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION) -/datum/mutation/human/swedish +/datum/mutation/swedish name = "Swedish" desc = "A horrible mutation originating from the distant past. Thought to be eradicated after the incident in 2037." instability = NEGATIVE_STABILITY_MINI @@ -180,11 +180,11 @@ text_lose_indication = span_notice("The feeling of Swedishness passes.") var/static/list/language_mutilation = list("w" = "v", "j" = "y", "bo" = "bjo", "a" = list("å","ä","æ","a"), "o" = list("ö","ø","o")) -/datum/mutation/human/swedish/New(class, timer, datum/mutation/human/copymut) +/datum/mutation/swedish/New(datum/mutation/copymut) . = ..() AddComponent(/datum/component/speechmod, replacements = language_mutilation, end_string = list("",", bork",", bork, bork"), end_string_chance = 30) -/datum/mutation/human/chav +/datum/mutation/chav name = "Chav" desc = "Unknown" instability = NEGATIVE_STABILITY_MINI @@ -192,11 +192,11 @@ text_gain_indication = span_notice("Ye feel like a reet prat like, innit?") text_lose_indication = span_notice("You no longer feel like being rude and sassy.") -/datum/mutation/human/chav/New(class, timer, datum/mutation/human/copymut) +/datum/mutation/chav/New(datum/mutation/copymut) . = ..() AddComponent(/datum/component/speechmod, replacements = strings("chav_replacement.json", "chav"), end_string = ", mate", end_string_chance = 30) -/datum/mutation/human/elvis +/datum/mutation/elvis name = "Elvis" desc = "A terrifying mutation named after its 'patient-zero'." instability = NEGATIVE_STABILITY_MINI @@ -204,11 +204,11 @@ text_gain_indication = span_notice("You feel pretty good, honeydoll.") text_lose_indication = span_notice("You feel a little less conversation would be great.") -/datum/mutation/human/chav/New(class, timer, datum/mutation/human/copymut) +/datum/mutation/chav/New(datum/mutation/copymut) . = ..() AddComponent(/datum/component/speechmod, replacements = strings("elvis_replacement.json", "elvis")) -/datum/mutation/human/elvis/on_life(seconds_per_tick, times_fired) +/datum/mutation/elvis/on_life(seconds_per_tick, times_fired) switch(pick(1,2)) if(1) if(SPT_PROB(7.5, seconds_per_tick)) @@ -219,26 +219,26 @@ if(SPT_PROB(7.5, seconds_per_tick)) owner.visible_message("[owner] [pick("jiggles their hips", "rotates their hips", "gyrates their hips", "taps their foot", "dances to an imaginary song", "jiggles their legs", "snaps their fingers")]!") -/datum/mutation/human/stoner +/datum/mutation/stoner name = "Stoner" desc = "A common mutation that severely decreases intelligence." quality = NEGATIVE text_gain_indication = span_notice("You feel...totally chill, man!") text_lose_indication = span_notice("You feel like you have a better sense of time.") -/datum/mutation/human/stoner/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/stoner/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return owner.grant_language(/datum/language/beachbum, source = LANGUAGE_STONER) owner.add_blocked_language(subtypesof(/datum/language) - /datum/language/beachbum, LANGUAGE_STONER) -/datum/mutation/human/stoner/on_losing(mob/living/carbon/human/owner) +/datum/mutation/stoner/on_losing(mob/living/carbon/human/owner) ..() owner.remove_language(/datum/language/beachbum, source = LANGUAGE_STONER) owner.remove_blocked_language(subtypesof(/datum/language) - /datum/language/beachbum, LANGUAGE_STONER) -/datum/mutation/human/medieval +/datum/mutation/medieval name = "Medieval" desc = "A horrible mutation originating from the distant past, thought to have once been a common gene in all of old world Europe." instability = NEGATIVE_STABILITY_MINI @@ -246,18 +246,18 @@ text_gain_indication = span_notice("You feel like seeking the holy grail!") text_lose_indication = span_notice("You no longer feel like seeking anything.") -/datum/mutation/human/medieval/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/medieval/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return RegisterSignal(owner, COMSIG_MOB_SAY, PROC_REF(handle_speech)) -/datum/mutation/human/medieval/on_losing(mob/living/carbon/human/owner) +/datum/mutation/medieval/on_losing(mob/living/carbon/human/owner) if(..()) return UnregisterSignal(owner, COMSIG_MOB_SAY) -/datum/mutation/human/medieval/proc/handle_speech(datum/source, list/speech_args) +/datum/mutation/medieval/proc/handle_speech(datum/source, list/speech_args) SIGNAL_HANDLER var/message = speech_args[SPEECH_MESSAGE] @@ -280,7 +280,7 @@ speech_args[SPEECH_MESSAGE] = message -/datum/mutation/human/piglatin +/datum/mutation/piglatin name = "Pig Latin" desc = "Historians say back in the 2020's humanity spoke entirely in this mystical language." instability = NEGATIVE_STABILITY_MINI @@ -288,18 +288,18 @@ text_gain_indication = span_notice("Omethingsay eelsfay offyay.") text_lose_indication = span_notice("The off sensation passes.") -/datum/mutation/human/piglatin/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/piglatin/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return RegisterSignal(owner, COMSIG_MOB_SAY, PROC_REF(handle_speech)) -/datum/mutation/human/piglatin/on_losing(mob/living/carbon/human/owner) +/datum/mutation/piglatin/on_losing(mob/living/carbon/human/owner) if(..()) return UnregisterSignal(owner, COMSIG_MOB_SAY) -/datum/mutation/human/piglatin/proc/handle_speech(datum/source, list/speech_args) +/datum/mutation/piglatin/proc/handle_speech(datum/source, list/speech_args) SIGNAL_HANDLER var/spoken_message = speech_args[SPEECH_MESSAGE] diff --git a/code/datums/mutations/telepathy.dm b/code/datums/mutations/telepathy.dm index 4fa2a38db14..5e296c38c0e 100644 --- a/code/datums/mutations/telepathy.dm +++ b/code/datums/mutations/telepathy.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/telepathy +/datum/mutation/telepathy name = "Telepathy" desc = "A rare mutation that allows the user to telepathically communicate to others." quality = POSITIVE diff --git a/code/datums/mutations/tongue_spike.dm b/code/datums/mutations/tongue_spike.dm index 828fd32bbe9..c63f4cbd703 100644 --- a/code/datums/mutations/tongue_spike.dm +++ b/code/datums/mutations/tongue_spike.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/tongue_spike +/datum/mutation/tongue_spike name = "Tongue Spike" desc = "Allows a creature to voluntary shoot their tongue out as a deadly weapon." quality = POSITIVE @@ -87,7 +87,7 @@ if (!QDELETED(tongue_spike)) // This can cause a qdel loop tongue_spike.morph_back() -/datum/mutation/human/tongue_spike/chem +/datum/mutation/tongue_spike/chem name = "Chem Spike" desc = "Allows a creature to voluntary shoot their tongue out as biomass, allowing a long range transfer of chemicals." quality = POSITIVE diff --git a/code/datums/mutations/touch.dm b/code/datums/mutations/touch.dm index 190dc84f72e..6ffcc79e8d6 100644 --- a/code/datums/mutations/touch.dm +++ b/code/datums/mutations/touch.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/shock +/datum/mutation/shock name = "Shock Touch" desc = "The affected can channel excess electricity through their hands without shocking themselves, allowing them to shock others. Mostly harmless! Mostly... " quality = POSITIVE @@ -11,7 +11,7 @@ energy_coeff = 1 power_coeff = 1 -/datum/mutation/human/shock/setup() +/datum/mutation/shock/setup() . = ..() var/datum/action/cooldown/spell/touch/shock/to_modify =. @@ -82,7 +82,7 @@ icon_state = "zapper" inhand_icon_state = "zapper" -/datum/mutation/human/lay_on_hands +/datum/mutation/lay_on_hands name = "Mending Touch" desc = "The affected can lay their hands on other people to transfer a small amount of their injuries to themselves." quality = POSITIVE @@ -96,7 +96,7 @@ power_coeff = 1 synchronizer_coeff = 1 -/datum/mutation/human/lay_on_hands/setup() +/datum/mutation/lay_on_hands/setup() . = ..() var/datum/action/cooldown/spell/touch/lay_on_hands/to_modify =. diff --git a/code/datums/mutations/void_magnet.dm b/code/datums/mutations/void_magnet.dm index 6b74e1bb371..a6c5c967a03 100644 --- a/code/datums/mutations/void_magnet.dm +++ b/code/datums/mutations/void_magnet.dm @@ -1,4 +1,4 @@ -/datum/mutation/human/void +/datum/mutation/void name = "Void Magnet" desc = "A rare genome that attracts odd forces not usually observed." quality = MINOR_NEGATIVE //upsides and downsides @@ -8,7 +8,7 @@ energy_coeff = 1 synchronizer_coeff = 1 -/datum/mutation/human/void/setup() +/datum/mutation/void/setup() . = ..() var/datum/action/cooldown/spell/void/cursed/to_modify = . if(!istype(to_modify)) // null or invalid diff --git a/code/datums/mutations/webbing.dm b/code/datums/mutations/webbing.dm index 672f55bff92..22395cd5317 100644 --- a/code/datums/mutations/webbing.dm +++ b/code/datums/mutations/webbing.dm @@ -1,5 +1,5 @@ //spider webs -/datum/mutation/human/webbing +/datum/mutation/webbing name = "Webbing Production" desc = "Allows the user to lay webbing, and travel through it." quality = POSITIVE @@ -8,7 +8,7 @@ power_path = /datum/action/cooldown/mob_cooldown/lay_web/genetic energy_coeff = 1 -/datum/mutation/human/webbing/setup() +/datum/mutation/webbing/setup() . = ..() var/datum/action/cooldown/mob_cooldown/lay_web/genetic/to_modify = . @@ -20,13 +20,13 @@ return to_modify.webbing_time = 2 SECONDS // Spin webs faster but not more often -/datum/mutation/human/webbing/on_acquiring(mob/living/carbon/human/owner) +/datum/mutation/webbing/on_acquiring(mob/living/carbon/human/owner) . = ..() if(!.) return ADD_TRAIT(owner, TRAIT_WEB_WEAVER, GENETIC_MUTATION) -/datum/mutation/human/webbing/on_losing(mob/living/carbon/human/owner) +/datum/mutation/webbing/on_losing(mob/living/carbon/human/owner) if(..()) return REMOVE_TRAIT(owner, TRAIT_WEB_WEAVER, GENETIC_MUTATION) diff --git a/code/datums/status_effects/debuffs/dna_transformation.dm b/code/datums/status_effects/debuffs/dna_transformation.dm index f6a2afa8610..1274d46b4c0 100644 --- a/code/datums/status_effects/debuffs/dna_transformation.dm +++ b/code/datums/status_effects/debuffs/dna_transformation.dm @@ -34,7 +34,7 @@ transforming.dna.copy_dna(old_dna) // Makes them into the new DNA transforming.visual_only_organs = TRUE // SKYRAT EDIT ADDITION - Customization - new_dna.transfer_identity(transforming) + new_dna.copy_dna(transforming.dna, COPY_DNA_SPECIES) transforming.visual_only_organs = initial(transforming.visual_only_organs) // SKYRAT EDIT ADDITION - Customization transforming.real_name = new_dna.real_name transforming.name = transforming.get_visible_name() @@ -47,7 +47,7 @@ if(!QDELING(owner)) // Don't really need to do appearance stuff if we're being deleted transforming.visual_only_organs = TRUE // SKYRAT EDIT ADDITION - Customization - old_dna.transfer_identity(transforming) + old_dna.copy_dna(transforming.dna, COPY_DNA_SPECIES) transforming.visual_only_organs = initial(transforming.visual_only_organs) // SKYRAT EDIT ADDITION - Customization transforming.updateappearance(mutcolor_update = TRUE) transforming.domutcheck() diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 17ee25c0c0d..74a8c640265 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -62,7 +62,14 @@ /// Input from tgui interface. Progress to previous gene. #define PREV_GENE 2 -/obj/machinery/computer/scan_consolenew +///This mutation has been activated by an activator or by completing the sequence +#define SCANNER_MUTATION_CLASS_ACTIVATOR 1 +///This mutation has been added via mutator or random mutations (eg. mutagen) +#define SCANNER_MUTATION_CLASS_MUTATOR 2 +///This mutation has been added by other means that cannot be undone by the console (or mutadone) +#define SCANNER_MUTATION_CLASS_OTHER 3 + +/obj/machinery/computer/dna_console name = "DNA Console" desc = "From here you can research mysteries of the DNA!" icon_screen = "dna" @@ -163,7 +170,7 @@ ///Counter for CRISPR charges var/crispr_charges = 0 -/obj/machinery/computer/scan_consolenew/process() +/obj/machinery/computer/dna_console/process() . = ..() // This is for pulsing the UI element with genetic damage as part of genetic makeup @@ -172,7 +179,7 @@ genetic_damage_pulse() return -/obj/machinery/computer/scan_consolenew/attackby(obj/item/item, mob/user, list/modifiers, list/attack_modifiers) +/obj/machinery/computer/dna_console/attackby(obj/item/item, mob/user, list/modifiers, list/attack_modifiers) // Store chromosomes in the console if there's room if (istype(item, /obj/item/chromosome)) item.forceMove(src) @@ -220,16 +227,16 @@ return return ..() -/obj/machinery/computer/scan_consolenew/multitool_act(mob/living/user, obj/item/multitool/tool) +/obj/machinery/computer/dna_console/multitool_act(mob/living/user, obj/item/multitool/tool) if(!QDELETED(tool.buffer) && istype(tool.buffer, /datum/techweb)) stored_research = tool.buffer return TRUE -/obj/machinery/computer/scan_consolenew/click_alt(mob/user) +/obj/machinery/computer/dna_console/click_alt(mob/user) eject_disk(user) return CLICK_ACTION_SUCCESS -/obj/machinery/computer/scan_consolenew/Initialize(mapload) +/obj/machinery/computer/dna_console/Initialize(mapload) . = ..() // Connect with a nearby DNA Scanner on init @@ -244,7 +251,7 @@ // Set the default tgui state set_default_state() -/obj/machinery/computer/scan_consolenew/post_machine_initialize() +/obj/machinery/computer/dna_console/post_machine_initialize() . = ..() // Link machine with research techweb. Used for discovering and accessing // already discovered mutations @@ -252,7 +259,7 @@ CONNECT_TO_RND_SERVER_ROUNDSTART(stored_research, src) -/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, datum/tgui/ui) +/obj/machinery/computer/dna_console/ui_interact(mob/user, datum/tgui/ui) . = ..() // Most of ui_interact is spent setting variables for passing to the tgui // interface. @@ -302,11 +309,11 @@ ui = new(user, src, "DnaConsole") ui.open() -/obj/machinery/computer/scan_consolenew/ui_assets() +/obj/machinery/computer/dna_console/ui_assets() . = ..() || list() . += get_asset_datum(/datum/asset/simple/genetics) -/obj/machinery/computer/scan_consolenew/ui_data(mob/user) +/obj/machinery/computer/dna_console/ui_data(mob/user) var/list/data = list() data["view"] = tgui_view_state @@ -398,7 +405,7 @@ return data -/obj/machinery/computer/scan_consolenew/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) +/obj/machinery/computer/dna_console/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) var/static/list/gene_letters = list("A", "T", "C", "G"); var/static/gene_letter_count = length(gene_letters) @@ -443,7 +450,7 @@ if(!can_modify_occupant() || !(scramble_ready < world.time) || HAS_TRAIT(scanner_occupant, TRAIT_NO_DNA_SCRAMBLE)) return - scanner_occupant.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA)) + scanner_occupant.dna.remove_all_mutations() scanner_occupant.dna.generate_dna_blocks() scramble_ready = world.time + SCRAMBLE_TIMEOUT to_chat(usr,span_notice("DNA scrambled.")) @@ -497,7 +504,7 @@ // Go over all standard mutations and check if they've been discovered. for(var/mutation_type in scanner_occupant.dna.mutation_index) - var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(mutation_type) + var/datum/mutation/HM = GET_INITIALIZED_MUTATION(mutation_type) check_discovery(HM.alias) return @@ -611,7 +618,7 @@ // GUARD CHECK - Only search occupant for this specific ref, since your // can only apply chromosomes to mutations occupants. - var/datum/mutation/human/mutation = get_mut_by_ref(bref, SEARCH_OCCUPANT) + var/datum/mutation/mutation = get_mut_by_ref(bref, SEARCH_OCCUPANT) // GUARD CHECK - This should not be possible. Unexpected result if(!mutation) @@ -680,7 +687,7 @@ // GUARD CHECK - Only search occupant for this specific ref, since you // can only CRISPR existing mutations in a target - var/datum/mutation/human/target_mutation = get_mut_by_ref(bref, search_flags) + var/datum/mutation/target_mutation = get_mut_by_ref(bref, search_flags) // Prompt for modifier string var/new_sequence_input = tgui_input_text(usr, "Enter a replacement sequence", "Inherent Gene Replacement", max_length = 32, encode = FALSE) @@ -717,11 +724,11 @@ //Apply sequence if(new_sequence) //to hold the found mutation, if found - var/datum/mutation/human/matched_mutation = null + var/datum/mutation/matched_mutation = null //Go through all sequences for matching gene, and set the mutation - for (var/M in subtypesof(/datum/mutation/human)) + for (var/M in subtypesof(/datum/mutation)) // SKYRAT EDIT ADDITION - var/datum/mutation/human/iterating_mutation = M + var/datum/mutation/iterating_mutation = M if(initial(iterating_mutation.disabled)) continue // SKYRAT EDIT END @@ -742,7 +749,7 @@ //Start with the bad mutation, overwrite with the desired mutation if it passes the check //assures BAD END is the natural state if things go wrong //I think this should be like with viruses, probability cascade or switch/case on random? - var/result_mutation = /datum/mutation/human/acidflesh + var/result_mutation = /datum/mutation/acidflesh //If we found the replacement mutation if(matched_mutation) //and the old sequence matches the real sequence of the old mutation @@ -751,10 +758,10 @@ result_mutation = matched_mutation //Remove the current active mutations - let's say doing this triggers DNA repair or something //This is admittedly because I couldn't figure out how to only remove the targeted mutation - //Not touching MUT_EXTRA will hopefully leave the added mutations alone - scanner_occupant.dna.remove_all_mutations(list(MUT_NORMAL)) + //Not touching MUTATION_SOURCE_MUTATOR will hopefully leave the added mutations alone + scanner_occupant.dna.remove_all_mutations(list(MUTATION_SOURCE_ACTIVATED)) //Add the resulting mutation to the active mutations - scanner_occupant.dna.add_mutation(result_mutation,MUT_NORMAL, 0) + scanner_occupant.dna.add_mutation(result_mutation, MUTATION_SOURCE_ACTIVATED) //Rebuild the mutation_index into mutation_data, replacing the sequence entry with the solved //entry for the result mutation for(var/mutation_type in scanner_occupant.dna.mutation_index) @@ -777,7 +784,7 @@ // Print any type of standard injector, limited right now to activators that // activate a dormant mutation and mutators that forcibly create a new - // MUT_EXTRA mutation + // MUTATION_SOURCE_MUTATOR mutation // ---------------------------------------------------------------------- // // params["mutref"] - ATOM Ref of specific mutation to create an injector of // params["is_activator"] - Is this an "Activator" style injector, also @@ -817,30 +824,30 @@ search_flags |= SEARCH_DISKETTE var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, search_flags) + var/datum/mutation/mutation = get_mut_by_ref(bref, search_flags) // GUARD CHECK - This should not be possible. Unexpected result - if(!HM) + if(!mutation) return // Create a new DNA Injector and add the appropriate mutations to it - var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc) - I.add_mutations += new HM.type(copymut = HM) + var/obj/item/dnainjector/activator/injector = new /obj/item/dnainjector/activator(loc) + injector.add_mutations += mutation.make_copy() var/is_activator = text2num(params["is_activator"]) // Activators are also called "research" injectors and are used to create // chromosomes by recycling at the DNA Console if(is_activator) - I.name = "[HM.name] activator" - I.research = TRUE + injector.name = "[mutation.name] activator" + injector.research = TRUE // If there's an operational connected scanner, we can use its upgrades // to improve our injector's genetic damage generation var/cd_reduction_mult = 1 + ACTIVATOR_COOLDOWN_MULTIPLIER - var/base_cd_time = max(MIN_ACTIVATOR_TIMEOUT, abs(HM.instability) SECONDS) + var/base_cd_time = max(MIN_ACTIVATOR_TIMEOUT, abs(mutation.instability) SECONDS) if(scanner_operational()) - I.damage_coeff = connected_scanner.damage_coeff*4 + injector.damage_coeff = connected_scanner.damage_coeff * 4 // T1: 1.25 - 0.25: 1: 100% // T4: 1.25 - 1: 0.25 = 25% // 25% reduction per tier @@ -848,15 +855,15 @@ injector_ready = world.time + (base_cd_time * cd_reduction_mult) else - I.name = "[HM.name] mutator" - I.force_mutate = TRUE + injector.name = "[mutation.name] mutator" + injector.force_mutate = TRUE // If there's an operational connected scanner, we can use its upgrades // to improve our injector's genetic damage generation var/cd_reduction_mult = 1 + INJECTOR_COOLDOWN_MULTIPLIER - var/base_cd_time = max(MIN_INJECTOR_TIMEOUT, abs(HM.instability) * 1 SECONDS) + var/base_cd_time = max(MIN_INJECTOR_TIMEOUT, abs(mutation.instability) * 1 SECONDS) if(scanner_operational()) - I.damage_coeff = connected_scanner.damage_coeff*4 + injector.damage_coeff = connected_scanner.damage_coeff * 4 // T1: 1.15 - 0.15: 1: 100% // T4: 1.15 - 0.60: 0.55: 55% // 15% reduction per tier @@ -891,19 +898,19 @@ search_flags |= SEARCH_DISKETTE var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, search_flags) + var/datum/mutation/mutation = get_mut_by_ref(bref, search_flags) // GUARD CHECK - This should not be possible. Unexpected result - if(!HM) + if(!mutation) return // Saving temporary or unobtainable mutations leads to gratuitous abuse - if(HM.class == MUT_OTHER) + if(!(MUTATION_SOURCE_ACTIVATED in mutation.sources)) say("ERROR: This mutation is anomalous, and cannot be saved.") return - var/datum/mutation/human/A = new HM.type(MUT_EXTRA, null, HM) - stored_mutations += A + var/datum/mutation/stored = mutation.make_copy() + stored_mutations += stored to_chat(usr,span_notice("Mutation successfully stored.")) return @@ -945,18 +952,17 @@ search_flags |= SEARCH_STORED var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, search_flags) + var/datum/mutation/original = get_mut_by_ref(bref, search_flags) // GUARD CHECK - This should not be possible. Unexpected result - if(!HM) + if(!original) return - var/datum/mutation/human/A = new HM.type(MUT_EXTRA, null, HM) - diskette.mutations += A + diskette.mutations += original.make_copy() to_chat(usr,span_notice("Mutation successfully stored to disk.")) return - // Completely removes a MUT_EXTRA mutation or mutation with corrupt gene + // Completely removes a MUTATION_SOURCE_MUTATOR mutation or mutation with corrupt gene // sequence from the scanner occupant // ---------------------------------------------------------------------- // // params["mutref"] - ATOM Ref of specific mutation to nullify @@ -967,18 +973,18 @@ return var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, SEARCH_OCCUPANT) + var/datum/mutation/mutation = get_mut_by_ref(bref, SEARCH_OCCUPANT) // GUARD CHECK - This should not be possible. Unexpected result - if(!HM) + if(!mutation) return // GUARD CHECK - Nullify should only be used on scrambled or "extra" // mutations. - if(!HM.scrambled && !(HM.class == MUT_EXTRA)) + if(!mutation.scrambled && !(MUTATION_SOURCE_MUTATOR in mutation.sources)) return - scanner_occupant.dna.remove_mutation(HM.type) + scanner_occupant.dna.remove_mutation(mutation.type, MUTATION_SOURCE_MUTATOR) return // Deletes saved mutation from console buffer. @@ -986,7 +992,7 @@ // params["mutref"] - ATOM Ref of specific mutation to delete if("delete_console_mut") var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, SEARCH_STORED) + var/datum/mutation/HM = get_mut_by_ref(bref, SEARCH_STORED) if(HM) stored_mutations.Remove(HM) @@ -1010,7 +1016,7 @@ return var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, SEARCH_DISKETTE) + var/datum/mutation/HM = get_mut_by_ref(bref, SEARCH_DISKETTE) if(HM) diskette.mutations.Remove(HM) @@ -1050,11 +1056,11 @@ // GUARD CHECK - Find the source and destination mutations on the console // and make sure they actually exist. - var/datum/mutation/human/source_mut = get_mut_by_ref(first_bref, SEARCH_STORED | SEARCH_DISKETTE) + var/datum/mutation/source_mut = get_mut_by_ref(first_bref, SEARCH_STORED | SEARCH_DISKETTE) if(!source_mut) return - var/datum/mutation/human/dest_mut = get_mut_by_ref(second_bref, SEARCH_STORED | SEARCH_DISKETTE) + var/datum/mutation/dest_mut = get_mut_by_ref(second_bref, SEARCH_STORED | SEARCH_DISKETTE) if(!dest_mut) return @@ -1074,7 +1080,7 @@ if(result_path in stored_research.discovered_mutations) return - var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(result_path) + var/datum/mutation/HM = GET_INITIALIZED_MUTATION(result_path) stored_research.discovered_mutations += result_path say("Successfully mutated [HM.name].") if(connected_scanner) @@ -1116,11 +1122,11 @@ // GUARD CHECK - Find the source and destination mutations on the console // and make sure they actually exist. - var/datum/mutation/human/source_mut = get_mut_by_ref(first_bref, SEARCH_STORED | SEARCH_DISKETTE) + var/datum/mutation/source_mut = get_mut_by_ref(first_bref, SEARCH_STORED | SEARCH_DISKETTE) if(!source_mut) return - var/datum/mutation/human/dest_mut = get_mut_by_ref(second_bref, SEARCH_STORED | SEARCH_DISKETTE) + var/datum/mutation/dest_mut = get_mut_by_ref(second_bref, SEARCH_STORED | SEARCH_DISKETTE) if(!dest_mut) return @@ -1140,7 +1146,7 @@ if(result_path in stored_research.discovered_mutations) return - var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(result_path) + var/datum/mutation/HM = GET_INITIALIZED_MUTATION(result_path) stored_research.discovered_mutations += result_path say("Successfully mutated [HM.name].") if(connected_scanner) @@ -1565,20 +1571,18 @@ if(!inj_name || !(inj_name in injector_selection)) return - var/list/injector = injector_selection[inj_name] - var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc) + var/obj/item/dnainjector/activator/injector = new /obj/item/dnainjector/activator(loc) // Run through each mutation in our Advanced Injector and add them to a // new injector - var/total_stability - for(var/A in injector) - var/datum/mutation/human/HM = A - I.add_mutations += new HM.type(copymut=HM) - total_stability += HM.instability + var/total_stability = 0 + for(var/datum/mutation/mutation as anything in injector_selection[inj_name]) + injector.add_mutations += mutation.make_copy() + total_stability += mutation.instability // Force apply any mutations, this is functionality similar to mutators - I.force_mutate = TRUE - I.name = "Advanced [inj_name] injector" + injector.force_mutate = TRUE + injector.name = "Advanced [inj_name] injector" // If there's an operational connected scanner, we can use its upgrades // to improve our injector's genetic damage generation @@ -1586,7 +1590,7 @@ var/base_cd_time = max(MIN_ADVANCED_TIMEOUT, abs(total_stability) SECONDS) if(scanner_operational()) - I.damage_coeff = connected_scanner.damage_coeff*4 + injector.damage_coeff = connected_scanner.damage_coeff*4 // T1: 1.1 - 0.1: 1: 100% // T4: 1.1 - 0.4: 0.7 = 70% // 10% reduction per tier @@ -1634,20 +1638,20 @@ return // We've already made sure we can modify the occupant, so this is safe to // call - var/datum/mutation/human/HM = get_mut_by_ref(bref, search_flag) + var/datum/mutation/original = get_mut_by_ref(bref, search_flag) // GUARD CHECK - This should not be possible. Unexpected result - if(!HM) + if(!original) return // We want to make sure we stick within the instability limit. // We start with the instability of the mutation we're intending to add. - var/instability_total = HM.instability + var/instability_total = original.instability // We then add the instabilities of all other mutations in the injector, // remembering to apply the Stabilizer chromosome modifiers - for(var/datum/mutation/human/I in injector_selection[adv_inj]) - instability_total += I.instability * GET_MUTATION_STABILIZER(I) + for(var/datum/mutation/mutation in injector_selection[adv_inj]) + instability_total += mutation.instability * GET_MUTATION_STABILIZER(mutation) // If this would take us over the max instability, we inform the user. if(instability_total > max_injector_instability) @@ -1655,10 +1659,8 @@ return // If we've got here, all our checks are passed and we can successfully - // add the mutation to the advanced injector. - var/datum/mutation/human/A = new HM.type() - A.copy_mutation(HM) - injector_selection[adv_inj] += A + // add the mutation to the advanced injector. + injector_selection[adv_inj] += original.make_copy() to_chat(usr,span_notice("Mutation successfully added to advanced injector.")) if(connected_scanner) connected_scanner.use_energy(connected_scanner.active_power_usage) @@ -1672,7 +1674,7 @@ if("delete_injector_mut") var/bref = params["mutref"] - var/datum/mutation/human/HM = get_mut_by_ref(bref, SEARCH_ADV_INJ) + var/datum/mutation/HM = get_mut_by_ref(bref, SEARCH_ADV_INJ) // GUARD CHECK - This should not be possible. Unexpected result if(!HM) @@ -1708,7 +1710,7 @@ * * type - "ui"/"ue"/"mixed" - Which part of the enzyme buffer to apply * * buffer_slot - Index of the enzyme buffer to apply */ -/obj/machinery/computer/scan_consolenew/proc/apply_genetic_makeup(type, buffer_slot) +/obj/machinery/computer/dna_console/proc/apply_genetic_makeup(type, buffer_slot) // Note - This proc is only called from code that has already performed the // necessary occupant guard checks. If you call this code yourself, please // apply can_modify_occupant() or equivalent checks first. @@ -1782,7 +1784,7 @@ /** * Checks if there is a connected DNA Scanner that is operational */ -/obj/machinery/computer/scan_consolenew/proc/scanner_operational() +/obj/machinery/computer/dna_console/proc/scanner_operational() return connected_scanner?.is_operational /** @@ -1792,7 +1794,7 @@ * modified. Will set the scanner occupant var as part of this check. * Requires that the scanner can be operated and will return early if it can't */ -/obj/machinery/computer/scan_consolenew/proc/can_modify_occupant() +/obj/machinery/computer/dna_console/proc/can_modify_occupant() // GUARD CHECK - We always want to perform the scanner operational check as // part of checking if we can modify the occupant. // We can never modify the occupant of a broken scanner. @@ -1822,7 +1824,7 @@ * Will connect to a broken scanner if no functional scanner is available. * Links itself to the DNA Scanner to receive door open and close events. */ -/obj/machinery/computer/scan_consolenew/proc/connect_to_scanner() +/obj/machinery/computer/dna_console/proc/connect_to_scanner() var/obj/machinery/dna_scannernew/test_scanner = null var/obj/machinery/dna_scannernew/broken_scanner = null @@ -1850,7 +1852,7 @@ * Sets the new scanner occupant and completes delayed enzyme transfer if one * is queued. */ -/obj/machinery/computer/scan_consolenew/proc/on_scanner_close() +/obj/machinery/computer/dna_console/proc/on_scanner_close() // Set the appropriate occupant now the scanner is closed if(connected_scanner.occupant) scanner_occupant = connected_scanner.occupant @@ -1875,7 +1877,7 @@ * Clears enzyme pulse operations, stops processing and nulls the current * scanner occupant var. */ -/obj/machinery/computer/scan_consolenew/proc/on_scanner_open() +/obj/machinery/computer/dna_console/proc/on_scanner_open() // If we had a genetic damage pulse action ongoing, we want to stop this. // Imagine it being like a microwave stopping when you open the door. genetic_damage_pulse_index = 0 @@ -1886,7 +1888,7 @@ /** * Builds the genetic makeup list which will be sent to tgui interface. */ -/obj/machinery/computer/scan_consolenew/proc/build_genetic_makeup_list() +/obj/machinery/computer/dna_console/proc/build_genetic_makeup_list() // No code will ever null this list, we can safely Cut it. tgui_genetic_makeup.Cut() @@ -1903,7 +1905,7 @@ * diskette and chromosomes and any advanced injectors, building the main data * structures which get passed to the tgui interface. */ -/obj/machinery/computer/scan_consolenew/proc/build_mutation_list(can_modify_occ) +/obj/machinery/computer/dna_console/proc/build_mutation_list(can_modify_occ) // No code will ever null these lists. We can safely Cut them. tgui_occupant_mutations.Cut() tgui_diskette_mutations.Cut() @@ -1919,14 +1921,14 @@ // ---------------------------------------------------------------------- // // Start cataloguing all mutations that the occupant has by default for(var/mutation_type in scanner_occupant.dna.mutation_index) - var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(mutation_type) + var/datum/mutation/mutation = GET_INITIALIZED_MUTATION(mutation_type) var/list/mutation_data = list() var/text_sequence = scanner_occupant.dna.mutation_index[mutation_type] var/default_sequence = scanner_occupant.dna.default_mutation_genes[mutation_type] var/discovered = (stored_research && (mutation_type in stored_research.discovered_mutations)) - mutation_data["Alias"] = HM.alias + mutation_data["Alias"] = mutation.alias mutation_data["Sequence"] = text_sequence mutation_data["DefaultSeq"] = default_sequence mutation_data["Discovered"] = discovered @@ -1936,39 +1938,38 @@ // the mutation has been discovered. Prevents people being able to cheese // or "hack" their way to figuring out what undiscovered mutations are if(discovered) - mutation_data["Name"] = HM.name - mutation_data["Description"] = HM.desc - mutation_data["Instability"] = HM.instability * GET_MUTATION_STABILIZER(HM) - mutation_data["Quality"] = HM.quality + mutation_data["Name"] = mutation.name + mutation_data["Description"] = mutation.desc + mutation_data["Instability"] = mutation.instability * GET_MUTATION_STABILIZER(mutation) + mutation_data["Quality"] = mutation.quality // Assume the mutation is normal unless assigned otherwise. - var/mut_class = MUT_NORMAL + var/mut_class = SCANNER_MUTATION_CLASS_ACTIVATOR // Check if the mutation is currently activated. If it is, we can add even // MORE information to send to tgui. - var/datum/mutation/human/A = scanner_occupant.dna.get_mutation(mutation_type) - if(A) + var/datum/mutation/stored = scanner_occupant.dna.get_mutation(mutation_type) + if(stored) mutation_data["Active"] = TRUE - mutation_data["Scrambled"] = A.scrambled - mutation_data["Class"] = A.class - mut_class = A.class - mutation_data["CanChromo"] = A.can_chromosome - mutation_data["ByondRef"] = REF(A) - mutation_data["Type"] = A.type - if(A.can_chromosome) - mutation_data["ValidChromos"] = jointext(A.valid_chrom_list, ", ") - mutation_data["AppliedChromo"] = A.chromosome_name - mutation_data["ValidStoredChromos"] = build_chrom_list(A) + mutation_data["Scrambled"] = stored.scrambled + mut_class = get_mutation_class(stored) + mutation_data["CanChromo"] = stored.can_chromosome + mutation_data["ByondRef"] = REF(mutation) + mutation_data["Type"] = stored.type + if(stored.can_chromosome) + mutation_data["ValidChromos"] = jointext(stored.valid_chrom_list, ", ") + mutation_data["AppliedChromo"] = stored.chromosome_name + mutation_data["ValidStoredChromos"] = build_chrom_list(stored) else mutation_data["Active"] = FALSE mutation_data["Scrambled"] = FALSE - mutation_data["Class"] = MUT_NORMAL + mutation_data["Class"] = mut_class - // Technically NONE of these mutations should be MUT_EXTRA but this will + // Technically NONE of these mutations should be MUTATION_SOURCE_MUTATOR but this will // catch any weird edge cases - // Assign icons by priority - MUT_EXTRA will ALSO be discovered, so it + // Assign icons by priority - MUTATION_SOURCE_MUTATOR will ALSO be discovered, so it // has a higher priority for icon/image assignment - if (mut_class == MUT_EXTRA) + if (mut_class == SCANNER_MUTATION_CLASS_MUTATOR) mutation_data["Image"] = "dna_extra.gif" else if(discovered) mutation_data["Image"] = "dna_discovered.gif" @@ -1979,46 +1980,47 @@ // ---------------------------------------------------------------------- // // Now get additional/"extra" mutations that they shouldn't have by default - for(var/datum/mutation/human/HM in scanner_occupant.dna.mutations) + for(var/datum/mutation/mutation in scanner_occupant.dna.mutations) // If it's in the mutation index array, we've already catalogued this // mutation and can safely skip over it. It really shouldn't be, but this // will catch any weird edge cases - if(HM.type in scanner_occupant.dna.mutation_index) + if(mutation.type in scanner_occupant.dna.mutation_index) continue var/list/mutation_data = list() - var/text_sequence = GET_SEQUENCE(HM.type) + var/text_sequence = GET_SEQUENCE(mutation.type) // These will all be active mutations. They're added by injector and their // sequencing code can't be changed. They can only be nullified, which // completely removes them. - var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(HM.type) + var/datum/mutation/active = GET_INITIALIZED_MUTATION(mutation.type) + var/mut_class = get_mutation_class(active) - mutation_data["Alias"] = A.alias + mutation_data["Alias"] = active.alias mutation_data["Sequence"] = text_sequence mutation_data["Discovered"] = TRUE - mutation_data["Quality"] = HM.quality + mutation_data["Quality"] = mutation.quality mutation_data["Source"] = "occupant" - mutation_data["Name"] = HM.name - mutation_data["Description"] = HM.desc - mutation_data["Instability"] = HM.instability * GET_MUTATION_STABILIZER(HM) + mutation_data["Name"] = mutation.name + mutation_data["Description"] = mutation.desc + mutation_data["Instability"] = mutation.instability * GET_MUTATION_STABILIZER(mutation) mutation_data["Active"] = TRUE - mutation_data["Scrambled"] = HM.scrambled - mutation_data["Class"] = HM.class - mutation_data["CanChromo"] = HM.can_chromosome - mutation_data["ByondRef"] = REF(HM) - mutation_data["Type"] = HM.type + mutation_data["Scrambled"] = mutation.scrambled + mutation_data["Class"] = mut_class + mutation_data["CanChromo"] = mutation.can_chromosome + mutation_data["ByondRef"] = REF(mutation) + mutation_data["Type"] = mutation.type - if(HM.can_chromosome) - mutation_data["ValidChromos"] = jointext(HM.valid_chrom_list, ", ") - mutation_data["AppliedChromo"] = HM.chromosome_name - mutation_data["ValidStoredChromos"] = build_chrom_list(HM) + if(mutation.can_chromosome) + mutation_data["ValidChromos"] = jointext(mutation.valid_chrom_list, ", ") + mutation_data["AppliedChromo"] = mutation.chromosome_name + mutation_data["ValidStoredChromos"] = build_chrom_list(mutation) // Nothing in this list should be undiscovered. Technically nothing // should be anything but EXTRA. But we're just handling some edge cases. - if (HM.class == MUT_EXTRA) + if (mut_class == SCANNER_MUTATION_CLASS_MUTATOR) mutation_data["Image"] = "dna_extra.gif" else mutation_data["Image"] = "dna_discovered.gif" @@ -2027,25 +2029,25 @@ // ------------------------------------------------------------------------ // // Build the list of mutations stored within the DNA Console - for(var/datum/mutation/human/HM in stored_mutations) + for(var/datum/mutation/mutation in stored_mutations) var/list/mutation_data = list() - var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(HM.type) + var/datum/mutation/active = GET_INITIALIZED_MUTATION(mutation.type) - mutation_data["Alias"] = A.alias - mutation_data["Name"] = HM.name + mutation_data["Alias"] = active.alias + mutation_data["Name"] = mutation.name mutation_data["Source"] = "console" mutation_data["Active"] = TRUE - mutation_data["Description"] = HM.desc - mutation_data["Instability"] = HM.instability * GET_MUTATION_STABILIZER(HM) - mutation_data["ByondRef"] = REF(HM) - mutation_data["Type"] = HM.type + mutation_data["Description"] = mutation.desc + mutation_data["Instability"] = mutation.instability * GET_MUTATION_STABILIZER(mutation) + mutation_data["ByondRef"] = REF(mutation) + mutation_data["Type"] = mutation.type - mutation_data["CanChromo"] = HM.can_chromosome - if(HM.can_chromosome) - mutation_data["ValidChromos"] = jointext(HM.valid_chrom_list, ", ") - mutation_data["AppliedChromo"] = HM.chromosome_name - mutation_data["ValidStoredChromos"] = build_chrom_list(HM) + mutation_data["CanChromo"] = mutation.can_chromosome + if(mutation.can_chromosome) + mutation_data["ValidChromos"] = jointext(mutation.valid_chrom_list, ", ") + mutation_data["AppliedChromo"] = mutation.chromosome_name + mutation_data["ValidStoredChromos"] = build_chrom_list(mutation) tgui_console_mutations += list(mutation_data) @@ -2065,10 +2067,10 @@ // ------------------------------------------------------------------------ // // Build the list of mutations stored on any inserted diskettes if(diskette) - for(var/datum/mutation/human/HM in diskette.mutations) + for(var/datum/mutation/HM in diskette.mutations) var/list/mutation_data = list() - var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(HM.type) + var/datum/mutation/A = GET_INITIALIZED_MUTATION(HM.type) mutation_data["Alias"] = A.alias mutation_data["Name"] = HM.name @@ -2093,10 +2095,10 @@ if(LAZYLEN(injector_selection)) for(var/I in injector_selection) var/list/mutations = list() - for(var/datum/mutation/human/HM in injector_selection[I]) + for(var/datum/mutation/HM in injector_selection[I]) var/list/mutation_data = list() - var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(HM.type) + var/datum/mutation/A = GET_INITIALIZED_MUTATION(HM.type) mutation_data["Alias"] = A.alias mutation_data["Name"] = HM.name @@ -2127,7 +2129,7 @@ * Arguments: * * mutation - The mutation to check chromosome compatibility with */ -/obj/machinery/computer/scan_consolenew/proc/build_chrom_list(mutation) +/obj/machinery/computer/dna_console/proc/build_chrom_list(mutation) var/list/chromosomes = list() for(var/obj/item/chromosome/CM in stored_chromosomes) @@ -2136,6 +2138,15 @@ return chromosomes +/// Returns a class declarations based on what sources the mutation has +/obj/machinery/computer/dna_console/proc/get_mutation_class(datum/mutation/mutation) + if(length(mutation.sources - list(MUTATION_SOURCE_MUTATOR, MUTATION_SOURCE_ACTIVATED))) //It has other sources as well... + return SCANNER_MUTATION_CLASS_OTHER + if(MUTATION_SOURCE_ACTIVATED in mutation.sources) //activated mutation priority over added ones. + return SCANNER_MUTATION_CLASS_ACTIVATOR + if(MUTATION_SOURCE_MUTATOR in mutation.sources) + return SCANNER_MUTATION_CLASS_MUTATOR + /** * Checks whether a mutation alias has been discovered * @@ -2145,7 +2156,7 @@ * Arguments: * * alias - Alias of the mutation to check (ie "Mutation 51" or "Mutation 12") */ -/obj/machinery/computer/scan_consolenew/proc/check_discovery(alias) +/obj/machinery/computer/dna_console/proc/check_discovery(alias) // Note - All code paths that call this have already done checks on the // current occupant to prevent cheese and other abuses. If you call this // proc please also do the following checks first: @@ -2161,13 +2172,13 @@ // then the mutation isn't eligible for discovery. If it is but is scrambled, // then the mutation isn't eligible for discovery. Finally, check if the // mutation is in discovered mutations - If it isn't, add it to discover. - var/datum/mutation/human/M = scanner_occupant.dna.get_mutation(path) + var/datum/mutation/M = scanner_occupant.dna.get_mutation(path) if(!M) return FALSE if(M.scrambled) return FALSE if(stored_research && !(path in stored_research.discovered_mutations)) - var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(path) + var/datum/mutation/HM = GET_INITIALIZED_MUTATION(path) stored_research.discovered_mutations += path say("Successfully discovered [HM.name].") return TRUE @@ -2184,7 +2195,7 @@ * * ref - ATOM ref of the mutation to locate * * target_flags - Flags for storage mediums to search, see #defines */ -/obj/machinery/computer/scan_consolenew/proc/get_mut_by_ref(ref, target_flags) +/obj/machinery/computer/dna_console/proc/get_mut_by_ref(ref, target_flags) var/mutation // Assume the occupant is valid and the check has been carried out before @@ -2222,7 +2233,7 @@ * * pulse_duration - Duration of intended genetic damage pulse * * number_of_blocks - Number of individual data blocks in the pulsed enzyme */ -/obj/machinery/computer/scan_consolenew/proc/randomize_GENETIC_DAMAGE_accuracy(position, pulse_duration, number_of_blocks) +/obj/machinery/computer/dna_console/proc/randomize_GENETIC_DAMAGE_accuracy(position, pulse_duration, number_of_blocks) var/val = round(gaussian(0, GENETIC_DAMAGE_ACCURACY_MULTIPLIER/pulse_duration) + position, 1) return WRAP(val, 1, number_of_blocks+1) @@ -2235,7 +2246,7 @@ * * input - Enzyme identity element to scramble, expected hex value * * rs - Strength of genetic damage pulse, increases the range of possible outcomes */ -/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs) +/obj/machinery/computer/dna_console/proc/scramble(input,rs) var/length = length(input) var/ran = gaussian(0, rs*GENETIC_DAMAGE_STRENGTH_MULTIPLIER) if(ran == 0) @@ -2252,7 +2263,7 @@ * Donor code from previous DNA Console iteration. Called from process() when * there is a genetic damage pulse in progress. Ends processing. */ -/obj/machinery/computer/scan_consolenew/proc/genetic_damage_pulse() +/obj/machinery/computer/dna_console/proc/genetic_damage_pulse() // GUARD CHECK - Can we genetically modify the occupant? Includes scanner // operational guard checks. // If we can't, abort the procedure. @@ -2294,7 +2305,7 @@ /** * Sets the default state for the tgui interface. */ -/obj/machinery/computer/scan_consolenew/proc/set_default_state() +/obj/machinery/computer/dna_console/proc/set_default_state() tgui_view_state["consoleMode"] = "storage" tgui_view_state["storageMode"] = "console" tgui_view_state["storageConsSubMode"] = "mutations" @@ -2309,7 +2320,7 @@ * Arguments: * * user - The mob that is attempting to eject the diskette. */ -/obj/machinery/computer/scan_consolenew/proc/eject_disk(mob/user) +/obj/machinery/computer/dna_console/proc/eject_disk(mob/user) // Check for diskette. if(!diskette) return @@ -2324,7 +2335,7 @@ diskette.forceMove(drop_location()) diskette = null -/obj/machinery/computer/scan_consolenew/proc/set_connected_scanner(new_scanner) +/obj/machinery/computer/dna_console/proc/set_connected_scanner(new_scanner) if(connected_scanner) UnregisterSignal(connected_scanner, COMSIG_QDELETING) if(connected_scanner.linked_console == src) @@ -2334,7 +2345,7 @@ RegisterSignal(connected_scanner, COMSIG_QDELETING, PROC_REF(react_to_scanner_del)) connected_scanner.set_linked_console(src) -/obj/machinery/computer/scan_consolenew/proc/react_to_scanner_del(datum/source) +/obj/machinery/computer/dna_console/proc/react_to_scanner_del(datum/source) SIGNAL_HANDLER set_connected_scanner(null) @@ -2375,3 +2386,7 @@ #undef CLEAR_GENE #undef NEXT_GENE #undef PREV_GENE + +#undef SCANNER_MUTATION_CLASS_ACTIVATOR +#undef SCANNER_MUTATION_CLASS_MUTATOR +#undef SCANNER_MUTATION_CLASS_OTHER diff --git a/code/game/machinery/computer/telescreen.dm b/code/game/machinery/computer/telescreen.dm index f6b5dc01597..12bafc3f73e 100644 --- a/code/game/machinery/computer/telescreen.dm +++ b/code/game/machinery/computer/telescreen.dm @@ -101,7 +101,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/entertai var/can_range = FALSE if(iscarbon(user)) var/mob/living/carbon/carbon_user = user - if(carbon_user.dna?.check_mutation(/datum/mutation/human/telekinesis) && tkMaxRangeCheck(user, src)) + if(carbon_user.dna?.check_mutation(/datum/mutation/telekinesis) && tkMaxRangeCheck(user, src)) can_range = TRUE if(HAS_SILICON_ACCESS(user) || (user.interaction_range && user.interaction_range >= get_dist(user, src))) can_range = TRUE diff --git a/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm b/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm index 74965cb462b..011b35ccd4c 100644 --- a/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm @@ -74,7 +74,7 @@ return var/mob/living/carbon/human/human_receiver = receiver if(human_receiver.can_mutate()) - human_receiver.dna.add_mutation(/datum/mutation/human/dwarfism) + human_receiver.dna.add_mutation(/datum/mutation/dwarfism, MUTATION_SOURCE_RAT_HEART) //but 1.5 damage human_receiver.physiology?.damage_resistance -= 50 @@ -83,8 +83,7 @@ if(!ishuman(heartless)) return var/mob/living/carbon/human/human_heartless = heartless - if(human_heartless.can_mutate()) - human_heartless.dna.remove_mutation(/datum/mutation/human/dwarfism) + human_heartless.dna.remove_mutation(/datum/mutation/dwarfism, MUTATION_SOURCE_RAT_HEART) human_heartless.physiology?.damage_resistance += 50 /// you occasionally squeak, and have some rat related verbal tics diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 4c8a86b51cc..4f20d4171a0 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -16,7 +16,7 @@ var/precision_coeff = 1 var/message_cooldown var/breakout_time = 1200 - var/obj/machinery/computer/scan_consolenew/linked_console = null + var/obj/machinery/computer/dna_console/linked_console = null /obj/machinery/dna_scannernew/RefreshParts() . = ..() @@ -198,8 +198,8 @@ /obj/item/disk/data/debug/Initialize(mapload) . = ..() // Grabs all instances of mutations and adds them to the disk - for(var/datum/mutation/human/mut as anything in subtypesof(/datum/mutation/human)) - var/datum/mutation/human/ref = GET_INITIALIZED_MUTATION(mut) + for(var/datum/mutation/mut as anything in subtypesof(/datum/mutation)) + var/datum/mutation/ref = GET_INITIALIZED_MUTATION(mut) mutations += ref /obj/item/disk/data/attack_self(mob/user) diff --git a/code/game/machinery/experimental_cloner/experimental_cloner_pod.dm b/code/game/machinery/experimental_cloner/experimental_cloner_pod.dm index 5866b9d1824..460786c9ea8 100644 --- a/code/game/machinery/experimental_cloner/experimental_cloner_pod.dm +++ b/code/game/machinery/experimental_cloner/experimental_cloner_pod.dm @@ -163,7 +163,7 @@ GLOBAL_VAR_INIT(experimental_cloner_fuckup_chance, 50) if (prob(75)) var/static/list/permitted_heights = list(HUMAN_HEIGHT_SHORTEST, HUMAN_HEIGHT_SHORT, HUMAN_HEIGHT_MEDIUM, HUMAN_HEIGHT_TALL, HUMAN_HEIGHT_TALLER, HUMAN_HEIGHT_TALLEST) - new_clone.dna.remove_mutation(/datum/mutation/human/dwarfism) + new_clone.dna.remove_mutation(/datum/mutation/dwarfism, list(MUTATION_SOURCE_ACTIVATED, MUTATION_SOURCE_MUTATOR)) new_clone.set_mob_height(pick(permitted_heights - loaded_record.height)) // To differentiate the clones return new_clone diff --git a/code/game/machinery/experimental_cloner/experimental_cloning_record.dm b/code/game/machinery/experimental_cloner/experimental_cloning_record.dm index 71a000059e6..adf0bda2916 100644 --- a/code/game/machinery/experimental_cloner/experimental_cloning_record.dm +++ b/code/game/machinery/experimental_cloner/experimental_cloning_record.dm @@ -67,7 +67,7 @@ subject.voice = voice subject.voice_filter = voice_filter - dna.transfer_identity(subject, TRUE) + dna.copy_dna(subject.dna, COPY_DNA_SE|COPY_DNA_SPECIES) for (var/quirk_type as anything in quirks) subject.add_quirk(quirk_type, add_unique = FALSE) diff --git a/code/game/objects/items/chromosome.dm b/code/game/objects/items/chromosome.dm index 0ba6980eed3..b0cc9786f5d 100644 --- a/code/game/objects/items/chromosome.dm +++ b/code/game/objects/items/chromosome.dm @@ -18,7 +18,7 @@ ///The chance of a specific mutation of being generated compared to others when generate_chromosome() is called. var/weight = 5 -/obj/item/chromosome/proc/can_apply(datum/mutation/human/mutation) +/obj/item/chromosome/proc/can_apply(datum/mutation/mutation) if(!mutation || QDELETED(mutation.owner) || mutation.can_chromosome != CHROMOSOME_NONE) return FALSE if(!isnull(stabilizer_coeff) && (mutation.stabilizer_coeff != MUTATION_COEFFICIENT_UNMODIFIABLE)) @@ -30,7 +30,7 @@ if(!isnull(energy_coeff) && (mutation.energy_coeff != MUTATION_COEFFICIENT_UNMODIFIABLE)) return TRUE -/obj/item/chromosome/proc/apply(datum/mutation/human/mutation) +/obj/item/chromosome/proc/apply(datum/mutation/mutation) if(mutation.stabilizer_coeff != MUTATION_COEFFICIENT_UNMODIFIABLE) mutation.stabilizer_coeff = stabilizer_coeff if(mutation.synchronizer_coeff != MUTATION_COEFFICIENT_UNMODIFIABLE) diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 98d738235bd..044ff28b616 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -488,7 +488,7 @@ /obj/item/circuitboard/computer/scan_consolenew name = "DNA Console" greyscale_colors = CIRCUIT_COLOR_SCIENCE - build_path = /obj/machinery/computer/scan_consolenew + build_path = /obj/machinery/computer/dna_console /obj/item/circuitboard/computer/mechpad name = "Mecha Orbital Pad Console" diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 9c9f2aa8026..57ea76358b8 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -145,7 +145,7 @@ else . += "[M.p_Their()] pupils narrow.\n"//they're okay :D - if(M.dna && M.dna.check_mutation(/datum/mutation/human/xray)) + if(M.dna && M.dna.check_mutation(/datum/mutation/xray)) . += "[M.p_Their()] pupils give an eerie glow!\n"//mob has X-ray vision return . diff --git a/code/game/objects/items/devices/mulligan_kit.dm b/code/game/objects/items/devices/mulligan_kit.dm index 0363a028b00..9560add9fa4 100644 --- a/code/game/objects/items/devices/mulligan_kit.dm +++ b/code/game/objects/items/devices/mulligan_kit.dm @@ -63,7 +63,7 @@ var/mob/living/carbon/human/dummy/consistent/dummy = new() // For manifest rendering, unfortunately dummy.physique = user.physique - user.dna.transfer_identity(dummy, transfer_SE = TRUE) + user.dna.copy_dna(dummy.dna, COPY_DNA_SE|COPY_DNA_SPECIES) user.copy_clothing_prefs(dummy) dummy.updateappearance(icon_update = TRUE, mutcolor_update = TRUE, mutations_overlay_update = TRUE) dummy.dress_up_as_job(job, visual_only = TRUE, player_client = user.client) diff --git a/code/game/objects/items/devices/scanners/sequence_scanner.dm b/code/game/objects/items/devices/scanners/sequence_scanner.dm index c64e6aae2d1..d22372fa108 100644 --- a/code/game/objects/items/devices/scanners/sequence_scanner.dm +++ b/code/game/objects/items/devices/scanners/sequence_scanner.dm @@ -30,8 +30,8 @@ . += span_notice("It has the genetic makeup of \"[genetic_makeup_buffer["name"]]\" stored inside its buffer") /obj/item/sequence_scanner/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) - if(istype(interacting_with, /obj/machinery/computer/scan_consolenew)) - var/obj/machinery/computer/scan_consolenew/console = interacting_with + if(istype(interacting_with, /obj/machinery/computer/dna_console)) + var/obj/machinery/computer/dna_console/console = interacting_with if(console.stored_research) to_chat(user, span_notice("[name] linked to central research database.")) discovered = console.stored_research.discovered_mutations @@ -56,8 +56,8 @@ return ITEM_INTERACT_BLOCKING /obj/item/sequence_scanner/interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers) - if(istype(interacting_with, /obj/machinery/computer/scan_consolenew)) - var/obj/machinery/computer/scan_consolenew/console = interacting_with + if(istype(interacting_with, /obj/machinery/computer/dna_console)) + var/obj/machinery/computer/dna_console/console = interacting_with var/buffer_index = tgui_input_number(user, "Slot:", "Which slot to export:", 1, LAZYLEN(console.genetic_makeup_buffer), 1) console.genetic_makeup_buffer[buffer_index] = genetic_makeup_buffer return ITEM_INTERACT_SUCCESS @@ -96,7 +96,7 @@ //dupe list as scanner could modify target data buffer = LAZYLISTDUPLICATE(target.dna.mutation_index) var/list/active_mutations = list() - for(var/datum/mutation/human/mutation in target.dna.mutations) + for(var/datum/mutation/mutation in target.dna.mutations) LAZYSET(buffer, mutation.type, GET_SEQUENCE(mutation.type)) active_mutations.Add(mutation.type) @@ -158,10 +158,10 @@ ready = TRUE /obj/item/sequence_scanner/proc/get_display_name(mutation) - var/datum/mutation/human/human_mutation = GET_INITIALIZED_MUTATION(mutation) - if(!human_mutation) + var/datum/mutation/mutation_instance = GET_INITIALIZED_MUTATION(mutation) + if(!mutation_instance) return "ERROR" if(mutation in discovered) - return "[human_mutation.name] ([human_mutation.alias])" + return "[mutation_instance.name] ([mutation_instance.alias])" else - return human_mutation.alias + return mutation_instance.alias diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index 35c17ca7f75..09cc0a9b2cc 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -44,14 +44,14 @@ if(!target.can_mutate()) return FALSE for(var/removed_mutation in remove_mutations) - target.dna.remove_mutation(removed_mutation) + target.dna.remove_mutation(removed_mutation, list(MUTATION_SOURCE_ACTIVATED, MUTATION_SOURCE_MUTATOR)) for(var/added_mutation in add_mutations) - if(added_mutation == /datum/mutation/human/race) + if(added_mutation == /datum/mutation/race) message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(target)] with \the [src] [span_danger("(MONKEY)")]") if(target.dna.mutation_in_sequence(added_mutation)) target.dna.activate_mutation(added_mutation) else - target.dna.add_mutation(added_mutation, MUT_EXTRA) + target.dna.add_mutation(added_mutation, MUTATION_SOURCE_MUTATOR) if(fields) if(fields["name"] && fields["UE"] && fields["blood_type"]) target.real_name = fields["name"] @@ -100,7 +100,7 @@ update_appearance() /obj/item/dnainjector/timed - var/duration = 600 + var/duration = 60 SECONDS /obj/item/dnainjector/timed/inject(mob/living/carbon/target, mob/user) if(target.stat == DEAD) //prevents dead people from having their DNA changed @@ -110,20 +110,14 @@ return FALSE var/endtime = world.time + duration for(var/mutation in remove_mutations) - if(mutation == /datum/mutation/human/race) - if(!ismonkey(target)) - continue - target.dna.remove_mutation(mutation) - else - target.dna.remove_mutation(mutation) + target.dna.remove_mutation(mutation, list(MUTATION_SOURCE_ACTIVATED, MUTATION_SOURCE_MUTATOR)) for(var/mutation in add_mutations) if(target.dna.get_mutation(mutation)) continue //Skip permanent mutations we already have. - if(mutation == /datum/mutation/human/race && !ismonkey(target)) + if(mutation == /datum/mutation/race && !ismonkey(target)) message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(target)] with \the [src] [span_danger("(MONKEY)")]") - target.dna.add_mutation(mutation, MUT_OTHER, endtime) - else - target.dna.add_mutation(mutation, MUT_OTHER, endtime) + target.dna.add_mutation(mutation, MUTATION_SOURCE_TIMED_INJECTOR) + addtimer(CALLBACK(target.dna, TYPE_PROC_REF(/datum/dna, remove_mutation), mutation, MUTATION_SOURCE_TIMED_INJECTOR), duration) if(fields) if(fields["name"] && fields["UE"] && fields["blood_type"]) if(!target.dna.previous["name"]) @@ -154,12 +148,12 @@ /obj/item/dnainjector/timed/hulk name = "\improper DNA injector (Hulk)" desc = "This will make you big and strong, but give you a bad skin condition." - add_mutations = list(/datum/mutation/human/hulk) + add_mutations = list(/datum/mutation/hulk) /obj/item/dnainjector/timed/h2m name = "\improper DNA injector (Human > Monkey)" desc = "Will make you a flea bag." - add_mutations = list(/datum/mutation/human/race) + add_mutations = list(/datum/mutation/race) /obj/item/dnainjector/activator name = "\improper DNA activator" @@ -173,12 +167,12 @@ if(!target.can_mutate()) return FALSE for(var/mutation in add_mutations) - var/datum/mutation/human/added_mutation = mutation - if(istype(added_mutation, /datum/mutation/human)) + var/datum/mutation/added_mutation = mutation + if(istype(added_mutation, /datum/mutation)) mutation = added_mutation.type if(!target.dna.activate_mutation(added_mutation)) if(force_mutate) - target.dna.add_mutation(added_mutation, MUT_EXTRA) + target.dna.add_mutation(added_mutation, MUTATION_SOURCE_MUTATOR) else if(research && target.client) filled = TRUE for(var/datum/disease/advance/disease in target.diseases) @@ -192,302 +186,302 @@ /obj/item/dnainjector/acidflesh name = "\improper DNA injector (Acid Flesh)" - add_mutations = list(/datum/mutation/human/acidflesh) + add_mutations = list(/datum/mutation/acidflesh) /obj/item/dnainjector/antiacidflesh name = "\improper DNA injector (Acid Flesh)" - remove_mutations = list(/datum/mutation/human/acidflesh) + remove_mutations = list(/datum/mutation/acidflesh) /obj/item/dnainjector/antenna name = "\improper DNA injector (Antenna)" - add_mutations = list(/datum/mutation/human/antenna) + add_mutations = list(/datum/mutation/antenna) /obj/item/dnainjector/antiantenna name = "\improper DNA injector (Anti-Antenna)" - remove_mutations = list(/datum/mutation/human/antenna) + remove_mutations = list(/datum/mutation/antenna) /obj/item/dnainjector/antiglow name = "\improper DNA injector (Antiglowy)" - add_mutations = list(/datum/mutation/human/glow/anti) + add_mutations = list(/datum/mutation/glow/anti) /obj/item/dnainjector/removeantiglow name = "\improper DNA injector (Anti-Antiglowy)" - remove_mutations = list(/datum/mutation/human/glow/anti) + remove_mutations = list(/datum/mutation/glow/anti) /obj/item/dnainjector/blindmut name = "\improper DNA injector (Blind)" desc = "Makes you not see anything." - add_mutations = list(/datum/mutation/human/blind) + add_mutations = list(/datum/mutation/blind) /obj/item/dnainjector/antiblind name = "\improper DNA injector (Anti-Blind)" desc = "IT'S A MIRACLE!!!" - remove_mutations = list(/datum/mutation/human/blind) + remove_mutations = list(/datum/mutation/blind) /obj/item/dnainjector/chameleonmut name = "\improper DNA injector (Chameleon)" - add_mutations = list(/datum/mutation/human/chameleon) + add_mutations = list(/datum/mutation/chameleon) /obj/item/dnainjector/antichameleon name = "\improper DNA injector (Anti-Chameleon)" - remove_mutations = list(/datum/mutation/human/chameleon) + remove_mutations = list(/datum/mutation/chameleon) /obj/item/dnainjector/chavmut name = "\improper DNA injector (Chav)" - add_mutations = list(/datum/mutation/human/chav) + add_mutations = list(/datum/mutation/chav) /obj/item/dnainjector/antichav name = "\improper DNA injector (Anti-Chav)" - remove_mutations = list(/datum/mutation/human/chav) + remove_mutations = list(/datum/mutation/chav) /obj/item/dnainjector/clumsymut name = "\improper DNA injector (Clumsy)" desc = "Makes clown minions." - add_mutations = list(/datum/mutation/human/clumsy) + add_mutations = list(/datum/mutation/clumsy) /obj/item/dnainjector/anticlumsy name = "\improper DNA injector (Anti-Clumsy)" desc = "Apply this for Security Clown." - remove_mutations = list(/datum/mutation/human/clumsy) + remove_mutations = list(/datum/mutation/clumsy) /obj/item/dnainjector/coughmut name = "\improper DNA injector (Cough)" desc = "Will bring forth a sound of horror from your throat." - add_mutations = list(/datum/mutation/human/cough) + add_mutations = list(/datum/mutation/cough) /obj/item/dnainjector/anticough name = "\improper DNA injector (Anti-Cough)" desc = "Will stop that awful noise." - remove_mutations = list(/datum/mutation/human/cough) + remove_mutations = list(/datum/mutation/cough) /obj/item/dnainjector/cryokinesis name = "\improper DNA injector (Cryokinesis)" - add_mutations = list(/datum/mutation/human/cryokinesis) + add_mutations = list(/datum/mutation/cryokinesis) /obj/item/dnainjector/anticryokinesis name = "\improper DNA injector (Anti-Cryokinesis)" - remove_mutations = list(/datum/mutation/human/cryokinesis) + remove_mutations = list(/datum/mutation/cryokinesis) /obj/item/dnainjector/deafmut name = "\improper DNA injector (Deaf)" desc = "Sorry, what did you say?" - add_mutations = list(/datum/mutation/human/deaf) + add_mutations = list(/datum/mutation/deaf) /obj/item/dnainjector/antideaf name = "\improper DNA injector (Anti-Deaf)" desc = "Will make you hear once more." - remove_mutations = list(/datum/mutation/human/deaf) + remove_mutations = list(/datum/mutation/deaf) /obj/item/dnainjector/dwarf name = "\improper DNA injector (Dwarfism)" desc = "It's a small world after all." - add_mutations = list(/datum/mutation/human/dwarfism) + add_mutations = list(/datum/mutation/dwarfism) /obj/item/dnainjector/antidwarf name = "\improper DNA injector (Anti-Dwarfism)" desc = "Helps you grow big and strong." - remove_mutations = list(/datum/mutation/human/dwarfism) + remove_mutations = list(/datum/mutation/dwarfism) /obj/item/dnainjector/elvismut name = "\improper DNA injector (Elvis)" - add_mutations = list(/datum/mutation/human/elvis) + add_mutations = list(/datum/mutation/elvis) /obj/item/dnainjector/antielvis name = "\improper DNA injector (Anti-Elvis)" - remove_mutations = list(/datum/mutation/human/elvis) + remove_mutations = list(/datum/mutation/elvis) /obj/item/dnainjector/epimut name = "\improper DNA injector (Epi.)" desc = "Shake shake shake the room!" - add_mutations = list(/datum/mutation/human/epilepsy) + add_mutations = list(/datum/mutation/epilepsy) /obj/item/dnainjector/antiepi name = "\improper DNA injector (Anti-Epi.)" desc = "Will fix you up from shaking the room." - remove_mutations = list(/datum/mutation/human/epilepsy) + remove_mutations = list(/datum/mutation/epilepsy) /obj/item/dnainjector/geladikinesis name = "\improper DNA injector (Geladikinesis)" - add_mutations = list(/datum/mutation/human/geladikinesis) + add_mutations = list(/datum/mutation/geladikinesis) /obj/item/dnainjector/antigeladikinesis name = "\improper DNA injector (Anti-Geladikinesis)" - remove_mutations = list(/datum/mutation/human/geladikinesis) + remove_mutations = list(/datum/mutation/geladikinesis) /obj/item/dnainjector/gigantism name = "\improper DNA injector (Gigantism)" - add_mutations = list(/datum/mutation/human/gigantism) + add_mutations = list(/datum/mutation/gigantism) /obj/item/dnainjector/antigigantism name = "\improper DNA injector (Anti-Gigantism)" - remove_mutations = list(/datum/mutation/human/gigantism) + remove_mutations = list(/datum/mutation/gigantism) /obj/item/dnainjector/glassesmut name = "\improper DNA injector (Glasses)" desc = "Will make you need dorkish glasses." - add_mutations = list(/datum/mutation/human/nearsight) + add_mutations = list(/datum/mutation/nearsight) /obj/item/dnainjector/antiglasses name = "\improper DNA injector (Anti-Glasses)" desc = "Toss away those glasses!" - remove_mutations = list(/datum/mutation/human/nearsight) + remove_mutations = list(/datum/mutation/nearsight) /obj/item/dnainjector/glow name = "\improper DNA injector (Glowy)" - add_mutations = list(/datum/mutation/human/glow) + add_mutations = list(/datum/mutation/glow) /obj/item/dnainjector/removeglow name = "\improper DNA injector (Anti-Glowy)" - remove_mutations = list(/datum/mutation/human/glow) + remove_mutations = list(/datum/mutation/glow) /obj/item/dnainjector/hulkmut name = "\improper DNA injector (Hulk)" desc = "This will make you big and strong, but give you a bad skin condition." - add_mutations = list(/datum/mutation/human/hulk) + add_mutations = list(/datum/mutation/hulk) /obj/item/dnainjector/antihulk name = "\improper DNA injector (Anti-Hulk)" desc = "Cures green skin." - remove_mutations = list(/datum/mutation/human/hulk) + remove_mutations = list(/datum/mutation/hulk) /obj/item/dnainjector/h2m name = "\improper DNA injector (Human > Monkey)" desc = "Will make you a flea bag." - add_mutations = list(/datum/mutation/human/race) + add_mutations = list(/datum/mutation/race) /obj/item/dnainjector/m2h name = "\improper DNA injector (Monkey > Human)" desc = "Will make you...less hairy." - remove_mutations = list(/datum/mutation/human/race) + remove_mutations = list(/datum/mutation/race) /obj/item/dnainjector/illiterate name = "\improper DNA injector (Illiterate)" - add_mutations = list(/datum/mutation/human/illiterate) + add_mutations = list(/datum/mutation/illiterate) /obj/item/dnainjector/antiilliterate name = "\improper DNA injector (Anti-Illiterate)" - remove_mutations = list(/datum/mutation/human/illiterate) + remove_mutations = list(/datum/mutation/illiterate) /obj/item/dnainjector/insulated name = "\improper DNA injector (Insulated)" - add_mutations = list(/datum/mutation/human/insulated) + add_mutations = list(/datum/mutation/insulated) /obj/item/dnainjector/antiinsulated name = "\improper DNA injector (Anti-Insulated)" - remove_mutations = list(/datum/mutation/human/insulated) + remove_mutations = list(/datum/mutation/insulated) /obj/item/dnainjector/lasereyesmut name = "\improper DNA injector (Laser Eyes)" - add_mutations = list(/datum/mutation/human/laser_eyes) + add_mutations = list(/datum/mutation/laser_eyes) /obj/item/dnainjector/antilasereyes name = "\improper DNA injector (Anti-Laser Eyes)" - remove_mutations = list(/datum/mutation/human/laser_eyes) + remove_mutations = list(/datum/mutation/laser_eyes) /obj/item/dnainjector/mindread name = "\improper DNA injector (Mindread)" - add_mutations = list(/datum/mutation/human/mindreader) + add_mutations = list(/datum/mutation/mindreader) /obj/item/dnainjector/antimindread name = "\improper DNA injector (Anti-Mindread)" - remove_mutations = list(/datum/mutation/human/mindreader) + remove_mutations = list(/datum/mutation/mindreader) /obj/item/dnainjector/mutemut name = "\improper DNA injector (Mute)" - add_mutations = list(/datum/mutation/human/mute) + add_mutations = list(/datum/mutation/mute) /obj/item/dnainjector/antimute name = "\improper DNA injector (Anti-Mute)" - remove_mutations = list(/datum/mutation/human/mute) + remove_mutations = list(/datum/mutation/mute) /obj/item/dnainjector/olfaction name = "\improper DNA injector (Olfaction)" - add_mutations = list(/datum/mutation/human/olfaction) + add_mutations = list(/datum/mutation/olfaction) /obj/item/dnainjector/antiolfaction name = "\improper DNA injector (Anti-Olfaction)" - remove_mutations = list(/datum/mutation/human/olfaction) + remove_mutations = list(/datum/mutation/olfaction) /obj/item/dnainjector/piglatinmut name = "\improper DNA injector (Pig Latin)" - add_mutations = list(/datum/mutation/human/piglatin) + add_mutations = list(/datum/mutation/piglatin) /obj/item/dnainjector/antipiglatin name = "\improper DNA injector (Anti-Pig Latin)" - remove_mutations = list(/datum/mutation/human/piglatin) + remove_mutations = list(/datum/mutation/piglatin) /obj/item/dnainjector/paranoia name = "\improper DNA injector (Paranoia)" - add_mutations = list(/datum/mutation/human/paranoia) + add_mutations = list(/datum/mutation/paranoia) /obj/item/dnainjector/antiparanoia name = "\improper DNA injector (Anti-Paranoia)" - remove_mutations = list(/datum/mutation/human/paranoia) + remove_mutations = list(/datum/mutation/paranoia) /obj/item/dnainjector/pressuremut name = "\improper DNA injector (Pressure Adaptation)" desc = "Gives you fire." - add_mutations = list(/datum/mutation/human/adaptation/pressure) + add_mutations = list(/datum/mutation/adaptation/pressure) /obj/item/dnainjector/antipressure name = "\improper DNA injector (Anti-Pressure Adaptation)" desc = "Cures fire." - remove_mutations = list(/datum/mutation/human/adaptation/pressure) + remove_mutations = list(/datum/mutation/adaptation/pressure) /obj/item/dnainjector/radioactive name = "\improper DNA injector (Radioactive)" - add_mutations = list(/datum/mutation/human/radioactive) + add_mutations = list(/datum/mutation/radioactive) /obj/item/dnainjector/antiradioactive name = "\improper DNA injector (Anti-Radioactive)" - remove_mutations = list(/datum/mutation/human/radioactive) + remove_mutations = list(/datum/mutation/radioactive) /obj/item/dnainjector/shock name = "\improper DNA injector (Shock Touch)" - add_mutations = list(/datum/mutation/human/shock) + add_mutations = list(/datum/mutation/shock) /obj/item/dnainjector/antishock name = "\improper DNA injector (Anti-Shock Touch)" - remove_mutations = list(/datum/mutation/human/shock) + remove_mutations = list(/datum/mutation/shock) /obj/item/dnainjector/spastic name = "\improper DNA injector (Spastic)" - add_mutations = list(/datum/mutation/human/spastic) + add_mutations = list(/datum/mutation/spastic) /obj/item/dnainjector/antispastic name = "\improper DNA injector (Anti-Spastic)" - remove_mutations = list(/datum/mutation/human/spastic) + remove_mutations = list(/datum/mutation/spastic) /obj/item/dnainjector/spatialinstability name = "\improper DNA injector (Spatial Instability)" - add_mutations = list(/datum/mutation/human/badblink) + add_mutations = list(/datum/mutation/badblink) /obj/item/dnainjector/antispatialinstability name = "\improper DNA injector (Anti-Spatial Instability)" - remove_mutations = list(/datum/mutation/human/badblink) + remove_mutations = list(/datum/mutation/badblink) /obj/item/dnainjector/stuttmut name = "\improper DNA injector (Stutt.)" desc = "Makes you s-s-stuttterrr." - add_mutations = list(/datum/mutation/human/nervousness) + add_mutations = list(/datum/mutation/nervousness) /obj/item/dnainjector/antistutt name = "\improper DNA injector (Anti-Stutt.)" desc = "Fixes that speaking impairment." - remove_mutations = list(/datum/mutation/human/nervousness) + remove_mutations = list(/datum/mutation/nervousness) /obj/item/dnainjector/swedishmut name = "\improper DNA injector (Swedish)" - add_mutations = list(/datum/mutation/human/swedish) + add_mutations = list(/datum/mutation/swedish) /obj/item/dnainjector/antiswedish name = "\improper DNA injector (Anti-Swedish)" - remove_mutations = list(/datum/mutation/human/swedish) + remove_mutations = list(/datum/mutation/swedish) /obj/item/dnainjector/telemut name = "\improper DNA injector (Tele.)" desc = "Super brain TK!" - add_mutations = list(/datum/mutation/human/telekinesis) + add_mutations = list(/datum/mutation/telekinesis) /obj/item/dnainjector/telemut/darkbundle name = "\improper DNA injector" @@ -496,90 +490,90 @@ /obj/item/dnainjector/antitele name = "\improper DNA injector (Anti-Tele.)" desc = "Will make you not able to control your mind." - remove_mutations = list(/datum/mutation/human/telekinesis) + remove_mutations = list(/datum/mutation/telekinesis) /obj/item/dnainjector/firemut name = "\improper DNA injector (Temp Adaptation)" desc = "Gives you fire." - add_mutations = list(/datum/mutation/human/adaptation/thermal) + add_mutations = list(/datum/mutation/adaptation/thermal) /obj/item/dnainjector/antifire name = "\improper DNA injector (Anti-Temp Adaptation)" desc = "Cures fire." - remove_mutations = list(/datum/mutation/human/adaptation/thermal) + remove_mutations = list(/datum/mutation/adaptation/thermal) /obj/item/dnainjector/thermal name = "\improper DNA injector (Thermal Vision)" - add_mutations = list(/datum/mutation/human/thermal) + add_mutations = list(/datum/mutation/thermal) /obj/item/dnainjector/antithermal name = "\improper DNA injector (Anti-Thermal Vision)" - remove_mutations = list(/datum/mutation/human/thermal) + remove_mutations = list(/datum/mutation/thermal) /obj/item/dnainjector/tourmut name = "\improper DNA injector (Tour.)" desc = "Gives you a nasty case of Tourette's." - add_mutations = list(/datum/mutation/human/tourettes) + add_mutations = list(/datum/mutation/tourettes) /obj/item/dnainjector/antitour name = "\improper DNA injector (Anti-Tour.)" desc = "Will cure Tourette's." - remove_mutations = list(/datum/mutation/human/tourettes) + remove_mutations = list(/datum/mutation/tourettes) /obj/item/dnainjector/twoleftfeet name = "\improper DNA injector (Two Left Feet)" - add_mutations = list(/datum/mutation/human/extrastun) + add_mutations = list(/datum/mutation/extrastun) /obj/item/dnainjector/antitwoleftfeet name = "\improper DNA injector (Anti-Two Left Feet)" - remove_mutations = list(/datum/mutation/human/extrastun) + remove_mutations = list(/datum/mutation/extrastun) /obj/item/dnainjector/unintelligiblemut name = "\improper DNA injector (Unintelligible)" - add_mutations = list(/datum/mutation/human/unintelligible) + add_mutations = list(/datum/mutation/unintelligible) /obj/item/dnainjector/antiunintelligible name = "\improper DNA injector (Anti-Unintelligible)" - remove_mutations = list(/datum/mutation/human/unintelligible) + remove_mutations = list(/datum/mutation/unintelligible) /obj/item/dnainjector/void name = "\improper DNA injector (Void)" - add_mutations = list(/datum/mutation/human/void) + add_mutations = list(/datum/mutation/void) /obj/item/dnainjector/antivoid name = "\improper DNA injector (Anti-Void)" - remove_mutations = list(/datum/mutation/human/void) + remove_mutations = list(/datum/mutation/void) /obj/item/dnainjector/xraymut name = "\improper DNA injector (X-ray)" desc = "Finally you can see what the Captain does." - add_mutations = list(/datum/mutation/human/xray) + add_mutations = list(/datum/mutation/xray) /obj/item/dnainjector/antixray name = "\improper DNA injector (Anti-X-ray)" desc = "It will make you see harder." - remove_mutations = list(/datum/mutation/human/xray) + remove_mutations = list(/datum/mutation/xray) /obj/item/dnainjector/wackymut name = "\improper DNA injector (Wacky)" - add_mutations = list(/datum/mutation/human/wacky) + add_mutations = list(/datum/mutation/wacky) /obj/item/dnainjector/antiwacky name = "\improper DNA injector (Anti-Wacky)" - remove_mutations = list(/datum/mutation/human/wacky) + remove_mutations = list(/datum/mutation/wacky) /obj/item/dnainjector/webbing name = "\improper DNA injector (Webbing)" - add_mutations = list(/datum/mutation/human/webbing) + add_mutations = list(/datum/mutation/webbing) /obj/item/dnainjector/antiwebbing name = "\improper DNA injector (Anti-Webbing)" - remove_mutations = list(/datum/mutation/human/webbing) + remove_mutations = list(/datum/mutation/webbing) /obj/item/dnainjector/clever name = "\improper DNA injector (Clever)" - add_mutations = list(/datum/mutation/human/clever) + add_mutations = list(/datum/mutation/clever) /obj/item/dnainjector/anticlever name = "\improper DNA injector (Anti-Clever)" - remove_mutations = list(/datum/mutation/human/clever) + remove_mutations = list(/datum/mutation/clever) diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 503a1a183e1..e1f046ce853 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -162,12 +162,12 @@ injection_cooldown = 0 replenish_cooldown = 300 -/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/H,mob/user) - if(!istype(H)) +/obj/machinery/implantchair/genepurge/implant_action(mob/living/carbon/human/human, mob/user) + if(!istype(human)) return FALSE - H.set_species(/datum/species/human, 1)//lizards go home - purrbation_remove(H)//remove cats - H.dna.remove_all_mutations()//hulks out + human.dna.remove_all_mutations()//hulks out + human.set_species(/datum/species/human, 1)//lizards go home + purrbation_remove(human)//remove cats return TRUE diff --git a/code/game/objects/items/maintenance_loot.dm b/code/game/objects/items/maintenance_loot.dm index a8d088a0098..e78f8c4a67e 100644 --- a/code/game/objects/items/maintenance_loot.dm +++ b/code/game/objects/items/maintenance_loot.dm @@ -61,7 +61,7 @@ if(!avatar.can_mutate()) return BITRUNNER_GEAR_LOAD_FAILED - if(avatar.dna.mutation_in_sequence(/datum/mutation/human/shock)) - avatar.dna.activate_mutation(/datum/mutation/human/shock) + if(avatar.dna.mutation_in_sequence(/datum/mutation/shock)) + avatar.dna.activate_mutation(/datum/mutation/shock) else - avatar.dna.add_mutation(/datum/mutation/human/shock, MUT_EXTRA) + avatar.dna.add_mutation(/datum/mutation/shock, MUTATION_SOURCE_MUTATOR) diff --git a/code/game/objects/items/toy_mechs.dm b/code/game/objects/items/toy_mechs.dm index e59083adfbc..74dccf416ee 100644 --- a/code/game/objects/items/toy_mechs.dm +++ b/code/game/objects/items/toy_mechs.dm @@ -100,7 +100,7 @@ if(attacker_controller.incapacitated) return FALSE //if the attacker_controller isn't next to the attacking toy (and doesn't have telekinesis), the battle ends - if(!in_range(attacker, attacker_controller) && !(attacker_controller.dna.check_mutation(/datum/mutation/human/telekinesis))) + if(!in_range(attacker, attacker_controller) && !(attacker_controller.dna.check_mutation(/datum/mutation/telekinesis))) attacker_controller.visible_message(span_notice("[attacker_controller.name] separates from [attacker], ending the battle."), \ span_notice("You separate from [attacker], ending the battle.")) return FALSE @@ -109,13 +109,13 @@ if(opponent) if(opponent.incapacitated) return FALSE - if(!in_range(src, opponent) && !(opponent.dna.check_mutation(/datum/mutation/human/telekinesis))) + if(!in_range(src, opponent) && !(opponent.dna.check_mutation(/datum/mutation/telekinesis))) opponent.visible_message(span_notice("[opponent.name] separates from [src], ending the battle."), \ span_notice("You separate from [src], ending the battle.")) return FALSE //if it's not PVP and the attacker_controller isn't next to the defending toy (and doesn't have telekinesis), the battle ends else - if (!in_range(src, attacker_controller) && !(attacker_controller.dna.check_mutation(/datum/mutation/human/telekinesis))) + if (!in_range(src, attacker_controller) && !(attacker_controller.dna.check_mutation(/datum/mutation/telekinesis))) attacker_controller.visible_message(span_notice("[attacker_controller.name] separates from [src] and [attacker], ending the battle."), \ span_notice("You separate [attacker] and [src], ending the battle.")) return FALSE diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index 16781a3fb09..2e9c6687826 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -176,7 +176,7 @@ to_chat(content, span_userdanger("You're suddenly forced into a tiny, compressed space!")) if(iscarbon(content)) var/mob/living/carbon/mob = content - if (mob.dna?.get_mutation(/datum/mutation/human/dwarfism)) + if (mob.dna?.get_mutation(/datum/mutation/dwarfism)) max_weight_of_contents = max(WEIGHT_CLASS_NORMAL, max_weight_of_contents) continue if(!isitem(content)) diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm index 47b4e75cd26..662b9fb5f2a 100644 --- a/code/game/turfs/closed/walls.dm +++ b/code/game/turfs/closed/walls.dm @@ -179,7 +179,7 @@ */ /turf/closed/wall/proc/hulk_recoil(obj/item/bodypart/arm, mob/living/carbon/human/hulkman, damage = 20) hulkman.apply_damage(damage, BRUTE, arm, wound_bonus = CANT_WOUND) - var/datum/mutation/human/hulk/smasher = locate(/datum/mutation/human/hulk) in hulkman.dna.mutations + var/datum/mutation/hulk/smasher = locate(/datum/mutation/hulk) in hulkman.dna.mutations if(!smasher || !damage) //sanity check but also snow and wood walls deal no recoil damage, so no arm breaky return smasher.break_an_arm(arm) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index e394994d2aa..837f3bcaf49 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -243,11 +243,10 @@ newmob.equipOutfit(posttransformoutfit) if("monkey") if(ishuman(M)) - var/mob/living/carbon/human/H = M - H.dna.add_mutation(/datum/mutation/human/race, MUT_NORMAL) - H.dna.activate_mutation(/datum/mutation/human/race) + var/mob/living/carbon/human/human = M + human.dna.add_mutation(/datum/mutation/race, MUTATION_SOURCE_ACTIVATED) else - M.change_mob_type( /mob/living/carbon/human/species/monkey , null, null, delmob ) + M.change_mob_type(/mob/living/carbon/human/species/monkey , null, null, delmob ) if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob ) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 930a605a580..e7e3b8476f5 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -229,11 +229,11 @@ GLOBAL_LIST_EMPTY(antagonists) return var/mob/living/carbon/human/human_override = mob_override if(removing) // They're a clown becoming an antag, remove clumsy - human_override.dna.remove_mutation(/datum/mutation/human/clumsy) + human_override.dna.remove_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) if(!silent && message) to_chat(human_override, span_boldnotice("[message]")) else - human_override.dna.add_mutation(/datum/mutation/human/clumsy) // We're removing their antag status, add back clumsy + human_override.dna.add_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) // We're removing their antag status, add back clumsy //Assign default team and creates one for one of a kind team antagonists diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 20dc92cbccc..94e032151b0 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -786,7 +786,7 @@ return var/mob/living/carbon/carbon_owner = owner.current - first_profile.dna.transfer_identity(carbon_owner, transfer_SE = TRUE) + first_profile.dna.copy_dna(carbon_owner.dna, COPY_DNA_SE|COPY_DNA_SPECIES) carbon_owner.real_name = first_profile.name carbon_owner.updateappearance(mutcolor_update = TRUE) carbon_owner.domutcheck() @@ -852,7 +852,7 @@ user.voice = chosen_profile.voice user.voice_filter = chosen_profile.voice_filter - chosen_dna.transfer_identity(user, TRUE) + chosen_dna.copy_dna(user.dna, COPY_DNA_SE|COPY_DNA_SPECIES) for(var/obj/item/bodypart/limb as anything in user.bodyparts) limb.update_limb(is_creating = TRUE) diff --git a/code/modules/antagonists/changeling/powers/chameleon_skin.dm b/code/modules/antagonists/changeling/powers/chameleon_skin.dm index f74ad1208dd..e02437926a8 100644 --- a/code/modules/antagonists/changeling/powers/chameleon_skin.dm +++ b/code/modules/antagonists/changeling/powers/chameleon_skin.dm @@ -12,14 +12,14 @@ if(!istype(cling)) // req_human could be done in can_sting stuff. return ..() - if(cling.dna.get_mutation(/datum/mutation/human/chameleon/changeling)) - cling.dna.remove_mutation(/datum/mutation/human/chameleon/changeling) + if(cling.dna.get_mutation(/datum/mutation/chameleon/changeling)) + cling.dna.remove_mutation(/datum/mutation/chameleon/changeling, MUTATION_SOURCE_CHANGELING) else - cling.dna.add_mutation(/datum/mutation/human/chameleon/changeling) + cling.dna.add_mutation(/datum/mutation/chameleon/changeling, MUTATION_SOURCE_CHANGELING) return TRUE /datum/action/changeling/chameleon_skin/Remove(mob/user) if(user.has_dna()) var/mob/living/carbon/cling = user - cling.dna.remove_mutation(/datum/mutation/human/chameleon/changeling) + cling.dna.remove_mutation(/datum/mutation/chameleon/changeling, MUTATION_SOURCE_CHANGELING) ..() diff --git a/code/modules/antagonists/clown_ops/bananium_bomb.dm b/code/modules/antagonists/clown_ops/bananium_bomb.dm index 3381c7bdb95..4484045a6fa 100644 --- a/code/modules/antagonists/clown_ops/bananium_bomb.dm +++ b/code/modules/antagonists/clown_ops/bananium_bomb.dm @@ -56,5 +56,5 @@ ADD_TRAIT(clown_mask, TRAIT_NODROP, CLOWN_NUKE_TRAIT) clowned_on.equip_to_slot_or_del(clown_mask, ITEM_SLOT_MASK) - clowned_on.dna.add_mutation(/datum/mutation/human/clumsy) + clowned_on.dna.add_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) clowned_on.gain_trauma(/datum/brain_trauma/mild/phobia/clowns, TRAUMA_RESILIENCE_LOBOTOMY) //MWA HA HA diff --git a/code/modules/antagonists/pirate/pirate_roles.dm b/code/modules/antagonists/pirate/pirate_roles.dm index 3ea82d4c200..bbde9ea0bef 100644 --- a/code/modules/antagonists/pirate/pirate_roles.dm +++ b/code/modules/antagonists/pirate/pirate_roles.dm @@ -219,5 +219,5 @@ /obj/effect/mob_spawn/ghost_role/human/pirate/medieval/warlord/special(mob/living/carbon/spawned_mob) . = ..() - spawned_mob.dna.add_mutation(/datum/mutation/human/hulk/superhuman) - spawned_mob.dna.add_mutation(/datum/mutation/human/gigantism) + spawned_mob.dna.add_mutation(/datum/mutation/hulk/superhuman, MUTATION_SOURCE_GHOST_ROLE) + spawned_mob.dna.add_mutation(/datum/mutation/gigantism, MUTATION_SOURCE_GHOST_ROLE) diff --git a/code/modules/antagonists/spy/spy_bounty.dm b/code/modules/antagonists/spy/spy_bounty.dm index f45da0fdce8..9fbb6c1c7c3 100644 --- a/code/modules/antagonists/spy/spy_bounty.dm +++ b/code/modules/antagonists/spy/spy_bounty.dm @@ -429,7 +429,7 @@ /obj/machinery/computer/prisoner/management, /obj/machinery/computer/rdconsole, /obj/machinery/computer/records/security, - /obj/machinery/computer/scan_consolenew, + /obj/machinery/computer/dna_console, /obj/machinery/computer/security, // Requires breaking into a sec checkpoint, but not too hard, many are never visited /obj/machinery/dna_scannernew, /obj/machinery/mecha_part_fabricator, diff --git a/code/modules/antagonists/wishgranter/wishgranter.dm b/code/modules/antagonists/wishgranter/wishgranter.dm index fd18ffe5c1e..09e498e5d14 100644 --- a/code/modules/antagonists/wishgranter/wishgranter.dm +++ b/code/modules/antagonists/wishgranter/wishgranter.dm @@ -25,7 +25,7 @@ var/mob/living/carbon/human/H = owner.current if(!istype(H)) return - H.dna.add_mutation(/datum/mutation/human/hulk) - H.dna.add_mutation(/datum/mutation/human/xray) - H.dna.add_mutation(/datum/mutation/human/adaptation/pressure) - H.dna.add_mutation(/datum/mutation/human/telekinesis) + H.dna.add_mutation(/datum/mutation/hulk, MUTATION_SOURCE_WISHGRANTER) + H.dna.add_mutation(/datum/mutation/xray, MUTATION_SOURCE_WISHGRANTER) + H.dna.add_mutation(/datum/mutation/adaptation/pressure, MUTATION_SOURCE_WISHGRANTER) + H.dna.add_mutation(/datum/mutation/telekinesis, MUTATION_SOURCE_WISHGRANTER) diff --git a/code/modules/antagonists/wizard/grand_ritual/finales/immortality.dm b/code/modules/antagonists/wizard/grand_ritual/finales/immortality.dm index 436383975d1..a9047c79878 100644 --- a/code/modules/antagonists/wizard/grand_ritual/finales/immortality.dm +++ b/code/modules/antagonists/wizard/grand_ritual/finales/immortality.dm @@ -123,7 +123,7 @@ for(var/datum/quirk/target_quirk as anything in quirks) target_quirk.add_to_holder(target) - dna.transfer_identity(target, TRUE) + dna.copy_dna(target.dna, COPY_DNA_SE|COPY_DNA_SPECIES) for(var/obj/item/bodypart/limb as anything in target.bodyparts) limb.update_limb(is_creating = TRUE) target.updateappearance(mutcolor_update = TRUE) diff --git a/code/modules/capture_the_flag/medieval_sim/medisim_game.dm b/code/modules/capture_the_flag/medieval_sim/medisim_game.dm index 66ed55f71e2..57923aa4501 100644 --- a/code/modules/capture_the_flag/medieval_sim/medisim_game.dm +++ b/code/modules/capture_the_flag/medieval_sim/medisim_game.dm @@ -23,7 +23,7 @@ return var/mob/living/carbon/human/human_knight = . randomize_human_normie(human_knight) - human_knight.dna.add_mutation(/datum/mutation/human/medieval, MUT_OTHER) + human_knight.dna.add_mutation(/datum/mutation/medieval, MUTATION_SOURCE_MEDIEVAL_CTF) var/oldname = human_knight.name var/title = "error" switch (human_knight.gender) diff --git a/code/modules/cargo/bounties/science.dm b/code/modules/cargo/bounties/science.dm index be0edbe1eb6..ca88b19de40 100644 --- a/code/modules/cargo/bounties/science.dm +++ b/code/modules/cargo/bounties/science.dm @@ -44,7 +44,7 @@ return FALSE var/inst_total = 0 for(var/pot_mut in mutator.add_mutations) - var/datum/mutation/human/mutation = pot_mut + var/datum/mutation/mutation = pot_mut if(initial(mutation.quality) != POSITIVE) continue inst_total += mutation.instability diff --git a/code/modules/clothing/outfits/ert.dm b/code/modules/clothing/outfits/ert.dm index 1d5171d6114..4d55fee7a98 100644 --- a/code/modules/clothing/outfits/ert.dm +++ b/code/modules/clothing/outfits/ert.dm @@ -289,9 +289,7 @@ if(visuals_only) return ADD_TRAIT(H.mind, TRAIT_NAIVE, INNATE_TRAIT) - H.dna.add_mutation(/datum/mutation/human/clumsy) - for(var/datum/mutation/human/clumsy/M in H.dna.mutations) - M.mutadone_proof = TRUE + H.dna.add_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) /datum/outfit/centcom/centcom_intern name = "CentCom Intern" diff --git a/code/modules/deathmatch/deathmatch_loadouts.dm b/code/modules/deathmatch/deathmatch_loadouts.dm index ceddf4d2fa1..92e31e18eb0 100644 --- a/code/modules/deathmatch/deathmatch_loadouts.dm +++ b/code/modules/deathmatch/deathmatch_loadouts.dm @@ -31,7 +31,7 @@ new_ability.Grant(user) for(var/mutation in mutations_to_add) - user.dna.add_mutation(mutation) + user.dna.add_mutation(mutation, MUTATION_SOURCE_GHOST_ROLE) /datum/outfit/deathmatch_loadout/naked name = "Deathmatch: Naked" @@ -1105,8 +1105,8 @@ /datum/action/cooldown/spell/smoke/lesser ) mutations_to_add = list( - /datum/mutation/human/medieval, - /datum/mutation/human/lay_on_hands, // useless, but fun + /datum/mutation/medieval, + /datum/mutation/lay_on_hands, // useless, but fun ) // Rat'var Apostate diff --git a/code/modules/events/wizard/imposter.dm b/code/modules/events/wizard/imposter.dm index 110f6afa5f6..7e1e4c7847c 100644 --- a/code/modules/events/wizard/imposter.dm +++ b/code/modules/events/wizard/imposter.dm @@ -18,7 +18,7 @@ return //Sad Trombone new /obj/effect/particle_effect/fluid/smoke(W.loc) var/mob/living/carbon/human/I = new /mob/living/carbon/human(W.loc) - W.dna.transfer_identity(I, transfer_SE=1) + W.dna.copy_dna(I.dna, COPY_DNA_SE|COPY_DNA_SPECIES) I.real_name = I.dna.real_name I.name = I.dna.real_name I.updateappearance(mutcolor_update=1) diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm index 569e33728f2..9f2b42231b7 100644 --- a/code/modules/jobs/job_types/clown.dm +++ b/code/modules/jobs/job_types/clown.dm @@ -100,9 +100,7 @@ return H.fully_replace_character_name(H.real_name, pick(GLOB.clown_names)) //rename the mob AFTER they're equipped so their ID gets updated properly. - H.dna.add_mutation(/datum/mutation/human/clumsy) - for(var/datum/mutation/human/clumsy/M in H.dna.mutations) - M.mutadone_proof = TRUE + H.dna.add_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) var/datum/atom_hud/fan = GLOB.huds[DATA_HUD_FAN] fan.show_to(H) H.faction |= FACTION_CLOWN diff --git a/code/modules/library/bibles.dm b/code/modules/library/bibles.dm index ab4fbb2873b..4b84c32873e 100644 --- a/code/modules/library/bibles.dm +++ b/code/modules/library/bibles.dm @@ -168,10 +168,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list( switch(icon_state) if("honk1") - user.dna.add_mutation(/datum/mutation/human/clumsy) + user.dna.add_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) user.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(user), ITEM_SLOT_MASK) if("honk2") - user.dna.add_mutation(/datum/mutation/human/clumsy) + user.dna.add_mutation(/datum/mutation/clumsy, MUTATION_SOURCE_CLOWN_CLUMSINESS) user.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(user), ITEM_SLOT_MASK) if("insuls") var/obj/item/clothing/gloves/color/fyellow/insuls = new diff --git a/code/modules/mapfluff/ruins/objects_and_mobs/sin_ruins.dm b/code/modules/mapfluff/ruins/objects_and_mobs/sin_ruins.dm index 72c4fe3ce4a..706235be089 100644 --- a/code/modules/mapfluff/ruins/objects_and_mobs/sin_ruins.dm +++ b/code/modules/mapfluff/ruins/objects_and_mobs/sin_ruins.dm @@ -46,7 +46,7 @@ return user.real_name = H.dna.real_name - H.dna.transfer_identity(user, transfer_SE=1) + H.dna.copy_dna(user.dna, COPY_DNA_SE|COPY_DNA_SPECIES) user.updateappearance(mutcolor_update=1) user.domutcheck() user.visible_message(span_warning("[user]'s appearance shifts into [H]'s!"), \ diff --git a/code/modules/mining/lavaland/mining_loot/megafauna/demonic_frost_miner.dm b/code/modules/mining/lavaland/mining_loot/megafauna/demonic_frost_miner.dm index 9544e9632c2..b7b51fd5f90 100644 --- a/code/modules/mining/lavaland/mining_loot/megafauna/demonic_frost_miner.dm +++ b/code/modules/mining/lavaland/mining_loot/megafauna/demonic_frost_miner.dm @@ -24,7 +24,7 @@ var/typepath = user.type var/mob/living/carbon/clone = new typepath(user.loc) clone.real_name = user.real_name - INVOKE_ASYNC(user.dna, TYPE_PROC_REF(/datum/dna, transfer_identity), clone) + INVOKE_ASYNC(user.dna, TYPE_PROC_REF(/datum/dna, copy_dna), clone.dna, COPY_DNA_SE|COPY_DNA_SPECIES) clone.updateappearance(mutcolor_update=1) var/turf/T = find_maintenance_spawn(atmos_sensitive = TRUE, require_darkness = TRUE) || find_safe_turf() user.forceMove(T) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index e675994db58..0349f56db5f 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -106,7 +106,7 @@ /// Assoc list of BODY_ZONE -> wounding_type. Set when a limb is dismembered, unset when one is attached. Used for determining what scar to add when it comes time to generate them. var/list/body_zone_dismembered_by - /// Simple modifier for whether this mob can handle greater or lesser skillchip complexity. See /datum/mutation/human/biotechcompat/ for example. + /// Simple modifier for whether this mob can handle greater or lesser skillchip complexity. See /datum/mutation/biotechcompat/ for example. var/skillchip_complexity_modifier = 0 /// Can other carbons be shoved into this one to make it fall? diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 8af474c9d2e..ccc66e12bc9 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -122,7 +122,7 @@ GLOBAL_LIST_EMPTY(features_by_species) ///To use MUTCOLOR with a fixed color that's independent of the mcolor feature in DNA. var/fixed_mut_color = "" ///Special mutation that can be found in the genepool exclusively in this species. Dont leave empty or changing species will be a headache - var/inert_mutation = /datum/mutation/human/dwarfism + var/inert_mutation = /datum/mutation/dwarfism ///Used to set the mob's death_sound upon species change var/death_sound ///Special sound for grabbing @@ -458,7 +458,7 @@ GLOBAL_LIST_EMPTY(features_by_species) //If their inert mutation is not the same, swap it out if((inert_mutation != new_species.inert_mutation) && LAZYLEN(human.dna.mutation_index) && (inert_mutation in human.dna.mutation_index)) - human.dna.remove_mutation(inert_mutation) + human.dna.remove_mutation(inert_mutation, MUTATION_SOURCE_ACTIVATED) //keep it at the right spot, so we can't have people taking shortcuts var/location = human.dna.mutation_index.Find(inert_mutation) human.dna.mutation_index[location] = new_species.inert_mutation diff --git a/code/modules/mob/living/carbon/human/dummy.dm b/code/modules/mob/living/carbon/human/dummy.dm index fc081ef8d86..467b4e3f698 100644 --- a/code/modules/mob/living/carbon/human/dummy.dm +++ b/code/modules/mob/living/carbon/human/dummy.dm @@ -181,7 +181,7 @@ GLOBAL_LIST_EMPTY(dummy_mob_list) if(iscarbon(target)) var/mob/living/carbon/carbon_target = target - carbon_target.dna.transfer_identity(copycat, transfer_SE = TRUE) + carbon_target.dna.copy_dna(copycat.dna, COPY_DNA_SE|COPY_DNA_SPECIES) if(ishuman(target)) var/mob/living/carbon/human/human_target = target diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8a946b22aa1..2e5b890cb34 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -751,9 +751,9 @@ /mob/living/carbon/human/fully_heal(heal_flags = HEAL_ALL) if(heal_flags & HEAL_NEGATIVE_MUTATIONS) - for(var/datum/mutation/human/existing_mutation in dna.mutations) + for(var/datum/mutation/existing_mutation in dna.mutations) if(existing_mutation.quality != POSITIVE && existing_mutation.remove_on_aheal) - dna.remove_mutation(existing_mutation) + dna.remove_mutation(existing_mutation, list(MUTATION_SOURCE_ACTIVATED, MUTATION_SOURCE_MUTATOR, MUTATION_SOURCE_TIMED_INJECTOR)) if(heal_flags & HEAL_TEMP) set_coretemperature(get_body_temp_normal(apply_change = FALSE)) @@ -813,20 +813,22 @@ if(!check_rights(R_SPAWN)) return var/list/options = list("Clear"="Clear") - for(var/x in subtypesof(/datum/mutation/human)) - var/datum/mutation/human/mut = x + for(var/x in subtypesof(/datum/mutation)) + var/datum/mutation/mut = x var/name = initial(mut.name) options[dna.check_mutation(mut) ? "[name] (Remove)" : "[name] (Add)"] = mut var/result = input(usr, "Choose mutation to add/remove","Mutation Mod") as null|anything in sort_list(options) if(result) if(result == "Clear") - dna.remove_all_mutations() + for(var/datum/mutation/mutation as anything in dna.mutations) + dna.remove_mutation(mutation, mutation.sources) else var/mut = options[result] if(dna.check_mutation(mut)) - dna.remove_mutation(mut) + var/datum/mutation/mutation = dna.get_mutation(mut) + dna.remove_mutation(mut, mutation.sources) else - dna.add_mutation(mut) + dna.add_mutation(mut, MUTATION_SOURCE_VV) if(href_list[VV_HK_MOD_QUIRKS]) if(!check_rights(R_SPAWN)) @@ -1141,12 +1143,9 @@ /mob/living/carbon/human/proc/crewlike_monkify() if(!ismonkey(src)) set_species(/datum/species/monkey) - dna.add_mutation(/datum/mutation/human/clever) // Can't make them human or nonclever. At least not with the easy and boring way out. - for(var/datum/mutation/human/mutation as anything in dna.mutations) - mutation.mutadone_proof = TRUE - mutation.instability = 0 - mutation.class = MUT_OTHER + dna.add_mutation(/datum/mutation/clever, MUTATION_SOURCE_CREW_MONKEY) + dna.add_mutation(/datum/mutation/race, MUTATION_SOURCE_CREW_MONKEY) add_traits(list(TRAIT_NO_DNA_SCRAMBLE, TRAIT_BADDNA, TRAIT_BORN_MONKEY), SPECIES_TRAIT) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 6fcba82dc2a..701e94be0bf 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -293,17 +293,14 @@ clone.age = age clone.voice = voice clone.pitch = pitch - dna.transfer_identity(clone, transfer_SE = TRUE, transfer_species = TRUE) + dna.copy_dna(clone.dna, COPY_DNA_SE|COPY_DNA_SPECIES|COPY_DNA_MUTATIONS) clone.dress_up_as_job(SSjob.get_job(job)) for(var/datum/quirk/original_quircks as anything in quirks) clone.add_quirk(original_quircks.type, override_client = client) - for(var/datum/mutation/human/mutations in dna.mutations) - clone.dna.add_mutation(mutations, MUT_NORMAL) clone.updateappearance(mutcolor_update = TRUE, mutations_overlay_update = TRUE) - clone.domutcheck() return clone diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6befcb5c9fe..de8b87733ea 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -31,8 +31,8 @@ if(!HAS_TRAIT(src, TRAIT_STASIS)) if(stat != DEAD) //handle active mutations - for(var/datum/mutation/human/human_mutation as anything in dna.mutations) - human_mutation.on_life(seconds_per_tick, times_fired) + for(var/datum/mutation/mutation as anything in dna.mutations) + mutation.on_life(seconds_per_tick, times_fired) //heart attack stuff handle_heart(seconds_per_tick, times_fired) //handles liver failure effects, if we lack a liver diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 81749c6028a..63dbceedb60 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -311,13 +311,12 @@ var/mob/living/carbon/human/spare = new /mob/living/carbon/human(H.loc) spare.underwear = "Nude" - H.dna.transfer_identity(spare, transfer_SE=1) + H.dna.copy_dna(spare.dna, COPY_DNA_SE|COPY_DNA_SPECIES|COPY_DNA_MUTATIONS) spare.dna.features["mcolor"] = "#[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]" spare.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK) spare.real_name = spare.dna.real_name spare.name = spare.dna.real_name spare.updateappearance(mutcolor_update=1) - spare.domutcheck() spare.Move(get_step(H.loc, pick(NORTH,SOUTH,EAST,WEST))) // BUBBER ADDITION START - NANITES diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 4927f55130e..2fe4a902fd2 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -25,7 +25,7 @@ meat = /obj/item/food/meat/slab/human/mutant/lizard skinned_type = /obj/item/stack/sheet/animalhide/lizard exotic_bloodtype = BLOOD_TYPE_LIZARD - inert_mutation = /datum/mutation/human/firebreath + inert_mutation = /datum/mutation/firebreath death_sound = 'sound/mobs/humanoids/lizard/deathsound.ogg' species_language_holder = /datum/language_holder/lizard digitigrade_customization = DIGITIGRADE_OPTIONAL diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index 952849a583d..5dbfd263448 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -45,15 +45,14 @@ if (pref_load) ADD_TRAIT(human_who_gained_species, TRAIT_BORN_MONKEY, INNATE_TRAIT) // Not a species trait, you cannot escape your genetic destiny passtable_on(human_who_gained_species, SPECIES_TRAIT) - human_who_gained_species.dna.add_mutation(/datum/mutation/human/race, MUT_NORMAL) - human_who_gained_species.dna.activate_mutation(/datum/mutation/human/race) + human_who_gained_species.dna.add_mutation(/datum/mutation/race, MUTATION_SOURCE_ACTIVATED) human_who_gained_species.AddElement(/datum/element/human_biter) human_who_gained_species.update_mob_height() /datum/species/monkey/on_species_loss(mob/living/carbon/human/C) . = ..() passtable_off(C, SPECIES_TRAIT) - C.dna.remove_mutation(/datum/mutation/human/race) + C.dna.remove_mutation(/datum/mutation/race, MUTATION_SOURCE_ACTIVATED) C.RemoveElement(/datum/element/human_biter) C.update_mob_height() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index cbc7c6d6efa..42219585f86 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -598,9 +598,6 @@ dna.previous.Remove("blood_type") dna.temporary_mutations.Remove(mut) continue - for(var/datum/mutation/human/HM in dna.mutations) - if(HM?.timeout) - dna.remove_mutation(HM.type) /** * Handles calling metabolization for dead people. diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index ef62bc031f8..fe1b697352b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1452,7 +1452,7 @@ return FALSE var/datum/dna/mob_DNA = has_dna() - if(!mob_DNA || !mob_DNA.check_mutation(/datum/mutation/human/telekinesis) || !tkMaxRangeCheck(src, target)) + if(!mob_DNA || !mob_DNA.check_mutation(/datum/mutation/telekinesis) || !tkMaxRangeCheck(src, target)) if(!(action_bitflags & SILENT_ADJACENCY)) to_chat(src, span_warning("You are too far away!")) return FALSE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9c24eb728dc..3f9466d2f2e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1126,7 +1126,7 @@ if (Adjacent(A)) return TRUE var/datum/dna/mob_dna = has_dna() - if(mob_dna?.check_mutation(/datum/mutation/human/telekinesis) && tkMaxRangeCheck(src, A)) + if(mob_dna?.check_mutation(/datum/mutation/telekinesis) && tkMaxRangeCheck(src, A)) return TRUE var/obj/item/item_in_hand = get_active_held_item() if(istype(item_in_hand, /obj/item/machine_remote)) diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index b73df686d44..6d8dcd03a7e 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -50,7 +50,7 @@ if(has_dna() && desired_mob.has_dna()) var/mob/living/carbon/old_mob = src var/mob/living/carbon/new_mob = desired_mob - old_mob.dna.transfer_identity(new_mob, transfer_species = FALSE) + old_mob.dna.copy_dna(new_mob.dna, NONE) new_mob.updateappearance(icon_update = TRUE, mutcolor_update = TRUE, mutations_overlay_update = TRUE) else if(ishuman(desired_mob) && (!ismonkey(desired_mob))) var/mob/living/carbon/human/new_human = desired_mob diff --git a/code/modules/mob_spawn/corpses/mining_corpses.dm b/code/modules/mob_spawn/corpses/mining_corpses.dm index a791296c6e4..284a6355436 100644 --- a/code/modules/mob_spawn/corpses/mining_corpses.dm +++ b/code/modules/mob_spawn/corpses/mining_corpses.dm @@ -77,7 +77,7 @@ /obj/effect/mob_spawn/corpse/human/legioninfested/dwarf/special(mob/living/carbon/human/spawned_human) . = ..() - spawned_human.dna.add_mutation(/datum/mutation/human/dwarfism) + spawned_human.dna.add_mutation(/datum/mutation/dwarfism, MUTATION_SOURCE_MUTATOR) /// Corpse spawner used by snow legions with alternate costumes /obj/effect/mob_spawn/corpse/human/legioninfested/snow diff --git a/code/modules/mob_spawn/ghost_roles/mining_roles.dm b/code/modules/mob_spawn/ghost_roles/mining_roles.dm index aa413b31735..2d073481923 100644 --- a/code/modules/mob_spawn/ghost_roles/mining_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/mining_roles.dm @@ -107,7 +107,7 @@ . = ..() if(visuals_only) return - bum.dna.add_mutation(/datum/mutation/human/stoner) + bum.dna.add_mutation(/datum/mutation/stoner, MUTATION_SOURCE_GHOST_ROLE) /datum/outfit/beachbum/lifeguard name = "Beach Lifeguard" diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm index 1b2590b3c0e..4de59b85e31 100644 --- a/code/modules/power/lighting/light.dm +++ b/code/modules/power/lighting/light.dm @@ -621,7 +621,7 @@ if(protected || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS)) to_chat(user, span_notice("You remove the light [fitting].")) - else if(istype(user) && user.dna.check_mutation(/datum/mutation/human/telekinesis)) + else if(istype(user) && user.dna.check_mutation(/datum/mutation/telekinesis)) to_chat(user, span_notice("You telekinetically remove the light [fitting].")) else var/obj/item/bodypart/affecting = user.get_active_hand() diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm index 690900a2d0f..dc430c6e4ef 100644 --- a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm @@ -588,20 +588,20 @@ Basically, we fill the time between now and 2s from now with hands based off the if(!affected_carbon.dna) return var/list/speech_options = list( - /datum/mutation/human/swedish, - /datum/mutation/human/unintelligible, - /datum/mutation/human/stoner, - /datum/mutation/human/medieval, - /datum/mutation/human/wacky, - /datum/mutation/human/piglatin, - /datum/mutation/human/nervousness, - /datum/mutation/human/mute, + /datum/mutation/swedish, + /datum/mutation/unintelligible, + /datum/mutation/stoner, + /datum/mutation/medieval, + /datum/mutation/wacky, + /datum/mutation/piglatin, + /datum/mutation/nervousness, + /datum/mutation/mute, ) speech_options = shuffle(speech_options) for(var/option in speech_options) - if(affected_carbon.dna.get_mutation(option)) + if(affected_carbon.dna.get_mutation(option, MUTATION_SOURCE_MANNITOIL)) continue - affected_carbon.dna.add_mutation(option) + affected_carbon.dna.add_mutation(option, MUTATION_SOURCE_MANNITOIL) speech_option = option return @@ -610,7 +610,7 @@ Basically, we fill the time between now and 2s from now with hands based off the if(!iscarbon(affected_mob)) return var/mob/living/carbon/carbon = affected_mob - carbon.dna?.remove_mutation(speech_option) + carbon.dna?.remove_mutation(speech_option, MUTATION_SOURCE_MANNITOIL) /datum/reagent/inverse/neurine name = "Neruwhine" diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 10ed8b31706..c2ce97d46a4 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1178,7 +1178,8 @@ var/mob/living/carbon/human/human_mob = affected_mob if (ismonkey(human_mob)) if (!HAS_TRAIT(human_mob, TRAIT_BORN_MONKEY)) - human_mob.dna.remove_mutation(/datum/mutation/human/race, mutadone = FALSE) // This is the only time mutadone should remove monkeyism + //This is the only time mutadone should remove monkeyism + human_mob.dna.remove_mutation(/datum/mutation/race, list(MUTATION_SOURCE_ACTIVATED, MUTATION_SOURCE_MUTATOR)) else if (HAS_TRAIT(human_mob, TRAIT_BORN_MONKEY)) human_mob.monkeyize() @@ -1187,7 +1188,8 @@ . = ..() affected_mob.remove_status_effect(/datum/status_effect/jitter) if(affected_mob.has_dna()) - affected_mob.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), TRUE) + affected_mob.dna.remove_mutation_group(affected_mob.dna.mutations - /datum/mutation/race, GLOB.standard_mutation_sources) + affected_mob.dna.scrambled = FALSE /datum/reagent/medicine/antihol name = "Antihol" diff --git a/code/modules/religion/burdened/burdened_trauma.dm b/code/modules/religion/burdened/burdened_trauma.dm index 90911895de8..74dc8527274 100644 --- a/code/modules/religion/burdened/burdened_trauma.dm +++ b/code/modules/religion/burdened/burdened_trauma.dm @@ -45,7 +45,7 @@ update_burden(TRUE, silent = TRUE) if (owner.dna) - for (var/datum/mutation/human/mutation in owner.dna.mutations) + for (var/datum/mutation/mutation in owner.dna.mutations) if (mutation.quality == NEGATIVE) update_burden(TRUE, silent = TRUE) @@ -108,15 +108,15 @@ else if (!silent) to_chat(owner, span_warning("The weight on your shoulders feels lighter. You have lost some universal truths.")) - dna.remove_mutation(/datum/mutation/human/telepathy) - dna.remove_mutation(/datum/mutation/human/unintelligible) + dna.remove_mutation(/datum/mutation/telepathy, MUTATION_SOURCE_BURDENED_TRAUMA) + dna.remove_mutation(/datum/mutation/unintelligible, MUTATION_SOURCE_BURDENED_TRAUMA) owner.remove_filter("burden_outline") if(3) if(increase) if (!silent) to_chat(owner, span_notice("Your suffering is only a fraction of [GLOB.deity]'s, and yet the universal truths are coming to you.")) - dna.add_mutation(/datum/mutation/human/telepathy) - dna.add_mutation(/datum/mutation/human/unintelligible) + dna.add_mutation(/datum/mutation/telepathy, MUTATION_SOURCE_BURDENED_TRAUMA) + dna.add_mutation(/datum/mutation/unintelligible, MUTATION_SOURCE_BURDENED_TRAUMA) owner.add_filter("burden_outline", 9, list("type" = "outline", "color" = "#6c6eff")) else if (!silent) @@ -134,14 +134,14 @@ else if (!silent) to_chat(owner, span_warning("The weight on your shoulders feels lighter. You have lost some universal truths.")) - dna.remove_mutation(/datum/mutation/human/telekinesis) - dna.remove_mutation(/datum/mutation/human/mindreader) + dna.remove_mutation(/datum/mutation/telekinesis, MUTATION_SOURCE_BURDENED_TRAUMA) + dna.remove_mutation(/datum/mutation/mindreader, MUTATION_SOURCE_BURDENED_TRAUMA) if(6) if(increase) if (!silent) to_chat(owner, span_notice("Your suffering is respectful, your scars immaculate. More universal truths are clear, but you do not fully understand yet.")) - dna.add_mutation(/datum/mutation/human/telekinesis) - dna.add_mutation(/datum/mutation/human/mindreader) + dna.add_mutation(/datum/mutation/telekinesis, MUTATION_SOURCE_BURDENED_TRAUMA) + dna.add_mutation(/datum/mutation/mindreader, MUTATION_SOURCE_BURDENED_TRAUMA) else if (!silent) to_chat(owner, span_warning("The weight on your shoulders feels lighter. You feel like you're about to forget.")) @@ -241,14 +241,14 @@ update_burden(increase = FALSE) /// Signal to increase burden_level (see update_burden proc) if a mutation is added -/datum/brain_trauma/special/burdened/proc/mutation_added_burden(mob/living/carbon/burdened, datum/mutation/human/mutation_type, class) +/datum/brain_trauma/special/burdened/proc/mutation_added_burden(mob/living/carbon/burdened, datum/mutation/mutation_type, class) SIGNAL_HANDLER if(initial(mutation_type.quality) == NEGATIVE) update_burden(increase = TRUE) /// Signal to decrease burden_level (see update_burden proc) if a mutation is removed -/datum/brain_trauma/special/burdened/proc/mutation_removed_burden(mob/living/carbon/burdened, datum/mutation/human/mutation_type) +/datum/brain_trauma/special/burdened/proc/mutation_removed_burden(mob/living/carbon/burdened, datum/mutation/mutation_type) SIGNAL_HANDLER if(initial(mutation_type.quality) == NEGATIVE) diff --git a/code/modules/religion/rites.dm b/code/modules/religion/rites.dm index 6bf7bdde522..2c49b8e3ec0 100644 --- a/code/modules/religion/rites.dm +++ b/code/modules/religion/rites.dm @@ -256,8 +256,8 @@ var/mob/living/carbon/vomitorium = user vomitorium.vomit(VOMIT_CATEGORY_DEFAULT) var/datum/dna/dna = vomitorium.has_dna() - dna?.add_mutation(/datum/mutation/human/stimmed) //some fluff mutations - dna?.add_mutation(/datum/mutation/human/strong) + dna?.add_mutation(/datum/mutation/stimmed, MUTATION_SOURCE_MAINT_ADAPT) //some fluff mutations + dna?.add_mutation(/datum/mutation/strong, MUTATION_SOURCE_MAINT_ADAPT) user.mind.add_addiction_points(/datum/addiction/maintenance_drugs, 1000)//ensure addiction /datum/religion_rites/adapted_eyes diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index fb419a60f1a..6d37ec13d01 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -140,13 +140,13 @@ /datum/status_effect/slime_clone/on_apply() var/typepath = owner.type - clone = new typepath(owner.loc) - var/mob/living/carbon/O = owner - var/mob/living/carbon/C = clone - if(istype(C) && istype(O)) - C.real_name = O.real_name - O.dna.transfer_identity(C) - C.updateappearance(mutcolor_update=1) + clone = new typepath(owner.drop_location()) + if(iscarbon(owner) && iscarbon(clone)) + var/mob/living/carbon/carbon_owner = owner + var/mob/living/carbon/carbon_clone = clone + carbon_clone.real_name = carbon_owner.real_name + carbon_owner.dna.copy_dna(carbon_clone.dna, COPY_DNA_SE|COPY_DNA_SPECIES) + carbon_clone.updateappearance(mutcolor_update = TRUE) if(owner.mind) originalmind = owner.mind owner.mind.transfer_to(clone) @@ -749,13 +749,13 @@ /datum/status_effect/stabilized/cerulean/on_apply() var/typepath = owner.type - clone = new typepath(owner.loc) - var/mob/living/carbon/O = owner - var/mob/living/carbon/C = clone - if(istype(C) && istype(O)) - C.real_name = O.real_name - O.dna.transfer_identity(C) - C.updateappearance(mutcolor_update=1) + clone = new typepath(owner.drop_location()) + if(iscarbon(owner) && iscarbon(clone)) + var/mob/living/carbon/carbon_owner = owner + var/mob/living/carbon/carbon_clone = clone + carbon_clone.real_name = carbon_owner.real_name + carbon_owner.dna.copy_dna(carbon_clone.dna, COPY_DNA_SE|COPY_DNA_SPECIES) + carbon_clone.updateappearance(mutcolor_update = TRUE) return ..() /datum/status_effect/stabilized/cerulean/tick(seconds_between_ticks) @@ -818,7 +818,7 @@ var/mob/living/carbon/human/H = owner originalDNA = new H.dna.type originalname = H.real_name - H.dna.copy_dna(originalDNA) + H.dna.copy_dna(originalDNA, COPY_DNA_SE|COPY_DNA_SPECIES) randomize_human(H) return ..() @@ -832,10 +832,11 @@ /datum/status_effect/stabilized/green/on_remove() to_chat(owner, span_notice("You feel more like yourself.")) if(ishuman(owner)) - var/mob/living/carbon/human/H = owner - originalDNA.transfer_identity(H) - H.real_name = originalname - H.updateappearance(mutcolor_update=1) + var/mob/living/carbon/human/human = owner + originalDNA.copy_dna(human.dna, COPY_DNA_SE|COPY_DNA_SPECIES|COPY_DNA_MUTATIONS) + human.real_name = originalname + human.updateappearance(mutcolor_update=1) + originalDNA = null /datum/status_effect/brokenpeace id = "brokenpeace" diff --git a/code/modules/research/xenobiology/crossbreeding/regenerative.dm b/code/modules/research/xenobiology/crossbreeding/regenerative.dm index a0d9a1e89ef..8e09f4c5707 100644 --- a/code/modules/research/xenobiology/crossbreeding/regenerative.dm +++ b/code/modules/research/xenobiology/crossbreeding/regenerative.dm @@ -249,12 +249,12 @@ Regenerative extracts: to_chat(user, span_warning("The milky goo flows over [target], falling into a weak puddle.")) var/mob/living/dummy = new dummytype(target.loc) to_chat(target, span_notice("The milky goo flows from your skin, forming an imperfect copy of you.")) - if(iscarbon(target)) - var/mob/living/carbon/T = target - var/mob/living/carbon/D = dummy - T.dna.transfer_identity(D) - D.updateappearance(mutcolor_update=1) - D.real_name = T.real_name + if(iscarbon(target) && iscarbon(dummy)) + var/mob/living/carbon/carbon_target = target + var/mob/living/carbon/carbon_dummy = dummy + carbon_dummy.real_name = carbon_target.real_name + carbon_target.dna.copy_dna(carbon_dummy.dna, COPY_DNA_SE|COPY_DNA_SPECIES) + carbon_dummy.updateappearance(mutcolor_update = TRUE) dummy.adjustBruteLoss(target.getBruteLoss()) dummy.adjustFireLoss(target.getFireLoss()) dummy.adjustToxLoss(target.getToxLoss()) diff --git a/code/modules/spells/spell_types/self/mutate.dm b/code/modules/spells/spell_types/self/mutate.dm index e7392a986d8..5aa827135c7 100644 --- a/code/modules/spells/spell_types/self/mutate.dm +++ b/code/modules/spells/spell_types/self/mutate.dm @@ -25,7 +25,7 @@ /datum/action/cooldown/spell/apply_mutations/cast(mob/living/carbon/human/cast_on) . = ..() for(var/mutation in mutations_to_add) - cast_on.dna.add_mutation(mutation) + cast_on.dna.add_mutation(mutation, MUTATION_SOURCE_SPELL) addtimer(CALLBACK(src, PROC_REF(remove_mutations), cast_on), mutation_duration, TIMER_DELETE_ME) /// Removes the mutations we added from casting our spell @@ -34,7 +34,7 @@ return for(var/mutation in mutations_to_add) - cast_on.dna.remove_mutation(mutation) + cast_on.dna.remove_mutation(mutation, MUTATION_SOURCE_SPELL) /datum/action/cooldown/spell/apply_mutations/mutate name = "Mutate" @@ -46,7 +46,7 @@ invocation = "BIRUZ BENNAR!" invocation_type = INVOCATION_SHOUT - mutations_to_add = list(/datum/mutation/human/laser_eyes, /datum/mutation/human/hulk/wizardly, /datum/mutation/human/gigantism) + mutations_to_add = list(/datum/mutation/laser_eyes, /datum/mutation/hulk/wizardly, /datum/mutation/gigantism) mutation_duration = 30 SECONDS /datum/action/cooldown/spell/apply_mutations/mutate/cast(mob/living/carbon/human/cast_on) diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 5a14c0e16b6..001419406cc 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -128,13 +128,13 @@ if((user_weakref in power_lottery) || isdead(user)) return possible_powers = list( - /datum/mutation/human/breathless, - /datum/mutation/human/dextrous, - /datum/mutation/human/quick, - /datum/mutation/human/fire_immunity, - /datum/mutation/human/plasmocile, - /datum/mutation/human/quick_recovery, - /datum/mutation/human/tough, + /datum/mutation/breathless, + /datum/mutation/dextrous, + /datum/mutation/quick, + /datum/mutation/fire_immunity, + /datum/mutation/plasmocile, + /datum/mutation/quick_recovery, + /datum/mutation/tough, ) var/list/gained_mutation = list() gained_mutation += pick_n_take(possible_powers) @@ -157,8 +157,8 @@ if(user && completed) var/list/mutation_options = power_lottery[WEAKREF(user)] if(length(mutation_options)) - var/datum/mutation/human/mutation1 = mutation_options[1] - var/datum/mutation/human/mutation2 = mutation_options[2] + var/datum/mutation/mutation1 = mutation_options[1] + var/datum/mutation/mutation2 = mutation_options[2] data["used"] = FALSE data["choiceA"] = initial(mutation1.name) data["choiceB"] = initial(mutation2.name) @@ -178,21 +178,21 @@ if(plant_dna.len >= plants_max && animal_dna.len >= animals_max && human_dna.len >= dna_max) completed = TRUE -/obj/machinery/dna_vault/proc/upgrade(mob/living/carbon/human/H, upgrade_type) - var/datum/weakref/human_weakref = WEAKREF(H) +/obj/machinery/dna_vault/proc/upgrade(mob/living/carbon/human/target, upgrade_type) + var/datum/weakref/human_weakref = WEAKREF(target) var/static/list/associated_mutation = list( - "Breathless" = /datum/mutation/human/breathless, - "Dextrous" = /datum/mutation/human/dextrous, - "Quick" = /datum/mutation/human/quick, - "Fire Immunity" = /datum/mutation/human/fire_immunity, - "Plasmocile" = /datum/mutation/human/plasmocile, - "Quick Recovery" = /datum/mutation/human/quick_recovery, - "Tough" = /datum/mutation/human/tough, + "Breathless" = /datum/mutation/breathless, + "Dextrous" = /datum/mutation/dextrous, + "Quick" = /datum/mutation/quick, + "Fire Immunity" = /datum/mutation/fire_immunity, + "Plasmocile" = /datum/mutation/plasmocile, + "Quick Recovery" = /datum/mutation/quick_recovery, + "Tough" = /datum/mutation/tough, ) - if(!(associated_mutation[upgrade_type] in power_lottery[human_weakref]) || (HAS_TRAIT(H, TRAIT_USED_DNA_VAULT))) + if(!(associated_mutation[upgrade_type] in power_lottery[human_weakref]) || (HAS_TRAIT(target, TRAIT_USED_DNA_VAULT))) return - H.dna.add_mutation(associated_mutation[upgrade_type], MUT_OTHER, 0) - ADD_TRAIT(H, TRAIT_USED_DNA_VAULT, DNA_VAULT_TRAIT) + target.dna.add_mutation(associated_mutation[upgrade_type], MUTATION_SOURCE_DNA_VAULT) + ADD_TRAIT(target, TRAIT_USED_DNA_VAULT, DNA_VAULT_TRAIT) power_lottery[human_weakref] = list() use_energy(active_power_usage) diff --git a/code/modules/station_goals/vault_mutation.dm b/code/modules/station_goals/vault_mutation.dm index 173388feadc..e8eda5b2b1f 100644 --- a/code/modules/station_goals/vault_mutation.dm +++ b/code/modules/station_goals/vault_mutation.dm @@ -1,113 +1,106 @@ -/datum/mutation/human/breathless +/datum/mutation/breathless name = "Breathless" desc = "A mutation within the skin that allows for filtering and absorption of oxygen from the skin." text_gain_indication = span_notice("Your lungs feel great.") text_lose_indication = span_warning("Your lungs feel normal again.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/breathless/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/breathless/on_acquiring(mob/living/carbon/human/acquirer) . = ..() ADD_TRAIT(acquirer, TRAIT_NOBREATH, GENETIC_MUTATION) -/datum/mutation/human/breathless/on_losing(mob/living/carbon/human/owner)//this shouldnt happen under normal condition but just to be sure +/datum/mutation/breathless/on_losing(mob/living/carbon/human/owner)//this shouldnt happen under normal condition but just to be sure . = ..() REMOVE_TRAIT(owner, TRAIT_NOBREATH, GENETIC_MUTATION) -/datum/mutation/human/quick +/datum/mutation/quick name = "Quick" desc = "A mutation within the leg muscles that allows it to operate at 20% more than the usual capacity." text_gain_indication = span_notice("Your legs feel faster and stronger.") text_lose_indication = span_warning("Your legs feel weaker and slower.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/quick/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/quick/on_acquiring(mob/living/carbon/human/acquirer) . = ..() acquirer.add_movespeed_modifier(/datum/movespeed_modifier/dna_vault_speedup) -/datum/mutation/human/quick/on_losing(mob/living/carbon/human/owner) +/datum/mutation/quick/on_losing(mob/living/carbon/human/owner) . = ..() owner.remove_movespeed_modifier(/datum/movespeed_modifier/dna_vault_speedup) -/datum/mutation/human/tough +/datum/mutation/tough name = "Tough" desc = "A mutation within the epidermis that makes it more resistant to tear." text_gain_indication = span_notice("Your skin feels tougher.") text_lose_indication = span_warning("Your skin feels weaker.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/tough/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/tough/on_acquiring(mob/living/carbon/human/acquirer) . = ..() acquirer.physiology.brute_mod *= 0.7 ADD_TRAIT(acquirer, TRAIT_PIERCEIMMUNE, GENETIC_MUTATION) -/datum/mutation/human/tough/on_losing(mob/living/carbon/human/owner) +/datum/mutation/tough/on_losing(mob/living/carbon/human/owner) . = ..() owner.physiology.brute_mod /= 0.7 REMOVE_TRAIT(owner, TRAIT_PIERCEIMMUNE, GENETIC_MUTATION) -/datum/mutation/human/dextrous +/datum/mutation/dextrous name = "Dextrous" desc = "A mutation within the nerve system that allows for more responsive and quicker action." text_gain_indication = span_notice("Your limbs feel more dextrous and responsive.") text_lose_indication = span_warning("Your limbs feel less dextrous and responsive.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/dextrous/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/dextrous/on_acquiring(mob/living/carbon/human/acquirer) . = ..() acquirer.next_move_modifier *= 0.5 -/datum/mutation/human/dextrous/on_losing(mob/living/carbon/human/owner) +/datum/mutation/dextrous/on_losing(mob/living/carbon/human/owner) . = ..() owner.next_move_modifier /= 0.5 -/datum/mutation/human/fire_immunity +/datum/mutation/fire_immunity name = "Fire Immunity" desc = "A mutation within the body that allows it to become nonflammable and withstand higher temperature." text_gain_indication = span_notice("Your body feels like it can withstand fire.") text_lose_indication = span_warning("Your body feels vulnerable to fire again.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/fire_immunity/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/fire_immunity/on_acquiring(mob/living/carbon/human/acquirer) . = ..() acquirer.physiology.burn_mod *= 0.5 acquirer.add_traits(list(TRAIT_RESISTHEAT, TRAIT_NOFIRE), GENETIC_MUTATION) -/datum/mutation/human/fire_immunity/on_losing(mob/living/carbon/human/owner) +/datum/mutation/fire_immunity/on_losing(mob/living/carbon/human/owner) . = ..() owner.physiology.burn_mod /= 0.5 owner.remove_traits(list(TRAIT_RESISTHEAT, TRAIT_NOFIRE), GENETIC_MUTATION) -/datum/mutation/human/quick_recovery +/datum/mutation/quick_recovery name = "Quick Recovery" desc = "A mutation within the nervous system that allows it to recover from being knocked down." text_gain_indication = span_notice("You feel like you can recover from a fall easier.") text_lose_indication = span_warning("You feel like recovering from a fall is a challenge again.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/quick_recovery/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/quick_recovery/on_acquiring(mob/living/carbon/human/acquirer) . = ..() acquirer.physiology.stun_mod *= 0.5 -/datum/mutation/human/quick_recovery/on_losing(mob/living/carbon/human/owner) +/datum/mutation/quick_recovery/on_losing(mob/living/carbon/human/owner) . = ..() owner.physiology.stun_mod /= 0.5 -/datum/mutation/human/plasmocile +/datum/mutation/plasmocile name = "Plasmocile" desc = "A mutation in the lungs that provides it immunity to plasma's toxic nature." text_gain_indication = span_notice("Your lungs feel resistant to airborne contaminant.") text_lose_indication = span_warning("Your lungs feel vulnerable to airborne contaminant again.") locked = TRUE - mutadone_proof = TRUE -/datum/mutation/human/plasmocile/on_acquiring(mob/living/carbon/human/acquirer) +/datum/mutation/plasmocile/on_acquiring(mob/living/carbon/human/acquirer) . = ..() var/obj/item/organ/lungs/improved_lungs = acquirer.get_organ_slot(ORGAN_SLOT_LUNGS) ADD_TRAIT(owner, TRAIT_VIRUSIMMUNE, GENETIC_MUTATION) @@ -116,7 +109,7 @@ RegisterSignal(acquirer, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(remove_modification)) RegisterSignal(acquirer, COMSIG_CARBON_GAIN_ORGAN, PROC_REF(reapply_modification)) -/datum/mutation/human/plasmocile/on_losing(mob/living/carbon/human/owner) +/datum/mutation/plasmocile/on_losing(mob/living/carbon/human/owner) . = ..() var/obj/item/organ/lungs/improved_lungs = owner.get_organ_slot(ORGAN_SLOT_LUNGS) REMOVE_TRAIT(owner, TRAIT_VIRUSIMMUNE, GENETIC_MUTATION) @@ -125,22 +118,22 @@ if(improved_lungs) remove_buff(improved_lungs) -/datum/mutation/human/plasmocile/proc/remove_modification(mob/source, obj/item/organ/old_organ) +/datum/mutation/plasmocile/proc/remove_modification(mob/source, obj/item/organ/old_organ) SIGNAL_HANDLER if(istype(old_organ, /obj/item/organ/lungs)) remove_buff(old_organ) -/datum/mutation/human/plasmocile/proc/reapply_modification(mob/source, obj/item/organ/new_organ) +/datum/mutation/plasmocile/proc/reapply_modification(mob/source, obj/item/organ/new_organ) SIGNAL_HANDLER if(istype(new_organ, /obj/item/organ/lungs)) apply_buff(new_organ) -/datum/mutation/human/plasmocile/proc/apply_buff(obj/item/organ/lungs/our_lungs) +/datum/mutation/plasmocile/proc/apply_buff(obj/item/organ/lungs/our_lungs) our_lungs.plas_breath_dam_min *= 0 our_lungs.plas_breath_dam_max *= 0 -/datum/mutation/human/plasmocile/proc/remove_buff(obj/item/organ/lungs/our_lungs) +/datum/mutation/plasmocile/proc/remove_buff(obj/item/organ/lungs/our_lungs) our_lungs.plas_breath_dam_min = initial(our_lungs.plas_breath_dam_min) our_lungs.plas_breath_dam_max = initial(our_lungs.plas_breath_dam_max) diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index b105646e3e6..a4eef854a11 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -126,10 +126,10 @@ if(!special) if(phantom_owner.dna) - for(var/datum/mutation/human/mutation as anything in phantom_owner.dna.mutations) //some mutations require having specific limbs to be kept. + for(var/datum/mutation/mutation as anything in phantom_owner.dna.mutations) //some mutations require having specific limbs to be kept. if(mutation.limb_req && (mutation.limb_req == body_zone)) to_chat(phantom_owner, span_warning("You feel your [mutation] deactivating from the loss of your [body_zone]!")) - phantom_owner.dna.force_lose(mutation) + phantom_owner.dna.remove_mutation(mutation, mutation.sources) update_icon_dropped() phantom_owner.update_health_hud() //update the healthdoll diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index 1a770d61588..a8fe0a46b4f 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -123,6 +123,6 @@ return UI_CLOSE /mob/living/carbon/human/shared_living_ui_distance(atom/movable/src_object, viewcheck = TRUE, allow_tk = TRUE) - if(allow_tk && dna.check_mutation(/datum/mutation/human/telekinesis) && tkMaxRangeCheck(src, src_object)) + if(allow_tk && dna.check_mutation(/datum/mutation/telekinesis) && tkMaxRangeCheck(src, src_object)) return UI_INTERACTIVE return ..() diff --git a/code/modules/unit_tests/blindness.dm b/code/modules/unit_tests/blindness.dm index 6ab6058aa61..8836f80611f 100644 --- a/code/modules/unit_tests/blindness.dm +++ b/code/modules/unit_tests/blindness.dm @@ -27,7 +27,7 @@ // Have to do a transfer here so we don't get a blindfold var/datum/quirk/item_quirk/blindness/quirk = allocate(/datum/quirk/item_quirk/blindness) quirk.add_to_holder(dummy, quirk_transfer = TRUE) - dummy.dna.add_mutation(/datum/mutation/human/blind) + dummy.dna.add_mutation(/datum/mutation/blind, "TEST") // Remove the blindfold. We should remain blinded QDEL_NULL(blindfold) @@ -36,7 +36,7 @@ dummy.remove_quirk(/datum/quirk/item_quirk/blindness) check_if_blind(dummy, status_message = "after removing their quirk BUT still being blinded") // Remove the mutation, this should unblind us - dummy.dna.remove_mutation(/datum/mutation/human/blind) + dummy.dna.remove_mutation(/datum/mutation/blind, "TEST") check_if_not_blind(dummy, status_message = "after removing their blind mutation and having no sources of blindness left") // Temp blindness diff --git a/code/modules/unit_tests/hulk.dm b/code/modules/unit_tests/hulk.dm index 52706e9ac73..bb4d5f06c4f 100644 --- a/code/modules/unit_tests/hulk.dm +++ b/code/modules/unit_tests/hulk.dm @@ -11,7 +11,7 @@ RegisterSignal(dummy, COMSIG_ATOM_HULK_ATTACK, PROC_REF(hulk_sig_fire)) RegisterSignal(dummy, COMSIG_ATOM_ATTACK_HAND, PROC_REF(hand_sig_fire)) - hulk.dna.add_mutation(/datum/mutation/human/hulk) + hulk.dna.add_mutation(/datum/mutation/hulk, "TEST") hulk.set_combat_mode(TRUE) hulk.ClickOn(dummy) @@ -36,7 +36,7 @@ var/obj/item/clothing/gloves/rapid/fotns = allocate(/obj/item/clothing/gloves/rapid) hulk.equip_to_appropriate_slot(fotns) - hulk.dna.add_mutation(/datum/mutation/human/hulk) + hulk.dna.add_mutation(/datum/mutation/hulk, "TEST") hulk.set_combat_mode(TRUE) hulk.ClickOn(dummy) diff --git a/tools/UpdatePaths/Scripts/91346_dna_console.txt b/tools/UpdatePaths/Scripts/91346_dna_console.txt new file mode 100644 index 00000000000..17f0c6f4848 --- /dev/null +++ b/tools/UpdatePaths/Scripts/91346_dna_console.txt @@ -0,0 +1 @@ +/obj/machinery/computer/scan_consolenew : /obj/machinery/computer/dna_console{@OLD} \ No newline at end of file