From 2785d37cf083ab2d1a8dc7bf1ed0b3f7912afc24 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 17 Jan 2023 02:06:18 +0100 Subject: [PATCH] [MIRROR] Cutting the Burdened Cheese Part 1: Removes free burden points from removing unnecessary or cosmetic organs. [MDB IGNORE] (#18493) * Cutting the Burdened Cheese Part 1: Removes free burden points from removing unnecessary or cosmetic organs. (#71938) Burdened organs now only count for the main organs only. Cyberimplants don't count, alien organs don't count, etc. This is because someone could get a bunch of extra organs, and then take the burdened sect and remove them for free burden points. Useless organs for species also do not count (stomachs given to species that do not hunger, for instance) Removes the error on burden points clamping on negative values. This can happen when someone previously disabled takes burden sect. Cheese is being used to bypass the unique gameplay goals burdened sect provides. Will throw another pr when fikou finishes bat mutants ;) :cl: fix: Removed some cheese strategies from burdened sect. /:cl: Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> * Modular! * Aaaaaa Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com> Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> Co-authored-by: Funce --- code/__DEFINES/DNA.dm | 24 +++---- code/__DEFINES/is_helpers.dm | 2 + code/__DEFINES/traits.dm | 5 +- code/_globalvars/traits.dm | 2 +- code/datums/quirks/negative_quirks.dm | 2 +- code/datums/wounds/_wounds.dm | 2 +- code/datums/wounds/bones.dm | 2 +- .../items/devices/scanners/health_analyzer.dm | 6 +- code/game/objects/items/weaponry.dm | 2 +- .../objects/structures/petrified_statue.dm | 4 +- code/modules/antagonists/cult/blood_magic.dm | 4 +- .../antagonists/nightmare/nightmare_organs.dm | 4 +- .../nightmare/nightmare_species.dm | 3 +- code/modules/mob/living/blood.dm | 12 ++-- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 6 +- .../mob/living/carbon/human/species.dm | 8 ++- .../carbon/human/species_types/abductors.dm | 6 +- .../carbon/human/species_types/android.dm | 7 +- .../carbon/human/species_types/dullahan.dm | 2 + .../carbon/human/species_types/golems.dm | 24 ++++--- .../carbon/human/species_types/jellypeople.dm | 7 +- .../human/species_types/lizardpeople.dm | 1 + .../carbon/human/species_types/mushpeople.dm | 1 + .../carbon/human/species_types/plasmamen.dm | 5 +- .../human/species_types/shadowpeople.dm | 4 +- .../carbon/human/species_types/skeletons.dm | 7 +- .../carbon/human/species_types/vampire.dm | 4 +- .../carbon/human/species_types/zombies.dm | 6 +- code/modules/mob/living/carbon/life.dm | 2 +- code/modules/mob/living/living.dm | 2 +- .../religion/burdened/burdened_trauma.dm | 66 ++++++++++++++----- code/modules/surgery/bodyparts/_bodyparts.dm | 12 ++-- code/modules/surgery/bodyparts/hair.dm | 2 +- code/modules/surgery/bodyparts/head.dm | 2 +- code/modules/surgery/coronary_bypass.dm | 2 +- code/modules/surgery/organic_steps.dm | 2 +- code/modules/surgery/organs/_organ.dm | 5 +- code/modules/surgery/organs/appendix.dm | 4 +- code/modules/surgery/organs/heart.dm | 8 +-- code/modules/surgery/organs/liver.dm | 4 +- code/modules/surgery/organs/lungs.dm | 4 +- .../surgery/organs/stomach/_stomach.dm | 4 +- code/modules/surgery/organs/tongue.dm | 4 +- .../unit_tests/species_change_organs.dm | 4 +- .../living/carbon/human/species/hemophage.dm | 2 +- .../carbon/human/species/roundstartslime.dm | 4 +- .../modules/medical/code/wounds/bones.dm | 2 +- .../modules/mutants/code/mutant_species.dm | 2 +- 49 files changed, 183 insertions(+), 118 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 3f8c792ab97..58b746a9cc7 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -82,29 +82,25 @@ #define FACEHAIR 3 #define EYECOLOR 4 #define LIPS 5 -#define NOBLOOD 6 #define NOTRANSSTING 7 #define NOZOMBIE 8 #define NO_UNDERWEAR 9 -#define NOSTOMACH 10 -#define NO_DNA_COPY 11 -#define DRINKSBLOOD 12 +#define NO_DNA_COPY 10 +#define DRINKSBLOOD 11 + /// Use this if you want to change the race's color without the player being able to pick their own color. AKA special color shifting -#define DYNCOLORS 13 -#define AGENDER 14 +#define DYNCOLORS 12 +#define AGENDER 13 /// Do not draw eyes or eyeless overlay -#define NOEYESPRITES 15 +#define NOEYESPRITES 14 ///If we have a limb-specific overlay sprite -#define HAS_MARKINGS 16 +#define HAS_MARKINGS 15 /// Do not draw blood overlay -#define NOBLOODOVERLAY 17 +#define NOBLOODOVERLAY 16 ///No augments, for monkeys in specific because they will turn into fucking freakazoids https://cdn.discordapp.com/attachments/326831214667235328/791313258912153640/102707682-fa7cad80-4294-11eb-8f13-8c689468aeb0.png -#define NOAUGMENTS 18 +#define NOAUGMENTS 17 ///will be assigned a universal vampire themed last name shared by their department. this is preferenced! -#define BLOOD_CLANS 19 -/// Stops species from spawning with tongue. Doesn't actually make the species able to talk with no tongue -#define NO_TONGUE 20 -#define NOAPPENDIX 21 +#define BLOOD_CLANS 18 //organ slots #define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator" diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 12c50ab9b15..16aaf019de9 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -90,6 +90,8 @@ GLOBAL_LIST_INIT(turfs_openspace, typecacheof(list( #define isdullahan(A) (is_species(A, /datum/species/dullahan)) #define ismonkey(A) (is_species(A, /datum/species/monkey)) #define isandroid(A) (is_species(A, /datum/species/android)) +#define isnightmare(A) (is_species(A, /datum/species/shadow/nightmare)) + //More carbon mobs #define isalien(A) (istype(A, /mob/living/carbon/alien)) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 5e400ffe216..846d2b96dec 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -216,7 +216,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Prevents plasmamen from self-igniting if only their helmet is missing #define TRAIT_NOSELFIGNITION_HEAD_ONLY "no_selfignition_head_only" #define TRAIT_NOGUNS "no_guns" +///This carbon doesn't get hungry #define TRAIT_NOHUNGER "no_hunger" +///This carbon doesn't bleed +#define TRAIT_NOBLOOD "noblood" #define TRAIT_NOMETABOLISM "no_metabolism" #define TRAIT_NOCLONELOSS "no_cloneloss" #define TRAIT_TOXIMMUNE "toxin_immune" @@ -393,8 +396,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_BLUSHING "blushing" /// This person is crying #define TRAIT_CRYING "crying" -///This carbon doesn't bleed -#define TRAIT_NOBLEED "nobleed" /// This atom can ignore the "is on a turf" check for simple AI datum attacks, allowing them to attack from bags or lockers as long as any other conditions are met #define TRAIT_AI_BAGATTACK "bagattack" /// This mobs bodyparts are invisible but still clickable. diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index d0dd16b4b25..26db3724aa4 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -164,7 +164,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_SNOB" = TRAIT_SNOB, "TRAIT_BALD" = TRAIT_BALD, "TRAIT_BADTOUCH" = TRAIT_BADTOUCH, - "TRAIT_NOBLEED" = TRAIT_NOBLEED, + "TRAIT_NOBLOOD" = TRAIT_NOBLOOD, "TRAIT_KISS_OF_DEATH" = TRAIT_KISS_OF_DEATH, "TRAIT_ANXIOUS" = TRAIT_ANXIOUS, "TRAIT_WEAK_SOUL" = TRAIT_WEAK_SOUL, diff --git a/code/datums/quirks/negative_quirks.dm b/code/datums/quirks/negative_quirks.dm index f3596ebd203..5e5ecf3a0fc 100644 --- a/code/datums/quirks/negative_quirks.dm +++ b/code/datums/quirks/negative_quirks.dm @@ -70,7 +70,7 @@ return var/mob/living/carbon/human/carbon_target = quirk_holder - if(NOBLOOD in carbon_target.dna.species.species_traits) //can't lose blood if your species doesn't have any + if(HAS_TRAIT(carbon_target, TRAIT_NOBLOOD)) //can't lose blood if your species doesn't have any return if (carbon_target.blood_volume <= min_blood) diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm index 2fb8a56211e..9c8e4706bc3 100644 --- a/code/datums/wounds/_wounds.dm +++ b/code/datums/wounds/_wounds.dm @@ -135,7 +135,7 @@ LAZYADD(limb.wounds, src) //it's ok to not typecheck, humans are the only ones that deal with wounds var/mob/living/carbon/human/human_victim = victim - no_bleeding = (NOBLOOD in human_victim?.dna.species.species_traits) + no_bleeding = HAS_TRAIT(human_victim, TRAIT_NOBLOOD) update_descriptions() limb.update_wounds() if(status_effect_type) diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm index b3bf42e6adc..2e4149d149a 100644 --- a/code/datums/wounds/bones.dm +++ b/code/datums/wounds/bones.dm @@ -124,7 +124,7 @@ return if(ishuman(victim)) var/mob/living/carbon/human/human_victim = victim - if(NOBLOOD in human_victim.dna?.species.species_traits) + if(HAS_TRAIT(human_victim, TRAIT_NOBLOOD)) return if(limb.body_zone == BODY_ZONE_CHEST && victim.blood_volume && prob(internal_bleeding_chance + wounding_dmg)) diff --git a/code/game/objects/items/devices/scanners/health_analyzer.dm b/code/game/objects/items/devices/scanners/health_analyzer.dm index 5b4bddb57d0..db19bb54ffe 100644 --- a/code/game/objects/items/devices/scanners/health_analyzer.dm +++ b/code/game/objects/items/devices/scanners/health_analyzer.dm @@ -273,15 +273,15 @@ var/missing_organs = list() if(!humantarget.getorganslot(ORGAN_SLOT_BRAIN)) missing_organs += "brain" - if(!(NOBLOOD in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_HEART)) + if(!HAS_TRAIT(humantarget, TRAIT_NOBLOOD) && !humantarget.getorganslot(ORGAN_SLOT_HEART)) missing_organs += "heart" if(!(TRAIT_NOBREATH in the_dudes_species.inherent_traits) && !humantarget.getorganslot(ORGAN_SLOT_LUNGS)) missing_organs += "lungs" if(!(TRAIT_NOMETABOLISM in the_dudes_species.inherent_traits) && !humantarget.getorganslot(ORGAN_SLOT_LIVER)) missing_organs += "liver" - if(!(NOSTOMACH in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_STOMACH)) + if(!the_dudes_species.mutantstomach && !humantarget.getorganslot(ORGAN_SLOT_STOMACH)) missing_organs += "stomach" - if(!(NO_TONGUE in the_dudes_species.species_traits) && !humantarget.getorganslot(ORGAN_SLOT_TONGUE)) + if(!the_dudes_species.mutanttongue && !humantarget.getorganslot(ORGAN_SLOT_TONGUE)) missing_organs += "tongue" if(!humantarget.getorganslot(ORGAN_SLOT_EARS)) missing_organs += "ears" diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 9ba205ecbb7..20e53df917b 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -139,7 +139,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 if(ishuman(loc)) var/mob/living/carbon/human/holder = loc SET_PLANE_EXPLICIT(holder, GAME_PLANE_UPPER_FOV_HIDDEN, src) //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS) - ADD_TRAIT(holder, TRAIT_NOBLEED, HIGHLANDER_TRAIT) //AND WE WON'T BLEED OUT LIKE COWARDS + ADD_TRAIT(holder, TRAIT_NOBLOOD, HIGHLANDER_TRAIT) //AND WE WON'T BLEED OUT LIKE COWARDS else if(!(flags_1 & ADMIN_SPAWNED_1)) qdel(src) diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index 0f06f25f8e5..9314544cbf4 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -60,7 +60,7 @@ petrified_mob.status_flags &= ~GODMODE petrified_mob.forceMove(loc) REMOVE_TRAIT(petrified_mob, TRAIT_MUTE, STATUE_MUTE) - REMOVE_TRAIT(petrified_mob, TRAIT_NOBLEED, MAGIC_TRAIT) + REMOVE_TRAIT(petrified_mob, TRAIT_NOBLOOD, MAGIC_TRAIT) petrified_mob.take_overall_damage((petrified_mob.health - atom_integrity + 100)) //any new damage the statue incurred is transfered to the mob petrified_mob.faction -= "mimic" petrified_mob = null @@ -92,7 +92,7 @@ return FALSE var/obj/structure/statue/petrified/S = new(loc, src, statue_timer) S.name = "statue of [name]" - ADD_TRAIT(src, TRAIT_NOBLEED, MAGIC_TRAIT) + ADD_TRAIT(src, TRAIT_NOBLOOD, MAGIC_TRAIT) S.copy_overlays(src) var/newcolor = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) S.add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 4aa7fb7074d..45237b46d65 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -677,8 +677,8 @@ if(proximity) if(ishuman(target)) var/mob/living/carbon/human/H = target - if(NOBLOOD in H.dna.species.species_traits) - to_chat(user,span_warning("Blood rites do not work on species with no blood!")) + if(HAS_TRAIT(H, TRAIT_NOBLOOD)) + to_chat(user,span_warning("Blood rites do not work on people with no blood!")) return if(IS_CULTIST(H)) if(H.stat == DEAD) diff --git a/code/modules/antagonists/nightmare/nightmare_organs.dm b/code/modules/antagonists/nightmare/nightmare_organs.dm index 6e7e4117ded..6bcb3559b31 100644 --- a/code/modules/antagonists/nightmare/nightmare_organs.dm +++ b/code/modules/antagonists/nightmare/nightmare_organs.dm @@ -97,8 +97,8 @@ playsound(owner, 'sound/hallucinations/far_noise.ogg', 50, TRUE) respawn_progress = 0 -/obj/item/organ/internal/heart/nightmare/get_availability(datum/species/S) - if(istype(S,/datum/species/shadow/nightmare)) +/obj/item/organ/internal/heart/nightmare/get_availability(datum/species/owner_species, mob/living/owner_mob) + if(isnightmare(owner_mob)) return TRUE return ..() diff --git a/code/modules/antagonists/nightmare/nightmare_species.dm b/code/modules/antagonists/nightmare/nightmare_species.dm index 78f1454fe90..9fc44cb434c 100644 --- a/code/modules/antagonists/nightmare/nightmare_species.dm +++ b/code/modules/antagonists/nightmare/nightmare_species.dm @@ -8,7 +8,7 @@ burnmod = 1.5 changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE no_equip_flags = ITEM_SLOT_MASK | ITEM_SLOT_OCLOTHING | ITEM_SLOT_GLOVES | ITEM_SLOT_FEET | ITEM_SLOT_ICLOTHING | ITEM_SLOT_SUITSTORE - species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYESPRITES) + species_traits = list(NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYESPRITES) inherent_traits = list( TRAIT_ADVANCEDTOOLUSER, TRAIT_CAN_STRIP, @@ -21,6 +21,7 @@ TRAIT_PIERCEIMMUNE, TRAIT_NODISMEMBER, TRAIT_NOHUNGER, + TRAIT_NOBLOOD, ) mutantheart = /obj/item/organ/internal/heart/nightmare diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 8cb25e84fa9..9cfe90a80e8 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -7,7 +7,7 @@ // Takes care blood loss and regeneration /mob/living/carbon/human/handle_blood(delta_time, times_fired) - if(NOBLOOD in dna.species.species_traits || HAS_TRAIT(src, TRAIT_NOBLEED) || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) + if(HAS_TRAIT(src, TRAIT_NOBLOOD) || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) return if(bodytemperature < BLOOD_STOP_TEMP || (HAS_TRAIT(src, TRAIT_HUSK))) //cold or husked people do not pump the blood. @@ -96,7 +96,7 @@ /mob/living/carbon/human/bleed(amt) amt *= physiology.bleed_mod - if(!(NOBLOOD in dna.species.species_traits)) + if(!HAS_TRAIT(src, TRAIT_NOBLOOD)) ..() /// A helper to see how much blood we're losing per tick @@ -110,7 +110,7 @@ return bleed_amt /mob/living/carbon/human/get_bleed_rate() - if((NOBLOOD in dna.species.species_traits)) + if(HAS_TRAIT(src, TRAIT_NOBLOOD)) return . = ..() . *= physiology.bleed_mod @@ -175,7 +175,7 @@ COOLDOWN_START(src, bleeding_message_cd, next_cooldown) /mob/living/carbon/human/bleed_warn(bleed_amt = 0, forced = FALSE) - if(!(NOBLOOD in dna.species.species_traits)) + if(!HAS_TRAIT(src, TRAIT_NOBLOOD)) return ..() /mob/living/proc/restore_blood() @@ -287,7 +287,7 @@ return /datum/reagent/colorful_reagent if(dna.species.exotic_blood) return dna.species.exotic_blood - else if((NOBLOOD in dna.species.species_traits)) + else if(HAS_TRAIT(src, TRAIT_NOBLOOD)) return return /datum/reagent/blood @@ -358,7 +358,7 @@ B.add_blood_DNA(temp_blood_DNA) /mob/living/carbon/human/add_splatter_floor(turf/T, small_drip) - if(!(NOBLOOD in dna.species.species_traits)) + if(!HAS_TRAIT(src, TRAIT_NOBLOOD)) ..() /mob/living/carbon/alien/add_splatter_floor(turf/T, small_drip) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e022be2d07f..2e277a0bbc9 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -864,7 +864,7 @@ /mob/living/carbon/revive(full_heal_flags = NONE, excess_healing = 0, force_grab_ghost = FALSE) if(excess_healing) - if(dna && !(NOBLOOD in dna.species.species_traits)) + if(dna && !HAS_TRAIT(src, TRAIT_NOBLOOD)) blood_volume += (excess_healing * 2) //1 excess = 10 blood for(var/obj/item/organ/organ as anything in internal_organs) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 48f0052e625..f907c033a23 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -806,7 +806,7 @@ return ..() /mob/living/carbon/human/vomit(lost_nutrition = 10, blood = FALSE, stun = TRUE, distance = 1, message = TRUE, vomit_type = VOMIT_TOXIC, harm = TRUE, force = FALSE, purge_ratio = 0.1) - if(blood && (NOBLOOD in dna.species.species_traits) && !HAS_TRAIT(src, TRAIT_TOXINLOVER)) + if(blood && HAS_TRAIT(src, TRAIT_NOBLOOD) && !HAS_TRAIT(src, TRAIT_TOXINLOVER)) if(message) visible_message(span_warning("[src] dry heaves!"), \ span_userdanger("You try to throw up, but there's nothing in your stomach!")) @@ -1042,12 +1042,12 @@ return ..() /mob/living/carbon/human/is_bleeding() - if(NOBLOOD in dna.species.species_traits) + if(HAS_TRAIT(src, TRAIT_NOBLOOD)) return FALSE return ..() /mob/living/carbon/human/get_total_bleed_rate() - if(NOBLOOD in dna.species.species_traits) + if(HAS_TRAIT(src, TRAIT_NOBLOOD)) return FALSE return ..() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 3b0bff6c180..4fd45f2602c 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -347,13 +347,15 @@ GLOBAL_LIST_EMPTY(features_by_species) var/obj/item/organ/oldorgan = C.getorganslot(slot) //used in removing var/obj/item/organ/neworgan = slot_mutantorgans[slot] //used in adding + if(!neworgan) //these can be null, if so we shouldn't regenerate + continue if(visual_only && !initial(neworgan.visual)) continue var/used_neworgan = FALSE neworgan = SSwardrobe.provide_type(neworgan) - var/should_have = neworgan.get_availability(src) //organ proc that points back to a species trait (so if the species is supposed to have this organ) + var/should_have = neworgan.get_availability(src, C) //organ proc that points back to a species trait (so if the species is supposed to have this organ) /* * There is an existing organ in this slot, what should we do with it? Probably remove it! @@ -2082,8 +2084,8 @@ GLOBAL_LIST_EMPTY(features_by_species) /datum/species/proc/create_pref_blood_perks() var/list/to_add = list() - // NOBLOOD takes priority by default - if(NOBLOOD in species_traits) + // TRAIT_NOBLOOD takes priority by default + if(TRAIT_NOBLOOD in inherent_traits) to_add += list(list( SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK, SPECIES_PERK_ICON = "tint-slash", diff --git a/code/modules/mob/living/carbon/human/species_types/abductors.dm b/code/modules/mob/living/carbon/human/species_types/abductors.dm index 97a29877ea6..703f61a7f7d 100644 --- a/code/modules/mob/living/carbon/human/species_types/abductors.dm +++ b/code/modules/mob/living/carbon/human/species_types/abductors.dm @@ -3,16 +3,18 @@ id = SPECIES_ABDUCTOR sexes = FALSE species_traits = list( - NOBLOOD, NOEYESPRITES, - NOSTOMACH, ) inherent_traits = list( TRAIT_NOBREATH, TRAIT_NOHUNGER, TRAIT_VIRUSIMMUNE, + TRAIT_NOBLOOD, ) mutanttongue = /obj/item/organ/internal/tongue/abductor + mutantstomach = null + mutantheart = null + mutantlungs = null changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT ass_image = 'icons/ass/assgrey.png' diff --git a/code/modules/mob/living/carbon/human/species_types/android.dm b/code/modules/mob/living/carbon/human/species_types/android.dm index 64ecb7c0047..e889beec6f2 100644 --- a/code/modules/mob/living/carbon/human/species_types/android.dm +++ b/code/modules/mob/living/carbon/human/species_types/android.dm @@ -2,10 +2,8 @@ name = "Android" id = SPECIES_ANDROID species_traits = list( - NOBLOOD, NO_DNA_COPY, NOTRANSSTING, - NOSTOMACH, ) inherent_traits = list( TRAIT_CAN_USE_FLIGHT_POTION, @@ -23,11 +21,16 @@ TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTHIGHPRESSURE, TRAIT_TOXIMMUNE, + TRAIT_NOBLOOD, ) inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID meat = null mutanttongue = /obj/item/organ/internal/tongue/robot + mutantstomach = null + mutantheart = null + mutantliver = null + mutantlungs = null species_language_holder = /datum/language_holder/synthetic wing_types = list(/obj/item/organ/external/wings/functional/robotic) changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 2f4ec6c35ca..8bae16a44d1 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -18,6 +18,8 @@ mutanteyes = /obj/item/organ/internal/eyes/dullahan mutanttongue = /obj/item/organ/internal/tongue/dullahan mutantears = /obj/item/organ/internal/ears/dullahan + mutantstomach = null + mutantlungs = null examine_limb_id = SPECIES_HUMAN skinned_type = /obj/item/stack/sheet/animalhide/human changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index b9564c4b7cf..ce41f23e9cd 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -3,7 +3,6 @@ name = "Golem" id = SPECIES_GOLEM species_traits = list( - NOBLOOD, NOTRANSSTING, MUTCOLORS, NO_UNDERWEAR, @@ -20,7 +19,10 @@ TRAIT_RESISTHEAT, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, + TRAIT_NOBLOOD, ) + mutantheart = null + mutantlungs = null inherent_biotypes = MOB_HUMANOID|MOB_MINERAL mutant_organs = list(/obj/item/organ/internal/adamantine_resonator) mutanttongue = /obj/item/organ/internal/vocal_cords/adamantine @@ -674,7 +676,7 @@ id = SPECIES_GOLEM_CULT sexes = FALSE info_text = "As a Runic Golem, you possess eldritch powers granted by the Elder Goddess Nar'Sie." - species_traits = list(NOBLOOD,NO_UNDERWEAR,NOEYESPRITES) //no mutcolors + species_traits = list(NO_UNDERWEAR,NOEYESPRITES) //no mutcolors inherent_traits = list( TRAIT_GENELESS, TRAIT_NOBREATH, @@ -687,6 +689,7 @@ TRAIT_RESISTCOLD, TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTHIGHPRESSURE, + TRAIT_NOBLOOD, ) inherent_biotypes = MOB_HUMANOID|MOB_MINERAL prefix = "Runic" @@ -756,7 +759,7 @@ sexes = FALSE info_text = "As a Cloth Golem, you are able to reform yourself after death, provided your remains aren't burned or destroyed. You are, of course, very flammable. \ Being made of cloth, your body is immune to spirits of the damned and runic golems. You are faster than that of other golems, but weaker and less resilient." - species_traits = list(NOBLOOD,NO_UNDERWEAR) //no mutcolors, and can burn + species_traits = list(NO_UNDERWEAR) //no mutcolors, and can burn inherent_traits = list( TRAIT_ADVANCEDTOOLUSER, TRAIT_CAN_STRIP, @@ -769,6 +772,7 @@ TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, + TRAIT_NOBLOOD, ) inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID armor = 15 //feels no pain, but not too resistant @@ -1031,8 +1035,8 @@ id = SPECIES_GOLEM_CARDBOARD prefix = "Cardboard" special_names = list("Box") - info_text = "As a Cardboard Golem, you aren't very strong, but you are a bit quicker and can easily create more brethren by using cardboard on yourself." - species_traits = list(NOBLOOD,NO_UNDERWEAR,NOEYESPRITES,NO_TONGUE) + info_text = "As a Cardboard Golem, you aren't very strong, but you are a bit quicker and can easily create more brethren by using cardboard on yourself. Cardboard makes a poor building material for tongues, so you'll have difficulty speaking." + species_traits = list(NO_UNDERWEAR,NOEYESPRITES) inherent_traits = list( TRAIT_ADVANCEDTOOLUSER, TRAIT_CAN_STRIP, @@ -1046,7 +1050,9 @@ TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, + TRAIT_NOBLOOD, ) + mutanttongue = null fixed_mut_color = null armor = 25 burnmod = 1.25 @@ -1117,7 +1123,7 @@ id = SPECIES_GOLEM_DURATHREAD prefix = "Durathread" special_names = list("Boll","Weave") - species_traits = list(NOBLOOD,NO_UNDERWEAR,NOEYESPRITES) + species_traits = list(NO_UNDERWEAR,NOEYESPRITES) fixed_mut_color = null inherent_traits = list( TRAIT_ADVANCEDTOOLUSER, @@ -1132,6 +1138,7 @@ TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, + TRAIT_NOBLOOD, ) info_text = "As a Durathread Golem, your strikes will cause those your targets to start choking, but your woven body won't withstand fire as well." bodypart_overrides = list( @@ -1160,7 +1167,6 @@ sexes = FALSE fixed_mut_color = null species_traits = list( - NOBLOOD, NO_UNDERWEAR, NOEYESPRITES, ) @@ -1180,6 +1186,7 @@ TRAIT_RESISTHEAT, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, + TRAIT_NOBLOOD, ) species_language_holder = /datum/language_holder/golem/bone info_text = "As a Bone Golem, You have a powerful spell that lets you chill your enemies with fear, and milk heals you! Just make sure to watch our for bone-hurting juice." @@ -1276,7 +1283,7 @@ info_text = "As a Snow Golem, you are extremely vulnerable to burn damage, but you can generate snowballs and shoot cryokinetic beams. You will also turn to snow when dying, preventing any form of recovery." prefix = "Snow" special_names = list("Flake", "Blizzard", "Storm") - species_traits = list(NOBLOOD,NO_UNDERWEAR,NOEYESPRITES) //no mutcolors, no eye sprites + species_traits = list(NO_UNDERWEAR,NOEYESPRITES) //no mutcolors, no eye sprites inherent_traits = list( TRAIT_ADVANCEDTOOLUSER, TRAIT_CAN_STRIP, @@ -1289,6 +1296,7 @@ TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, + TRAIT_NOBLOOD, ) bodypart_overrides = list( BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/golem/snow, 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 1522b357421..9aa0aa6854f 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -6,14 +6,15 @@ species_traits = list( MUTCOLORS, EYECOLOR, - NOBLOOD, ) inherent_traits = list( TRAIT_TOXINLOVER, + TRAIT_NOBLOOD, ) mutanttongue = /obj/item/organ/internal/tongue/jelly mutantlungs = /obj/item/organ/internal/lungs/slime mutanteyes = /obj/item/organ/internal/eyes/jelly + mutantheart = null meat = /obj/item/food/meat/slab/human/mutant/slime exotic_blood = /datum/reagent/toxin/slimejelly var/datum/action/innate/regenerate_limbs/regenerate_limbs @@ -97,7 +98,7 @@ qdel(consumed_limb) H.blood_volume += 20 -// Slimes have both NOBLOOD and an exotic bloodtype set, so they need to be handled uniquely here. +// Slimes have both TRAIT_NOBLOOD and an exotic bloodtype set, so they need to be handled uniquely here. // They may not be roundstart but in the unlikely event they become one might as well not leave a glaring issue open. /datum/species/jelly/create_pref_blood_perks() var/list/to_add = list() @@ -161,7 +162,7 @@ name = "\improper Slimeperson" plural_form = "Slimepeople" id = SPECIES_SLIMEPERSON - species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD) + species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR) hair_color = "mutcolor" hair_alpha = 150 changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT 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 c1265a805ae..6d664a9e832 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -168,6 +168,7 @@ Lizard subspecies: SILVER SCALED TRAIT_VIRUSIMMUNE, TRAIT_WINE_TASTER, ) + mutantlungs = null species_language_holder = /datum/language_holder/lizard //SKYRAT EDIT CHANGE - Enclave pirates - ORIGINAL: species_language_holder = /datum/language_holder/lizard/silver mutanttongue = /obj/item/organ/internal/tongue/lizard //SKYRAT EDIT CHANGE - Enclave pirates - ORIGINAL: mutanttongue = /obj/item/organ/internal/tongue/lizard/silver armor = 10 //very light silvery scales soften blows diff --git a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm index 1f50a366758..87f9b96f765 100644 --- a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm @@ -27,6 +27,7 @@ mutanttongue = /obj/item/organ/internal/tongue/mush mutanteyes = /obj/item/organ/internal/eyes/night_vision/mushroom + mutantlungs = null use_skintones = FALSE var/datum/martial_art/mushpunch/mush species_language_holder = /datum/language_holder/mushroom diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index 648f91e51c3..a1878bf7c93 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -5,9 +5,7 @@ sexes = 0 meat = /obj/item/stack/sheet/mineral/plasma species_traits = list( - NOBLOOD, NOTRANSSTING, - NOAPPENDIX, ) // plasmemes get hard to wound since they only need a severe bone wound to dismember, but unlike skellies, they can't pop their bones back into place inherent_traits = list( @@ -15,6 +13,7 @@ TRAIT_HARDLY_WOUNDED, TRAIT_RADIMMUNE, TRAIT_RESISTCOLD, + TRAIT_NOBLOOD, ) inherent_biotypes = MOB_HUMANOID|MOB_MINERAL @@ -22,6 +21,8 @@ mutanttongue = /obj/item/organ/internal/tongue/bone/plasmaman mutantliver = /obj/item/organ/internal/liver/plasmaman mutantstomach = /obj/item/organ/internal/stomach/bone/plasmaman + mutantappendix = null + mutantheart = null burnmod = 1.5 heatmod = 1.5 brutemod = 1.5 diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index e86efa6974f..46ada757da3 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -6,19 +6,21 @@ sexes = 0 meat = /obj/item/food/meat/slab/human/mutant/shadow species_traits = list( - NOBLOOD, NOEYESPRITES, ) inherent_traits = list( TRAIT_NOBREATH, TRAIT_RADIMMUNE, TRAIT_VIRUSIMMUNE, + TRAIT_NOBLOOD, ) inherent_factions = list("faithless") changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC mutantbrain = /obj/item/organ/internal/brain/shadow mutanteyes = /obj/item/organ/internal/eyes/night_vision/shadow + mutantheart = null + mutantlungs = null species_language_holder = /datum/language_holder/shadowpeople examine_limb_id = SPECIES_SHADOW // SKYRAT EDIT: Fixing Shadowpeople diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index 8447dc2be45..edc618c1fd3 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -5,11 +5,9 @@ sexes = 0 meat = /obj/item/food/meat/slab/human/mutant/skeleton species_traits = list( - NOBLOOD, NOTRANSSTING, NOEYESPRITES, NO_DNA_COPY, - NOAPPENDIX, ) inherent_traits = list( TRAIT_CAN_USE_FLIGHT_POTION, @@ -28,10 +26,15 @@ TRAIT_RESISTLOWPRESSURE, TRAIT_TOXIMMUNE, TRAIT_XENO_IMMUNE, + TRAIT_NOBLOOD, ) inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID mutanttongue = /obj/item/organ/internal/tongue/bone mutantstomach = /obj/item/organ/internal/stomach/bone + mutantappendix = null + mutantheart = null + mutantliver = null + mutantlungs = null disliked_food = NONE liked_food = GROSS | MEAT | RAW | GORE wing_types = list(/obj/item/organ/external/wings/functional/skeleton) diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 052c74a59b2..6473494e374 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -26,6 +26,8 @@ use_skintones = TRUE mutantheart = /obj/item/organ/internal/heart/vampire mutanttongue = /obj/item/organ/internal/tongue/vampire + mutantstomach = null + mutantlungs = null examine_limb_id = SPECIES_HUMAN skinned_type = /obj/item/stack/sheet/animalhide/human ///some starter text sent to the vampire initially, because vampires have shit to do to stay alive @@ -165,7 +167,7 @@ if(victim.stat == DEAD) to_chat(H, span_warning("You need a living victim!")) return - if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || victim.dna.species.exotic_blood))) + if(!victim.blood_volume || (victim.dna && (HAS_TRAIT(victim, TRAIT_NOBLOOD) || victim.dna.species.exotic_blood))) to_chat(H, span_warning("[victim] doesn't have blood!")) return COOLDOWN_START(V, drain_cooldown, 3 SECONDS) diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index 17deaccab6f..828d051aa8f 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -8,7 +8,6 @@ meat = /obj/item/food/meat/slab/human/mutant/zombie mutanttongue = /obj/item/organ/internal/tongue/zombie species_traits = list( - NOBLOOD, NOZOMBIE, NOTRANSSTING, ) @@ -28,7 +27,12 @@ TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_TOXIMMUNE, + TRAIT_NOBLOOD, ) + mutantstomach = null + mutantheart = null + mutantliver = null + mutantlungs = null inherent_biotypes = MOB_UNDEAD|MOB_HUMANOID mutanttongue = /obj/item/organ/internal/tongue/zombie var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg') diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 0450820828d..279d30b1ef2 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -712,7 +712,7 @@ /mob/living/carbon/proc/needs_heart() if(HAS_TRAIT(src, TRAIT_STABLEHEART)) return FALSE - if(dna && dna.species && (NOBLOOD in dna.species.species_traits)) //not all carbons have species! + if(dna && dna.species && HAS_TRAIT(src, TRAIT_NOBLOOD)) //not all carbons have species! return FALSE return TRUE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 4d3f455556c..8f3ad575614 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1023,7 +1023,7 @@ TH.transfer_mob_blood_dna(src) /mob/living/carbon/human/makeTrail(turf/T) - if((NOBLOOD in dna.species.species_traits) || !is_bleeding() || HAS_TRAIT(src, TRAIT_NOBLEED)) + if(HAS_TRAIT(src, TRAIT_NOBLOOD) || !is_bleeding() || HAS_TRAIT(src, TRAIT_NOBLOOD)) return ..() diff --git a/code/modules/religion/burdened/burdened_trauma.dm b/code/modules/religion/burdened/burdened_trauma.dm index 8f5b34b33df..b6a1052dab4 100644 --- a/code/modules/religion/burdened/burdened_trauma.dm +++ b/code/modules/religion/burdened/burdened_trauma.dm @@ -55,8 +55,7 @@ return //adjust burden burden_level = increase ? burden_level + 1 : burden_level - 1 - if(burden_level < 0) //basically a clamp with a stack on it, because this shouldn't be happening - stack_trace("somehow, burden trauma is removing more burden than it's adding.") + if(burden_level < 0) burden_level = 0 //send a message and handle rewards switch(burden_level) @@ -113,11 +112,12 @@ else to_chat(owner, span_warning("The weight on your shoulders feels lighter. You have lost some universal truths.")) if(9) - to_chat(owner, span_notice("You have finally broken yourself enough to understand [GLOB.deity]. It's all so clear to you.")) - var/mob/living/carbon/human/knower = owner - if(!istype(knower)) - return - INVOKE_ASYNC(knower, TYPE_PROC_REF(/mob/living/carbon/human, slow_psykerize)) + if(increase) + to_chat(owner, span_notice("You have finally broken yourself enough to understand [GLOB.deity]. It's all so clear to you.")) + var/mob/living/carbon/human/knower = owner + if(!istype(knower)) + return + INVOKE_ASYNC(knower, TYPE_PROC_REF(/mob/living/carbon/human, slow_psykerize)) /// Signal to decrease burden_level (see update_burden proc) if an organ is added /datum/brain_trauma/special/burdened/proc/organ_added_burden(mob/burdened, obj/item/organ/new_organ, special) @@ -136,21 +136,51 @@ update_burden(increase = FALSE)//working organ +/datum/brain_trauma/special/burdened/proc/is_burdensome_to_lose_organ(mob/burdened, obj/item/organ/old_organ, special) + if(special) //aheals + return + if(!ishuman(burdened)) + return //mobs that don't care about organs + var/mob/living/carbon/human/burdened_human = burdened + var/datum/species/burdened_species = burdened_human.dna?.species + if(!burdened_species) + return + + /// only organs that are slotted in these count. because there's a lot of useless organs to cheese with. + var/list/critical_slots = list( + ORGAN_SLOT_BRAIN, + ORGAN_SLOT_HEART, + ORGAN_SLOT_LUNGS, + ORGAN_SLOT_EYES, + ORGAN_SLOT_EARS, + ORGAN_SLOT_TONGUE, + ORGAN_SLOT_LIVER, + ORGAN_SLOT_STOMACH, + ) + if(!burdened_species.mutantheart) + critical_slots -= ORGAN_SLOT_HEART + if(!burdened_species.mutanttongue) + critical_slots -= ORGAN_SLOT_TONGUE + if(!burdened_species.mutantlungs) + critical_slots -= ORGAN_SLOT_LUNGS + if(!burdened_species.mutantstomach) + critical_slots -= ORGAN_SLOT_STOMACH + if(!burdened_species.mutantliver) + critical_slots -= ORGAN_SLOT_LIVER + + if(!(old_organ.slot in critical_slots)) + return FALSE + else if(istype(old_organ, /obj/item/organ/internal/eyes)) + var/obj/item/organ/internal/eyes/old_eyes = old_organ + if(old_eyes.tint < TINT_BLIND) //unless you were already blinded by them (flashlight eyes), this is adding burden! + return TRUE + return FALSE + return TRUE + /// Signal to increase burden_level (see update_burden proc) if an organ is removed /datum/brain_trauma/special/burdened/proc/organ_removed_burden(mob/burdened, obj/item/organ/old_organ, special) SIGNAL_HANDLER - if(special) //aheals - return - - if(istype(old_organ, /obj/item/organ/internal/eyes)) - var/obj/item/organ/internal/eyes/old_eyes = old_organ - if(old_eyes.tint < TINT_BLIND) //unless you were already blinded by them (flashlight eyes), this is adding burden! - update_burden(TRUE) - return - else if(istype(old_organ, /obj/item/organ/internal/appendix)) - return - update_burden(increase = TRUE)//lost organ /// Signal to decrease burden_level (see update_burden proc) if a limb is added diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index c0601b060d2..0dd25e2ccb2 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -671,8 +671,8 @@ UnregisterSignal(old_owner, list( SIGNAL_REMOVETRAIT(TRAIT_NOLIMBDISABLE), SIGNAL_ADDTRAIT(TRAIT_NOLIMBDISABLE), - SIGNAL_REMOVETRAIT(TRAIT_NOBLEED), - SIGNAL_ADDTRAIT(TRAIT_NOBLEED), + SIGNAL_REMOVETRAIT(TRAIT_NOBLOOD), + SIGNAL_ADDTRAIT(TRAIT_NOBLOOD), )) if(owner) if(initial(can_be_disabled)) @@ -682,8 +682,8 @@ RegisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_NOLIMBDISABLE), PROC_REF(on_owner_nolimbdisable_trait_loss)) RegisterSignal(owner, SIGNAL_ADDTRAIT(TRAIT_NOLIMBDISABLE), PROC_REF(on_owner_nolimbdisable_trait_gain)) // Bleeding stuff - RegisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_NOBLEED), PROC_REF(on_owner_nobleed_loss)) - RegisterSignal(owner, SIGNAL_ADDTRAIT(TRAIT_NOBLEED), PROC_REF(on_owner_nobleed_gain)) + RegisterSignal(owner, SIGNAL_REMOVETRAIT(TRAIT_NOBLOOD), PROC_REF(on_owner_nobleed_loss)) + RegisterSignal(owner, SIGNAL_ADDTRAIT(TRAIT_NOBLOOD), PROC_REF(on_owner_nobleed_gain)) if(needs_update_disabled) update_disabled() @@ -1087,7 +1087,7 @@ if(!owner) return - if(HAS_TRAIT(owner, TRAIT_NOBLEED) || !IS_ORGANIC_LIMB(src)) + if(HAS_TRAIT(owner, TRAIT_NOBLOOD) || !IS_ORGANIC_LIMB(src)) if(cached_bleed_rate != old_bleed_rate) update_part_wound_overlay() return @@ -1128,7 +1128,7 @@ /obj/item/bodypart/proc/update_part_wound_overlay() if(!owner) return FALSE - if(HAS_TRAIT(owner, TRAIT_NOBLEED) || !IS_ORGANIC_LIMB(src) || (NOBLOOD in species_flags_list)) + if(HAS_TRAIT(owner, TRAIT_NOBLOOD) || !IS_ORGANIC_LIMB(src)) if(bleed_overlay_icon) bleed_overlay_icon = null owner.update_wound_overlays() diff --git a/code/modules/surgery/bodyparts/hair.dm b/code/modules/surgery/bodyparts/hair.dm index 7c227150ec2..180e7762c2e 100644 --- a/code/modules/surgery/bodyparts/hair.dm +++ b/code/modules/surgery/bodyparts/hair.dm @@ -48,7 +48,7 @@ hair_hidden = TRUE facial_hair_hidden = TRUE - if(!hair_hidden && !owner.getorganslot(ORGAN_SLOT_BRAIN) && !(NOBLOOD in species_flags_list)) + if(!hair_hidden && !owner.getorganslot(ORGAN_SLOT_BRAIN) && !HAS_TRAIT(owner, TRAIT_NOBLOOD)) show_debrained = TRUE else show_debrained = FALSE diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index 020679c75b1..c098a6aae1c 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -235,7 +235,7 @@ else if(bodytype & BODYTYPE_LARVA_PLACEHOLDER) debrain_overlay.icon = 'icons/mob/species/alien/bodyparts.dmi' debrain_overlay.icon_state = "debrained_larva" - else if(!(NOBLOOD in species_flags_list)) + else if(!(TRAIT_NOBLOOD in species_flags_list)) debrain_overlay.icon = 'icons/mob/species/human/human_face.dmi' debrain_overlay.icon_state = "debrained" . += debrain_overlay diff --git a/code/modules/surgery/coronary_bypass.dm b/code/modules/surgery/coronary_bypass.dm index 4c3dd9a76f9..245ae531ffa 100644 --- a/code/modules/surgery/coronary_bypass.dm +++ b/code/modules/surgery/coronary_bypass.dm @@ -46,7 +46,7 @@ /datum/surgery_step/incise_heart/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) if(ishuman(target)) var/mob/living/carbon/human/target_human = target - if (!(NOBLOOD in target_human.dna.species.species_traits)) + if (!HAS_TRAIT(target_human, TRAIT_NOBLOOD)) display_results( user, target, diff --git a/code/modules/surgery/organic_steps.dm b/code/modules/surgery/organic_steps.dm index 132887246c8..91a55805da4 100644 --- a/code/modules/surgery/organic_steps.dm +++ b/code/modules/surgery/organic_steps.dm @@ -31,7 +31,7 @@ /datum/surgery_step/incise/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) if ishuman(target) var/mob/living/carbon/human/human_target = target - if (!(NOBLOOD in human_target.dna.species.species_traits)) + if (!HAS_TRAIT(human_target, TRAIT_NOBLOOD)) display_results( user, target, diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm index 4f823f2f3fb..72d1084a120 100644 --- a/code/modules/surgery/organs/_organ.dm +++ b/code/modules/surgery/organs/_organ.dm @@ -291,9 +291,10 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) * For example, lungs won't be given if you have NO_BREATH, stomachs check for NO_HUNGER, and livers check for NO_METABOLISM. * If you want a carbon to have a trait that normally blocks an organ but still want the organ. Attach the trait to the organ using the organ_traits var * Arguments: - * owner_species - species, needed to return whether the species has an organ specific trait + * owner_species - species, needed to return the mutant slot as true or false. stomach set to null means it shouldn't have one. + * owner_mob - for more specific checks, like nightmares. */ -/obj/item/organ/proc/get_availability(datum/species/owner_species) +/obj/item/organ/proc/get_availability(datum/species/owner_species, mob/living/owner_mob) return TRUE /// Called before organs are replaced in regenerate_organs with new ones diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm index 554929babdb..cbdca6fe6a1 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -69,8 +69,8 @@ organ_owner.adjustOrganLoss(ORGAN_SLOT_APPENDIX, 15) -/obj/item/organ/internal/appendix/get_availability(datum/species/owner_species) - return !((TRAIT_NOHUNGER in owner_species.inherent_traits) || (NOAPPENDIX in owner_species.species_traits)) +/obj/item/organ/internal/appendix/get_availability(datum/species/owner_species, mob/living/owner_mob) + return owner_species.mutantappendix /obj/item/organ/internal/appendix/Remove(mob/living/carbon/organ_owner, special = FALSE) REMOVE_TRAIT(organ_owner, TRAIT_DISEASELIKE_SEVERITY_MEDIUM, type) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index ebad7c56490..2f001b8657a 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -95,8 +95,8 @@ owner.set_heartattack(TRUE) failed = TRUE -/obj/item/organ/internal/heart/get_availability(datum/species/owner_species) - return !(NOBLOOD in owner_species.species_traits) +/obj/item/organ/internal/heart/get_availability(datum/species/owner_species, mob/living/owner_mob) + return owner_species.mutantheart /obj/item/organ/internal/heart/cursed name = "cursed heart" @@ -128,7 +128,7 @@ if(world.time > (last_pump + pump_delay)) if(ishuman(owner) && owner.client) //While this entire item exists to make people suffer, they can't control disconnects. var/mob/living/carbon/human/accursed_human = owner - if(accursed_human.dna && !(NOBLOOD in accursed_human.dna.species.species_traits)) + if(accursed_human.dna && !HAS_TRAIT(accursed_human, TRAIT_NOBLOOD)) accursed_human.blood_volume = max(accursed_human.blood_volume - blood_loss, 0) to_chat(accursed_human, span_userdanger("You have to keep pumping your blood!")) if(add_colour) @@ -166,7 +166,7 @@ var/mob/living/carbon/human/accursed = owner if(istype(accursed)) - if(accursed.dna && !(NOBLOOD in accursed.dna.species.species_traits)) + if(accursed.dna && !HAS_TRAIT(accursed, TRAIT_NOBLOOD)) accursed.blood_volume = min(accursed.blood_volume + cursed_heart.blood_loss*0.5, BLOOD_VOLUME_MAXIMUM) accursed.remove_client_colour(/datum/client_colour/cursed_heart_blood) cursed_heart.add_colour = TRUE diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index 3fb53079a34..c7b7f148126 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -210,8 +210,8 @@ for(var/datum/reagent/chem as anything in carbon_owner.reagents.reagent_list) chem.on_mob_dead(carbon_owner, delta_time) -/obj/item/organ/internal/liver/get_availability(datum/species/species) - return !(TRAIT_NOMETABOLISM in species.inherent_traits) +/obj/item/organ/internal/liver/get_availability(datum/species/owner_species, mob/living/owner_mob) + return owner_species.mutantliver /obj/item/organ/internal/liver/plasmaman name = "reagent processing crystal" diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 46cb63c6d99..0fd96f30abd 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -543,8 +543,8 @@ owner.visible_message(span_danger("[owner] grabs [owner.p_their()] throat, struggling for breath!"), span_userdanger("You suddenly feel like you can't breathe!")) failed = TRUE -/obj/item/organ/internal/lungs/get_availability(datum/species/owner_species) - return !(TRAIT_NOBREATH in owner_species.inherent_traits) +/obj/item/organ/internal/lungs/get_availability(datum/species/owner_species, mob/living/owner_mob) + return owner_species.mutantlungs /obj/item/organ/internal/lungs/plasmaman name = "plasma filter" diff --git a/code/modules/surgery/organs/stomach/_stomach.dm b/code/modules/surgery/organs/stomach/_stomach.dm index e4d01d98e3b..f4d478a7710 100644 --- a/code/modules/surgery/organs/stomach/_stomach.dm +++ b/code/modules/surgery/organs/stomach/_stomach.dm @@ -205,8 +205,8 @@ else human.remove_movespeed_modifier(/datum/movespeed_modifier/hunger) -/obj/item/organ/internal/stomach/get_availability(datum/species/owner_species) - return !(NOSTOMACH in owner_species.species_traits) +/obj/item/organ/internal/stomach/get_availability(datum/species/owner_species, mob/living/owner_mob) + return owner_species.mutantstomach ///This gets called after the owner takes a bite of food /obj/item/organ/internal/stomach/proc/after_eat(atom/edible) diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 0a704f21ff8..619d200fe50 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -110,8 +110,8 @@ /obj/item/organ/internal/tongue/could_speak_language(datum/language/language_path) return (language_path in languages_possible) -/obj/item/organ/internal/tongue/get_availability(datum/species/owner_species) - return !(NO_TONGUE in owner_species.species_traits) +/obj/item/organ/internal/tongue/get_availability(datum/species/owner_species, mob/living/owner_mob) + return owner_species.mutanttongue /obj/item/organ/internal/tongue/lizard name = "forked tongue" diff --git a/code/modules/unit_tests/species_change_organs.dm b/code/modules/unit_tests/species_change_organs.dm index 7be808e3c5d..e2435486162 100644 --- a/code/modules/unit_tests/species_change_organs.dm +++ b/code/modules/unit_tests/species_change_organs.dm @@ -27,8 +27,8 @@ // But make sure the lizard's mutant organs are "normal" changed_species.mutantheart = dummy.dna.species.mutantheart changed_species.mutantappendix = dummy.dna.species.mutantappendix - // and make sure they're not a NOBLOOD species so they need a heart - changed_species.species_traits -= NOBLOOD + // and make sure they're not a TRAIT_NOBLOOD species so they need a heart + changed_species.inherent_traits -= TRAIT_NOBLOOD // Now make them a lizard dummy.set_species(changed_species) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm index 4f4dc73951b..232005c3b45 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm @@ -442,7 +442,7 @@ hemophage.balloon_alert(hemophage, "needs a living victim!") return - if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || victim.dna.species.exotic_blood))) + if(!victim.blood_volume || (victim.dna && ((HAS_TRAIT(victim, TRAIT_NOBLOOD)) || victim.dna.species.exotic_blood))) hemophage.balloon_alert(hemophage, "[victim] doesn't have blood!") return diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm index b061898d931..059f8cd9205 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm @@ -2,10 +2,12 @@ species_traits = list( MUTCOLORS, EYECOLOR, - NOBLOOD, HAIR, FACEHAIR, ) + inherent_traits = list( + TRAIT_NOBLOOD + ) default_mutant_bodyparts = list( "tail" = "None", "snout" = "None", diff --git a/modular_skyrat/modules/medical/code/wounds/bones.dm b/modular_skyrat/modules/medical/code/wounds/bones.dm index 543050dc1a5..9e818b88877 100644 --- a/modular_skyrat/modules/medical/code/wounds/bones.dm +++ b/modular_skyrat/modules/medical/code/wounds/bones.dm @@ -120,7 +120,7 @@ return if(ishuman(victim)) var/mob/living/carbon/human/human_victim = victim - if(NOBLOOD in human_victim.dna?.species.species_traits) + if(HAS_TRAIT(human_victim, TRAIT_NOBLOOD)) return if(limb.body_zone == BODY_ZONE_CHEST && victim.blood_volume && prob(internal_bleeding_chance + wounding_dmg)) diff --git a/modular_skyrat/modules/mutants/code/mutant_species.dm b/modular_skyrat/modules/mutants/code/mutant_species.dm index df1b18fdbb6..95ae0807fc4 100644 --- a/modular_skyrat/modules/mutants/code/mutant_species.dm +++ b/modular_skyrat/modules/mutants/code/mutant_species.dm @@ -6,13 +6,13 @@ meat = /obj/item/food/meat/slab/human/mutant/zombie eyes_icon = 'modular_skyrat/modules/mutants/icons/mutant_eyes.dmi' species_traits = list( - NOBLOOD, NOZOMBIE, NOEYESPRITES, LIPS, HAIR ) inherent_traits = list( + TRAIT_NOBLOOD, TRAIT_NODISMEMBER, TRAIT_ADVANCEDTOOLUSER, TRAIT_NOMETABOLISM,