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>
This commit is contained in:
Cameron Lennox
2025-03-14 17:34:03 -04:00
committed by GitHub
parent 5788fd6e21
commit f48f89f1db
37 changed files with 99 additions and 68 deletions
@@ -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]
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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"
@@ -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)
@@ -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
@@ -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)
@@ -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)
@@ -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])
@@ -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
@@ -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