From f48f89f1db3773fa90d337cd95aee6bb86ac38f0 Mon Sep 17 00:00:00 2001 From: Cameron Lennox Date: Fri, 14 Mar 2025 17:34:03 -0400 Subject: [PATCH] Split NO_SCAN into two flags (#17226) * Split NO_SCAN into two flags * traits * species flags applied correctly by traits * fixed species flag toggling for traits * bold of you --------- Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com> --- code/__defines/species_languages.dm | 3 ++- code/game/antagonist/station/changeling.dm | 6 ++--- code/game/dna/dna2_domutcheck.dm | 4 +-- code/game/dna/dna2_helpers.dm | 12 ++++----- code/game/dna/dna_modifier.dm | 4 +-- .../gamemodes/changeling/powers/absorb.dm | 2 +- .../changeling/powers/extract_dna_sting.dm | 2 +- code/game/machinery/cloning.dm | 2 +- .../objects/items/weapons/dna_injector.dm | 6 ++--- code/game/objects/structures/morgue.dm | 2 +- code/modules/admin/player_effects.dm | 2 +- code/modules/admin/verbs/debug_vr.dm | 2 +- .../preference_setup/general/03_body.dm | 4 ++- code/modules/mob/living/carbon/human/human.dm | 14 ----------- .../mob/living/carbon/human/human_damage.dm | 10 ++++---- .../mob/living/carbon/human/human_organs.dm | 4 +-- .../carbon/human/species/lleill/lleill.dm | 2 +- .../carbon/human/species/outsider/event.dm | 5 +++- .../carbon/human/species/outsider/shadow.dm | 2 +- .../carbon/human/species/outsider/skeleton.dm | 2 +- .../carbon/human/species/outsider/vox.dm | 2 +- .../carbon/human/species/shadekin/shadekin.dm | 2 +- .../carbon/human/species/station/alraune.dm | 2 +- .../carbon/human/species/station/golem.dm | 2 +- .../human/species/station/prometheans.dm | 2 +- .../station/protean_vr/protean_species.dm | 2 +- .../carbon/human/species/station/station.dm | 2 +- .../species/station/station_special_vr.dm | 2 +- .../human/species/station/station_vr.dm | 2 +- .../species/station/traits_vr/negative.dm | 25 +++++++++++++++++++ .../species/station/traits_vr/positive.dm | 7 ++++++ .../human/species/station/traits_vr/trait.dm | 11 ++++++-- .../human/species/xenomorphs/alien_species.dm | 2 +- .../subtypes/slime/xenobio/consumption.dm | 2 +- code/modules/nifsoft/nif.dm | 2 +- code/modules/reagents/reagents/toxins.dm | 6 ++--- code/modules/resleeving/autoresleever.dm | 4 +-- 37 files changed, 99 insertions(+), 68 deletions(-) diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index a538c77ce0..e11b0a3dec 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -1,7 +1,7 @@ // Species flags. #define NO_MINOR_CUT 0x1 // Can step on broken glass with no ill-effects. Either thick skin (diona), cut resistant (slimes) or incorporeal (shadows) #define IS_PLANT 0x2 // Is a treeperson. -#define NO_SCAN 0x4 // Cannot be scanned in a DNA machine/genome-stolen. +#define NO_SLEEVE 0x4 // Cannot be resleeved by clonepods #define NO_PAIN 0x8 // Cannot suffer halloss/recieves deceptive health indicator. #define NO_SLIP 0x10 // Cannot fall over. #define NO_POISON 0x20 // Cannot not suffer toxloss. @@ -11,6 +11,7 @@ #define UNDEAD 0x200 // Various things that living things don't do, mostly for skeletons #define NO_INFECT 0x400 // Don't allow infections in limbs or organs, similar to IS_PLANT, without other strings. #define NO_DEFIB 0x800 // Don't allow them to be defibbed +#define NO_DNA 0x1000 // Cannot have mutations or have their dna changed by genetics/radiation/genome-stolen. // unused: 0x8000 - higher than this will overflow // Species EMP vuln for carbons diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm index e82fac7c8e..7a7be183f1 100644 --- a/code/game/antagonist/station/changeling.dm +++ b/code/game/antagonist/station/changeling.dm @@ -64,15 +64,15 @@ var/mob/living/carbon/human/H = player.current if(H.isSynthetic()) return 0 - if(H.species.flags & NO_SCAN) + if(H.species.flags & (NO_SLEEVE|NO_DNA)) return 0 return 1 else if(isnewplayer(player.current)) if(player.current.client && player.current.client.prefs) var/datum/species/S = GLOB.all_species[player.current.client.prefs.species] - if(S && (S.flags & NO_SCAN)) + if(S && (S.flags & (NO_SLEEVE|NO_DNA))) return 0 - if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic. + if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic. // TODO, this to issynthetic()? return 0 return 1 return 0 diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm index d710cce5ae..47f1e04daa 100644 --- a/code/game/dna/dna2_domutcheck.dm +++ b/code/game/dna/dna2_domutcheck.dm @@ -5,12 +5,12 @@ // flags: See below, bitfield. /proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0) - // Traitgenes NO_SCAN and Synthetics cannot be mutated + // Traitgenes NO_DNA and Synthetics cannot be mutated if(M.isSynthetic()) return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.species || H.species.flags & NO_SCAN) + if(!H.species || H.species.flags & NO_DNA) return // Traitgenes Sort genes into currently active, and deactivated... Genes that are active and may deactivate should do so before attempting to activate genes(to avoid conflicts blocking them!) var/list/enabled_genes = list() diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index b7a22e8fed..b3d87121da 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -23,12 +23,12 @@ // Give Random Bad Mutation to M /proc/randmutb(var/mob/living/M) if(!M || !(M.dna)) return - // Traitgenes NO_SCAN and Synthetics cannot be mutated + // Traitgenes NO_DNA and Synthetics cannot be mutated if(M.isSynthetic()) return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.species || H.species.flags & NO_SCAN) + if(!H.species || H.species.flags & NO_DNA) return M.dna.check_integrity() // Traitgenes Pick from bad traitgenes @@ -38,12 +38,12 @@ // Give Random Good Mutation to M /proc/randmutg(var/mob/living/M) if(!M || !(M.dna)) return - // Traitgenes NO_SCAN and Synthetics cannot be mutated + // Traitgenes NO_DNA and Synthetics cannot be mutated if(M.isSynthetic()) return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.species || H.species.flags & NO_SCAN) + if(!H.species || H.species.flags & NO_DNA) return M.dna.check_integrity() // Traitgenes Pick from good traitgenes @@ -53,12 +53,12 @@ // Scramble UI or SE. /proc/scramble(var/UI, var/mob/M, var/prob) if(!M || !(M.dna)) return - // Traitgenes edit begin - NO_SCAN and Synthetics cannot be mutated + // Traitgenes edit begin - NO_DNA and Synthetics cannot be mutated if(M.isSynthetic()) return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.species || H.species.flags & NO_SCAN) + if(!H.species || H.species.flags & NO_DNA) return // Traitgenes edit end M.dna.check_integrity() diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index e990ebd0b8..9dc056d614 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -467,13 +467,13 @@ occupantData["name"] = WC.real_name occupantData["stat"] = WC.stat occupantData["isViableSubject"] = 1 - // Traitgenes NO_SCAN and Synthetics cannot be mutated + // Traitgenes NO_DNA and Synthetics cannot be mutated var/allowed = TRUE if(WC.isSynthetic()) allowed = FALSE if(ishuman(WC)) var/mob/living/carbon/human/H = WC - if(!H.species || (H.species.flags & NO_SCAN)) + if(!H.species || (H.species.flags & NO_DNA)) allowed = FALSE if(!allowed || (NOCLONE in WC.mutations) || !WC.dna) occupantData["isViableSubject"] = 0 diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm index 1523855a12..8efc8f293f 100644 --- a/code/game/gamemodes/changeling/powers/absorb.dm +++ b/code/game/gamemodes/changeling/powers/absorb.dm @@ -24,7 +24,7 @@ to_chat(src, span_warning("\The [T] is not compatible with our biology.")) return - if(T.species.flags & NO_SCAN) + if(T.species.flags & (NO_DNA|NO_SLEEVE)) to_chat(src, span_warning("We do not know how to parse this creature's DNA!")) return diff --git a/code/game/gamemodes/changeling/powers/extract_dna_sting.dm b/code/game/gamemodes/changeling/powers/extract_dna_sting.dm index 3806b0ef33..66bb36c499 100644 --- a/code/game/gamemodes/changeling/powers/extract_dna_sting.dm +++ b/code/game/gamemodes/changeling/powers/extract_dna_sting.dm @@ -27,7 +27,7 @@ to_chat(src, span_warning("\The [T] is not compatible with our biology.")) return 0 - if(T.species.flags & NO_SCAN) + if(T.species.flags & (NO_DNA|NO_SLEEVE)) to_chat(src, span_warning("We do not know how to parse this creature's DNA!")) return 0 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index eb95d8e60d..ccdc300201 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -335,7 +335,7 @@ eject_wait = 0 //If it's still set somehow. if(ishuman(occupant)) //Need to be safe. var/mob/living/carbon/human/patient = occupant - if(!(patient.species.flags & NO_SCAN)) //If, for some reason, someone makes a genetically-unalterable clone, let's not make them permanently disabled. + if(!(patient.species.flags & NO_DNA)) //If, for some reason, someone makes a genetically-unalterable clone, let's not make them permanently disabled. domutcheck(occupant) //Waiting until they're out before possible transforming. occupant.UpdateAppearance() occupant = null diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index e6e7aafffe..67cc6edb40 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -71,16 +71,16 @@ L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0) L.apply_damage(max(2,L.getCloneLoss()), CLONE) - // Traitgenes edit begin - NO_SCAN and Synthetics cannot be mutated + // Traitgenes edit begin - NO_DNA and Synthetics cannot be mutated var/allow = TRUE if(M.isSynthetic()) allow = FALSE if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.species || H.species.flags & NO_SCAN) + if(!H.species || H.species.flags & NO_DNA) allow = FALSE // Traitgenes edit end - if (!(NOCLONE in M.mutations) && allow) // prevents drained people from having their DNA changed, Traitgenes edit - NO_SCAN and Synthetics cannot be mutated + if (!(NOCLONE in M.mutations) && allow) // prevents drained people from having their DNA changed, Traitgenes edit - NO_DNA and Synthetics cannot be mutated if(buf) if (buf.types & DNA2_BUF_UI) if (!block) //isolated block? diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 5af4964bf5..87a470c6c8 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -43,7 +43,7 @@ src.icon_state = "morgue2" get_occupants() for (var/mob/living/carbon/human/H in occupants) - if(H.isSynthetic() || H.suiciding || !H.ckey || !H.client || (NOCLONE in H.mutations) || (H.species && H.species.flags & NO_SCAN)) + if(H.isSynthetic() || H.suiciding || !H.ckey || !H.client || (NOCLONE in H.mutations) || (H.species && H.species.flags & NO_SLEEVE)) src.icon_state = "morgue2" break else diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index 38ddb64bf3..db66c7dd7b 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -652,7 +652,7 @@ if(Tar.nif) to_chat(user,span_warning("Target already has a NIF.")) return - if(Tar.species.flags & NO_SCAN) + if(Tar.species.flags & NO_DNA) var/obj/item/nif/S = /obj/item/nif/bioadap input_NIF = initial(S.name) new /obj/item/nif/bioadap(Tar) diff --git a/code/modules/admin/verbs/debug_vr.dm b/code/modules/admin/verbs/debug_vr.dm index e0240c4c79..3b9538d996 100644 --- a/code/modules/admin/verbs/debug_vr.dm +++ b/code/modules/admin/verbs/debug_vr.dm @@ -25,7 +25,7 @@ to_chat(usr,span_warning("Target already has a NIF.")) return - if(H.species.flags & NO_SCAN) + if(H.species.flags & NO_DNA) var/obj/item/nif/S = /obj/item/nif/bioadap input_NIF = initial(S.name) new /obj/item/nif/bioadap(H) diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 12e7b527be..c11d2b63c9 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -1211,8 +1211,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O dat += "
" + span_bold("Does not have a circulatory system.") if(!current_species.has_organ[O_LUNGS]) dat += "
" + span_bold("Does not have a respiratory system.") - if(current_species.flags & NO_SCAN) + if(current_species.flags & NO_DNA) dat += "
" + span_bold("Does not have DNA.") + if(current_species.flags & NO_SLEEVE) + dat += "
" + span_bold("Cannot be cloned.") if(current_species.flags & NO_DEFIB) dat += "
" + span_bold("Cannot be defibrillated.") if(current_species.flags & NO_PAIN) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fc1923b5b6..6c4fb97f4a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1487,20 +1487,6 @@ else return ..() -/mob/living/carbon/human/getDNA() - if(species.flags & NO_SCAN) - return null - if(isSynthetic()) - return - ..() - -/mob/living/carbon/human/setDNA() - if(species.flags & NO_SCAN) - return - if(isSynthetic()) - return - ..() - /mob/living/carbon/human/has_brain() if(internal_organs_by_name[O_BRAIN]) var/obj/item/organ/brain = internal_organs_by_name[O_BRAIN] diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index b59db0842b..d11114f062 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -221,13 +221,13 @@ ..() /mob/living/carbon/human/proc/Stasis(amount) - if((species.flags & NO_SCAN) || isSynthetic()) + if((species.flags & NO_DNA) || isSynthetic()) in_stasis = 0 else in_stasis = amount /mob/living/carbon/human/proc/getStasis() - if((species.flags & NO_SCAN) || isSynthetic()) + if((species.flags & NO_DNA) || isSynthetic()) return 0 return in_stasis @@ -241,12 +241,12 @@ return 0 /mob/living/carbon/human/getCloneLoss() - if((species.flags & NO_SCAN) || isSynthetic()) + if((species.flags & NO_DNA) || isSynthetic()) cloneloss = 0 return ..() /mob/living/carbon/human/setCloneLoss(var/amount) - if((species.flags & NO_SCAN) || isSynthetic()) + if((species.flags & NO_DNA) || isSynthetic()) cloneloss = 0 else ..() @@ -254,7 +254,7 @@ /mob/living/carbon/human/adjustCloneLoss(var/amount) ..() - if((species.flags & NO_SCAN) || isSynthetic()) + if((species.flags & NO_DNA) || isSynthetic()) cloneloss = 0 return diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 7eb1e01b45..505c360753 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -192,10 +192,10 @@ SHOULD_NOT_OVERRIDE(TRUE) //Don't. Even. /Think/. About. It. if(!dna || !species) return - // Traitgenes NO_SCAN and Synthetics cannot be mutated + // Traitgenes NO_DNA and Synthetics cannot be mutated if(isSynthetic()) return - if(species.flags & NO_SCAN) + if(species.flags & NO_DNA) return if(refresh_traits && species.traits) for(var/TR in species.traits) diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill.dm index 51cc7a8e3b..d285941ac8 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill.dm @@ -21,7 +21,7 @@ language = LANGUAGE_LLEILL name_language = LANGUAGE_LLEILL - flags = NO_SCAN | NO_MINOR_CUT | NO_INFECT | NO_HALLUCINATION + flags = NO_SLEEVE | NO_MINOR_CUT | NO_INFECT | NO_HALLUCINATION spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_UNDERWEAR diff --git a/code/modules/mob/living/carbon/human/species/outsider/event.dm b/code/modules/mob/living/carbon/human/species/outsider/event.dm index 32c3314b0b..ae0dc3b23e 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/event.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/event.dm @@ -197,7 +197,10 @@ Variables you may want to make use of are: flags ^= NO_SLIP /datum/species/event1/proc/toggle_cloning() - flags ^= NO_SCAN + flags ^= NO_SLEEVE + +/datum/species/event1/proc/toggle_dna() + flags ^= NO_DNA /datum/species/event1/proc/toggle_defibbing() flags ^= NO_DEFIB diff --git a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm index 0af5fede7f..05fbd9045b 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -20,7 +20,7 @@ remains_type = /obj/effect/decal/cleanable/ash death_message = "dissolves into ash..." - flags = NO_SCAN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_DEFIB + flags = NO_DNA | NO_SLEEVE | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_DEFIB spawn_flags = SPECIES_IS_RESTRICTED genders = list(NEUTER) diff --git a/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm b/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm index 73168b8e83..056d7199cd 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/skeleton.dm @@ -11,7 +11,7 @@ max_age = 110 health_hud_intensity = 1.5 - flags = NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_BLOOD | UNDEAD | NO_DEFIB + flags = NO_DNA | NO_SLEEVE | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_BLOOD | UNDEAD | NO_DEFIB spawn_flags = SPECIES_IS_RESTRICTED appearance_flags = null diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index e21efed663..e7c4744b63 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -48,7 +48,7 @@ ideal_air_type = /datum/gas_mixture/belly_air/vox siemens_coefficient = 0.2 - flags = NO_SCAN + flags = NO_DNA | NO_SLEEVE | NO_DEFIB spawn_flags = SPECIES_IS_WHITELISTED appearance_flags = HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_SKIN_COLOR diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm index d5be08ec6d..bacef0e804 100644 --- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm +++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin.dm @@ -46,7 +46,7 @@ heat_level_2 = 1000 heat_level_3 = 1150 - flags = NO_SCAN | NO_MINOR_CUT | NO_INFECT + flags = NO_DNA | NO_SLEEVE | NO_MINOR_CUT | NO_INFECT spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE reagent_tag = IS_SHADEKIN // for shadekin-unqiue chem interactions diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index 24ba9afa82..9295101619 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -44,7 +44,7 @@ breath_heat_level_3 = 800 //lower incineration threshold though spawn_flags = SPECIES_CAN_JOIN - flags = NO_SCAN | IS_PLANT | NO_MINOR_CUT + flags = NO_DNA | NO_SLEEVE | IS_PLANT | NO_MINOR_CUT appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR inherent_verbs = list(/mob/living/carbon/human/proc/alraune_fruit_select, //Give them the voremodes related to wrapping people in vines and sapping their fluids diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index 2353fcaa6d..71ba4fcea5 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -7,7 +7,7 @@ language = "Sol Common" //todo? unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch) - flags = NO_PAIN | NO_SCAN | NO_POISON | NO_MINOR_CUT | NO_DEFIB + flags = NO_PAIN | NO_DNA | NO_SLEEVE | NO_POISON | NO_MINOR_CUT | NO_DEFIB spawn_flags = SPECIES_IS_RESTRICTED siemens_coefficient = 0 diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 84b792a941..baf0784391 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -25,7 +25,7 @@ var/datum/species/shapeshifter/promethean/prometheans bump_flag = SLIME swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL push_flags = MONKEY|SLIME|SIMPLE_ANIMAL - flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_DEFIB + flags = NO_DNA | NO_SLEEVE | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_DEFIB appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | RADIATION_GLOWS | HAS_UNDERWEAR spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED health_hud_intensity = 2 diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm index 2c98793542..bcdfadd185 100755 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_species.dm @@ -18,7 +18,7 @@ flesh_color = "#505050" base_color = "#FFFFFF" //Color mult, start out with this - flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_PAIN + flags = NO_DNA | NO_SLEEVE | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_PAIN appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_LIPS spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE health_hud_intensity = 2 diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index d9befa5f27..8a5ac67d8b 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -591,7 +591,7 @@ body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not - flags = NO_SCAN | IS_PLANT | NO_PAIN | NO_SLIP | NO_MINOR_CUT | NO_DEFIB + flags = NO_DNA | NO_SLEEVE | IS_PLANT | NO_PAIN | NO_SLIP | NO_MINOR_CUT | NO_DEFIB spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED blood_color = "#004400" diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm index f34c9b6a73..5ac162eb6f 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_vr.dm @@ -50,7 +50,7 @@ //primitive_form = SPECIES_MONKEY_TAJ spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE//Whitelisted as restricted is broken. - flags = NO_SCAN | NO_INFECT // | NO_DEFIB // Dying as a chimera is, quite literally, a death sentence. Well, if it wasn't for their revive, that is. Leaving NO_DEFIB there for the future/in case reversion to old 'chimera no-defib. + flags = NO_SLEEVE | NO_DNA | NO_INFECT // | NO_DEFIB // Dying as a chimera is, quite literally, a death sentence. Well, if it wasn't for their revive, that is. Leaving NO_DEFIB there for the future/in case reversion to old 'chimera no-defib. appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR genders = list(MALE, FEMALE, PLURAL, NEUTER) diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 9fbbb3face..fad2edd50a 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -497,7 +497,7 @@ heat_level_2 = 1000 heat_level_3 = 1150 - flags = NO_SCAN + flags = NO_DNA | NO_SLEEVE spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE reagent_tag = IS_SHADEKIN // for shadekin-unqiue chem interactions diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm index c5f99fe848..fd2cd69c8a 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm @@ -702,3 +702,28 @@ desc = "Even the tiniest particles of dirt give you uneasy footing, even through several layers of footwear." cost = -5 var_changes = list("dirtslip" = TRUE) + +/datum/trait/negative/nodefib + name = "Unreviveable" + desc = "For whatever strange genetic reason, defibs cannot restart your heart." + cost = -1 + custom_only = FALSE + var_changes = list("flags" = NO_DEFIB) + can_take = ORGANICS + excludes = list(/datum/trait/negative/noresleeve, /datum/trait/negative/onelife) + +/datum/trait/negative/noresleeve + name = "Unsleeveable" + desc = "Your genetics have been ruined, to the point where resleeving can no longer bring you back. Your DNA is unappealing to slimes as a result." //The autoresleever still resleeves on Virgo as that section has been commented out, but eh, whatever. It's not really a big concern. -1+-1 = -2 is all I care about. + cost = -1 + custom_only = TRUE + var_changes = list("flags" = NO_SLEEVE) + excludes = list(/datum/trait/negative/nodefib, /datum/trait/negative/onelife) + +/datum/trait/negative/onelife + name = "One Life" + desc = "Once you are dead, you are incapable of being resleeved or revived using a defib." + cost = -2 + custom_only = TRUE + var_changes = list("flags" = NO_SLEEVE | NO_DEFIB) + excludes = list(/datum/trait/negative/nodefib, /datum/trait/negative/noresleeve) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index c882835c30..e6463e4300 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -386,3 +386,10 @@ /datum/trait/positive/vibration_sense/unapply(datum/species/S, mob/living/carbon/human/H, trait_prefs) . = ..() H.motiontracker_unsubscribe() + +/datum/trait/positive/stable_genetics + name = "Stable Genetics" + desc = "Your genetics are extraordinarily stable, with your DNA being immune to any changes, including slimes!" + cost = 2 + custom_only = TRUE + var_changes = list("flags" = NO_DNA) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm index c4c1563e2c..6e6d1aa5b6 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm @@ -49,7 +49,10 @@ ASSERT(S) if(var_changes) for(var/V in var_changes) - S.vars[V] = var_changes[V] + if(V == "flags") // Is bitflag, implimentation means traits can only GIVE you flags, not remove them. + S.vars[V] |= var_changes[V] + else + S.vars[V] = var_changes[V] if (trait_prefs) for (var/trait in trait_prefs) switch(has_preferences[trait][3]) @@ -77,7 +80,11 @@ ASSERT(S) if(var_changes) for(var/V in var_changes) - S.vars[V] = initial(S.vars[V]) + if(V == "flags") // Is bitflag, this assumes traits can only ever GIVE you flags. + if(!(initial(S.vars[V]) & var_changes[V])) + S.vars[V] &= ~var_changes[V] + else + S.vars[V] = initial(S.vars[V]) if (trait_prefs) for (var/trait in trait_prefs) switch(has_preferences[trait][3]) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index be96d9a596..00475e80b6 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -24,7 +24,7 @@ cold_level_2 = -1 cold_level_3 = -1 - flags = NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_INFECT | NO_DEFIB + flags = NO_DNA | NO_SLEEVE | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_INFECT | NO_DEFIB spawn_flags = SPECIES_IS_RESTRICTED reagent_tag = IS_XENOS diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm index 6aa44b5c3f..7197c9266f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm @@ -138,7 +138,7 @@ //VOREStation Addition start if(ishuman(L)) var/mob/living/carbon/human/H = L - if(H.species.flags & NO_SCAN) + if(H.species.flags & (NO_DNA|NO_SLEEVE)) to_chat(src, "This subject's life energy is beyond my reach...") return FALSE //VOREStation Addition end diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm index ead0df0c15..13addc66c5 100644 --- a/code/modules/nifsoft/nif.dm +++ b/code/modules/nifsoft/nif.dm @@ -119,7 +119,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable should_be_in = brain.parent_organ if(istype(H) && !H.nif && H.species && (loc == H.get_organ(should_be_in))) - if(!bioadap && (H.species.flags & NO_SCAN)) //NO_SCAN is the default 'too complicated' flag + if(!bioadap && (H.species.flags & NO_DNA)) //NO_DNA is the default 'too complicated' flag return FALSE human = H diff --git a/code/modules/reagents/reagents/toxins.dm b/code/modules/reagents/reagents/toxins.dm index ca0d2f3a39..07f0eb65a1 100644 --- a/code/modules/reagents/reagents/toxins.dm +++ b/code/modules/reagents/reagents/toxins.dm @@ -605,7 +605,7 @@ H.b_hair = max(0, min(255, H.b_hair + color_shift)) if(H.b_facial) H.b_facial = max(0, min(255, H.b_facial + color_shift)) - if(H.species.flags & NO_SCAN) + if(H.species.flags & NO_DNA) return //The original coder comment here wanted it to be "Approx. one mutation per 10 injected/20 ingested/30 touching units" @@ -875,7 +875,7 @@ return var/mob/living/carbon/human/H = M - if(istype(H) && (H.species.flags & NO_SCAN)) + if(istype(H) && (H.species.flags & NO_DNA)) return if(M.dna) @@ -901,7 +901,7 @@ return var/mob/living/carbon/human/H = M - if(istype(H) && (H.species.flags & NO_SCAN)) + if(istype(H) && (H.species.flags & NO_DNA)) return if(M.dna) diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index 7c1dd2ac3b..7cd67c3a13 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -79,12 +79,12 @@ to_chat(ghost, span_warning("You are not whitelisted to spawn as this species!")) return - /* // Comments out NO_SCAN restriction, as per headmin/maintainer request. + /* // Comments out NO_SLEEVE restriction, as per headmin/maintainer request. var/datum/species/chosen_species if(ghost.client.prefs.species) // In case we somehow don't have a species set here. chosen_species = GLOB.all_species[ghost_client.prefs.species] - if(chosen_species.flags && NO_SCAN) // Sanity. Prevents species like Xenochimera, Proteans, etc from rejoining the round via resleeve, as they should have their own methods of doing so already, as agreed to when you whitelist as them. + if(chosen_species.flags && NO_SLEEVE) // Sanity. Prevents species like Xenochimera, Proteans, etc from rejoining the round via resleeve, as they should have their own methods of doing so already, as agreed to when you whitelist as them. to_chat(ghost, span_warning("This species cannot be resleeved!")) return */