diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 838499f9ef7..a3e7af39c36 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -58,12 +58,6 @@
#define RESPIRATION_OXYGEN (1 << 0)
#define RESPIRATION_N2 (1 << 1)
#define RESPIRATION_PLASMA (1 << 2)
-
-//Organ defines for carbon mobs
-#define ORGAN_ORGANIC 1
-#define ORGAN_ROBOTIC 2
-#define ORGAN_MINERAL 3 // Used for the plasmaman liver
-
#define DEFAULT_BODYPART_ICON_ORGANIC 'icons/mob/species/human/bodyparts_greyscale.dmi'
#define DEFAULT_BODYPART_ICON_ROBOTIC 'icons/mob/augmentation/augments.dmi'
diff --git a/code/__DEFINES/surgery.dm b/code/__DEFINES/surgery.dm
index 4aba0de29e2..61aa305c27a 100644
--- a/code/__DEFINES/surgery.dm
+++ b/code/__DEFINES/surgery.dm
@@ -1,25 +1,39 @@
+/// Helper to figure out if an organ is organic
+#define IS_ORGANIC_ORGAN(organ) (organ.organ_flags & ORGAN_ORGANIC)
+/// Helper to figure out if an organ is robotic
+#define IS_ROBOTIC_ORGAN(organ) (organ.organ_flags & ORGAN_ROBOTIC)
+
// Flags for the organ_flags var on /obj/item/organ
-///Synthetic organs, or cybernetic organs. Reacts to EMPs and don't deteriorate or heal
-#define ORGAN_SYNTHETIC (1<<0)
-///Frozen organs, don't deteriorate
-#define ORGAN_FROZEN (1<<1)
-///Failing organs perform damaging effects until replaced or fixed
-#define ORGAN_FAILING (1<<2)
-///Currently only the brain
-#define ORGAN_VITAL (1<<3)
-///is a snack? :D
-#define ORGAN_EDIBLE (1<<4)
-///Synthetic organ affected by an EMP. Deteriorates over time.
-#define ORGAN_SYNTHETIC_EMP (1<<5)
-///Can't be removed using surgery
-#define ORGAN_UNREMOVABLE (1<<6)
+/// Organic organs, the default. Don't get affected by EMPs.
+#define ORGAN_ORGANIC (1<<0)
+/// Synthetic organs, or cybernetic organs. Reacts to EMPs and don't deteriorate or heal
+#define ORGAN_ROBOTIC (1<<1)
+/// Mineral organs. Snowflakey.
+#define ORGAN_MINERAL (1<<2)
+/// Frozen organs, don't deteriorate
+#define ORGAN_FROZEN (1<<3)
+/// Failing organs perform damaging effects until replaced or fixed, and typically they don't function properly either
+#define ORGAN_FAILING (1<<4)
+/// Synthetic organ affected by an EMP. Deteriorates over time.
+#define ORGAN_EMP (1<<5)
+/// Currently only the brain - Removing this organ KILLS the owner
+#define ORGAN_VITAL (1<<6)
+/// Can be eaten
+#define ORGAN_EDIBLE (1<<7)
+/// Can't be removed using surgery or other common means
+#define ORGAN_UNREMOVABLE (1<<8)
/// Can't be seen by scanners, doesn't anger body purists
-#define ORGAN_HIDDEN (1<<7)
+#define ORGAN_HIDDEN (1<<9)
// SKYRAT EDIT START - Customization
/// Synthetic organ granted by a species (for use for organ replacements between species)
-#define ORGAN_SYNTHETIC_FROM_SPECIES (1<<8)
+#define ORGAN_SYNTHETIC_FROM_SPECIES (1<<10)
// SKYRAT EDIT END
+/// Helper to figure out if a limb is organic
+#define IS_ORGANIC_LIMB(limb) (limb.bodytype & BODYTYPE_ORGANIC)
+/// Helper to figure out if a limb is robotic
+#define IS_ROBOTIC_LIMB(limb) (limb.bodytype & BODYTYPE_ROBOTIC)
+
// Flags for the bodypart_flags var on /obj/item/bodypart
/// Bodypart cannot be dismembered or amputated
#define BODYPART_UNREMOVABLE (1<<0)
diff --git a/code/__HELPERS/bodyparts.dm b/code/__HELPERS/bodyparts.dm
deleted file mode 100644
index 39df8e37e5f..00000000000
--- a/code/__HELPERS/bodyparts.dm
+++ /dev/null
@@ -1 +0,0 @@
-#define IS_ORGANIC_LIMB(limb) (limb.bodytype & BODYTYPE_ORGANIC)
diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index d5fdae81563..60226312866 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -435,12 +435,14 @@ DEFINE_BITFIELD(emote_flags, list(
))
DEFINE_BITFIELD(organ_flags, list(
- "ORGAN_SYNTHETIC" = ORGAN_SYNTHETIC,
+ "ORGAN_ORGANIC" = ORGAN_ORGANIC,
+ "ORGAN_ROBOTIC" = ORGAN_ROBOTIC,
+ "ORGAN_MINERAL" = ORGAN_MINERAL,
"ORGAN_FROZEN" = ORGAN_FROZEN,
"ORGAN_FAILING" = ORGAN_FAILING,
+ "ORGAN_EMP" = ORGAN_EMP,
"ORGAN_VITAL" = ORGAN_VITAL,
"ORGAN_EDIBLE" = ORGAN_EDIBLE,
- "ORGAN_SYNTHETIC_EMP" = ORGAN_SYNTHETIC_EMP,
"ORGAN_UNREMOVABLE" = ORGAN_UNREMOVABLE,
))
diff --git a/code/datums/components/surgery_initiator.dm b/code/datums/components/surgery_initiator.dm
index 693f6db32fc..bc8b0ee9b97 100644
--- a/code/datums/components/surgery_initiator.dm
+++ b/code/datums/components/surgery_initiator.dm
@@ -130,7 +130,6 @@
var/required_tool_type = TOOL_CAUTERY
var/obj/item/close_tool = user.get_inactive_held_item()
var/is_robotic = the_surgery.requires_bodypart_type == BODYTYPE_ROBOTIC
-
if(is_robotic)
required_tool_type = TOOL_SCREWDRIVER
diff --git a/code/datums/quirks/negative_quirks.dm b/code/datums/quirks/negative_quirks.dm
index 00969925a96..c16d92483cb 100644
--- a/code/datums/quirks/negative_quirks.dm
+++ b/code/datums/quirks/negative_quirks.dm
@@ -939,7 +939,7 @@
quirk_holder.add_mob_memory(/datum/memory/key/quirk_smoker, protagonist = quirk_holder, preferred_brand = initial(drug_container_type.name))
// smoker lungs have 25% less health and healing
var/obj/item/organ/internal/lungs/smoker_lungs = quirk_holder.get_organ_slot(ORGAN_SLOT_LUNGS)
- if (smoker_lungs && !(smoker_lungs.organ_flags & ORGAN_SYNTHETIC)) // robotic lungs aren't affected
+ if(smoker_lungs && IS_ORGANIC_ORGAN(smoker_lungs)) // robotic lungs aren't affected
smoker_lungs.maxHealth = smoker_lungs.maxHealth * 0.75
smoker_lungs.healing_factor = smoker_lungs.healing_factor * 0.75
@@ -1198,10 +1198,10 @@
if(!istype(owner))
return
for(var/obj/item/bodypart/limb as anything in owner.bodyparts)
- if(!IS_ORGANIC_LIMB(limb))
+ if(IS_ROBOTIC_LIMB(limb))
cybernetics_level++
for(var/obj/item/organ/organ as anything in owner.organs)
- if((organ.organ_flags & ORGAN_SYNTHETIC || organ.status == ORGAN_ROBOTIC) && !(organ.organ_flags & ORGAN_HIDDEN))
+ if(IS_ROBOTIC_ORGAN(organ) && !(organ.organ_flags & ORGAN_HIDDEN))
cybernetics_level++
update_mood()
@@ -1212,25 +1212,25 @@
/datum/quirk/body_purist/proc/on_organ_gain(datum/source, obj/item/organ/new_organ, special)
SIGNAL_HANDLER
- if((new_organ.organ_flags & ORGAN_SYNTHETIC || new_organ.status == ORGAN_ROBOTIC) && !(new_organ.organ_flags & ORGAN_HIDDEN)) //why the fuck are there 2 of them
+ if(IS_ROBOTIC_ORGAN(new_organ) && !(new_organ.organ_flags & ORGAN_HIDDEN)) //why the fuck are there 2 of them
cybernetics_level++
update_mood()
/datum/quirk/body_purist/proc/on_organ_lose(datum/source, obj/item/organ/old_organ, special)
SIGNAL_HANDLER
- if((old_organ.organ_flags & ORGAN_SYNTHETIC || old_organ.status == ORGAN_ROBOTIC) && !(old_organ.organ_flags & ORGAN_HIDDEN))
+ if(IS_ROBOTIC_ORGAN(old_organ) && !(old_organ.organ_flags & ORGAN_HIDDEN))
cybernetics_level--
update_mood()
/datum/quirk/body_purist/proc/on_limb_gain(datum/source, obj/item/bodypart/new_limb, special)
SIGNAL_HANDLER
- if(!IS_ORGANIC_LIMB(new_limb))
+ if(IS_ROBOTIC_LIMB(new_limb))
cybernetics_level++
update_mood()
/datum/quirk/body_purist/proc/on_limb_lose(datum/source, obj/item/bodypart/old_limb, special)
SIGNAL_HANDLER
- if(!IS_ORGANIC_LIMB(old_limb))
+ if(IS_ROBOTIC_LIMB(old_limb))
cybernetics_level--
update_mood()
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 562f16a262f..16fc1857f2e 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -945,7 +945,7 @@ GLOBAL_LIST_EMPTY(possible_items)
continue
//this is an objective item
var/obj/item/organ/wanted = stolen
- if(!(wanted.organ_flags & ORGAN_FAILING) && !(wanted.organ_flags & ORGAN_SYNTHETIC))
+ if(!(wanted.organ_flags & ORGAN_FAILING) && !IS_ROBOTIC_ORGAN(wanted))
stolen_count++
return stolen_count >= amount
diff --git a/code/game/machinery/dna_infuser/dna_infuser.dm b/code/game/machinery/dna_infuser/dna_infuser.dm
index a07f869b9aa..8275eb1e948 100644
--- a/code/game/machinery/dna_infuser/dna_infuser.dm
+++ b/code/game/machinery/dna_infuser/dna_infuser.dm
@@ -152,7 +152,7 @@
for(var/obj/item/organ/new_organ as anything in infusing_into.output_organs)
var/obj/item/organ/old_organ = target.get_organ_slot(initial(new_organ.slot))
if(old_organ)
- if((old_organ.type != new_organ) && (old_organ.status != ORGAN_ROBOTIC))
+ if((old_organ.type != new_organ) && !IS_ROBOTIC_ORGAN(old_organ))
continue // Old organ can be mutated!
else if(ispath(new_organ, /obj/item/organ/external))
continue // External organ can be grown!
diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm
index 6e38c4fee59..5341a49e89c 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -339,7 +339,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.expose(smoker, INGEST, min(to_smoke / reagents.total_volume, 1))
var/obj/item/organ/internal/lungs/lungs = smoker.get_organ_slot(ORGAN_SLOT_LUNGS)
- if(lungs && !(lungs.organ_flags & ORGAN_SYNTHETIC))
+ if(lungs && IS_ORGANIC_ORGAN(lungs))
var/smoker_resistance = HAS_TRAIT(smoker, TRAIT_SMOKER) ? 0.5 : 1
smoker.adjustOrganLoss(ORGAN_SLOT_LUNGS, lung_harm*smoker_resistance)
if(!reagents.trans_to(smoker, to_smoke, methods = INGEST, ignore_stomach = TRUE))
diff --git a/code/game/objects/items/devices/scanners/health_analyzer.dm b/code/game/objects/items/devices/scanners/health_analyzer.dm
index 54ef949f4bf..333fdab6fcc 100644
--- a/code/game/objects/items/devices/scanners/health_analyzer.dm
+++ b/code/game/objects/items/devices/scanners/health_analyzer.dm
@@ -397,9 +397,9 @@
if(iscarbon(target))
var/mob/living/carbon/carbontarget = target
var/cyberimp_detect
- for(var/obj/item/organ/internal/cyberimp/CI in carbontarget.organs)
- if(CI.status == ORGAN_ROBOTIC && !(CI.organ_flags & ORGAN_HIDDEN))
- cyberimp_detect += "[!cyberimp_detect ? "[CI.get_examine_string(user)]" : ", [CI.get_examine_string(user)]"]"
+ for(var/obj/item/organ/internal/cyberimp/cyberimp in carbontarget.organs)
+ if(IS_ROBOTIC_ORGAN(cyberimp) && !(cyberimp.organ_flags & ORGAN_HIDDEN))
+ cyberimp_detect += "[!cyberimp_detect ? "[cyberimp.get_examine_string(user)]" : ", [cyberimp.get_examine_string(user)]"]"
if(cyberimp_detect)
render_list += "Detected cybernetic modifications:\n"
render_list += "[cyberimp_detect]\n"
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 00f0a2e6c18..bd6deadbbb5 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -88,7 +88,7 @@
patient.balloon_alert(user, "no [parse_zone(user.zone_selected)]!")
return FALSE
if(!IS_ORGANIC_LIMB(affecting)) //Limb must be organic to be healed - RR
- patient.balloon_alert(user, "it's mechanical!")
+ patient.balloon_alert(user, "it's not organic!")
return FALSE
if(affecting.brute_dam && brute || affecting.burn_dam && burn)
user.visible_message(
diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm
index 2251218d78d..661ebec6484 100644
--- a/code/game/objects/items/tools/weldingtool.dm
+++ b/code/game/objects/items/tools/weldingtool.dm
@@ -140,7 +140,7 @@
var/obj/item/bodypart/affecting = attacked_humanoid.get_bodypart(check_zone(user.zone_selected))
- if(affecting && !IS_ORGANIC_LIMB(affecting) && !user.combat_mode)
+ if(affecting && IS_ROBOTIC_LIMB(affecting) && !user.combat_mode)
if(src.use_tool(attacked_humanoid, user, 0, volume=50, amount=1))
if(user == attacked_humanoid)
user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid]'s [affecting.name]."),
diff --git a/code/game/turfs/open/lava.dm b/code/game/turfs/open/lava.dm
index eceee21c816..2df65a74ad4 100644
--- a/code/game/turfs/open/lava.dm
+++ b/code/game/turfs/open/lava.dm
@@ -388,7 +388,7 @@
for(var/obj/item/bodypart/burn_limb as anything in burn_human.bodyparts)
if(IS_ORGANIC_LIMB(burn_limb) && burn_limb.limb_id != SPECIES_PLASMAMAN) //getting every organic, non-plasmaman limb (augments/androids are immune to this)
plasma_parts += burn_limb
- if(!IS_ORGANIC_LIMB(burn_limb))
+ if(IS_ROBOTIC_LIMB(burn_limb))
robo_parts += burn_limb
burn_human.adjustToxLoss(15, required_biotype = MOB_ORGANIC) // This is from plasma, so it should obey plasma biotype requirements
diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm
index 056e72fc1a0..18a4412113e 100644
--- a/code/modules/antagonists/abductor/equipment/gland.dm
+++ b/code/modules/antagonists/abductor/equipment/gland.dm
@@ -3,8 +3,7 @@
desc = "A nausea-inducing hunk of twisting flesh and metal."
icon = 'icons/obj/abductor.dmi'
icon_state = "gland"
- status = ORGAN_ROBOTIC
- organ_flags = NONE
+ organ_flags = ORGAN_ROBOTIC // weird?
beating = TRUE
/// Shows name of the gland as well as a description of what it does upon examination by abductor scientists and observers.
var/abductor_hint = "baseline placebo referencer"
diff --git a/code/modules/antagonists/abductor/equipment/glands/heal.dm b/code/modules/antagonists/abductor/equipment/glands/heal.dm
index 8704f049a91..a8e01a45eee 100644
--- a/code/modules/antagonists/abductor/equipment/glands/heal.dm
+++ b/code/modules/antagonists/abductor/equipment/glands/heal.dm
@@ -22,27 +22,27 @@
return
var/obj/item/organ/internal/appendix/appendix = owner.get_organ_slot(ORGAN_SLOT_APPENDIX)
- if((!appendix && !HAS_TRAIT(owner, TRAIT_NOHUNGER)) || (appendix && ((appendix.organ_flags & ORGAN_FAILING) || (appendix.organ_flags & ORGAN_SYNTHETIC))))
+ if((!appendix && !HAS_TRAIT(owner, TRAIT_NOHUNGER)) || (appendix && ((appendix.organ_flags & ORGAN_FAILING) || IS_ROBOTIC_ORGAN(appendix))))
replace_appendix(appendix)
return
var/obj/item/organ/internal/liver/liver = owner.get_organ_slot(ORGAN_SLOT_LIVER)
- if((!liver && !HAS_TRAIT(owner, TRAIT_LIVERLESS_METABOLISM)) || (liver && ((liver.damage > liver.high_threshold) || (liver.organ_flags & ORGAN_SYNTHETIC))))
+ if((!liver && !HAS_TRAIT(owner, TRAIT_LIVERLESS_METABOLISM)) || (liver && ((liver.damage > liver.high_threshold) || IS_ROBOTIC_ORGAN(liver))))
replace_liver(liver)
return
var/obj/item/organ/internal/lungs/lungs = owner.get_organ_slot(ORGAN_SLOT_LUNGS)
- if((!lungs && !HAS_TRAIT(owner, TRAIT_NOBREATH)) || (lungs && ((lungs.damage > lungs.high_threshold) || (lungs.organ_flags & ORGAN_SYNTHETIC))))
+ if((!lungs && !HAS_TRAIT(owner, TRAIT_NOBREATH)) || (lungs && ((lungs.damage > lungs.high_threshold) || IS_ROBOTIC_ORGAN(lungs))))
replace_lungs(lungs)
return
var/obj/item/organ/internal/stomach/stomach = owner.get_organ_slot(ORGAN_SLOT_STOMACH)
- if((!stomach && !HAS_TRAIT(owner, TRAIT_NOHUNGER)) || (stomach && ((stomach.damage > stomach.high_threshold) || (stomach.organ_flags & ORGAN_SYNTHETIC))))
+ if((!stomach && !HAS_TRAIT(owner, TRAIT_NOHUNGER)) || (stomach && ((stomach.damage > stomach.high_threshold) || IS_ROBOTIC_ORGAN(stomach))))
replace_stomach(stomach)
return
var/obj/item/organ/internal/eyes/eyes = owner.get_organ_slot(ORGAN_SLOT_EYES)
- if(!eyes || (eyes && ((eyes.damage > eyes.low_threshold) || (eyes.organ_flags & ORGAN_SYNTHETIC))))
+ if(!eyes || (eyes && ((eyes.damage > eyes.low_threshold) || IS_ROBOTIC_ORGAN(eyes))))
replace_eyes(eyes)
return
diff --git a/code/modules/antagonists/heretic/heretic_living_heart.dm b/code/modules/antagonists/heretic/heretic_living_heart.dm
index 063303c49b6..b50cd44b0d8 100644
--- a/code/modules/antagonists/heretic/heretic_living_heart.dm
+++ b/code/modules/antagonists/heretic/heretic_living_heart.dm
@@ -55,7 +55,7 @@
/datum/component/living_heart/proc/on_organ_replaced(obj/item/organ/source, obj/item/organ/replacement)
SIGNAL_HANDLER
- if(replacement.status == ORGAN_ROBOTIC || (replacement.organ_flags & ORGAN_SYNTHETIC))
+ if(IS_ROBOTIC_ORGAN(replacement))
qdel(src)
return
diff --git a/code/modules/antagonists/heretic/knowledge/starting_lore.dm b/code/modules/antagonists/heretic/knowledge/starting_lore.dm
index 2e6b8b22772..8f36b866510 100644
--- a/code/modules/antagonists/heretic/knowledge/starting_lore.dm
+++ b/code/modules/antagonists/heretic/knowledge/starting_lore.dm
@@ -183,9 +183,7 @@ GLOBAL_LIST_INIT(heretic_start_knowledge, initialize_starting_knowledge())
return FALSE
if(!new_heart.useable)
return FALSE
- if(new_heart.status == ORGAN_ROBOTIC)
- return FALSE
- if(new_heart.organ_flags & (ORGAN_SYNTHETIC|ORGAN_FAILING))
+ if(new_heart.organ_flags & (ORGAN_ROBOTIC|ORGAN_FAILING))
return FALSE
return TRUE
diff --git a/code/modules/antagonists/heretic/magic/flesh_surgery.dm b/code/modules/antagonists/heretic/magic/flesh_surgery.dm
index 2a216b08969..0fb0a402da9 100644
--- a/code/modules/antagonists/heretic/magic/flesh_surgery.dm
+++ b/code/modules/antagonists/heretic/magic/flesh_surgery.dm
@@ -142,7 +142,7 @@
if(deprecise_zone(organ.zone) != zone_to_check)
continue
// Also, some organs to exclude. Don't remove vital (brains), don't remove synthetics, and don't remove unremovable
- if(organ.organ_flags & (ORGAN_SYNTHETIC|ORGAN_VITAL|ORGAN_UNREMOVABLE))
+ if(organ.organ_flags & (ORGAN_ROBOTIC|ORGAN_VITAL|ORGAN_UNREMOVABLE))
continue
organs_we_can_remove[organ.name] = organ
diff --git a/code/modules/antagonists/heretic/structures/mawed_crucible.dm b/code/modules/antagonists/heretic/structures/mawed_crucible.dm
index 1b720cd9940..091fe2f827e 100644
--- a/code/modules/antagonists/heretic/structures/mawed_crucible.dm
+++ b/code/modules/antagonists/heretic/structures/mawed_crucible.dm
@@ -84,7 +84,7 @@
if(isorgan(weapon))
var/obj/item/organ/consumed = weapon
- if(consumed.status == ORGAN_ROBOTIC || (consumed.organ_flags & ORGAN_SYNTHETIC))
+ if(!IS_ORGANIC_ORGAN(consumed))
balloon_alert(user, "not organic!")
return
if(consumed.organ_flags & ORGAN_VITAL) // Basically, don't eat organs like brains
diff --git a/code/modules/library/bibles.dm b/code/modules/library/bibles.dm
index ecf85954fef..6f65e72f87e 100644
--- a/code/modules/library/bibles.dm
+++ b/code/modules/library/bibles.dm
@@ -216,7 +216,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
var/mob/living/carbon/human/built_in_his_image = blessed
for(var/obj/item/bodypart/bodypart as anything in built_in_his_image.bodyparts)
if(!IS_ORGANIC_LIMB(bodypart))
- balloon_alert(user, "can't heal metal!")
+ balloon_alert(user, "can't heal inorganic!")
return FALSE
var/heal_amt = 10
diff --git a/code/modules/mining/equipment/monster_organs/monster_organ.dm b/code/modules/mining/equipment/monster_organs/monster_organ.dm
index 22837383d31..7898abd6dda 100644
--- a/code/modules/mining/equipment/monster_organs/monster_organ.dm
+++ b/code/modules/mining/equipment/monster_organs/monster_organ.dm
@@ -42,7 +42,7 @@
visual = FALSE
item_flags = NOBLUDGEON
slot = ORGAN_SLOT_MONSTER_CORE
- organ_flags = NONE
+ organ_flags = ORGAN_ORGANIC
force = 0
/// Set to true if this organ has decayed into uselessness.
var/inert = FALSE
diff --git a/code/modules/mining/lavaland/tendril_loot.dm b/code/modules/mining/lavaland/tendril_loot.dm
index 1f2235aa69b..21547bccf0b 100644
--- a/code/modules/mining/lavaland/tendril_loot.dm
+++ b/code/modules/mining/lavaland/tendril_loot.dm
@@ -898,8 +898,7 @@
desc = "An eerie metal shard surrounded by dark energies...of soup drinking. You probably don't think you should have been able to find this."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "cursed_katana_organ"
- status = ORGAN_ORGANIC
- organ_flags = ORGAN_FROZEN|ORGAN_UNREMOVABLE
+ organ_flags = ORGAN_ORGANIC | ORGAN_FROZEN | ORGAN_UNREMOVABLE
items_to_create = list(/obj/item/kitchen/spoon)
extend_sound = 'sound/items/unsheath.ogg'
retract_sound = 'sound/items/sheath.ogg'
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index ea034fd43d6..769105376f6 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -9,7 +9,7 @@
plane = GAME_PLANE_UPPER
zone = BODY_ZONE_HEAD
slot = ORGAN_SLOT_BRAIN
- organ_flags = ORGAN_VITAL
+ organ_flags = ORGAN_ORGANIC | ORGAN_VITAL
attack_verb_continuous = list("attacks", "slaps", "whacks")
attack_verb_simple = list("attack", "slap", "whack")
@@ -379,7 +379,7 @@
desc = "This collection of sparkling gems somehow allows a golem to think."
icon_state = "adamantine_resonator"
color = COLOR_GOLEM_GRAY
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
organ_traits = list(TRAIT_ADVANCEDTOOLUSER, TRAIT_LITERATE, TRAIT_CAN_STRIP, TRAIT_ROCK_METAMORPHIC)
////////////////////////////////////TRAUMAS////////////////////////////////////////
@@ -507,7 +507,7 @@
amount_cured++
return amount_cured
-/obj/item/organ/internal/brain/apply_organ_damage(damage_amount, maximum, required_organtype)
+/obj/item/organ/internal/brain/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag = NONE)
. = ..()
if(!owner)
return
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 3b3a90a0f8c..b4b84d14e5b 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -851,8 +851,6 @@
blood_volume += (excess_healing * 2) //1 excess = 10 blood
for(var/obj/item/organ/organ as anything in organs)
- if(organ.organ_flags & ORGAN_SYNTHETIC)
- continue
organ.apply_organ_damage(excess_healing * -1) //1 excess = 5 organ damage healed
return ..()
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 70797dac337..bafd98b8873 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -427,6 +427,8 @@
return
for(var/obj/item/organ/organ as anything in organs)
organ.emp_act(severity)
+ for(var/obj/item/bodypart/bodypart as anything in src.bodyparts)
+ bodypart.emp_act(severity)
///Adds to the parent by also adding functionality to propagate shocks through pulling and doing some fluff effects.
/mob/living/carbon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
@@ -853,7 +855,7 @@
var/changed_something = FALSE
var/obj/item/organ/new_organ = pick(GLOB.bioscrambler_valid_organs)
var/obj/item/organ/replaced = get_organ_slot(initial(new_organ.slot))
- if (!(replaced?.organ_flags & ORGAN_SYNTHETIC))
+ if (!replaced || !IS_ROBOTIC_ORGAN(replaced))
changed_something = TRUE
new_organ = new new_organ()
new_organ.replace_into(src)
@@ -877,15 +879,15 @@
/// Fill in the lists of things we can bioscramble into people
/mob/living/carbon/proc/init_bioscrambler_lists()
var/list/body_parts = typesof(/obj/item/bodypart/chest) + typesof(/obj/item/bodypart/head) + subtypesof(/obj/item/bodypart/arm) + subtypesof(/obj/item/bodypart/leg)
- for (var/obj/item/bodypart/part as anything in body_parts)
- if (!is_type_in_typecache(part, GLOB.bioscrambler_parts_blacklist) && BODYTYPE_CAN_BE_BIOSCRAMBLED(initial(part.bodytype)))
+ for(var/obj/item/bodypart/part as anything in body_parts)
+ if(!is_type_in_typecache(part, GLOB.bioscrambler_parts_blacklist) && BODYTYPE_CAN_BE_BIOSCRAMBLED(initial(part.bodytype)))
continue
body_parts -= part
GLOB.bioscrambler_valid_parts = body_parts
var/list/organs = subtypesof(/obj/item/organ/internal) + subtypesof(/obj/item/organ/external)
- for (var/obj/item/organ/organ_type as anything in organs)
- if (!is_type_in_typecache(organ_type, GLOB.bioscrambler_organs_blacklist) && !(initial(organ_type.organ_flags) & ORGAN_SYNTHETIC))
+ for(var/obj/item/organ/organ_type as anything in organs)
+ if(!is_type_in_typecache(organ_type, GLOB.bioscrambler_organs_blacklist) && !(initial(organ_type.organ_flags) & ORGAN_ROBOTIC))
continue
organs -= organ_type
GLOB.bioscrambler_valid_organs = organs
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index a0f69296229..2c14cc678e7 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -114,13 +114,13 @@
* * slot - organ slot, like [ORGAN_SLOT_HEART]
* * amount - damage to be done
* * maximum - currently an arbitrarily large number, can be set so as to limit damage
- * * required_organtype - targets only a specific organ type if set to ORGAN_ORGANIC or ORGAN_ROBOTIC
+ * * required_organ_flag - targets only a specific organ type if set to ORGAN_ORGANIC or ORGAN_ROBOTIC
*/
-/mob/living/carbon/adjustOrganLoss(slot, amount, maximum, required_organtype)
+/mob/living/carbon/adjustOrganLoss(slot, amount, maximum = INFINITY, required_organ_flag = NONE)
var/obj/item/organ/affected_organ = get_organ_slot(slot)
if(!affected_organ || (status_flags & GODMODE))
return
- if(required_organtype && (affected_organ.status != required_organtype))
+ if(required_organ_flag && !(affected_organ.organ_flags & required_organ_flag))
return
affected_organ.apply_organ_damage(amount, maximum)
@@ -131,13 +131,13 @@
* Arguments:
* * slot - organ slot, like [ORGAN_SLOT_HEART]
* * amount - damage to be set to
- * * required_organtype - targets only a specific organ type if set to ORGAN_ORGANIC or ORGAN_ROBOTIC
+ * * required_organ_flag - targets only a specific organ type if set to ORGAN_ORGANIC or ORGAN_ROBOTIC
*/
-/mob/living/carbon/setOrganLoss(slot, amount, required_organtype)
+/mob/living/carbon/setOrganLoss(slot, amount, required_organ_flag = NONE)
var/obj/item/organ/affected_organ = get_organ_slot(slot)
if(!affected_organ || (status_flags & GODMODE))
return
- if(required_organtype && (affected_organ.status != required_organtype))
+ if(required_organ_flag && !(affected_organ.organ_flags & required_organ_flag))
return
if(affected_organ.damage == amount)
return
diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm
index a59ba15569b..f5ec7045734 100644
--- a/code/modules/mob/living/carbon/human/_species.dm
+++ b/code/modules/mob/living/carbon/human/_species.dm
@@ -720,7 +720,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(mutant_bodyparts["ears"])
- if(!source.dna.features["ears"] || source.dna.features["ears"] == "None" || source.head && (source.head.flags_inv & HIDEHAIR) || (source.wear_mask && (source.wear_mask.flags_inv & HIDEHAIR)) || !noggin || !IS_ORGANIC_LIMB(noggin))
+ if(!source.dna.features["ears"] || source.dna.features["ears"] == "None" || source.head && (source.head.flags_inv & HIDEHAIR) || (source.wear_mask && (source.wear_mask.flags_inv & HIDEHAIR)) || !noggin || IS_ROBOTIC_LIMB(noggin))
bodyparts_to_add -= "ears"
if(!bodyparts_to_add)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 89930c562e8..7b1b7eb7b6a 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -409,9 +409,9 @@
. += "Rank: [target_record.rank]\n\[Front photo\]\[Side photo\]"
if(HAS_TRAIT(user, TRAIT_MEDICAL_HUD))
var/cyberimp_detect
- for(var/obj/item/organ/internal/cyberimp/CI in organs)
- if(CI.status == ORGAN_ROBOTIC && !(CI.organ_flags & ORGAN_HIDDEN))
- cyberimp_detect += "[!cyberimp_detect ? "[CI.get_examine_string(user)]" : ", [CI.get_examine_string(user)]"]"
+ for(var/obj/item/organ/internal/cyberimp/cyberimp in organs)
+ if(IS_ROBOTIC_ORGAN(cyberimp) && !(cyberimp.organ_flags & ORGAN_HIDDEN))
+ cyberimp_detect += "[!cyberimp_detect ? "[cyberimp.get_examine_string(user)]" : ", [cyberimp.get_examine_string(user)]"]"
if(cyberimp_detect)
. += "Detected cybernetic modifications:"
. += "[cyberimp_detect]"
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 423cdaba0c8..281a80dd4f5 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -523,13 +523,6 @@
to_chat(src, span_notice("You feel your heart beating again!"))
electrocution_animation(40)
-/mob/living/carbon/human/emp_act(severity)
- . = ..()
- if(. & EMP_PROTECT_CONTENTS)
- return
- for(var/obj/item/bodypart/L as anything in src.bodyparts)
- L.emp_act()
-
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit) //todo: update this to utilize check_obscured_slots() //and make sure it's check_obscured_slots(TRUE) to stop aciding through visors etc
var/list/damaged = list()
var/list/inventory_items_to_kill = list()
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 e78912b11d8..75e4297a1c9 100644
--- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm
+++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
@@ -159,7 +159,7 @@
/obj/item/organ/internal/brain/dullahan
decoy_override = TRUE
- organ_flags = NONE
+ organ_flags = ORGAN_ORGANIC //not vital
/obj/item/organ/internal/tongue/dullahan
zone = "abstract"
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 7bee12c758c..2f8ca84a59e 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -779,7 +779,7 @@
if(!needs_heart())
return FALSE
var/obj/item/organ/internal/heart/heart = get_organ_slot(ORGAN_SLOT_HEART)
- if(!heart || (heart.organ_flags & ORGAN_SYNTHETIC))
+ if(!heart || IS_ROBOTIC_ORGAN(heart))
return FALSE
return TRUE
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 3b035cfd413..439101151c6 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -287,11 +287,11 @@
updatehealth()
return amount
-/mob/living/proc/adjustOrganLoss(slot, amount, maximum, required_organtype)
+/mob/living/proc/adjustOrganLoss(slot, amount, maximum, required_organ_flag)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_ORGAN, slot, amount) //SKYRAT EDIT ADDITION
return
-/mob/living/proc/setOrganLoss(slot, amount, maximum, required_organtype)
+/mob/living/proc/setOrganLoss(slot, amount, maximum, required_organ_flag)
return
/mob/living/proc/get_organ_loss(slot)
diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm
index 093c3baee73..59db1264a30 100644
--- a/code/modules/mob/living/silicon/damage_procs.dm
+++ b/code/modules/mob/living/silicon/damage_procs.dm
@@ -33,7 +33,7 @@
/mob/living/silicon/setStaminaLoss(amount, updating_health = TRUE)
return FALSE
-/mob/living/silicon/adjustOrganLoss(slot, amount, maximum = 500, required_organtype) //immune to organ damage (no organs, duh)
+/mob/living/silicon/adjustOrganLoss(slot, amount, maximum = 500, required_organ_flag) //immune to organ damage (no organs, duh)
return FALSE
/mob/living/silicon/setOrganLoss(slot, amount)
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index d5951cadefb..38fe5e08e50 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -570,7 +570,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
return ..()
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
- if(affecting && !IS_ORGANIC_LIMB(affecting))
+ if(affecting && IS_ROBOTIC_LIMB(affecting))
if(user == H)
user.visible_message(span_notice("[user] starts to fix some of the wires in [H]'s [affecting.name]."), span_notice("You start fixing some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name]."))
/* SKYRAT EDIT START - ORIGINAL:
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index ce4e11d9f0d..44cf8b995da 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -80,6 +80,9 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
var/burning_volume = 0.5
///Assoc list with key type of addiction this reagent feeds, and value amount of addiction points added per unit of reagent metabolzied (which means * REAGENTS_METABOLISM every life())
var/list/addiction_types = null
+ /// The affected organ_flags, if the reagent damages/heals organ damage of an affected mob.
+ /// See "Organ defines for carbon mobs" in /code/_DEFINES/surgery.dm
+ var/affected_organ_flags = ORGAN_ORGANIC
/// The affected bodytype, if the reagent damages/heals bodyparts (Brute/Fire) of an affected mob.
/// See "Bodytype defines" in /code/_DEFINES/mobs.dm
var/affected_bodytype = BODYTYPE_ORGANIC
@@ -89,9 +92,6 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
/// The affected respiration type, if the reagent damages/heals oxygen damage of an affected mob.
/// See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
var/affected_respiration_type = ALL
- /// The affected organtype, if the reagent damages/heals organ damage of an affected mob.
- /// See "Organ defines for carbon mobs" in /code/_DEFINES/mobs.dm
- var/affected_organtype = ORGAN_ORGANIC
///The default reagent container for the reagent, used for icon generation
var/obj/item/reagent_containers/default_container = /obj/item/reagent_containers/cup/bottle
diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
index 8898de9ae81..8a6717ca52f 100644
--- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
@@ -100,7 +100,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/c2/libital/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjustBruteLoss(-3 * REM * normalise_creation_purity() * seconds_per_tick, required_bodytype = affected_bodytype)
..()
return TRUE
@@ -164,7 +164,7 @@
/datum/reagent/medicine/c2/lenturi/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
affected_mob.adjustFireLoss(-3 * REM * normalise_creation_purity() * seconds_per_tick, required_bodytype = affected_bodytype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.4 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.4 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
..()
return TRUE
@@ -180,7 +180,7 @@
/datum/reagent/medicine/c2/aiuri/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
affected_mob.adjustFireLoss(-2 * REM * normalise_creation_purity() * seconds_per_tick, required_bodytype = affected_bodytype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_EYES, 0.25 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_EYES, 0.25 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
..()
return TRUE
@@ -331,7 +331,7 @@
//you're yes and... oh no!
healypoints = round(healypoints, 0.1)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, healypoints / 5, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, healypoints / 5, required_organ_flag = affected_organ_flags)
..()
return TRUE
@@ -352,7 +352,7 @@
if(creation_purity >= 1) //Perfectly pure multivers gives a bonus of 2!
medibonus += 1
affected_mob.adjustToxLoss(-0.5 * min(medibonus, 3 * normalise_creation_purity()) * REM * seconds_per_tick, required_biotype = affected_biotype) //not great at healing but if you have nothing else it will work
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * seconds_per_tick, required_organtype = affected_organtype) //kills at 40u
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags) //kills at 40u
for(var/r2 in affected_mob.reagents.reagent_list)
var/datum/reagent/the_reagent2 = r2
if(the_reagent2 == src)
@@ -396,7 +396,7 @@
..()
/datum/reagent/medicine/c2/syriniver/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.8 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.8 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjustToxLoss(-1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
for(var/datum/reagent/R in affected_mob.reagents.reagent_list)
if(issyrinormusc(R))
@@ -407,7 +407,7 @@
. = TRUE
/datum/reagent/medicine/c2/syriniver/overdose_process(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjust_disgust(3 * REM * seconds_per_tick)
affected_mob.reagents.add_reagent(/datum/reagent/medicine/c2/musiver, 0.225 * REM * seconds_per_tick)
..()
@@ -425,7 +425,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/c2/musiver/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.1 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.1 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjustToxLoss(-1 * REM * seconds_per_tick * normalise_creation_purity(), FALSE, required_biotype = affected_biotype)
for(var/datum/reagent/R in affected_mob.reagents.reagent_list)
if(issyrinormusc(R))
@@ -445,7 +445,7 @@
return ..()
/datum/reagent/medicine/c2/musiver/overdose_process(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjust_disgust(3 * REM * seconds_per_tick)
..()
. = TRUE
@@ -529,7 +529,7 @@
/datum/reagent/medicine/c2/penthrite/on_mob_life(mob/living/carbon/human/H, seconds_per_tick, times_fired)
H.adjustStaminaLoss(-25 * REM) //SKYRAT EDIT ADDITION - COMBAT - makes your heart beat faster, fills you with energy. For miners
- H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.25 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.25 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
if(H.health <= HEALTH_THRESHOLD_CRIT && H.health > (H.crit_threshold + HEALTH_THRESHOLD_FULLCRIT * (2 * normalise_creation_purity()))) //we cannot save someone below our lowered crit threshold.
H.adjustToxLoss(-2 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
@@ -539,7 +539,7 @@
H.losebreath = 0
- H.adjustOrganLoss(ORGAN_SLOT_HEART, max(volume/10, 1) * REM * seconds_per_tick, required_organtype = affected_organtype) // your heart is barely keeping up!
+ H.adjustOrganLoss(ORGAN_SLOT_HEART, max(volume/10, 1) * REM * seconds_per_tick, required_organ_flag = affected_organ_flags) // your heart is barely keeping up!
H.set_jitter_if_lower(rand(0 SECONDS, 4 SECONDS) * REM * seconds_per_tick)
H.set_dizzy_if_lower(rand(0 SECONDS, 4 SECONDS) * REM * seconds_per_tick)
@@ -563,7 +563,7 @@
/datum/reagent/medicine/c2/penthrite/overdose_process(mob/living/carbon/human/H, seconds_per_tick, times_fired)
REMOVE_TRAIT(H, TRAIT_STABLEHEART, type)
H.adjustStaminaLoss(10 * REM * seconds_per_tick, required_biotype = affected_biotype)
- H.adjustOrganLoss(ORGAN_SLOT_HEART, 10 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ H.adjustOrganLoss(ORGAN_SLOT_HEART, 10 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
H.set_heartattack(TRUE)
diff --git a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
index 111ab42fe18..d2919b7d4ed 100644
--- a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
@@ -1373,7 +1373,7 @@
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
drinker.set_drugginess(100 SECONDS * REM * seconds_per_tick)
drinker.adjust_dizzy(4 SECONDS * REM * seconds_per_tick)
- drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * seconds_per_tick, 150, required_organtype = affected_organtype)
+ drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * seconds_per_tick, 150, required_organ_flag = affected_organ_flags)
if(SPT_PROB(10, seconds_per_tick))
drinker.adjustStaminaLoss(10, required_biotype = affected_biotype)
drinker.drop_all_held_items()
@@ -1384,7 +1384,7 @@
ADD_TRAIT(drinker, paralyzed_limb, type)
drinker.adjustStaminaLoss(10, required_biotype = affected_biotype)
if(current_cycle > 30)
- drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
if(current_cycle > 50 && SPT_PROB(7.5, seconds_per_tick))
if(!drinker.undergoing_cardiac_arrest() && drinker.can_heartattack())
drinker.set_heartattack(TRUE)
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index 5bf64550bc2..9a0339551cd 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -126,7 +126,7 @@
..()
/datum/reagent/drug/krokodil/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.25 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.25 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjustToxLoss(0.25 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -179,7 +179,7 @@
affected_mob.AdjustImmobilized(-40 * REM * seconds_per_tick)
affected_mob.adjustStaminaLoss(-2 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
affected_mob.set_jitter_if_lower(4 SECONDS * REM * seconds_per_tick)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.emote(pick("twitch", "shiver"))
..()
@@ -196,7 +196,7 @@
affected_mob.drop_all_held_items()
..()
affected_mob.adjustToxLoss(1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, (rand(5, 10) / 10) * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, (rand(5, 10) / 10) * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
. = TRUE
/datum/reagent/drug/bath_salts
@@ -231,7 +231,7 @@
to_chat(affected_mob, span_notice("[high_message]"))
affected_mob.add_mood_event("salted", /datum/mood_event/stimulant_heavy, name)
affected_mob.adjustStaminaLoss(-5 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjust_hallucinations(10 SECONDS * REM * seconds_per_tick)
if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && !ismovable(affected_mob.loc))
step(affected_mob, pick(GLOB.cardinals))
@@ -294,7 +294,7 @@
affected_mob.remove_status_effect(/datum/status_effect/jitter)
affected_mob.remove_status_effect(/datum/status_effect/confusion)
affected_mob.disgust = 0
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
..()
. = TRUE
@@ -311,7 +311,7 @@
if(3)
affected_mob.emote("frown")
affected_mob.add_mood_event("happiness_drug", /datum/mood_event/happiness_drug_bad_od)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
..()
. = TRUE
@@ -386,7 +386,7 @@
/datum/reagent/drug/maint/powder/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.1 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.1 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
// 5x if you want to OD, you can potentially go higher, but good luck managing the brain damage.
var/amt = max(round(volume/3, 0.1), 1)
affected_mob?.mind?.experience_multiplier_reasons |= type
@@ -399,7 +399,7 @@
/datum/reagent/drug/maint/powder/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 6 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 6 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
/datum/reagent/drug/maint/sludge
name = "Maintenance Sludge"
@@ -452,13 +452,13 @@
affected_mob.AdjustUnconscious(-10 * REM * seconds_per_tick)
affected_mob.AdjustParalyzed(-10 * REM * seconds_per_tick)
affected_mob.AdjustImmobilized(-10 * REM * seconds_per_tick)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
/datum/reagent/drug/maint/tar/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
affected_mob.adjustToxLoss(5 * REM * seconds_per_tick, required_biotype = affected_biotype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 3 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 3 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
/datum/reagent/drug/mushroomhallucinogen
name = "Mushroom Hallucinogen"
@@ -599,7 +599,7 @@
/datum/reagent/drug/blastoff/on_mob_life(mob/living/carbon/dancer, seconds_per_tick, times_fired)
. = ..()
- dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
dancer.AdjustKnockdown(-20)
if(SPT_PROB(BLASTOFF_DANCE_MOVE_CHANCE_PER_UNIT * volume, seconds_per_tick))
@@ -607,7 +607,7 @@
/datum/reagent/drug/blastoff/overdose_process(mob/living/dancer, seconds_per_tick, times_fired)
. = ..()
- dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
if(SPT_PROB(BLASTOFF_DANCE_MOVE_CHANCE_PER_UNIT * volume, seconds_per_tick))
dancer.emote("spin")
@@ -670,7 +670,7 @@
/datum/reagent/drug/saturnx/on_mob_life(mob/living/carbon/invisible_man, seconds_per_tick, times_fired)
. = ..()
- invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
/datum/reagent/drug/saturnx/on_mob_metabolize(mob/living/invisible_man)
. = ..()
@@ -746,7 +746,7 @@
invisible_man.emote("giggle")
if(SPT_PROB(5, seconds_per_tick))
invisible_man.emote("laugh")
- invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.4 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.4 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
/datum/reagent/drug/saturnx/stable
name = "Stabilized Saturn-X"
@@ -788,7 +788,7 @@
/datum/reagent/drug/kronkaine/on_mob_life(mob/living/carbon/kronkaine_fiend, seconds_per_tick, times_fired)
. = ..()
kronkaine_fiend.add_mood_event("tweaking", /datum/mood_event/stimulant_medium, name)
- kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 0.4 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 0.4 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
kronkaine_fiend.set_jitter_if_lower(20 SECONDS * REM * seconds_per_tick)
kronkaine_fiend.AdjustSleeping(-20 * REM * seconds_per_tick)
kronkaine_fiend.adjust_drowsiness(-10 SECONDS * REM * seconds_per_tick)
@@ -801,7 +801,7 @@
/datum/reagent/drug/kronkaine/overdose_process(mob/living/kronkaine_fiend, seconds_per_tick, times_fired)
. = ..()
- kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 1 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 1 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
kronkaine_fiend.set_jitter_if_lower(20 SECONDS * REM * seconds_per_tick)
if(SPT_PROB(10, seconds_per_tick))
to_chat(kronkaine_fiend, span_danger(pick("You feel like your heart is going to explode!", "Your ears are ringing!", "You sweat like a pig!", "You clench your jaw and grind your teeth.", "You feel prickles of pain in your chest.")))
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
index 682ca6f9f0b..d14df37ce96 100644
--- a/code/modules/reagents/chemistry/reagents/impure_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
@@ -15,11 +15,11 @@
var/liver_damage = 0.5
/datum/reagent/impurity/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- var/obj/item/organ/internal/liver/L = affected_mob.get_organ_slot(ORGAN_SLOT_LIVER)
- if(!L)//Though, lets be safe
+ var/obj/item/organ/internal/liver/liver = affected_mob.get_organ_slot(ORGAN_SLOT_LIVER)
+ if(!liver)//Though, lets be safe
affected_mob.adjustToxLoss(1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)//Incase of no liver!
return ..()
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, liver_damage * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, liver_damage * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
return ..()
//Basically just so people don't forget to adjust metabolization_rate
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm
index 7157b87f890..33cefdbb890 100644
--- a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_medicine_reagents.dm
@@ -297,7 +297,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
/datum/reagent/inverse/hercuri/overdose_process(mob/living/carbon/owner, seconds_per_tick, times_fired)
. = ..()
- owner.adjustOrganLoss(ORGAN_SLOT_LIVER, 2 * REM * seconds_per_tick, required_organtype = affected_organtype) //Makes it so you can't abuse it with pyroxadone very easily (liver dies from 25u unless it's fully upgraded)
+ owner.adjustOrganLoss(ORGAN_SLOT_LIVER, 2 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags) //Makes it so you can't abuse it with pyroxadone very easily (liver dies from 25u unless it's fully upgraded)
var/heating = 10 * creation_purity * REM * seconds_per_tick * TEMPERATURE_DAMAGE_COEFFICIENT
owner.adjust_bodytemperature(heating) //hot hot
if(ishuman(owner))
@@ -491,7 +491,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
//Heals toxins if it's the only thing present - kinda the oposite of multiver! Maybe that's why it's inverse!
/datum/reagent/inverse/healing/monover/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
if(length(affected_mob.reagents.reagent_list) > 1)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * seconds_per_tick, required_organtype = affected_organtype) //Hey! It's everyone's favourite drawback from multiver!
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * seconds_per_tick, required_organ_flag = affected_organ_flags) //Hey! It's everyone's favourite drawback from multiver!
return ..()
affected_mob.adjustToxLoss(-2 * REM * creation_purity * seconds_per_tick, FALSE, required_biotype = affected_biotype)
..()
@@ -552,7 +552,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
for(var/datum/wound/iter_wound as anything in affected_mob.all_wounds)
iter_wound.adjust_blood_flow(1-creation_purity)
affected_mob.adjustBruteLoss(5 * (1-creation_purity) * seconds_per_tick, required_bodytype = affected_bodytype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, (1 + (1-creation_purity)) * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, (1 + (1-creation_purity)) * seconds_per_tick, required_organ_flag = affected_organ_flags)
if(affected_mob.health < HEALTH_THRESHOLD_CRIT)
affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/nooartrium)
if(affected_mob.health < HEALTH_THRESHOLD_FULLCRIT)
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_toxin_reagents.dm
index 12912b80a15..947c83c3166 100644
--- a/code/modules/reagents/chemistry/reagents/impure_reagents/impure_toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents/impure_toxin_reagents.dm
@@ -30,7 +30,7 @@
/datum/reagent/impurity/methanol/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
var/obj/item/organ/internal/eyes/eyes = affected_mob.get_organ_slot(ORGAN_SLOT_EYES)
- eyes?.apply_organ_damage(0.5 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ eyes?.apply_organ_damage(0.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
return ..()
//Chloral Hydrate - Impure Version
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 89bd36fc6bc..329e955f0f4 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -728,7 +728,7 @@
var/obj/item/organ/internal/eyes/eyes = affected_mob.get_organ_slot(ORGAN_SLOT_EYES)
if(eyes)
// Healing eye damage will cure nearsightedness and blindness from ... eye damage
- eyes.apply_organ_damage(-2 * REM * seconds_per_tick * normalise_creation_purity(), required_organtype = affected_organtype)
+ eyes.apply_organ_damage(-2 * REM * seconds_per_tick * normalise_creation_purity(), required_organ_flag = affected_organ_flags)
// If our eyes are seriously damaged, we have a probability of causing eye blur while healing depending on purity
if(eyes.damaged && SPT_PROB(16 - min(normalized_purity * 6, 12), seconds_per_tick))
// While healing, gives some eye blur
@@ -998,7 +998,7 @@
inverse_chem_val = 0.45
/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * seconds_per_tick * normalise_creation_purity(), required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * seconds_per_tick * normalise_creation_purity(), required_organ_flag = affected_organ_flags)
..()
//Having mannitol in you will pause the brain damage from brain tumor (so it heals an even 2 brain damage instead of 1.8)
@@ -1064,7 +1064,7 @@
..()
/datum/reagent/medicine/neurine/on_mob_dead(mob/living/carbon/affected_mob, seconds_per_tick)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * REM * seconds_per_tick * normalise_creation_purity(), required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * REM * seconds_per_tick * normalise_creation_purity(), required_organ_flag = affected_organ_flags)
..()
/datum/reagent/medicine/mutadone
@@ -1251,7 +1251,7 @@
affected_mob.adjustToxLoss(-0.5 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
affected_mob.adjustCloneLoss(-0.1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
affected_mob.adjustStaminaLoss(-0.5 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * seconds_per_tick, 150, affected_organtype) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * seconds_per_tick, 150, affected_organ_flags) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
else
affected_mob.adjustBruteLoss(-5 * REM * seconds_per_tick, FALSE, required_bodytype = affected_bodytype) //slow to start, but very quick healing once it gets going
affected_mob.adjustFireLoss(-5 * REM * seconds_per_tick, FALSE, required_bodytype = affected_bodytype)
@@ -1260,7 +1260,7 @@
affected_mob.adjustCloneLoss(-1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
affected_mob.adjustStaminaLoss(-3 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
affected_mob.adjust_jitter_up_to(6 SECONDS * REM * seconds_per_tick, 1 MINUTES)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * seconds_per_tick, 150, affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * seconds_per_tick, 150, affected_organ_flags)
if(SPT_PROB(5, seconds_per_tick))
affected_mob.say(return_hippie_line(), forced = /datum/reagent/medicine/earthsblood)
affected_mob.adjust_drugginess_up_to(20 SECONDS * REM * seconds_per_tick, 30 SECONDS * REM * seconds_per_tick)
@@ -1322,7 +1322,7 @@
affected_mob.adjust_hallucinations(-10 SECONDS * REM * seconds_per_tick)
if(SPT_PROB(10, seconds_per_tick))
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 50, affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 50, affected_organ_flags)
affected_mob.adjustStaminaLoss(2.5 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
..()
return TRUE
@@ -1552,7 +1552,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/silibinin/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, -2 * REM * seconds_per_tick, required_organtype = affected_organtype)//Add a chance to cure liver trauma once implemented.
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, -2 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)//Add a chance to cure liver trauma once implemented.
..()
. = TRUE
@@ -1568,7 +1568,7 @@
/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) //I wanted a collection of small positive effects, this is as hard to obtain as coniine after all.
. = ..()
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjustBruteLoss(-0.35 * REM * seconds_per_tick, FALSE, required_bodytype = affected_bodytype)
return TRUE
@@ -1581,7 +1581,7 @@
exposed_human.update_body_parts()
/datum/reagent/medicine/polypyr/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
..()
. = TRUE
@@ -1603,7 +1603,7 @@
/datum/reagent/medicine/granibitaluri/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = TRUE
- affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.2 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.2 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
affected_mob.adjustToxLoss(0.2 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype) //Only really deadly if you eat over 100u
..()
diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm
index 1682395ddb0..9c2b38f1850 100644
--- a/code/modules/reagents/reagent_containers/patch.dm
+++ b/code/modules/reagents/reagent_containers/patch.dm
@@ -18,7 +18,7 @@
to_chat(user, span_warning("The limb is missing!"))
return
if(!IS_ORGANIC_LIMB(affecting))
- to_chat(user, span_notice("Medicine won't work on a robotic limb!"))
+ to_chat(user, span_notice("Medicine won't work on an inorganic limb!"))
return
..()
diff --git a/code/modules/religion/religion_sects.dm b/code/modules/religion/religion_sects.dm
index 1139de6e5cb..de7f1069a83 100644
--- a/code/modules/religion/religion_sects.dm
+++ b/code/modules/religion/religion_sects.dm
@@ -98,7 +98,7 @@
return FALSE
var/mob/living/carbon/human/blessed = target
for(var/obj/item/bodypart/bodypart as anything in blessed.bodyparts)
- if(!IS_ORGANIC_LIMB(bodypart))
+ if(IS_ROBOTIC_LIMB(bodypart))
to_chat(chap, span_warning("[GLOB.deity] refuses to heal this metallic taint!"))
return TRUE
@@ -258,7 +258,7 @@
return FALSE
var/mob/living/carbon/human/blessed = blessed_living
for(var/obj/item/bodypart/robolimb as anything in blessed.bodyparts)
- if(!IS_ORGANIC_LIMB(robolimb))
+ if(IS_ROBOTIC_LIMB(robolimb))
to_chat(chap, span_warning("[GLOB.deity] refuses to heal this metallic taint!"))
return TRUE
diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm
index 7a7412a6eea..45260a3cfe5 100644
--- a/code/modules/surgery/bodyparts/_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -76,9 +76,6 @@
///A mutiplication of the burn and brute damage that the limb's stored damage contributes to its attached mob's overall wellbeing.
var/body_damage_coeff = 1
- ///Used in determining overlays for limb damage states. As the mob receives more burn/brute damage, their limbs update to reflect.
- var/brutestate = 0
- var/burnstate = 0
///The current amount of brute damage the limb has
var/brute_dam = 0
///The current amount of burn damage the limb has
@@ -86,6 +83,10 @@
///The maximum brute OR burn damage a bodypart can take. Once we hit this cap, no more damage of either type!
var/max_damage = 0
+ //Used in determining overlays for limb damage states. As the mob receives more burn/brute damage, their limbs update to reflect.
+ var/brutestate = 0
+ var/burnstate = 0
+
///Gradually increases while burning when at full damage, destroys the limb when at 100
var/cremation_progress = 0
diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm
index 6c68ed3d0d5..1cdbc3ba5a9 100644
--- a/code/modules/surgery/organs/_organ.dm
+++ b/code/modules/surgery/organs/_organ.dm
@@ -4,26 +4,32 @@
icon = 'icons/obj/medical/organs/organs.dmi'
w_class = WEIGHT_CLASS_SMALL
throwforce = 0
- ///The mob that owns this organ.
+ /// The mob that owns this organ.
var/mob/living/carbon/owner = null
- var/status = ORGAN_ORGANIC
- ///The body zone this organ is supposed to inhabit.
+ /// The body zone this organ is supposed to inhabit.
var/zone = BODY_ZONE_CHEST
- ///The organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc)
+ /**
+ * The organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc)
+ * Do NOT add slots with matching names to different zones - it will break the organs_slot list!
+ */
var/slot
- // DO NOT add slots with matching names to different zones - it will break organs_slot list!
- var/organ_flags = ORGAN_EDIBLE
+ /// Random flags that describe this organ
+ var/organ_flags = ORGAN_ORGANIC | ORGAN_EDIBLE
+ /// Maximum damage the organ can take, ever.
var/maxHealth = STANDARD_ORGAN_THRESHOLD
- /// Total damage this organ has sustained
- /// Should only ever be modified by apply_organ_damage
+ /**
+ * Total damage this organ has sustained.
+ * Should only ever be modified by apply_organ_damage!
+ */
var/damage = 0
- ///Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick
+ /// Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick
var/healing_factor = 0 //fraction of maxhealth healed per on_life(), set to 0 for generic organs
var/decay_factor = 0 //same as above but when without a living owner, set to 0 for generic organs
var/high_threshold = STANDARD_ORGAN_THRESHOLD * 0.45 //when severe organ damage occurs
var/low_threshold = STANDARD_ORGAN_THRESHOLD * 0.1 //when minor organ damage occurs
var/severe_cooldown //cooldown for severe effects, used for synthetic organ emp effects.
- ///Organ variables for determining what we alert the owner with when they pass/clear the damage thresholds
+
+ // Organ variables for determining what we alert the owner with when they pass/clear the damage thresholds
var/prev_damage = 0
var/low_threshold_passed
var/high_threshold_passed
@@ -32,16 +38,22 @@
var/high_threshold_cleared
var/low_threshold_cleared
- ///When you take a bite you cant jam it in for surgery anymore.
+ /// When set to false, this can't be used in surgeries and such - Honestly a terrible variable.
var/useable = TRUE
+
+ /// Food reagents if the organ is edible
var/list/food_reagents = list(/datum/reagent/consumable/nutriment = 5)
- ///The size of the reagent container
+ /// The size of the reagent container if the organ is edible
var/reagent_vol = 10
+ /// Time this organ has failed for
var/failure_time = 0
- ///Do we effect the appearance of our mob. Used to save time in preference code
+ /// Do we affect the appearance of our mob. Used to save time in preference code
var/visual = TRUE
- /// Traits that are given to the holder of the organ. If you want an effect that changes this, don't add directly to this. Use the add_organ_trait() proc
+ /**
+ * Traits that are given to the holder of the organ.
+ * If you want an effect that changes this, don't add directly to this. Use the add_organ_trait() proc.
+ */
var/list/organ_traits
/// Status Effects that are given to the holder of the organ.
var/list/organ_effects
@@ -201,7 +213,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
. += span_notice("It should be inserted in the [parse_zone(zone)].")
if(organ_flags & ORGAN_FAILING)
- if(status == ORGAN_ROBOTIC)
+ if(IS_ROBOTIC_ORGAN(src))
. += span_warning("[src] seems to be broken.")
return
. += span_warning("[src] has decayed for too long, and has turned a sickly color. It probably won't work without repairs.")
@@ -225,12 +237,12 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
return //so we don't grant the organ's action to mobs who pick up the organ.
///Adjusts an organ's damage by the amount "damage_amount", up to a maximum amount, which is by default max damage
-/obj/item/organ/proc/apply_organ_damage(damage_amount, maximum = maxHealth, required_organtype) //use for damaging effects
+/obj/item/organ/proc/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag = NONE) //use for damaging effects
if(!damage_amount) //Micro-optimization.
return
if(maximum < damage)
return
- if(required_organtype && (status != required_organtype))
+ if(required_organ_flag && !(organ_flags & required_organ_flag))
return
damage = clamp(damage + damage_amount, 0, maximum)
var/mess = check_damage_thresholds(owner)
@@ -245,8 +257,8 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
to_chat(owner, mess)
///SETS an organ's damage to the amount "damage_amount", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken
-/obj/item/organ/proc/set_organ_damage(damage_amount, required_organtype) //use mostly for admin heals
- apply_organ_damage(damage_amount - damage, required_organtype = required_organtype)
+/obj/item/organ/proc/set_organ_damage(damage_amount, required_organ_flag = NONE) //use mostly for admin heals
+ return apply_organ_damage(damage_amount - damage, required_organ_flag = required_organ_flag)
/** check_damage_thresholds
* input: mob/organ_owner (a mob, the owner of the organ we call the proc on)
diff --git a/code/modules/surgery/organs/external/_external_organ.dm b/code/modules/surgery/organs/external/_external_organ.dm
index 3b5a69c5f5e..8c120df732e 100644
--- a/code/modules/surgery/organs/external/_external_organ.dm
+++ b/code/modules/surgery/organs/external/_external_organ.dm
@@ -7,7 +7,7 @@
name = "external organ"
desc = "An external organ that is too external."
- organ_flags = ORGAN_EDIBLE
+ organ_flags = ORGAN_ORGANIC | ORGAN_EDIBLE
visual = TRUE
///The overlay datum that actually draws stuff on the limb
diff --git a/code/modules/surgery/organs/external/wings/functional_wings.dm b/code/modules/surgery/organs/external/wings/functional_wings.dm
index b9233da81c8..10af23158f4 100644
--- a/code/modules/surgery/organs/external/wings/functional_wings.dm
+++ b/code/modules/surgery/organs/external/wings/functional_wings.dm
@@ -186,6 +186,7 @@
/obj/item/organ/external/wings/functional/robotic
name = "robotic wings"
desc = "Using microscopic hover-engines, or \"microwings,\" as they're known in the trade, these tiny devices are able to lift a few grams at a time. Gathering enough of them, and you can lift impressively large things."
+ organ_flags = ORGAN_ROBOTIC
sprite_accessory_override = /datum/sprite_accessory/wings/robotic
///skeletal wings, which relate to skeletal races.
diff --git a/code/modules/surgery/organs/internal/_internal_organ.dm b/code/modules/surgery/organs/internal/_internal_organ.dm
index a51ad9dd1fe..0c314237a47 100644
--- a/code/modules/surgery/organs/internal/_internal_organ.dm
+++ b/code/modules/surgery/organs/internal/_internal_organ.dm
@@ -41,7 +41,7 @@
on_death(seconds_per_tick, times_fired) //Kinda hate doing it like this, but I really don't want to call process directly.
/obj/item/organ/internal/on_death(seconds_per_tick, times_fired) //runs decay when outside of a person
- if(organ_flags & (ORGAN_SYNTHETIC | ORGAN_FROZEN))
+ if(organ_flags & (ORGAN_ROBOTIC | ORGAN_FROZEN))
return
apply_organ_damage(decay_factor * maxHealth * seconds_per_tick)
@@ -57,7 +57,7 @@
if(failure_time > 0)
failure_time--
- if(organ_flags & ORGAN_SYNTHETIC_EMP) //Synthetic organ has been emped, is now failing.
+ if(organ_flags & ORGAN_EMP) //Synthetic organ has been emped, is now failing.
apply_organ_damage(decay_factor * maxHealth * seconds_per_tick)
return
diff --git a/code/modules/surgery/organs/internal/appendix/_appendix.dm b/code/modules/surgery/organs/internal/appendix/_appendix.dm
index 8a0f04be1f2..835d7e62bed 100644
--- a/code/modules/surgery/organs/internal/appendix/_appendix.dm
+++ b/code/modules/surgery/organs/internal/appendix/_appendix.dm
@@ -28,14 +28,13 @@
return ..()
/obj/item/organ/internal/appendix/on_life(seconds_per_tick, times_fired)
- ..()
- var/mob/living/carbon/organ_owner = owner
- if(!organ_owner)
+ . = ..()
+ if(!owner)
return
if(organ_flags & ORGAN_FAILING)
// forced to ensure people don't use it to gain tox as slime person
- organ_owner.adjustToxLoss(2 * seconds_per_tick, updating_health = TRUE, forced = TRUE)
+ owner.adjustToxLoss(2 * seconds_per_tick, updating_health = TRUE, forced = TRUE)
else if(inflamation_stage)
inflamation(seconds_per_tick)
else if(SPT_PROB(APPENDICITIS_PROB, seconds_per_tick))
diff --git a/code/modules/surgery/organs/internal/appendix/appendix_golem.dm b/code/modules/surgery/organs/internal/appendix/appendix_golem.dm
index eb89112cbd0..03b076b1b2a 100644
--- a/code/modules/surgery/organs/internal/appendix/appendix_golem.dm
+++ b/code/modules/surgery/organs/internal/appendix/appendix_golem.dm
@@ -4,7 +4,7 @@
desc = "This expanded digestive chamber allows golems to smelt minerals, provided that they are immersed in lava."
icon_state = "ethereal_heart"
color = COLOR_GOLEM_GRAY
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
/// Action which performs smelting
var/datum/action/cooldown/internal_smelting/smelter
diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm b/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm
index 6f28dd871a3..8df969c3bec 100644
--- a/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm
+++ b/code/modules/surgery/organs/internal/cyberimp/augments_arms.dm
@@ -60,7 +60,7 @@
/obj/item/organ/internal/cyberimp/arm/examine(mob/user)
. = ..()
- if(status == ORGAN_ROBOTIC)
+ if(IS_ROBOTIC_ORGAN(src))
. += span_info("[src] is assembled in the [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm configuration. You can use a screwdriver to reassemble it.")
/obj/item/organ/internal/cyberimp/arm/screwdriver_act(mob/living/user, obj/item/screwtool)
@@ -98,7 +98,7 @@
/obj/item/organ/internal/cyberimp/arm/emp_act(severity)
. = ..()
- if(. & EMP_PROTECT_SELF || status == ORGAN_ORGANIC)
+ if(. & EMP_PROTECT_SELF || !IS_ROBOTIC_ORGAN(src))
return
if(prob(15/severity) && owner)
to_chat(owner, span_warning("The electromagnetic pulse causes [src] to malfunction!"))
diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm b/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm
index 837b10443f2..352d4237cc0 100644
--- a/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm
+++ b/code/modules/surgery/organs/internal/cyberimp/augments_eyes.dm
@@ -44,7 +44,6 @@
desc = "These cybernetic eye implants will display a security HUD over everything you see."
HUD_type = DATA_HUD_SECURITY_ADVANCED
HUD_trait = TRAIT_SECURITY_HUD
- organ_flags = ALL
/obj/item/organ/internal/cyberimp/eyes/hud/diagnostic
name = "Diagnostic HUD implant"
@@ -54,4 +53,4 @@
/obj/item/organ/internal/cyberimp/eyes/hud/security/syndicate
name = "Contraband Security HUD Implant"
desc = "A Cybersun Industries brand Security HUD Implant. These illicit cybernetic eye implants will display a security HUD over everything you see."
- organ_flags = ORGAN_SYNTHETIC | ORGAN_HIDDEN
+ organ_flags = ORGAN_ROBOTIC | ORGAN_HIDDEN
diff --git a/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm b/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm
index 0ae0cbc962a..48f48bf674c 100644
--- a/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm
+++ b/code/modules/surgery/organs/internal/cyberimp/augments_internal.dm
@@ -3,8 +3,7 @@
name = "cybernetic implant"
desc = "A state-of-the-art implant that improves a baseline's functionality."
visual = FALSE
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
var/implant_color = "#FFFFFF"
var/implant_overlay
diff --git a/code/modules/surgery/organs/internal/ears/_ears.dm b/code/modules/surgery/organs/internal/ears/_ears.dm
index 0f02f71153f..c6dd57024ca 100644
--- a/code/modules/surgery/organs/internal/ears/_ears.dm
+++ b/code/modules/surgery/organs/internal/ears/_ears.dm
@@ -108,7 +108,7 @@
icon_state = "ears-c"
desc = "A basic cybernetic organ designed to mimic the operation of ears."
damage_multiplier = 0.9
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
/obj/item/organ/internal/ears/cybernetic/upgraded
name = "upgraded cybernetic ears"
diff --git a/code/modules/surgery/organs/internal/eyes/_eyes.dm b/code/modules/surgery/organs/internal/eyes/_eyes.dm
index 03473c48553..27e51ffe1ca 100644
--- a/code/modules/surgery/organs/internal/eyes/_eyes.dm
+++ b/code/modules/surgery/organs/internal/eyes/_eyes.dm
@@ -180,7 +180,7 @@
eye_color_left = initial(eye_color_left)
eye_color_right = initial(eye_color_right)
-/obj/item/organ/internal/eyes/apply_organ_damage(damage_amount, maximum, required_organtype)
+/obj/item/organ/internal/eyes/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag)
. = ..()
if(!owner)
return
@@ -290,7 +290,7 @@
desc = "Golems somehow measure external light levels and detect nearby ore using this sensitive mineral lattice."
color = COLOR_GOLEM_GRAY
visual = FALSE
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
color_cutoffs = list(10, 15, 5)
actions_types = list(/datum/action/cooldown/golem_ore_sight)
@@ -313,12 +313,11 @@
name = "robotic eyes"
icon_state = "cybernetic_eyeballs"
desc = "Your vision is augmented."
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
/obj/item/organ/internal/eyes/robotic/emp_act(severity)
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
if(prob(10 * severity))
return
diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm
index 072da2a9755..785831680db 100644
--- a/code/modules/surgery/organs/internal/heart/_heart.dm
+++ b/code/modules/surgery/organs/internal/heart/_heart.dm
@@ -201,7 +201,7 @@
desc = "A basic electronic device designed to mimic the functions of an organic human heart."
icon_state = "heart-c-on"
base_icon_state = "heart-c"
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
maxHealth = STANDARD_ORGAN_THRESHOLD*0.75 //This also hits defib timer, so a bit higher than its less important counterparts
var/dose_available = FALSE
@@ -240,7 +240,7 @@
COOLDOWN_START(src, severe_cooldown, 20 SECONDS)
if(prob(emp_vulnerability/severity)) //Chance of permanent effects
- organ_flags |= ORGAN_SYNTHETIC_EMP //Starts organ faliure - gonna need replacing soon.
+ organ_flags |= ORGAN_EMP //Starts organ faliure - gonna need replacing soon.
Stop()
addtimer(CALLBACK(src, PROC_REF(Restart)), 10 SECONDS)
if(owner_needs_us)
@@ -265,7 +265,7 @@
/obj/item/organ/internal/heart/freedom
name = "heart of freedom"
desc = "This heart pumps with the passion to give... something freedom."
- organ_flags = ORGAN_SYNTHETIC //the power of freedom prevents heart attacks
+ organ_flags = ORGAN_ROBOTIC //the power of freedom prevents heart attacks
/// The cooldown until the next time this heart can give the host an adrenaline boost.
COOLDOWN_DECLARE(adrenaline_cooldown)
diff --git a/code/modules/surgery/organs/internal/liver/_liver.dm b/code/modules/surgery/organs/internal/liver/_liver.dm
index e69a632fdeb..b78a6b1361e 100644
--- a/code/modules/surgery/organs/internal/liver/_liver.dm
+++ b/code/modules/surgery/organs/internal/liver/_liver.dm
@@ -141,7 +141,7 @@
if(filterToxins && !HAS_TRAIT(owner, TRAIT_TOXINLOVER))
for(var/datum/reagent/toxin/toxin in cached_reagents)
- if(status != toxin.affected_organtype) //this particular toxin does not affect this type of organ
+ if(toxin.affected_organ_flags && !(organ_flags & toxin.affected_organ_flags)) //this particular toxin does not affect this type of organ
continue
var/amount = round(toxin.volume, CHEMICAL_QUANTISATION_LEVEL) // this is an optimization
if(belly)
@@ -247,7 +247,7 @@
name = "basic cybernetic liver"
desc = "A very basic device designed to mimic the functions of a human liver. Handles toxins slightly worse than an organic liver."
icon_state = "liver-c"
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
toxTolerance = 2
liver_resistance = 0.9 * LIVER_DEFAULT_TOX_RESISTANCE // -10%
maxHealth = STANDARD_ORGAN_THRESHOLD*0.5
@@ -280,7 +280,7 @@
owner.adjustToxLoss(10)
COOLDOWN_START(src, severe_cooldown, 10 SECONDS)
if(prob(emp_vulnerability/severity)) //Chance of permanent effects
- organ_flags |= ORGAN_SYNTHETIC_EMP //Starts organ faliure - gonna need replacing soon.
+ organ_flags |= ORGAN_EMP //Starts organ faliure - gonna need replacing soon.
#undef HAS_SILENT_TOXIN
#undef HAS_NO_TOXIN
diff --git a/code/modules/surgery/organs/internal/liver/liver_golem.dm b/code/modules/surgery/organs/internal/liver/liver_golem.dm
index 4bcfae5d9d9..1ab3eabcd9c 100644
--- a/code/modules/surgery/organs/internal/liver/liver_golem.dm
+++ b/code/modules/surgery/organs/internal/liver/liver_golem.dm
@@ -9,7 +9,7 @@
name = "porous rock"
desc = "A spongy rock capable of absorbing chemicals."
icon_state = "liver-p"
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
color = COLOR_GOLEM_GRAY
/obj/item/organ/internal/liver/golem/handle_chemical(mob/living/carbon/organ_owner, datum/reagent/chem, seconds_per_tick, times_fired)
diff --git a/code/modules/surgery/organs/internal/liver/liver_plasmaman.dm b/code/modules/surgery/organs/internal/liver/liver_plasmaman.dm
index 3365c5ec3fc..0ed71c32445 100644
--- a/code/modules/surgery/organs/internal/liver/liver_plasmaman.dm
+++ b/code/modules/surgery/organs/internal/liver/liver_plasmaman.dm
@@ -6,7 +6,7 @@
name = "reagent processing crystal"
desc = "A large crystal that is somehow capable of metabolizing chemicals, these are found in plasmamen."
icon_state = "liver-p"
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
organ_traits = list(TRAIT_PLASMA_LOVER_METABOLISM)
/obj/item/organ/internal/liver/bone/plasmaman/handle_chemical(mob/living/carbon/organ_owner, datum/reagent/chem, seconds_per_tick, times_fired)
diff --git a/code/modules/surgery/organs/internal/lungs/_lungs.dm b/code/modules/surgery/organs/internal/lungs/_lungs.dm
index e46137006bc..7214c7e6764 100644
--- a/code/modules/surgery/organs/internal/lungs/_lungs.dm
+++ b/code/modules/surgery/organs/internal/lungs/_lungs.dm
@@ -820,7 +820,7 @@
name = "basic cybernetic lungs"
desc = "A basic cybernetic version of the lungs found in traditional humanoid entities."
icon_state = "lungs-c"
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
maxHealth = STANDARD_ORGAN_THRESHOLD * 0.5
var/emp_vulnerability = 80 //Chance of permanent effects if emp-ed.
@@ -855,7 +855,7 @@
owner.losebreath += 20
COOLDOWN_START(src, severe_cooldown, 30 SECONDS)
if(prob(emp_vulnerability/severity)) //Chance of permanent effects
- organ_flags |= ORGAN_SYNTHETIC_EMP //Starts organ faliure - gonna need replacing soon.
+ organ_flags |= ORGAN_EMP //Starts organ faliure - gonna need replacing soon.
/obj/item/organ/internal/lungs/lavaland
diff --git a/code/modules/surgery/organs/internal/stomach/_stomach.dm b/code/modules/surgery/organs/internal/stomach/_stomach.dm
index 253cfb3be70..2d2a4681616 100644
--- a/code/modules/surgery/organs/internal/stomach/_stomach.dm
+++ b/code/modules/surgery/organs/internal/stomach/_stomach.dm
@@ -289,7 +289,7 @@
name = "basic cybernetic stomach"
desc = "A basic device designed to mimic the functions of a human stomach"
icon_state = "stomach-c"
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
maxHealth = STANDARD_ORGAN_THRESHOLD * 0.5
var/emp_vulnerability = 80 //Chance of permanent effects if emp-ed.
metabolism_efficiency = 0.035 // not as good at digestion
@@ -320,7 +320,7 @@
owner.vomit(stun = FALSE)
COOLDOWN_START(src, severe_cooldown, 10 SECONDS)
if(prob(emp_vulnerability/severity)) //Chance of permanent effects
- organ_flags |= ORGAN_SYNTHETIC_EMP //Starts organ faliure - gonna need replacing soon.
+ organ_flags |= ORGAN_EMP //Starts organ faliure - gonna need replacing soon.
#undef STOMACH_METABOLISM_CONSTANT
diff --git a/code/modules/surgery/organs/internal/stomach/stomach_golem.dm b/code/modules/surgery/organs/internal/stomach/stomach_golem.dm
index 2649656982b..c03ae073941 100644
--- a/code/modules/surgery/organs/internal/stomach/stomach_golem.dm
+++ b/code/modules/surgery/organs/internal/stomach/stomach_golem.dm
@@ -3,7 +3,7 @@
icon_state = "stomach-p"
desc = "A rocklike organ which grinds and processes nutrition from minerals."
color = COLOR_GOLEM_GRAY
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
organ_traits = list(TRAIT_ROCK_EATER)
hunger_modifier = 10 // golems burn fuel quickly
/// How slow are you when the "hungry" icon appears?
diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm
index 214314fcd42..3bd1be45299 100644
--- a/code/modules/surgery/organs/internal/tongue/_tongue.dm
+++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm
@@ -145,7 +145,7 @@
ADD_TRAIT(tongue_owner, TRAIT_AGEUSIA, NO_TONGUE_TRAIT)
tongue_owner.voice_filter = initial(tongue_owner.voice_filter)
-/obj/item/organ/internal/tongue/apply_organ_damage(damage_amount, maximum, required_organtype)
+/obj/item/organ/internal/tongue/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag)
. = ..()
if(!owner)
return
@@ -554,8 +554,7 @@ GLOBAL_LIST_INIT(english_to_zombie, list())
/obj/item/organ/internal/tongue/robot
name = "robotic voicebox"
desc = "A voice synthesizer that can interface with organic lifeforms."
- status = ORGAN_ROBOTIC
- organ_flags = NONE
+ organ_flags = ORGAN_ROBOTIC
icon_state = "tonguerobot"
say_mod = "states"
attack_verb_continuous = list("beeps", "boops")
@@ -666,7 +665,7 @@ GLOBAL_LIST_INIT(english_to_zombie, list())
name = "golem tongue"
desc = "This silicate plate doesn't seem particularly mobile, but golems use it to form sounds."
color = COLOR_WEBSAFE_DARK_GRAY
- status = ORGAN_MINERAL
+ organ_flags = ORGAN_MINERAL
say_mod = "rumbles"
sense_of_taste = FALSE
liked_foodtypes = STONE
diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm
index b22c4cd06bf..712a5fd1757 100644
--- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm
+++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm
@@ -233,8 +233,7 @@ GLOBAL_LIST_EMPTY(customizable_races)
replacement.relevant_layers = mutant_accessory.relevent_layers
if(robot_organs)
- replacement.status = ORGAN_ROBOTIC
- replacement.organ_flags |= ORGAN_SYNTHETIC
+ replacement.organ_flags |= ORGAN_ROBOTIC
// If there's an existing mutant organ, we're technically replacing it.
// Let's abuse the snowflake proc that skillchips added. Basically retains
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 07a5c518799..7043da00bb3 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
@@ -389,9 +389,7 @@
alterer.dna.mutant_bodyparts[chosen_key] = new_acc_list.Copy()
if(robot_organs)
- replacement_organ.status = ORGAN_ROBOTIC
- replacement_organ.organ_flags |= ORGAN_SYNTHETIC
-
+ replacement_organ.organ_flags |= ORGAN_ROBOTIC
replacement_organ.build_from_dna(alterer.dna, chosen_key)
replacement_organ.Insert(alterer, special = TRUE, drop_if_replaced = FALSE)
else
diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm b/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm
index 276e83974fa..233b2290b7c 100644
--- a/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm
+++ b/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm
@@ -15,8 +15,7 @@
var/obj/item/bodypart/leg/right/old_left_leg = null
/obj/item/organ/external/taur_body/synth
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
/datum/bodypart_overlay/mutant/taur_body
feature_key = "taur"
@@ -41,11 +40,11 @@
var/obj/item/bodypart/leg/left/taur/new_left_leg
var/obj/item/bodypart/leg/right/taur/new_right_leg
- if(status & ORGAN_ORGANIC)
+ if(organ_flags & ORGAN_ORGANIC)
new_left_leg = new /obj/item/bodypart/leg/left/taur()
new_right_leg = new /obj/item/bodypart/leg/right/taur()
- if(status & ORGAN_ROBOTIC)
+ if(organ_flags & ORGAN_ROBOTIC)
new_left_leg = new /obj/item/bodypart/leg/left/robot/synth/taur()
new_right_leg = new /obj/item/bodypart/leg/right/robot/synth/taur()
diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/vox.dm b/modular_skyrat/modules/customization/modules/surgery/organs/vox.dm
index ff9c7e79db4..f7407a73b15 100644
--- a/modular_skyrat/modules/customization/modules/surgery/organs/vox.dm
+++ b/modular_skyrat/modules/customization/modules/surgery/organs/vox.dm
@@ -16,13 +16,11 @@
cold_level_1_threshold = 0 // Vox should be able to breathe in cold gas without issues?
cold_level_2_threshold = 0
cold_level_3_threshold = 0
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/brain/vox
name = "vox brain"
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/brain/vox/emp_act(severity)
. = ..()
diff --git a/modular_skyrat/modules/implants/code/augments_eyes.dm b/modular_skyrat/modules/implants/code/augments_eyes.dm
index 8432bc1af2a..4de66355058 100644
--- a/modular_skyrat/modules/implants/code/augments_eyes.dm
+++ b/modular_skyrat/modules/implants/code/augments_eyes.dm
@@ -24,8 +24,7 @@
desc = "A pair of eyes with built-in nightvision optics, with the additional bonus of being rad as hell."
eye_color_left = "#0ffc03"
eye_color_right = "#ff2700"
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
low_light_cutoff = list(0, 15, 20)
medium_light_cutoff = list(0, 20, 35)
high_light_cutoff = list(0, 40, 50)
diff --git a/modular_skyrat/modules/organs/code/tongue.dm b/modular_skyrat/modules/organs/code/tongue.dm
index 9361bb0b143..1a4ed74449e 100644
--- a/modular_skyrat/modules/organs/code/tongue.dm
+++ b/modular_skyrat/modules/organs/code/tongue.dm
@@ -30,8 +30,7 @@
icon = 'modular_skyrat/modules/organs/icons/cyber_tongue.dmi'
icon_state = "cybertongue"
desc = "A fully-functional synthetic tongue, encased in soft silicone. Features include high-resolution vocals and taste receptors."
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
say_mod = "says"
// Not as good as organic tongues, not as bad as the robotic voicebox.
taste_sensitivity = 20
diff --git a/modular_skyrat/modules/synths/code/bodyparts/brain.dm b/modular_skyrat/modules/synths/code/bodyparts/brain.dm
index cb7ccdbef0c..190a23b5c3a 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/brain.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/brain.dm
@@ -7,8 +7,7 @@
name = "compact positronic brain"
slot = ORGAN_SLOT_BRAIN
zone = BODY_ZONE_CHEST
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. It has an IPC serial number engraved on the top. It is usually slotted into the chest of synthetic crewmembers."
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "posibrain-ipc"
@@ -35,7 +34,7 @@
apply_organ_damage(SYNTH_EMP_BRAIN_DAMAGE, SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM)
-/obj/item/organ/internal/brain/synth/apply_organ_damage(damage_amount, maximumm, required_organtype)
+/obj/item/organ/internal/brain/synth/apply_organ_damage(damage_amount, maximumm, required_organ_flag)
. = ..()
if(owner && damage > 0 && (world.time - last_message_time) > SYNTH_BRAIN_DAMAGE_MESSAGE_INTERVAL)
diff --git a/modular_skyrat/modules/synths/code/bodyparts/ears.dm b/modular_skyrat/modules/synths/code/bodyparts/ears.dm
index d0f57250cc6..93491fa87ea 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/ears.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/ears.dm
@@ -11,8 +11,7 @@
zone = BODY_ZONE_HEAD
slot = ORGAN_SLOT_EARS
gender = PLURAL
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/ears/synth/emp_act(severity)
. = ..()
diff --git a/modular_skyrat/modules/synths/code/bodyparts/eyes.dm b/modular_skyrat/modules/synths/code/bodyparts/eyes.dm
index 3488797ced8..388103261dd 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/eyes.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/eyes.dm
@@ -2,8 +2,7 @@
name = "optical sensors"
icon_state = "cybernetic_eyeballs"
desc = "A very basic set of optical sensors with no extra vision modes or functions."
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/eyes/synth/emp_act(severity)
. = ..()
diff --git a/modular_skyrat/modules/synths/code/bodyparts/heart.dm b/modular_skyrat/modules/synths/code/bodyparts/heart.dm
index 42de860f6fd..aebc9fd85f1 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/heart.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/heart.dm
@@ -1,8 +1,7 @@
/obj/item/organ/internal/heart/synth
name = "hydraulic pump engine"
desc = "An electronic device that handles the hydraulic pumps, powering one's robotic limbs. Without this, synthetics are unable to move."
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "heart-ipc-on"
base_icon_state = "heart-ipc"
diff --git a/modular_skyrat/modules/synths/code/bodyparts/liver.dm b/modular_skyrat/modules/synths/code/bodyparts/liver.dm
index 71106c9602a..5799b1c35e5 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/liver.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/liver.dm
@@ -1,8 +1,7 @@
/obj/item/organ/internal/liver/synth
name = "reagent processing unit"
desc = "An electronic device that processes the beneficial chemicals for the synthetic user."
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "liver-ipc"
filterToxins = FALSE //We dont filter them, we're immune to them
diff --git a/modular_skyrat/modules/synths/code/bodyparts/lungs.dm b/modular_skyrat/modules/synths/code/bodyparts/lungs.dm
index 734d06cab3e..fa7f0046b67 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/lungs.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/lungs.dm
@@ -12,8 +12,7 @@
safe_plasma_max = 0
safe_oxygen_min = 0 //What are you doing man, dont breathe with those!
safe_oxygen_max = 0
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/lungs/synth/emp_act(severity)
. = ..()
diff --git a/modular_skyrat/modules/synths/code/bodyparts/stomach.dm b/modular_skyrat/modules/synths/code/bodyparts/stomach.dm
index bad2ab85d9a..18a72224290 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/stomach.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/stomach.dm
@@ -9,8 +9,7 @@
zone = "chest"
slot = "stomach"
desc = "A specialised cell, for synthetic use only. Has a low-power mode. Without this, synthetics are unable to stay powered."
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/stomach/synth/emp_act(severity)
. = ..()
diff --git a/modular_skyrat/modules/synths/code/bodyparts/tongue.dm b/modular_skyrat/modules/synths/code/bodyparts/tongue.dm
index 75beccaf1cc..e39ff438b85 100644
--- a/modular_skyrat/modules/synths/code/bodyparts/tongue.dm
+++ b/modular_skyrat/modules/synths/code/bodyparts/tongue.dm
@@ -1,14 +1,13 @@
/obj/item/organ/internal/tongue/synth
name = "synthetic voicebox"
desc = "A voice synthesizer that allows synths to communicate with lifeforms. Tuned to sound less agressive than robotic voiceboxes."
- status = ORGAN_ROBOTIC
icon = 'modular_skyrat/master_files/icons/obj/surgery.dmi'
icon_state = "tongue-ipc"
say_mod = "beeps"
modifies_speech = TRUE
taste_sensitivity = 25 // not as good as an organic tongue
maxHealth = 100 //RoboTongue!
- organ_flags = ORGAN_SYNTHETIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/tongue/synth/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
diff --git a/tgstation.dme b/tgstation.dme
index 3dda23df037..269d12af6a9 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -427,7 +427,6 @@
#include "code\__HELPERS\atoms.dm"
#include "code\__HELPERS\auxtools.dm"
#include "code\__HELPERS\bitflag_lists.dm"
-#include "code\__HELPERS\bodyparts.dm"
#include "code\__HELPERS\chat.dm"
#include "code\__HELPERS\chat_filter.dm"
#include "code\__HELPERS\clients.dm"