diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 90a8d49207d6..e12a1896d59a 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -60,11 +60,6 @@
#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 aa81976f6dd3..3dcc4662b559 100644
--- a/code/__DEFINES/surgery.dm
+++ b/code/__DEFINES/surgery.dm
@@ -1,24 +1,46 @@
+/// 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)
+/// Helper to figure out if an organ is unremovable
+#define IS_ORGAN_UNREMOVABLE(organ) (organ.organ_flags & ORGAN_UNREMOVABLE)
+
// 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)
+/// Has the organ already been inserted inside someone
+#define ORGAN_VIRGIN (1<<10) // Not used yet just a placeholder as of monkepr#6802.
+/// ALWAYS show this when scanned by advanced scanners, even if it is totally healthy
+#define ORGAN_PROMINENT (1<<11)
+/// An organ that is ostensibly dangerous when inside a body
+#define ORGAN_HAZARDOUS (1<<12)
/// 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<<13)
/// This organ has no impact on conversion via flash, such as revs or bbs. Doesn't affect hypnosis and whatnot, though. MONKESTATION EDIT
-#define ORGAN_DOESNT_PROTECT_AGAINST_CONVERSION (1<<9)
+#define ORGAN_DOESNT_PROTECT_AGAINST_CONVERSION (1<<14)
+
+/// 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
@@ -50,7 +72,7 @@
/// All head flags, default for most heads
#define HEAD_ALL_FEATURES (HEAD_HAIR|HEAD_FACIAL_HAIR|HEAD_LIPS|HEAD_EYESPRITES|HEAD_EYECOLOR|HEAD_EYEHOLES|HEAD_DEBRAIN)
-/// When the surgery step fails :(
+/// Return value when the surgery step fails :(
#define SURGERY_STEP_FAIL -1
// Flags for surgery_flags on surgery datums
diff --git a/code/__HELPERS/bodyparts.dm b/code/__HELPERS/bodyparts.dm
deleted file mode 100644
index 6a76ef50870d..000000000000
--- a/code/__HELPERS/bodyparts.dm
+++ /dev/null
@@ -1,3 +0,0 @@
-#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)
diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index 749277b71423..24411c052082 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -499,12 +499,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,
"ORGAN_HIDDEN" = ORGAN_HIDDEN, //Monkestation edit: BLOOD_DATUMS, how was this forgotten
))
diff --git a/code/datums/components/irradiated.dm b/code/datums/components/irradiated.dm
index 805288fe4867..412c8912a5c2 100644
--- a/code/datums/components/irradiated.dm
+++ b/code/datums/components/irradiated.dm
@@ -51,11 +51,13 @@
/datum/component/irradiated/RegisterWithParent()
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, PROC_REF(on_clean))
RegisterSignal(parent, COMSIG_GEIGER_COUNTER_SCAN, PROC_REF(on_geiger_counter_scan))
+ RegisterSignal(parent, COMSIG_LIVING_HEALTHSCAN, PROC_REF(on_healthscan))
/datum/component/irradiated/UnregisterFromParent()
UnregisterSignal(parent, list(
COMSIG_COMPONENT_CLEAN_ACT,
COMSIG_GEIGER_COUNTER_SCAN,
+ COMSIG_LIVING_HEALTHSCAN,
))
/datum/component/irradiated/Destroy(force)
@@ -186,6 +188,12 @@
return COMSIG_GEIGER_COUNTER_SCAN_SUCCESSFUL
+/datum/component/irradiated/proc/on_healthscan(datum/source, list/render_list, advanced, mob/user, mode, tochat)
+ SIGNAL_HANDLER
+
+ render_list += conditional_tooltip("Subject is irradiated.", "Supply antiradiation or antitoxin, such as [/datum/reagent/medicine/potass_iodide::name] or [/datum/reagent/medicine/pen_acid::name].", tochat)
+ render_list += "
"
+
/atom/movable/screen/alert/irradiated
name = "Irradiated"
desc = "You're irradiated! Heal your toxins quick, and stand under a shower to halt the incoming damage."
diff --git a/code/datums/components/surgery_initiator.dm b/code/datums/components/surgery_initiator.dm
index 45a394265fb8..0e4b23f4853b 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/body_purist.dm b/code/datums/quirks/negative_quirks/body_purist.dm
index 7b33db52ab77..2edf88385aa4 100644
--- a/code/datums/quirks/negative_quirks/body_purist.dm
+++ b/code/datums/quirks/negative_quirks/body_purist.dm
@@ -32,10 +32,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()
@@ -46,24 +46,24 @@
/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/datums/quirks/negative_quirks/junkie.dm b/code/datums/quirks/negative_quirks/junkie.dm
index 582e814ac387..f03129abbddd 100644
--- a/code/datums/quirks/negative_quirks/junkie.dm
+++ b/code/datums/quirks/negative_quirks/junkie.dm
@@ -121,7 +121,7 @@
var/mob/living/carbon/carbon_holder = quirk_holder
var/obj/item/organ/internal/lungs/smoker_lungs = null
var/obj/item/organ/internal/lungs/old_lungs = carbon_holder.get_organ_slot(ORGAN_SLOT_LUNGS)
- if(old_lungs && !(old_lungs.organ_flags & ORGAN_SYNTHETIC))
+ if(old_lungs && IS_ORGANIC_ORGAN(old_lungs))
if(isplasmaman(carbon_holder))
smoker_lungs = /obj/item/organ/internal/lungs/plasmaman/plasmaman_smoker
else if(isethereal(carbon_holder))
@@ -192,7 +192,7 @@
quirk_holder.add_mob_memory(/datum/memory/key/quirk_alcoholic, protagonist = quirk_holder, preferred_brandy = initial(favorite_alcohol.name))
// alcoholic livers have 25% less health and healing
var/obj/item/organ/internal/liver/alcohol_liver = quirk_holder.get_organ_slot(ORGAN_SLOT_LIVER)
- if(alcohol_liver && !(alcohol_liver.organ_flags & ORGAN_SYNTHETIC)) // robotic livers aren't affected
+ if(alcohol_liver && IS_ORGANIC_ORGAN(alcohol_liver)) // robotic livers aren't affected
alcohol_liver.maxHealth = alcohol_liver.maxHealth * 0.75
alcohol_liver.healing_factor = alcohol_liver.healing_factor * 0.75
diff --git a/code/datums/status_effects/debuffs/genetic_damage.dm b/code/datums/status_effects/debuffs/genetic_damage.dm
index 6fb151dea2cb..1c2a55bdfee0 100644
--- a/code/datums/status_effects/debuffs/genetic_damage.dm
+++ b/code/datums/status_effects/debuffs/genetic_damage.dm
@@ -46,15 +46,20 @@
qdel(src)
return
-/datum/status_effect/genetic_damage/proc/on_healthscan(datum/source, list/render_list, advanced)
+/datum/status_effect/genetic_damage/proc/on_healthscan(datum/source, list/render_list, advanced, mob/user, mode, tochat)
SIGNAL_HANDLER
+ var/message = ""
if(advanced)
- render_list += "Genetic damage: [round(total_damage / minimum_before_tox_damage * 100, 0.1)]%\n"
+ message += "Genetic damage: [round(total_damage / minimum_before_tox_damage * 100, 0.1)]%"
else if(total_damage >= minimum_before_tox_damage)
- render_list += "Severe genetic damage detected.\n"
+ message += "Severe genetic damage detected."
else
- render_list += "Minor genetic damage detected.\n"
+ message += "Minor genetic damage detected."
+
+ if(message)
+ render_list += conditional_tooltip("[message]", "Irreparable under normal circumstances - will decay over time.", tochat)
+ render_list += "
"
#undef GORILLA_MUTATION_CHANCE_PER_SECOND
#undef GORILLA_MUTATION_MINIMUM_DAMAGE
diff --git a/code/datums/status_effects/debuffs/hallucination.dm b/code/datums/status_effects/debuffs/hallucination.dm
index 781b004c1318..77f1c3f7aaf0 100644
--- a/code/datums/status_effects/debuffs/hallucination.dm
+++ b/code/datums/status_effects/debuffs/hallucination.dm
@@ -38,13 +38,13 @@
))
/// Signal proc for [COMSIG_LIVING_HEALTHSCAN]. Show we're hallucinating to (advanced) scanners.
-/datum/status_effect/hallucination/proc/on_health_scan(datum/source, list/render_list, advanced, mob/user, mode)
+/datum/status_effect/hallucination/proc/on_health_scan(datum/source, list/render_list, advanced, mob/user, mode, tochat)
SIGNAL_HANDLER
if(!advanced)
return
-
- render_list += "Subject is hallucinating.\n"
+ render_list += conditional_tooltip("Subject is hallucinating.", "Supply antipsychotic medication.", tochat)
+ render_list += "
"
/// Signal proc for [COMSIG_CARBON_CHECKING_BODYPART],
/// checking bodyparts while hallucinating can cause them to appear more damaged than they are
diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm
index 23da79d45fbc..6e38f0efece4 100644
--- a/code/datums/wounds/_wounds.dm
+++ b/code/datums/wounds/_wounds.dm
@@ -664,29 +664,42 @@
return span_bold("[desc]!")
return "[desc]."
+/**
+ * Prints the details about the wound for the wound scanner on simple mode
+ */
/datum/wound/proc/get_scanner_description(mob/user)
- return "Type: [name]\n\
- Severity: [severity_text(simple = FALSE)]\n\
- Description: [desc]\n\
+ return "Type: [name]
\
+ Severity: [severity_text()]
\
+ Description: [desc]
\
Recommended Treatment: [treat_text]"
+/**
+ * Prints the details about the wound for the wound scanner on complex mode
+ */
/datum/wound/proc/get_simple_scanner_description(mob/user)
- return "[name] detected!\n\
- Risk: [severity_text(simple = TRUE)]\n\
- Description: [simple_desc ? simple_desc : desc]\n\
- Treatment Guide: [simple_treat_text]\n\
+ var/severity_text_formatted = severity_text()
+ for(var/i in 1 to severity)
+ severity_text_formatted += "!"
+
+ return "[name] detected!
\
+ Risk: [severity_text_formatted]
\
+ Description: [simple_desc || desc]
\
+ Treatment Guide: [simple_treat_text]
\
Homemade Remedies: [homemade_treat_text]"
-/datum/wound/proc/severity_text(simple = FALSE)
+/**
+ * Returns what text describes this wound
+ */
+/datum/wound/proc/severity_text()
switch(severity)
if(WOUND_SEVERITY_TRIVIAL)
return "Trivial"
if(WOUND_SEVERITY_MODERATE)
- return "Moderate" + (simple ? "!" : "")
+ return "Moderate"
if(WOUND_SEVERITY_SEVERE)
- return "Severe" + (simple ? "!!" : "")
+ return "Severe"
if(WOUND_SEVERITY_CRITICAL)
- return "Critical" + (simple ? "!!!" : "")
+ return "Critical"
/// Getter proc for our scar_keyword, in case we might have some custom scar gen logic.
/datum/wound/proc/get_scar_keyword(obj/item/bodypart/scarred_limb, add_to_scars)
diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm
index 33ffa56d7cd1..c11bf0960fb6 100644
--- a/code/datums/wounds/burns.dm
+++ b/code/datums/wounds/burns.dm
@@ -45,18 +45,13 @@
/// Once we reach infestation beyond WOUND_INFESTATION_SEPSIS, we get this many warnings before the limb is completely paralyzed (you'd have to ignore a really bad burn for a really long time for this to happen)
var/strikes_to_lose_limb = 3
-/datum/wound/burn/flesh/severity_text(simple = FALSE)
- if(infestation > WOUND_INFECTION_MODERATE)
- return "Infected, [..()]"
- return ..()
-
/datum/wound/burn/flesh/handle_process(seconds_per_tick, times_fired)
if (QDELETED(victim) || HAS_TRAIT(victim, TRAIT_STASIS))
return
. = ..()
- if(strikes_to_lose_limb == 0) // we've already hit sepsis, nothing more to do
+ if(strikes_to_lose_limb <= 0) // we've already hit sepsis, nothing more to do
victim.adjustToxLoss(0.25 * seconds_per_tick)
if(SPT_PROB(0.5, seconds_per_tick))
victim.visible_message(span_danger("The infection on the remnants of [victim]'s [limb.plaintext_zone] shift and bubble nauseatingly!"), span_warning("You can feel the infection on the remnants of your [limb.plaintext_zone] coursing through your veins!"), vision_distance = COMBAT_MESSAGE_RANGE)
@@ -148,6 +143,13 @@
var/datum/brain_trauma/severe/paralysis/sepsis = new (limb.body_zone)
victim.gain_trauma(sepsis)
+/datum/wound/burn/flesh/set_disabling(new_value)
+ . = ..()
+ if(new_value && strikes_to_lose_limb <= 0)
+ treat_text_short = "Amputate or augment limb immediately, or place the patient into cryogenics."
+ else
+ treat_text_short = initial(treat_text_short)
+
/datum/wound/burn/flesh/get_wound_description(mob/user)
if(strikes_to_lose_limb <= 0)
return span_deadsay("[victim.p_their(TRUE)] [limb.plaintext_zone] has locked up completely and is non-functional.")
@@ -181,9 +183,25 @@
return "[condition.Join()]"
+/datum/wound/burn/flesh/severity_text(simple = FALSE)
+ . = ..()
+ . += " Burn / "
+ switch(infestation)
+ if(-INFINITY to WOUND_INFECTION_MODERATE)
+ . += "No"
+ if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
+ . += "Moderate"
+ if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
+ . += "Severe"
+ if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
+ . += "Critical"
+ if(WOUND_INFECTION_SEPTIC to INFINITY)
+ . += "Total"
+ . += " Infection"
+
/datum/wound/burn/flesh/get_scanner_description(mob/user)
if(strikes_to_lose_limb <= 0) // Unclear if it can go below 0, best to not take the chance
- var/oopsie = "Type: [name]\nSeverity: [severity_text()]"
+ var/oopsie = "Type: [name]
Severity: [severity_text()]"
oopsie += "
Infection Level: [span_deadsay("The body part has suffered complete sepsis and must be removed. Amputate or augment limb immediately.")]
"
return oopsie
@@ -262,7 +280,7 @@
// people complained about burns not healing on stasis beds, so in addition to checking if it's cured, they also get the special ability to very slowly heal on stasis beds if they have the healing effects stored
/datum/wound/burn/flesh/on_stasis(seconds_per_tick, times_fired)
. = ..()
- if(strikes_to_lose_limb == 0) // we've already hit sepsis, nothing more to do
+ if(strikes_to_lose_limb <= 0) // we've already hit sepsis, nothing more to do
if(SPT_PROB(0.5, seconds_per_tick))
victim.visible_message(span_danger("The infection on the remnants of [victim]'s [limb.plaintext_zone] shift and bubble nauseatingly!"), span_warning("You can feel the infection on the remnants of your [limb.plaintext_zone] coursing through your veins!"), vision_distance = COMBAT_MESSAGE_RANGE)
return
@@ -321,7 +339,8 @@
treat_text = "Swiftly apply healing aids such as Synthflesh or regenerative mesh to the wound. \
Disinfect the wound and surgically debride any infected skin, and wrap in clean gauze / use ointment to prevent further infection. \
If the limb has locked up, it must be amputated, augmented or treated with cryogenics."
- treat_text_short = "Apply healing aid such as regenerative mesh or Synthflesh and disinfect / debride."
+ treat_text_short = "Apply healing aid such as regenerative mesh, Synthflesh, or cryogenics and disinfect / debride. \
+ Clean gauze or ointment will slow infection rate."
examine_desc = "appears seriously charred, with aggressive red splotches"
occur_text = "chars rapidly, exposing ruined tissue and spreading angry red burns"
severity = WOUND_SEVERITY_SEVERE
@@ -350,7 +369,8 @@
treat_text = "Immediately apply healing aids such as Synthflesh or regenerative mesh to the wound. \
Disinfect the wound and surgically debride any infected skin, and wrap in clean gauze / use ointment to prevent further infection. \
If the limb has locked up, it must be amputated, augmented or treated with cryogenics."
- treat_text_short = "Apply healing aid such as regenerative mesh or Synthflesh and disinfect / debride."
+ treat_text_short = "Apply healing aid such as regenerative mesh, Synthflesh, or cryogenics and disinfect / debride. \
+ Clean gauze or ointment will slow infection rate."
examine_desc = "is a ruined mess of blanched bone, melted fat, and charred tissue"
occur_text = "vaporizes as flesh, bone, and fat melt together in a horrifying mess"
severity = WOUND_SEVERITY_CRITICAL
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 58570722ec68..c83f8ef5ae03 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -957,7 +957,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 286d4879594f..9b199d3a337e 100644
--- a/code/game/machinery/dna_infuser/dna_infuser.dm
+++ b/code/game/machinery/dna_infuser/dna_infuser.dm
@@ -170,7 +170,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) || IS_ORGAN_UNREMOVABLE(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 61982bfc7f69..f33f55df04a2 100644
--- a/code/game/objects/items/cigs_lighters.dm
+++ b/code/game/objects/items/cigs_lighters.dm
@@ -421,7 +421,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
how_long_have_we_been_smokin += seconds_per_tick * (1 SECONDS)
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 9776daeec8e5..a79e6e5fc042 100644
--- a/code/game/objects/items/devices/scanners/health_analyzer.dm
+++ b/code/game/objects/items/devices/scanners/health_analyzer.dm
@@ -30,6 +30,7 @@
custom_price = PAYCHECK_COMMAND
/// If this analyzer will give a bonus to wound treatments apon woundscan.
var/give_wound_treatment_bonus = FALSE
+ var/last_scan_text
/obj/item/healthanalyzer/Initialize(mapload)
. = ..()
@@ -62,12 +63,20 @@
// Clumsiness/brain damage check
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
- user.visible_message(span_warning("[user] analyzes the floor's vitals!"), \
- span_notice("You stupidly try to analyze the floor's vitals!"))
- to_chat(user, "[span_info("Analyzing results for The floor:\n\tOverall status: Healthy")]\
- \n[span_info("Key: Suffocation/Toxin/Burn/Brute")]\
- \n[span_info("\tDamage specifics: 0-0-0-0")]\
- \n[span_info("Body temperature: ???")]")
+ var/turf/scan_turf = get_turf(user)
+ user.visible_message(
+ span_warning("[user] analyzes [scan_turf]'s vitals!"),
+ span_notice("You stupidly try to analyze [scan_turf]'s vitals!"),
+ )
+
+ var/floor_text = "Analyzing results for [scan_turf] ([station_time_timestamp()]):
"
+ floor_text += "Overall status: Unknown
"
+ floor_text += "Subject lacks a brain.
"
+ floor_text += "Body temperature: [scan_turf?.return_air()?.return_temperature() || "???"]
"
+
+ if(user.can_read(src) && !user.is_blind())
+ to_chat(user, boxed_message(floor_text))
+ last_scan_text = floor_text
return
if(ispodperson(M) && !advanced)
@@ -78,19 +87,20 @@
balloon_alert(user, "analyzing vitals")
playsound(user.loc, 'sound/items/healthanalyzer.ogg', 50)
- switch (scanmode)
- if (SCANMODE_HEALTH)
- healthscan(user, M, mode, advanced)
- if (SCANMODE_WOUND)
- woundscan(user, M, src)
+ var/readability_check = user.can_read(src) && !user.is_blind()
+ switch(scanmode)
+ if(SCANMODE_HEALTH)
+ last_scan_text = healthscan(user, M, mode, advanced, tochat = readability_check)
+ if(SCANMODE_WOUND)
+ if(readability_check)
+ woundscan(user, M, src)
add_fingerprint(user)
/obj/item/healthanalyzer/attack_secondary(mob/living/victim, mob/living/user, params)
- if(!user.can_read(src) || user.is_blind())
- return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
+ if(user.can_read(src) && !user.is_blind())
+ chemscan(user, victim)
- chemscan(user, victim)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
/obj/item/healthanalyzer/add_item_context(
@@ -127,37 +137,33 @@
return
// the final list of strings to render
- var/render_list = list()
+ var/list/render_list = list()
// Damage specifics
var/oxy_loss = target.getOxyLoss()
var/tox_loss = target.getToxLoss()
var/fire_loss = target.getFireLoss()
var/brute_loss = target.getBruteLoss()
- var/mob_status = (target.stat == DEAD ? span_alert("Deceased") : "[round(target.health/target.maxHealth,0.01)*100]% healthy")
+ var/mob_status = (target.stat == DEAD ? span_alert("Deceased") : "[round(target.health / target.maxHealth, 0.01) * 100]% healthy")
if(HAS_TRAIT(target, TRAIT_FAKEDEATH) && !advanced)
mob_status = span_alert("Deceased")
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
- render_list += "[span_info("Analyzing results for [target]:")]\nOverall status: [mob_status]\n"
+ render_list += "[span_info("Analyzing results for [target] ([station_time_timestamp()]):")]
Overall status: [mob_status]
"
- if(ishuman(target))
- var/mob/living/carbon/human/humantarget = target
- if(humantarget.undergoing_cardiac_arrest() && humantarget.stat != DEAD)
- render_list += "Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!\n"
- if(humantarget.has_reagent(/datum/reagent/inverse/technetium))
- advanced = TRUE
+ if(!advanced && target.has_reagent(/datum/reagent/inverse/technetium))
+ advanced = TRUE
- SEND_SIGNAL(target, COMSIG_LIVING_HEALTHSCAN, render_list, advanced, user, mode)
+ SEND_SIGNAL(target, COMSIG_LIVING_HEALTHSCAN, render_list, advanced, user, mode, tochat)
// Husk detection
if(HAS_TRAIT(target, TRAIT_HUSK))
if(advanced)
if(HAS_TRAIT_FROM(target, TRAIT_HUSK, BURN))
- render_list += "Subject has been husked by severe burns.\n"
+ render_list += "Subject has been husked by [conditional_tooltip("severe burns", "Tend burns and apply a de-husking agent, such as [/datum/reagent/medicine/c2/synthflesh::name].", tochat)].
"
else if (HAS_TRAIT_FROM(target, TRAIT_HUSK, CHANGELING_DRAIN))
- render_list += "Subject has been husked by dessication.\n"
+ render_list += "Subject has been husked by [conditional_tooltip("desiccation", "Irreparable. Under normal circumstances, revival can only proceed via brain transplant, cloning, or special surgies.", tochat)].
"
else
render_list += "Subject has been husked by mysterious causes.\n"
@@ -193,106 +199,98 @@
if(iscarbon(target))
var/mob/living/carbon/carbontarget = target
- if(LAZYLEN(carbontarget.get_traumas()))
- var/list/trauma_text = list()
- for(var/datum/brain_trauma/trauma in carbontarget.get_traumas())
- var/trauma_desc = ""
- switch(trauma.resilience)
- if(TRAUMA_RESILIENCE_SURGERY)
- trauma_desc += "severe "
- if(TRAUMA_RESILIENCE_LOBOTOMY)
- trauma_desc += "deep-rooted "
- if(TRAUMA_RESILIENCE_WOUND)
- trauma_desc += "fracture-derived "
- if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE)
- trauma_desc += "permanent "
- trauma_desc += trauma.scan_desc
- trauma_text += trauma_desc
- render_list += "Cerebral traumas detected: subject appears to be suffering from [english_list(trauma_text)].\n"
- if(carbontarget.quirks.len)
+ if(LAZYLEN(carbontarget.quirks))
render_list += "Subject Major Disabilities: [carbontarget.get_quirk_string(FALSE, CAT_QUIRK_MAJOR_DISABILITY, from_scan = TRUE)].\n"
if(advanced)
render_list += "Subject Minor Disabilities: [carbontarget.get_quirk_string(FALSE, CAT_QUIRK_MINOR_DISABILITY, TRUE)].\n"
- if (HAS_TRAIT(target, TRAIT_IRRADIATED))
- render_list += "Subject is irradiated. Supply toxin healing.\n"
-
- //Eyes and ears
- if(advanced && iscarbon(target))
- var/mob/living/carbon/carbontarget = target
-
- // Ear status
- var/obj/item/organ/internal/ears/ears = carbontarget.get_organ_slot(ORGAN_SLOT_EARS)
- if(istype(ears))
- if(HAS_TRAIT_FROM(carbontarget, TRAIT_DEAF, GENETIC_MUTATION))
- render_list += "Subject is genetically deaf.\n"
- else if(HAS_TRAIT_FROM(carbontarget, TRAIT_DEAF, EAR_DAMAGE))
- render_list += "Subject is deaf from ear damage.\n"
- else if(HAS_TRAIT(carbontarget, TRAIT_DEAF))
- render_list += "Subject is deaf.\n"
- else
- if(ears.damage)
- render_list += "Subject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.\n"
- if(ears.deaf)
- render_list += "Subject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.\n"
-
- // Eye status
- var/obj/item/organ/internal/eyes/eyes = carbontarget.get_organ_slot(ORGAN_SLOT_EYES)
- if(istype(eyes))
- if(carbontarget.is_blind())
- render_list += "Subject is blind.\n"
- else if(carbontarget.is_nearsighted())
- render_list += "Subject is nearsighted.\n"
-
// Body part damage report
if(iscarbon(target))
var/mob/living/carbon/carbontarget = target
- var/list/damaged = carbontarget.get_damaged_bodyparts(1,1)
- if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0)
- var/dmgreport = "General status:\
- \
+ var/any_damage = brute_loss > 0 || fire_loss > 0 || oxy_loss > 0 || tox_loss > 0 || fire_loss > 0
+ var/any_missing = length(carbontarget.bodyparts) < (carbontarget.dna?.species?.max_bodypart_count || 6)
+ var/any_wounded = length(carbontarget.all_wounds)
+ var/any_embeds = carbontarget.has_embedded_objects()
+ if(any_damage || (mode == SCANNER_VERBOSE && (any_missing || any_wounded || any_embeds)))
+ render_list += "
"
+ var/dmgreport = "Body status:\
+ \
+ \
+ \
Damage: | \
Brute | \
Burn | \
Toxin | \
- Suffocation |
\
- Overall: | \
- [CEILING(brute_loss,1)] | \
- [CEILING(fire_loss,1)] | \
- [CEILING(tox_loss,1)] | \
- [CEILING(oxy_loss,1)] |
"
+ Suffocation | \
+ \
+ \
+ Overall: | \
+ [ceil(brute_loss)] | \
+ [ceil(fire_loss)] | \
+ [ceil(tox_loss)] | \
+ [ceil(oxy_loss)] | \
+
"
if(mode == SCANNER_VERBOSE)
- for(var/obj/item/bodypart/limb as anything in damaged)
- if(limb.bodytype & BODYTYPE_ROBOTIC)
- dmgreport += "[capitalize(limb.name)]: | "
- else
- dmgreport += "
[capitalize(limb.plaintext_zone)]: | "
- dmgreport += "[(limb.brute_dam > 0) ? "[CEILING(limb.brute_dam,1)]" : "0"] | "
- dmgreport += "[(limb.burn_dam > 0) ? "[CEILING(limb.burn_dam,1)]" : "0"] |
"
- dmgreport += "
"
+ // Follow same body zone list every time so it's consistent across all humans
+ for(var/zone in list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
+ var/obj/item/bodypart/limb = carbontarget.get_bodypart(zone)
+ if(isnull(limb))
+ dmgreport += ""
+ dmgreport += "[capitalize(parse_zone(zone))]: | "
+ dmgreport += "- | "
+ dmgreport += "- | "
+ dmgreport += "
"
+ dmgreport += "↳ Physical trauma: [conditional_tooltip("Dismembered", "Reattach or replace surgically.", tochat)] |
"
+ continue
+ var/has_any_embeds = length(limb.embedded_objects) >= 1
+ var/has_any_wounds = length(limb.wounds) >= 1
+ var/is_damaged = limb.burn_dam > 0 || limb.brute_dam > 0
+ if(!is_damaged && (zone != BODY_ZONE_CHEST || (tox_loss <= 0 && oxy_loss <= 0)) && !has_any_embeds && !has_any_wounds)
+ continue
+ dmgreport += ""
+ dmgreport += "[capitalize((limb.bodytype & BODYTYPE_ROBOTIC) ? limb.name : limb.plaintext_zone)]: | "
+ dmgreport += "[limb.brute_dam > 0 ? ceil(limb.brute_dam) : "0"] | "
+ dmgreport += "[limb.burn_dam > 0 ? ceil(limb.burn_dam) : "0"] | "
+ if(zone == BODY_ZONE_CHEST) // tox/oxy is stored in the chest
+ dmgreport += "[tox_loss > 0 ? ceil(tox_loss) : "0"] | "
+ dmgreport += "[oxy_loss > 0 ? ceil(oxy_loss) : "0"] | "
+ dmgreport += "
"
+ if(has_any_embeds)
+ var/list/embedded_names = list()
+ for(var/obj/item/embed as anything in limb.embedded_objects)
+ embedded_names[capitalize(embed.name)] += 1
+ for(var/embedded_name in embedded_names)
+ var/displayed = embedded_name
+ var/embedded_amt = embedded_names[embedded_name]
+ if(embedded_amt > 1)
+ displayed = "[embedded_amt]x [embedded_name]"
+ dmgreport += "↳ Foreign object(s): [conditional_tooltip(displayed, "Use a hemostat to remove.", tochat)] |
"
+ if(has_any_wounds)
+ for(var/datum/wound/wound as anything in limb.wounds)
+ dmgreport += "↳ Physical trauma: [conditional_tooltip("[wound.name] ([wound.severity_text()])", wound.treat_text_short, tochat)] |
"
+
+ dmgreport += "
"
render_list += dmgreport // tables do not need extra linebreak
- for(var/obj/item/bodypart/limb as anything in carbontarget.bodyparts)
- for(var/obj/item/embed as anything in limb.embedded_objects)
- render_list += "Embedded object: [embed] located in \the [limb.plaintext_zone]\n"
if(ishuman(target))
var/mob/living/carbon/human/humantarget = target
+ // Organ damage, missing organs
var/render = FALSE
var/toReport = "Organ status:\
- \
- \
- \
- Organ: | \
- [advanced ? "Dmg | " : ""]\
- Status | \
-
"
+ \
+ \
+ \
+ Organ: | \
+ [advanced ? "Dmg | " : ""]\
+ Status | \
+
"
var/list/missing_organs = list()
if(!humantarget.get_organ_slot(ORGAN_SLOT_BRAIN))
missing_organs[ORGAN_SLOT_BRAIN] = "Brain"
- if(!humantarget.needs_heart() && !humantarget.get_organ_slot(ORGAN_SLOT_HEART))
+ if(humantarget.needs_heart() && !humantarget.get_organ_slot(ORGAN_SLOT_HEART))
missing_organs[ORGAN_SLOT_HEART] = "Heart"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_NOBREATH, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantlungs) && !humantarget.get_organ_slot(ORGAN_SLOT_LUNGS))
missing_organs[ORGAN_SLOT_LUNGS] = "Lungs"
@@ -300,11 +298,13 @@
missing_organs[ORGAN_SLOT_LIVER] = "Liver"
if(!HAS_TRAIT_FROM(humantarget, TRAIT_NOHUNGER, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantstomach) && !humantarget.get_organ_slot(ORGAN_SLOT_STOMACH))
missing_organs[ORGAN_SLOT_STOMACH] ="Stomach"
+ if(!HAS_TRAIT_FROM(humantarget, TRAIT_SPLEENLESS_METABOLISM, SPECIES_TRAIT) && !isnull(humantarget.dna.species.mutantspleen) && !humantarget.get_organ_slot(ORGAN_SLOT_SPLEEN))
+ missing_organs[ORGAN_SLOT_SPLEEN] ="Spleen"
if(!isnull(humantarget.dna.species.mutanttongue) && !humantarget.get_organ_slot(ORGAN_SLOT_TONGUE))
missing_organs[ORGAN_SLOT_TONGUE] = "Tongue"
if(!isnull(humantarget.dna.species.mutantears) && !humantarget.get_organ_slot(ORGAN_SLOT_EARS))
missing_organs[ORGAN_SLOT_EARS] = "Ears"
- if(!isnull(humantarget.dna.species.mutanteyes) && !humantarget.get_organ_slot(ORGAN_SLOT_EYES))
+ if(!isnull(humantarget.dna.species.mutantears) && !humantarget.get_organ_slot(ORGAN_SLOT_EYES))
missing_organs[ORGAN_SLOT_EYES] = "Eyes"
// Follow same order as in the organ_process_order so it's consistent across all humans
@@ -336,8 +336,21 @@
render_list += "
"
render_list += toReport + "
" // tables do not need extra linebreak
+ // Cybernetics
+ var/list/cyberimps
+ for(var/obj/item/organ/internal/cyberimp/cyberimp in humantarget.organs)
+ if(IS_ROBOTIC_ORGAN(cyberimp) && !(cyberimp.organ_flags & ORGAN_HIDDEN))
+ LAZYADD(cyberimps, cyberimp.get_examine_string(user))
+ if(LAZYLEN(cyberimps))
+ if(!render)
+ render_list += "
"
+ render_list += "Detected cybernetic modifications:
"
+ render_list += "[english_list(cyberimps, and_text = ", and ")]
"
+
+ render_list += "
"
+
//Genetic stability
- if(advanced && humantarget.has_dna())
+ if(advanced && humantarget.has_dna() && humantarget.dna.stability != initial(humantarget.dna.stability))
render_list += "Genetic Stability: [humantarget.dna.stability]%.\n"
// Species and body temperature
@@ -351,7 +364,9 @@
|| targetspecies.mutanttongue != initial(targetspecies.mutanttongue) \
|| targetspecies.mutantliver != initial(targetspecies.mutantliver) \
|| targetspecies.mutantstomach != initial(targetspecies.mutantstomach) \
+ || targetspecies.mutantspleen != initial(targetspecies.mutantspleen) \
|| targetspecies.mutantappendix != initial(targetspecies.mutantappendix) \
+ || HAS_TRAIT(humantarget, TRAIT_HULK) \
|| istype(humantarget.get_organ_slot(ORGAN_SLOT_EXTERNAL_WINGS), /obj/item/organ/external/wings/functional)
render_list += "Species: [targetspecies.name][mutant ? "-derived mutant" : ""]\n"
@@ -372,33 +387,6 @@
else
render_list += "[body_temperature_message]\n"
- // Time of death
- if(target.tod && (target.stat == DEAD || ((HAS_TRAIT(target, TRAIT_FAKEDEATH)) && !advanced)))
- render_list += "Time of Death: [target.tod]\n"
- var/tdelta = round(world.time - target.timeofdeath)
- render_list += "Subject died [DisplayTimeText(tdelta)] ago.\n"
-
- // Wounds
- if(iscarbon(target))
- var/mob/living/carbon/carbontarget = target
- var/list/wounded_parts = carbontarget.get_wounded_bodyparts()
- for(var/i in wounded_parts)
- var/obj/item/bodypart/wounded_part = i
- render_list += "Physical trauma[LAZYLEN(wounded_part.wounds) > 1 ? "s" : ""] detected in [wounded_part.name]"
- for(var/k in wounded_part.wounds)
- var/datum/wound/W = k
- render_list += "[W.name] ([W.severity_text()])\nRecommended treatment: [W.treat_text]
" // less lines than in woundscan() so we don't overload people trying to get basic med info
- render_list += ""
-
- //Diseases
- /*
- for(var/thing in target.diseases)
- var/datum/disease/D = thing
- if(!(D.visibility_flags & HIDDEN_SCANNER))
- render_list += "Warning: [D.form] detected\n\
- Name: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]
\
- " // divs do not need extra linebreak
- */
// Blood Level
// NON-MODULE CHANGE
if(target.has_dna() && target.get_blood_type())
@@ -415,22 +403,32 @@
else
render_list += "Blood level: [blood_percent] %, [target.blood_volume] cl, type: [blood_type]\n"
- // Cybernetics
- 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)]"]"
- if(cyberimp_detect)
- render_list += "Detected cybernetic modifications:\n"
- render_list += "[cyberimp_detect]\n"
- // we handled the last
so we don't need handholding
+ // Blood Alcohol Content
+ var/blood_alcohol_content = target.get_blood_alcohol_content()
+ var/datum/component/living_drunk/drinking_good = target.GetComponent(/datum/component/living_drunk)
+ if(drinking_good)
+ switch(drinking_good.drunk_state)
+ if(3)
+ render_list += "CRITICAL Extreme Alcohol withdrawal detected. Administer Ethanol related beverages immediately.
"
+ if(2)
+ render_list += "Dropping levels of Alcoholic byproducts. Consumption of Alcohol advised.
"
+ if(blood_alcohol_content > 0)
+ if(blood_alcohol_content >= 0.21 && isnull(drinking_good))
+ render_list += "Blood alcohol content: CRITICAL [blood_alcohol_content]%
"
+ else
+ render_list += "Blood alcohol content: [blood_alcohol_content]%
"
+
+ // Time of death
+ if(target.tod && (target.stat == DEAD || (HAS_TRAIT(target, TRAIT_FAKEDEATH) && !advanced)))
+ render_list += "
"
+ render_list += "Time of Death: [target.tod]
"
+ render_list += "Subject died [DisplayTimeText(round(world.time - target.timeofdeath))] ago.
"
+
+ . = jointext(render_list, "")
if(tochat)
- to_chat(user, custom_boxed_message("blue_box", jointext(render_list, "")), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
- else
- return(jointext(render_list, ""))
+ to_chat(user, boxed_message(.), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
+ return .
/proc/chemscan(mob/living/user, mob/living/target)
if(user.incapacitated())
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 376dc4a72400..8661ceccfa7d 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -113,7 +113,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/turfs/open/lava.dm b/code/game/turfs/open/lava.dm
index 81f5cf73bee8..25ad7bfec33d 100644
--- a/code/game/turfs/open/lava.dm
+++ b/code/game/turfs/open/lava.dm
@@ -399,7 +399,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 9bdf5646898a..948287c3ce31 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 | ORGAN_PROMINENT
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 90b6e9865a9c..019973d0b269 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 6d0cb4666c36..38a1a58036cc 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/items/corrupted_organs.dm b/code/modules/antagonists/heretic/items/corrupted_organs.dm
index 5e1aaf511c8a..b5367c26d751 100644
--- a/code/modules/antagonists/heretic/items/corrupted_organs.dm
+++ b/code/modules/antagonists/heretic/items/corrupted_organs.dm
@@ -2,6 +2,7 @@
/obj/item/organ/internal/eyes/corrupt
name = "corrupt orbs"
desc = "These eyes have seen something they shouldn't have."
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/// The override images we are applying
var/list/hallucinations
@@ -39,6 +40,7 @@
/obj/item/organ/internal/tongue/corrupt
name = "corrupt tongue"
desc = "This one tells only lies."
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/obj/item/organ/internal/tongue/corrupt/Initialize(mapload)
. = ..()
@@ -65,6 +67,7 @@
/obj/item/organ/internal/liver/corrupt
name = "corrupt liver"
desc = "After what you've seen you could really go for a drink."
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/// How much extra ingredients to add?
var/amount_added = 5
/// What extra ingredients can we add?
@@ -108,6 +111,7 @@
/obj/item/organ/internal/stomach/corrupt
name = "corrupt stomach"
desc = "This parasite demands an unwholesome diet in order to be satisfied."
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/// Do we have an unholy thirst?
var/thirst_satiated = FALSE
/// Timer for when we get thirsty again
@@ -173,6 +177,7 @@
/obj/item/organ/internal/heart/corrupt
name = "corrupt heart"
desc = "What corruption is this spreading along with the blood?"
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/// How long until the next heart?
COOLDOWN_DECLARE(hand_cooldown)
@@ -193,6 +198,7 @@
/obj/item/organ/internal/lungs/corrupt
name = "corrupt lungs"
desc = "Some things SHOULD be drowned in tar."
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/// How likely are we not to cough every time we take a breath?
var/cough_chance = 15
/// How much gas to emit?
@@ -234,6 +240,7 @@
/obj/item/organ/internal/appendix/corrupt
name = "corrupt appendix"
desc = "What kind of dark, cosmic force is even going to bother to corrupt an appendix?"
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
/// How likely are we to spawn worms?
var/worm_chance = 2
/// Cooldown between corrupted effects (monkestation addition)
diff --git a/code/modules/antagonists/heretic/knowledge/starting_lore.dm b/code/modules/antagonists/heretic/knowledge/starting_lore.dm
index c36faa8a2cff..19f0fb903d94 100644
--- a/code/modules/antagonists/heretic/knowledge/starting_lore.dm
+++ b/code/modules/antagonists/heretic/knowledge/starting_lore.dm
@@ -184,9 +184,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 2a216b089690..0fb0a402da96 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 1b720cd99402..091fe2f827ec 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/language/language_holder.dm b/code/modules/language/language_holder.dm
index 2dea26571b4e..cd499bb367c7 100644
--- a/code/modules/language/language_holder.dm
+++ b/code/modules/language/language_holder.dm
@@ -449,6 +449,9 @@ Key procs
understood_languages = list()
spoken_languages = list()
+// Has all the languages known (via "mind")
+/datum/language_holder/universal
+
/datum/language_holder/universal/New()
..()
grant_all_languages()
diff --git a/code/modules/library/bibles.dm b/code/modules/library/bibles.dm
index fd8a7842a36e..405e7f539865 100644
--- a/code/modules/library/bibles.dm
+++ b/code/modules/library/bibles.dm
@@ -191,7 +191,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 55b7c08220bd..c5ee06ea941c 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 2fde7293f124..2be038f68254 100644
--- a/code/modules/mining/lavaland/tendril_loot.dm
+++ b/code/modules/mining/lavaland/tendril_loot.dm
@@ -899,9 +899,8 @@
desc = "An eerie metal shard surrounded by dark energies."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "cursed_katana_organ"
- status = ORGAN_ORGANIC
encode_info = AUGMENT_NO_REQ
- organ_flags = ORGAN_FROZEN|ORGAN_UNREMOVABLE
+ organ_flags = ORGAN_ORGANIC | ORGAN_FROZEN | ORGAN_UNREMOVABLE
items_to_create = list(/obj/item/cursed_katana)
extend_sound = 'sound/items/unsheath.ogg'
retract_sound = 'sound/items/sheath.ogg'
diff --git a/code/modules/mob/living/basic/lavaland/legion/legion_tumour.dm b/code/modules/mob/living/basic/lavaland/legion/legion_tumour.dm
index 82d52445d659..752faad58f67 100644
--- a/code/modules/mob/living/basic/lavaland/legion/legion_tumour.dm
+++ b/code/modules/mob/living/basic/lavaland/legion/legion_tumour.dm
@@ -7,6 +7,7 @@
icon_state = "legion_remains"
zone = BODY_ZONE_CHEST
slot = ORGAN_SLOT_PARASITE_EGG
+ organ_flags = parent_type::organ_flags | ORGAN_HAZARDOUS
decay_factor = STANDARD_ORGAN_DECAY * 3 // About 5 minutes outside of a host
/// What stage of growth the corruption has reached.
var/stage = 0
@@ -30,7 +31,7 @@
. = ..()
animate_pulse()
-/obj/item/organ/internal/legion_tumour/apply_organ_damage(damage_amount, maximum, required_organtype)
+/obj/item/organ/internal/legion_tumour/apply_organ_damage(damage_amount, maximum, required_organ_flag)
var/was_failing = organ_flags & ORGAN_FAILING
. = ..()
if (was_failing != (organ_flags & ORGAN_FAILING))
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index 91ef91009dba..1109b509f213 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -1,4 +1,5 @@
#define BLOOD_DRIP_RATE_MOD 90 //Greater number means creating blood drips more often while bleeding
+#define DRUNK_POWER_TO_BLOOD_ALCOHOL 0.003 // Conversion between internal drunk power and common blood alcohol content
/****************************************************
BLOOD SYSTEM
@@ -327,6 +328,14 @@
var/turf/targ = get_ranged_target_turf(src, splatter_direction, splatter_strength)
our_splatter.fly_towards(targ, splatter_strength)
+/mob/living/proc/get_blood_alcohol_content()
+ var/blood_alcohol_content = 0
+ var/datum/status_effect/inebriated/inebriation = has_status_effect(/datum/status_effect/inebriated)
+ if(!isnull(inebriation))
+ blood_alcohol_content = round(inebriation.drunk_value * DRUNK_POWER_TO_BLOOD_ALCOHOL, 0.01)
+
+ return blood_alcohol_content
+
/**
* Helper proc for throwing blood particles around, similar to the spray_blood proc.
*/
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index caf5a3b3a8cc..8d223a0a0e42 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 | ORGAN_PROMINENT
attack_verb_continuous = list("attacks", "slaps", "whacks")
attack_verb_simple = list("attack", "slap", "whack")
@@ -194,7 +194,7 @@
to_chat(user, span_danger("You hit [src] with [item]!"))
/obj/item/organ/internal/brain/proc/check_for_repair(obj/item/item, mob/user)
- if(damage && item.is_drainable() && item.reagents.has_reagent(/datum/reagent/medicine/mannitol) && (status == ORGAN_ORGANIC)) //attempt to heal the brain
+ if(damage && item.is_drainable() && item.reagents.has_reagent(/datum/reagent/medicine/mannitol) && (IS_ORGANIC_ORGAN(src))) //attempt to heal the brain
// MONKESTATION NOTE: There was a check for the brain being completely dead here. But that's like, the only case when you'd want to do this. Pretty sure it isn't on tg, so I'm leaving this here for documentation.
user.visible_message(span_notice("[user] starts to slowly pour the contents of [item] onto [src]."), span_notice("You start to slowly pour the contents of [item] onto [src]."))
@@ -215,6 +215,10 @@
. = ..()
if(length(skillchips))
. += span_info("It has a skillchip embedded in it.")
+ . += brain_damage_examine()
+
+/// Needed so subtypes can override examine text while still calling parent
+/obj/item/organ/internal/brain/proc/brain_damage_examine()
if(suicided)
. += span_info("It's started turning slightly grey. They must not have been able to handle the stress of it all.")
return
@@ -228,6 +232,26 @@
else
. += span_info("This one is completely devoid of life.")
+/obj/item/organ/internal/brain/get_status_appendix(advanced, add_tooltips)
+ var/list/trauma_text
+ for(var/datum/brain_trauma/trauma as anything in traumas)
+ var/trauma_desc = ""
+ switch(trauma.resilience)
+ if(TRAUMA_RESILIENCE_BASIC)
+ trauma_desc = conditional_tooltip("Mild ", "Repair via brain surgery or medication such as [/datum/reagent/medicine/neurine::name].", add_tooltips)
+ if(TRAUMA_RESILIENCE_SURGERY)
+ trauma_desc = conditional_tooltip("Severe ", "Repair via brain surgery.", add_tooltips)
+ if(TRAUMA_RESILIENCE_LOBOTOMY)
+ trauma_desc = conditional_tooltip("Deep-rooted ", "Repair via Lobotomy.", add_tooltips)
+ if(TRAUMA_RESILIENCE_WOUND)
+ trauma_desc = conditional_tooltip("Fracture-derived ", "Repair via treatment of wounds afflicting the head.", add_tooltips)
+ if(TRAUMA_RESILIENCE_MAGIC, TRAUMA_RESILIENCE_ABSOLUTE)
+ trauma_desc = conditional_tooltip("Permanent ", "Irreparable under normal circumstances.", add_tooltips)
+ trauma_desc += capitalize(trauma.scan_desc)
+ LAZYADD(trauma_text, trauma_desc)
+ if(LAZYLEN(trauma_text))
+ return "Mental trauma: [english_list(trauma_text, and_text = ", and ")]."
+
/obj/item/organ/internal/brain/attack(mob/living/carbon/C, mob/user)
if(!istype(C))
return ..()
@@ -522,7 +546,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 49f61dbaa7a1..a7032ae68dab 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -907,8 +907,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 b7cd8a684576..b3a3f1de990d 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -386,6 +386,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)
@@ -835,7 +837,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 | ORGAN_UNREMOVABLE | ORGAN_HIDDEN))) // monkestation edit: also check ORGAN_UNREMOVABLE and ORGAN_HIDDEN
+ if (!replaced || !(replaced.organ_flags & (ORGAN_ROBOTIC | ORGAN_UNREMOVABLE | ORGAN_HIDDEN))) // monkestation edit: also check ORGAN_UNREMOVABLE and ORGAN_HIDDEN
changed_something = TRUE
new_organ = new new_organ()
new_organ.replace_into(src)
@@ -866,8 +868,8 @@
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) && !(organ_type::organ_flags & (ORGAN_SYNTHETIC | ORGAN_UNREMOVABLE | ORGAN_HIDDEN)) && organ_type::zone != "abstract") // monkestation edit: also check ORGAN_UNREMOVABLE and ORGAN_HIDDEN
+ for(var/obj/item/organ/organ_type as anything in organs)
+ if(!is_type_in_typecache(organ_type, GLOB.bioscrambler_organs_blacklist) && !(organ_type::organ_flags & (ORGAN_ROBOTIC | ORGAN_UNREMOVABLE | ORGAN_HIDDEN)) && organ_type::zone != "abstract") // monkestation edit: also check ORGAN_UNREMOVABLE and ORGAN_HIDDEN
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 34dc3cb9d51b..64efd81d0511 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -163,13 +163,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 || HAS_TRAIT(src, TRAIT_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)
@@ -180,13 +180,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 || HAS_TRAIT(src, TRAIT_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 7f6cdba331f6..cf71d40406ab 100644
--- a/code/modules/mob/living/carbon/human/_species.dm
+++ b/code/modules/mob/living/carbon/human/_species.dm
@@ -762,7 +762,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"
// MONKESTATION ADDITION START
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 0404fafca9e4..7714ee0756ba 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -426,9 +426,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 0c44e4986c9b..f34f3b32bd15 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -494,24 +494,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
- var/informed = FALSE
- for(var/obj/item/bodypart/L as anything in src.bodyparts)
- if(!IS_ORGANIC_LIMB(L))
- if(!informed)
- to_chat(src, span_userdanger("You feel a sharp pain as your robotic limbs overload."))
- informed = TRUE
- switch(severity)
- if(1)
- L.receive_damage(0,10)
- Paralyze(200)
- if(2)
- L.receive_damage(0,5)
- Paralyze(100)
-
/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 36803fc797b5..5d69cda9a3d9 100644
--- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm
+++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
@@ -150,7 +150,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 ab88b17a4331..cfceecf3bce3 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -462,7 +462,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 2e7d6eff1d30..4912f780c3d8 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -491,10 +491,10 @@
updatehealth()
return amount
-/mob/living/proc/adjustOrganLoss(slot, amount, maximum, required_organtype)
+/mob/living/proc/adjustOrganLoss(slot, amount, maximum, required_organ_flag)
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/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 61eb5aedcbbf..64f472ed9838 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -96,7 +96,7 @@
/// Used by [living/Bump()][/mob/living/proc/Bump] and [living/PushAM()][/mob/living/proc/PushAM] to prevent potential infinite loop.
var/now_pushing = null
- /// Time of death
+ ///The mob's latest time-of-death, as a station timestamp instead of world.time
var/tod = null
/// Sets AI behavior that allows mobs to target and dismember limbs with their basic attack.
diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm
index 8dbecfff49b7..4bc18f72b0ed 100644
--- a/code/modules/mob/living/silicon/damage_procs.dm
+++ b/code/modules/mob/living/silicon/damage_procs.dm
@@ -19,7 +19,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 7c27d3e7ab59..9d11cd98772b 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -580,7 +580,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]."))
if(!do_after(user, 50, H))
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index 69929561ee18..1a6a2c974d30 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 afcb401bbf77..d006d125e0eb 100644
--- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
@@ -105,7 +105,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
@@ -171,7 +171,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
@@ -187,7 +187,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
@@ -334,7 +334,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
@@ -394,7 +394,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))
@@ -405,7 +405,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)
..()
@@ -423,7 +423,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))
@@ -443,7 +443,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
@@ -525,7 +525,7 @@
user.add_traits(subject_traits, type)
/datum/reagent/medicine/c2/penthrite/on_mob_life(mob/living/carbon/human/H, seconds_per_tick, times_fired)
- 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)
@@ -535,7 +535,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)
@@ -559,7 +559,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.stamina.adjust(-10 * REM * seconds_per_tick)
- 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 84be7244e9a7..1c9990086264 100644
--- a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
@@ -1388,7 +1388,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.stamina.adjust(-10)
drinker.drop_all_held_items()
@@ -1399,7 +1399,7 @@
ADD_TRAIT(drinker, paralyzed_limb, type)
drinker.stamina.adjust(-10)
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 1ab4157d3484..013cacd06ad7 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -131,7 +131,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
@@ -189,7 +189,7 @@
affected_mob.stamina.adjust(2 * REM * seconds_per_tick, TRUE)
affected_mob.set_jitter_if_lower(4 SECONDS * REM * seconds_per_tick)
if(!safe || overdosed) // MONKESTATION EDIT: Makes Unknown Methamphetamine Isomer actually safe. "safe" is false by default.
- 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"))
..()
@@ -206,7 +206,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
@@ -242,7 +242,7 @@
to_chat(affected_mob, span_notice("[high_message]"))
affected_mob.add_mood_event("salted", /datum/mood_event/stimulant_heavy, name)
affected_mob.stamina.adjust(5 * REM * seconds_per_tick, TRUE)
- 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))
@@ -304,7 +304,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
@@ -321,7 +321,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
@@ -379,7 +379,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
@@ -392,7 +392,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"
@@ -437,13 +437,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"
@@ -594,7 +594,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))
@@ -602,7 +602,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")
@@ -665,7 +665,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)
. = ..()
@@ -734,7 +734,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"
@@ -776,7 +776,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)
@@ -789,7 +789,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 ad0994987fb2..38a549be3a37 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 6917be34fefe..ff14072e62aa 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
@@ -283,7 +283,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)
owner.adjust_bodytemperature(0.5 KELVIN * creation_purity * REM * seconds_per_tick) //hot hot
/datum/reagent/inverse/healing/tirimol
@@ -473,7 +473,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)
..()
@@ -537,7 +537,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 12912b80a155..947c83c3166a 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 7324ccc31a65..b1251757fb8f 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -687,7 +687,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
@@ -947,7 +947,7 @@
metabolized_traits = list(TRAIT_TUMOR_SUPPRESSED) //Having mannitol in you will pause the brain damage from brain tumor (so it heals an even 2 brain damage instead of 1.8)
/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)
..()
/datum/reagent/medicine/mannitol/overdose_start(mob/living/affected_mob)
@@ -1003,7 +1003,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
@@ -1206,7 +1206,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.stamina.adjust(0.5 * REM * seconds_per_tick, TRUE)
- 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, required_organ_flag = 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)
@@ -1215,7 +1215,7 @@
affected_mob.adjustCloneLoss(-1 * REM * seconds_per_tick, FALSE, required_biotype = affected_biotype)
affected_mob.stamina.adjust(3 * REM * seconds_per_tick, TRUE)
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, required_organ_flag = 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)
@@ -1256,7 +1256,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, required_organ_flag = affected_organ_flags)
affected_mob.stamina.adjust(-2.5 * REM * seconds_per_tick, FALSE)
..()
return TRUE
@@ -1467,7 +1467,7 @@ MONKESTATION REMOVAL END */
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
@@ -1483,7 +1483,7 @@ MONKESTATION REMOVAL END */
/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
@@ -1496,7 +1496,7 @@ MONKESTATION REMOVAL END */
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
@@ -1518,7 +1518,7 @@ MONKESTATION REMOVAL END */
/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/religion/religion_sects.dm b/code/modules/religion/religion_sects.dm
index 59785ec308ef..3416bdf517dc 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 24c93c1c3b73..98415658400b 100644
--- a/code/modules/surgery/bodyparts/_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -72,20 +72,16 @@
var/speed_modifier = 0
// Limb disabling variables
+ ///Whether it is possible for the limb to be disabled whatsoever. TRUE means that it is possible.
+ var/can_be_disabled = FALSE //Defaults to FALSE, as only human limbs can be disabled, and only the appendages.
///Controls if the limb is disabled. TRUE means it is disabled (similar to being removed, but still present for the sake of targeted interactions).
var/bodypart_disabled = FALSE
///Handles limb disabling by damage. If 0 (0%), a limb can't be disabled via damage. If 1 (100%), it is disabled at max limb damage. Anything between is the percentage of damage against maximum limb damage needed to disable the limb.
var/disabling_threshold_percentage = 0
- ///Whether it is possible for the limb to be disabled whatsoever. TRUE means that it is possible.
- var/can_be_disabled = FALSE //Defaults to FALSE, as only human limbs can be disabled, and only the appendages.
// Damage state variables
-
///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
@@ -93,6 +89,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 51015e0692d8..df4956d89011 100644
--- a/code/modules/surgery/organs/_organ.dm
+++ b/code/modules/surgery/organs/_organ.dm
@@ -4,25 +4,31 @@
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
var/prev_damage = 0
var/low_threshold_passed
@@ -32,18 +38,23 @@
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
///If the organ is cosmetic only, it loses all organ functionality.
var/cosmetic_only = FALSE
- /// 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 = list()
/// Status Effects that are given to the holder of the organ.
var/list/organ_effects
@@ -235,7 +246,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.")
@@ -259,12 +270,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)
@@ -279,8 +290,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)
@@ -416,29 +427,34 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
/// Called by medical scanners to get a simple summary of how healthy the organ is. Returns an empty string if things are fine.
/obj/item/organ/proc/get_status_text(advanced, add_tooltips)
- if(organ_flags & ORGAN_FAILING)
- . = "Non-Functional"
- if(add_tooltips)
- . = span_tooltip("Repair or replace surgically.", .)
- return .
+ if(advanced && (organ_flags & ORGAN_HAZARDOUS))
+ return conditional_tooltip("Harmful Foreign Body", "Remove surgically.", add_tooltips)
+
+ if(organ_flags & ORGAN_EMP)
+ return conditional_tooltip("EMP-Derived Failure", "Repair or replace surgically.", add_tooltips)
+ var/tech_text = ""
if(owner.has_reagent(/datum/reagent/inverse/technetium))
- return "[round((damage/maxHealth)*100, 1)]% damaged"
+ tech_text = "[round((damage / maxHealth) * 100, 1)]% damaged"
+
+ if(organ_flags & ORGAN_FAILING)
+ return conditional_tooltip("[tech_text || "Non-Functional"]", "Repair or replace surgically.", add_tooltips)
+
if(damage > high_threshold)
- . = "Severely Damaged"
- if(add_tooltips && owner.stat != DEAD)
- . = span_tooltip("[healing_factor ? "Treat with rest or use specialty medication." : "Repair surgically or use specialty medication."]", .)
- return .
+ return conditional_tooltip("[tech_text || "Severely Damaged"]", "[healing_factor ? "Treat with rest or use specialty medication." : "Repair surgically or use specialty medication."]", add_tooltips && owner.stat != DEAD)
+
if(damage > low_threshold)
- . = "Mildly Damaged"
- if(add_tooltips && owner.stat != DEAD)
- . = span_tooltip("[healing_factor ? "Treat with rest." : "Use specialty medication."]", .)
- return .
+ return conditional_tooltip("[tech_text || "Mildly Damaged"] ", "[healing_factor ? "Treat with rest." : "Use specialty medication."]", add_tooltips && owner.stat != DEAD)
+
+ if(tech_text)
+ return "[tech_text]"
+
+ return ""
/// Determines if this organ is shown when a user has condensed scans enabled
/obj/item/organ/proc/show_on_condensed_scans()
// We don't need to show *most* damaged organs as they have no effects associated
- return (organ_flags & (ORGAN_FAILING|ORGAN_VITAL))
+ return (organ_flags & (ORGAN_PROMINENT|ORGAN_HAZARDOUS|ORGAN_FAILING|ORGAN_VITAL))
/// Similar to get_status_text, but appends the text after the damage report, for additional status info
/obj/item/organ/proc/get_status_appendix(advanced, add_tooltips)
diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm
index b8f34306ab0a..bbe73797fc47 100644
--- a/code/modules/surgery/organs/ears.dm
+++ b/code/modules/surgery/organs/ears.dm
@@ -29,15 +29,16 @@
var/damage_multiplier = 1
/obj/item/organ/internal/ears/get_status_appendix(advanced, add_tooltips)
- if(owner.stat == DEAD)
+ if(owner.stat == DEAD || !HAS_TRAIT(owner, TRAIT_DEAF))
return
if(advanced)
+ if(HAS_TRAIT_FROM(owner, TRAIT_DEAF, QUIRK_TRAIT))
+ return conditional_tooltip("Subject is permanently deaf.", "Irreparable under normal circumstances.", add_tooltips)
if(HAS_TRAIT_FROM(owner, TRAIT_DEAF, GENETIC_MUTATION))
- return "Subject is genetically deaf."
+ return conditional_tooltip("Subject is genetically deaf.", "Use medication such as [/datum/reagent/medicine/mutadone::name].", add_tooltips)
if(HAS_TRAIT_FROM(owner, TRAIT_DEAF, EAR_DAMAGE))
- return "Subject is [(organ_flags & ORGAN_FAILING) ? "permanently": "temporarily"] deaf from ear damage."
- if(HAS_TRAIT(owner, TRAIT_DEAF))
- return "Subject is deaf."
+ return conditional_tooltip("Subject is [(organ_flags & ORGAN_FAILING) ? "permanently": "temporarily"] deaf from ear damage.", "Repair surgically, use medication such as [/datum/reagent/medicine/inacusiate::name], or protect ears with earmuffs.", add_tooltips)
+ return "Subject is deaf."
/obj/item/organ/internal/ears/show_on_condensed_scans()
// Always show if we have an appendix
@@ -125,7 +126,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 = "cybernetic ears"
diff --git a/code/modules/surgery/organs/external/_external_organs.dm b/code/modules/surgery/organs/external/_external_organs.dm
index d7bdee9f60ef..7bb453d74c87 100644
--- a/code/modules/surgery/organs/external/_external_organs.dm
+++ b/code/modules/surgery/organs/external/_external_organs.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 f6aee4a08212..f637746e3bdc 100644
--- a/code/modules/surgery/organs/external/wings/functional_wings.dm
+++ b/code/modules/surgery/organs/external/wings/functional_wings.dm
@@ -182,6 +182,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/eyes.dm b/code/modules/surgery/organs/eyes.dm
index 4a21c5bf7a28..c3fe3470142f 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -120,22 +120,25 @@
return
if(owner.is_blind())
if(advanced)
- if(owner.is_blind_from(EYE_DAMAGE))
- return "Subject is blind from eye damage."
- if(owner.is_blind_from(GENETIC_MUTATION))
- return "Subject is genetically blind."
if(owner.is_blind_from(QUIRK_TRAIT))
- return "Subject is permanently blind."
+ return conditional_tooltip("Subject is permanently blind.", "Irreparable under normal circumstances.", add_tooltips)
+ if(owner.is_blind_from(TRAUMA_TRAIT))
+ return conditional_tooltip("Subject is blind from mental trauma.", "Repair via treatment of associated trauma.", add_tooltips)
+ if(owner.is_blind_from(GENETIC_MUTATION))
+ return conditional_tooltip("Subject is genetically blind.", "Use medication such as [/datum/reagent/medicine/mutadone::name].", add_tooltips)
+ if(owner.is_blind_from(EYE_DAMAGE))
+ return conditional_tooltip("Subject is blind from eye damage.", "Repair surgically, use medication such as [/datum/reagent/medicine/oculine::name], or protect eyes with a blindfold.", add_tooltips)
return "Subject is blind."
if(owner.is_nearsighted())
if(advanced)
- if(owner.is_nearsighted_from(EYE_DAMAGE))
- return "Subject is nearsighted from eye damage."
- if(owner.is_nearsighted_from(GENETIC_MUTATION))
- return "Subject is genetically nearsighted."
if(owner.is_nearsighted_from(QUIRK_TRAIT))
- return "Subject is permanently nearsighted."
+ return conditional_tooltip("Subject is permanently nearsighted.", "Irreparable under normal circumstances. Prescription glasses will assuage the effects.", add_tooltips)
+ if(owner.is_nearsighted_from(GENETIC_MUTATION))
+ return conditional_tooltip("Subject is genetically nearsighted.", "Use medication such as [/datum/reagent/medicine/mutadone::name]. Prescription glasses will assuage the effects.", add_tooltips)
+ if(owner.is_nearsighted_from(EYE_DAMAGE))
+ return conditional_tooltip("Subject is nearsighted from eye damage.", "Repair surgically or use medication such as [/datum/reagent/medicine/oculine::name]. Prescription glasses will assuage the effects.", add_tooltips)
return "Subject is nearsighted."
+ return ""
/obj/item/organ/internal/eyes/show_on_condensed_scans()
// Always show if we have an appendix
@@ -180,7 +183,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
@@ -289,12 +292,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/appendix/_appendix.dm b/code/modules/surgery/organs/internal/appendix/_appendix.dm
index 3452e9a5954f..cc8124d03b8b 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))
@@ -91,10 +90,7 @@
/obj/item/organ/internal/appendix/get_status_text(advanced, add_tooltips)
if(!(organ_flags & ORGAN_FAILING) && inflamation_stage)
- . = "Inflamed"
- if(add_tooltips)
- . = span_tooltip("Remove surgically.", .)
- return .
+ return conditional_tooltip("Inflamed", "Remove surgically.", add_tooltips)
return ..()
#undef APPENDICITIS_PROB
diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm
index 29079bfc0f86..c9d9e91648b2 100644
--- a/code/modules/surgery/organs/internal/heart/_heart.dm
+++ b/code/modules/surgery/organs/internal/heart/_heart.dm
@@ -91,6 +91,15 @@
return round(base_amount * clamp(1.5 * ((maxHealth - damage) / maxHealth), 0.5, 1)) // heart damage puts a multiplier on it
+/obj/item/organ/internal/heart/get_status_text(advanced, add_tooltips)
+ if(!beating && !(organ_flags & ORGAN_FAILING) && owner.needs_heart() && owner.stat != DEAD)
+ return conditional_tooltip("Cardiac Arrest", "Apply defibrillation immediately. Similar electric shocks may work in emergencies.", add_tooltips)
+ return ..()
+
+/obj/item/organ/internal/heart/show_on_condensed_scans()
+ // Always show if the guy needs a heart (so its status can be monitored)
+ return ..() || owner.needs_heart()
+
/obj/item/organ/internal/heart/on_life(seconds_per_tick, times_fired)
..()
@@ -236,7 +245,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
@@ -274,7 +283,7 @@
owner.losebreath += 10
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
// monkestation edit: antispam
if(beating)
owner.visible_message(span_danger("[owner] clutches at [owner.p_their()] chest as if [owner.p_their()] heart is stopping!"), \
@@ -299,7 +308,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 dede7eaca711..5759c9aa3fba 100644
--- a/code/modules/surgery/organs/internal/liver/_liver.dm
+++ b/code/modules/surgery/organs/internal/liver/_liver.dm
@@ -135,7 +135,7 @@
if(filterToxins && !HAS_TRAIT(owner, TRAIT_TOXINLOVER) && !HAS_TRAIT(owner, TRAIT_TOXIMMUNE))
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)
@@ -241,7 +241,7 @@
name = "basic cybernetic liver"
icon_state = "liver-c"
desc = "A very basic device designed to mimic the functions of a human liver. Handles toxins slightly worse than an organic liver."
- 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
@@ -274,7 +274,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_plasmamen.dm b/code/modules/surgery/organs/internal/liver/liver_plasmamen.dm
index 34dbec6ab612..142f7e263984 100644
--- a/code/modules/surgery/organs/internal/liver/liver_plasmamen.dm
+++ b/code/modules/surgery/organs/internal/liver/liver_plasmamen.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
/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/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm
index 8d872b75e017..2833bb71bed5 100644
--- a/code/modules/surgery/organs/internal/tongue/_tongue.dm
+++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm
@@ -163,7 +163,7 @@
ADD_TRAIT(tongue_owner, TRAIT_AGEUSIA, NO_TONGUE_TRAIT)
-/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
@@ -536,8 +536,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")
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index f46d0c95b360..32c58ef1029a 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -794,7 +794,7 @@
var/oxyloss = suffocator.getOxyLoss()
if(oxyloss >= 50)
// Suffocating = brain damage
- suffocator.adjustOrganLoss(ORGAN_SLOT_BRAIN, (oxyloss / MAX_OXYLOSS(suffocator.maxHealth)) * 4, required_organtype = ORGAN_ORGANIC)
+ suffocator.adjustOrganLoss(ORGAN_SLOT_BRAIN, (oxyloss / MAX_OXYLOSS(suffocator.maxHealth)) * 4, required_organ_flag = ORGAN_ORGANIC)
// If mob is at critical health, check if they can be damaged further.
if(suffocator.stat >= SOFT_CRIT && HAS_TRAIT(suffocator, TRAIT_NOCRITDAMAGE))
return
@@ -894,7 +894,7 @@
QDEL_IN(holder, breath_particle.lifespan)
-/obj/item/organ/internal/lungs/apply_organ_damage(damage_amount, maximum = maxHealth, required_organtype)
+/obj/item/organ/internal/lungs/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag)
. = ..()
if(!.)
return
@@ -985,7 +985,7 @@
desc = "A basic cybernetic version of the lungs found in traditional humanoid entities."
failing_desc = "seems to be broken."
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.
@@ -1020,7 +1020,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/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index da0069cf8b5a..1cd9dc3fb55e 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.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
if(HAS_TRAIT(src, TRAIT_NO_ORGAN_DECAY) || (owner && HAS_TRAIT(owner, TRAIT_NO_ORGAN_DECAY)))
return
@@ -70,7 +70,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/stomach/_stomach.dm b/code/modules/surgery/organs/stomach/_stomach.dm
index 3c5c231ba988..ebd3aea05cdd 100644
--- a/code/modules/surgery/organs/stomach/_stomach.dm
+++ b/code/modules/surgery/organs/stomach/_stomach.dm
@@ -293,7 +293,7 @@
name = "basic cybernetic stomach"
icon_state = "stomach-c"
desc = "A basic device designed to mimic the functions of a human stomach"
- 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
@@ -324,7 +324,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.
// Lizard stomach to Let Them Eat Rat
/obj/item/organ/internal/stomach/lizard
diff --git a/monkestation/code/datums/mutations/sight.dm b/monkestation/code/datums/mutations/sight.dm
index bbaa74aaa1db..3b792d586087 100644
--- a/monkestation/code/datums/mutations/sight.dm
+++ b/monkestation/code/datums/mutations/sight.dm
@@ -34,7 +34,7 @@
to_chat(source, span_warning("You can't shoot lasers whilst your cornea is melted!"))
return
- if(eyes.status == ORGAN_ROBOTIC)
+ if(IS_ROBOTIC_ORGAN(eyes))
owner.balloon_alert(owner, "eyes robotic!")
return FALSE
@@ -148,7 +148,7 @@
return TRUE
var/obj/item/organ/internal/eyes/eyes = owner.get_organ_slot(ORGAN_SLOT_EYES)
- if(eyes && eyes.status == ORGAN_ROBOTIC)
+ if(IS_ROBOTIC_ORGAN(eyes))
return TRUE
. = ..()
@@ -177,7 +177,7 @@
if(!istype(eyes))
return
- if(eyes.status == ORGAN_ROBOTIC)
+ if(IS_ROBOTIC_ORGAN(eyes))
return
eyes.flash_protect = FLASH_PROTECTION_FLASH
@@ -250,7 +250,7 @@
to_chat(owner, span_warning("You can't use your X-ray vision whilst blind!"))
return FALSE
- if(eyes.status == ORGAN_ROBOTIC)
+ if(IS_ROBOTIC_ORGAN(eyes))
if(feedback)
owner.balloon_alert(owner, "eyes robotic!")
return FALSE
diff --git a/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_objectives.dm b/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_objectives.dm
index 583c2544b971..01e7a149cf10 100644
--- a/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_objectives.dm
+++ b/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_objectives.dm
@@ -186,7 +186,7 @@
var/list/all_items = owner.current.get_all_contents()
var/heart_count = 0
for(var/obj/item/organ/internal/heart/current_hearts in all_items)
- if(current_hearts.organ_flags & ORGAN_SYNTHETIC) // No robo-hearts allowed
+ if(IS_ROBOTIC_ORGAN(current_hearts)) // No robo-hearts allowed
continue
heart_count++
diff --git a/monkestation/code/modules/blueshift/reagents/deforest.dm b/monkestation/code/modules/blueshift/reagents/deforest.dm
index b878a6ccf86f..bf8e2c223fd7 100644
--- a/monkestation/code/modules/blueshift/reagents/deforest.dm
+++ b/monkestation/code/modules/blueshift/reagents/deforest.dm
@@ -417,7 +417,7 @@
var/mob/living/carbon/human/human = our_guy
human.adjust_bodytemperature(heating * TEMPERATURE_DAMAGE_COEFFICIENT, max_temp = our_guy.bodytemp_heat_damage_limit - 5)
else
- our_guy.adjustOrganLoss(ORGAN_SLOT_HEART, 1 * REM * seconds_per_tick, required_organtype = affected_organtype)
+ our_guy.adjustOrganLoss(ORGAN_SLOT_HEART, 1 * REM * seconds_per_tick, required_organ_flag = affected_organ_flags)
our_guy.adjustToxLoss(1 * REM * seconds_per_tick, updating_health = FALSE, forced = TRUE, required_biotype = affected_biotype)
if(SPT_PROB(5, seconds_per_tick) && !(our_guy.mob_biotypes & MOB_ROBOTIC))
diff --git a/monkestation/code/modules/cybernetics/augments/_base_changes.dm b/monkestation/code/modules/cybernetics/augments/_base_changes.dm
index 91d10601abd4..083e0b3c89d6 100644
--- a/monkestation/code/modules/cybernetics/augments/_base_changes.dm
+++ b/monkestation/code/modules/cybernetics/augments/_base_changes.dm
@@ -3,7 +3,7 @@
/obj/item/organ/internal/cyberimp
var/hacked = FALSE
-
+ organ_flags = ORGAN_ROBOTIC
var/list/encode_info = AUGMENT_NO_REQ
///are we a visual implant
@@ -165,6 +165,7 @@
w_class = WEIGHT_CLASS_TINY
var/obj/item/cyberlink_connector/connector
var/extended = FALSE
+ organ_flags = ORGAN_ROBOTIC
/obj/item/organ/internal/cyberimp/cyberlink/Insert(mob/living/carbon/user, special, drop_if_replaced)
for(var/obj/item/organ/internal/cyberimp/cyber in user.organs)
diff --git a/monkestation/code/modules/cybernetics/augments/arm_augments/_base.dm b/monkestation/code/modules/cybernetics/augments/arm_augments/_base.dm
index 8aa22b1fd783..ae534610590f 100644
--- a/monkestation/code/modules/cybernetics/augments/arm_augments/_base.dm
+++ b/monkestation/code/modules/cybernetics/augments/arm_augments/_base.dm
@@ -74,7 +74,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)
diff --git a/monkestation/code/modules/cybernetics/augments/arm_augments/item_sets/_base.dm b/monkestation/code/modules/cybernetics/augments/arm_augments/item_sets/_base.dm
index b2d27c099470..14cca408b9bb 100644
--- a/monkestation/code/modules/cybernetics/augments/arm_augments/item_sets/_base.dm
+++ b/monkestation/code/modules/cybernetics/augments/arm_augments/item_sets/_base.dm
@@ -80,7 +80,7 @@
/obj/item/organ/internal/cyberimp/arm/item_set/emp_act(severity)
. = ..()
- if(. & EMP_PROTECT_SELF || status == ORGAN_ROBOTIC)
+ 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/monkestation/code/modules/cybernetics/augments/chest_augments.dm b/monkestation/code/modules/cybernetics/augments/chest_augments.dm
index 02d24507a5cf..148d73f79970 100644
--- a/monkestation/code/modules/cybernetics/augments/chest_augments.dm
+++ b/monkestation/code/modules/cybernetics/augments/chest_augments.dm
@@ -9,6 +9,7 @@
implant_overlay = "chest_implant_overlay"
slot = ORGAN_SLOT_SPINAL
var/double_legged = FALSE
+ organ_flags = ORGAN_ROBOTIC
/datum/action/item_action/organ_action/sandy
name = "Sandevistan Activation"
@@ -88,7 +89,7 @@
/datum/reagent/medicine/brain_healer/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
- affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5 * REM * seconds_per_tick * normalise_creation_purity(), required_organtype = affected_organtype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5 * REM * seconds_per_tick * normalise_creation_purity(), required_organ_flag = affected_organ_flags)
..()
diff --git a/monkestation/code/modules/cybernetics/augments/internal_implants.dm b/monkestation/code/modules/cybernetics/augments/internal_implants.dm
index 2c58e1c0b8d3..1c36992dc46c 100644
--- a/monkestation/code/modules/cybernetics/augments/internal_implants.dm
+++ b/monkestation/code/modules/cybernetics/augments/internal_implants.dm
@@ -2,8 +2,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/monkestation/code/modules/cybernetics/augments/leg_augments/_base.dm b/monkestation/code/modules/cybernetics/augments/leg_augments/_base.dm
index b85fec602902..d397da8fef02 100644
--- a/monkestation/code/modules/cybernetics/augments/leg_augments/_base.dm
+++ b/monkestation/code/modules/cybernetics/augments/leg_augments/_base.dm
@@ -5,7 +5,7 @@
icon_state = "implant-toolkit"
w_class = WEIGHT_CLASS_SMALL
encode_info = AUGMENT_NT_LOWLEVEL
-
+ organ_flags = ORGAN_ROBOTIC
var/double_legged = FALSE
/obj/item/organ/internal/cyberimp/leg/Initialize()
diff --git a/monkestation/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/monkestation/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index d91267e96843..1e7e59aae3de 100644
--- a/monkestation/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/monkestation/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -26,7 +26,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
diff --git a/monkestation/code/modules/reagents/chemistry/reagents/other_reagents.dm b/monkestation/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 2862da172fb7..1f9b317aee15 100644
--- a/monkestation/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/monkestation/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -17,8 +17,8 @@
var/uh_oh_message = pick("You rub your eyes.", "Your eyes lose focus for a second.", "Your stomach cramps!")
if (SPT_PROB(2.5, seconds_per_tick))
to_chat(affected_mob, span_notice("[uh_oh_message]"))
- affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 2 * REM * 1, required_organtype = affected_organtype) // Kills your stomach.
- affected_mob.adjustOrganLoss(ORGAN_SLOT_EYES, 2 * REM * 1, required_organtype = affected_organtype) // Kills your eyes too.
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 2 * REM * 1, required_organ_flag = affected_organ_flags) // Kills your stomach.
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_EYES, 2 * REM * 1, required_organ_flag = affected_organ_flags) // Kills your eyes too.
@@ -65,6 +65,6 @@
var/tummy_ache_message = pick("Your stomach rumbles.", "Your stomach is upset!", "You don't feel very good...")
if (SPT_PROB(2.5, seconds_per_tick))
to_chat(affected_mob, span_notice("[tummy_ache_message]"))
- affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 2 * REM * 1, required_organtype = affected_organtype) // Tumby hurty...
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 2 * REM * 1, required_organ_flag = affected_organ_flags) // Tumby hurty...
diff --git a/monkestation/code/modules/surgery/organs/augments.dm b/monkestation/code/modules/surgery/organs/augments.dm
index 1764dd71d34b..f691779ba39d 100644
--- a/monkestation/code/modules/surgery/organs/augments.dm
+++ b/monkestation/code/modules/surgery/organs/augments.dm
@@ -109,7 +109,7 @@
/obj/item/organ/internal/cyberimp/brain/linked_surgery/perfect
name = "hacked surgical serverlink brain implant"
desc = "A brain implant with a bluespace technology that lets you perform any advanced surgery through hacked Nanotrasen servers."
- organ_flags = ORGAN_SYNTHETIC | ORGAN_HIDDEN
+ organ_flags = ORGAN_ROBOTIC | ORGAN_HIDDEN
organ_traits = list(TRAIT_PERFECT_SURGEON)
actions_types = null
implant_color = "#7a0875"
diff --git a/monkestation/code/modules/surgery/organs/external/tail/clockworktail.dm b/monkestation/code/modules/surgery/organs/external/tail/clockworktail.dm
index e7e7bf33c151..7d17d847551c 100644
--- a/monkestation/code/modules/surgery/organs/external/tail/clockworktail.dm
+++ b/monkestation/code/modules/surgery/organs/external/tail/clockworktail.dm
@@ -4,5 +4,4 @@
color = null
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "clocktail"
- organ_flags = ORGAN_SYNTHETIC
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC
diff --git a/monkestation/code/modules/surgery/organs/internal/appendix/fidgetappendix.dm b/monkestation/code/modules/surgery/organs/internal/appendix/fidgetappendix.dm
index 18105014101b..13f63633a5e4 100644
--- a/monkestation/code/modules/surgery/organs/internal/appendix/fidgetappendix.dm
+++ b/monkestation/code/modules/surgery/organs/internal/appendix/fidgetappendix.dm
@@ -4,7 +4,7 @@
base_icon_state = "fidgetappendix"
food_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/toxin/bad_food = 10)
var/spinresetter = 0
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
/obj/item/organ/internal/appendix/fidgetappendix/on_life(seconds_per_tick, times_fired)
..()
diff --git a/monkestation/code/modules/surgery/organs/internal/brain.dm b/monkestation/code/modules/surgery/organs/internal/brain.dm
index edeb5f4af0a9..93580a899da9 100644
--- a/monkestation/code/modules/surgery/organs/internal/brain.dm
+++ b/monkestation/code/modules/surgery/organs/internal/brain.dm
@@ -3,8 +3,7 @@
desc ="An engineer would call this inconcievable wonder of gears and metal a 'black box'"
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "brain-clock"
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
var/robust //Set to true if the robustbits causes brain replacement. Because holy fuck is the CLANG CLANG CLANG CLANG annoying
/obj/item/organ/internal/brain/clockwork/emp_act(severity)
@@ -455,7 +454,7 @@
/obj/item/organ/internal/brain/synth/emp_act(severity) // EMP act against the posi, keep the cap far below the organ health
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
if(!COOLDOWN_FINISHED(src, severe_cooldown)) //So we cant just spam emp to kill people.
@@ -464,12 +463,12 @@
switch(severity)
if(EMP_HEAVY)
to_chat(owner, span_warning("01001001 00100111 01101101 00100000 01100110 01110101 01100011 01101011 01100101 01100100 00101110"))
- apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maximum = SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM, required_organ_flag = ORGAN_ROBOTIC)
if(EMP_LIGHT)
to_chat(owner, span_warning("Alert: Electromagnetic damage taken in central processing unit. Error Code: 401-YT"))
- apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maximum = SYNTH_EMP_BRAIN_DAMAGE_MAXIMUM, required_organ_flag = ORGAN_ROBOTIC)
-/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, maximum = maxHealth, required_organ_flag)
. = ..()
if(owner && damage > 0 && (world.time - last_message_time) > SYNTH_BRAIN_DAMAGE_MESSAGE_INTERVAL)
diff --git a/monkestation/code/modules/surgery/organs/internal/eyes.dm b/monkestation/code/modules/surgery/organs/internal/eyes.dm
index 8f9d3cde9f6c..b6c8d62b079c 100644
--- a/monkestation/code/modules/surgery/organs/internal/eyes.dm
+++ b/monkestation/code/modules/surgery/organs/internal/eyes.dm
@@ -74,16 +74,16 @@
/obj/item/organ/internal/eyes/synth/emp_act(severity)
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
switch(severity)
if(EMP_HEAVY)
to_chat(owner, span_warning("Alert:Severe electromagnetic interference clouds your optics with static. Error Code: I-CS6"))
- apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maximum = maxHealth, required_organ_flag = ORGAN_ROBOTIC)
if(EMP_LIGHT)
to_chat(owner, span_warning("Alert: Mild interference clouds your optics with static. Error Code: I-CS0"))
- apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maximum =maxHealth, required_organ_flag = ORGAN_ROBOTIC)
/datum/design/synth_eyes
name = "Optical Sensors"
diff --git a/monkestation/code/modules/surgery/organs/internal/heart.dm b/monkestation/code/modules/surgery/organs/internal/heart.dm
index 4be5715eab20..fc46b1a0ae91 100644
--- a/monkestation/code/modules/surgery/organs/internal/heart.dm
+++ b/monkestation/code/modules/surgery/organs/internal/heart.dm
@@ -3,8 +3,7 @@
desc = "A complex, multi-valved hydraulic pump, which fits perfectly where a heart normally would."
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "heart-clock"
- organ_flags = ORGAN_SYNTHETIC
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC
///The rate at which slimes regenerate their jelly normally
#define JELLY_REGEN_RATE 1.5
@@ -150,7 +149,7 @@
/obj/item/organ/internal/heart/synth/emp_act(severity)
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
if(!COOLDOWN_FINISHED(src, severe_cooldown)) //So we cant just spam emp to kill people.
@@ -159,10 +158,10 @@
switch(severity)
if(EMP_HEAVY)
to_chat(owner, span_warning("Alert: Main hydraulic pump control has taken severe damage, seek maintenance immediately. Error code: HP300-10."))
- apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maximum = maxHealth, required_organ_flag = ORGAN_ROBOTIC)
if(EMP_LIGHT)
to_chat(owner, span_warning("Alert: Main hydraulic pump control has taken light damage, seek maintenance immediately. Error code: HP300-05."))
- apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maximum = maxHealth, required_organ_flag = ORGAN_ROBOTIC)
/datum/design/synth_heart
name = "Hydraulic Pump Engine"
diff --git a/monkestation/code/modules/surgery/organs/internal/liver.dm b/monkestation/code/modules/surgery/organs/internal/liver.dm
index ecc42a99d1ba..443613897951 100644
--- a/monkestation/code/modules/surgery/organs/internal/liver.dm
+++ b/monkestation/code/modules/surgery/organs/internal/liver.dm
@@ -3,8 +3,7 @@
desc = "A series of small pumps and boilers, designed to facilitate proper metabolism."
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "liver-clock"
- organ_flags = ORGAN_SYNTHETIC
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC
alcohol_tolerance = 0
liver_resistance = 0
toxTolerance = 1 //while the organ isn't damaged by doing its job, it doesnt do it very well
@@ -33,7 +32,7 @@
/obj/item/organ/internal/liver/synth/emp_act(severity)
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
if(!COOLDOWN_FINISHED(src, severe_cooldown)) //So we cant just spam emp to kill people.
@@ -42,11 +41,11 @@
switch(severity)
if(EMP_HEAVY)
to_chat(owner, span_warning("Alert: Critical! Reagent processing unit failure, seek maintenance immediately. Error Code: DR-1k"))
- apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maximum = maxHealth, required_organ_flag = ORGAN_ROBOTIC)
if(EMP_LIGHT)
to_chat(owner, span_warning("Alert: Reagent processing unit failure, seek maintenance for diagnostic. Error Code: DR-0k"))
- apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maximum = maxHealth, required_organ_flag = ORGAN_ROBOTIC)
/datum/design/synth_liver
name = "Reagent Processing Unit"
diff --git a/monkestation/code/modules/surgery/organs/internal/lungs.dm b/monkestation/code/modules/surgery/organs/internal/lungs.dm
index 664383dc0d0a..666ad689767f 100644
--- a/monkestation/code/modules/surgery/organs/internal/lungs.dm
+++ b/monkestation/code/modules/surgery/organs/internal/lungs.dm
@@ -3,8 +3,7 @@
desc = "A utilitarian bellows which serves to pump oxygen into an automaton's body."
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "lungs-clock"
- organ_flags = ORGAN_SYNTHETIC
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC
/obj/item/organ/internal/lungs/slime
zone = BODY_ZONE_CHEST
@@ -34,7 +33,7 @@
/obj/item/organ/internal/lungs/synth/emp_act(severity)
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
if(!COOLDOWN_FINISHED(src, severe_cooldown)) //So we cant just spam emp to kill people.
diff --git a/monkestation/code/modules/surgery/organs/internal/spleen/_spleen.dm b/monkestation/code/modules/surgery/organs/internal/spleen/_spleen.dm
index dd6cd34a53d5..bac2dff04291 100644
--- a/monkestation/code/modules/surgery/organs/internal/spleen/_spleen.dm
+++ b/monkestation/code/modules/surgery/organs/internal/spleen/_spleen.dm
@@ -116,7 +116,7 @@ If you have > 135 toxin damage and dont have spleenless/liverless metabolism you
name = "basic cybernetic spleen"
icon_state = "spleen-c"
desc = "A very basic device designed to mimic the functions of a human liver. Handles toxins slightly worse than an organic liver."
- 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.
@@ -131,7 +131,7 @@ If you have > 135 toxin damage and dont have spleenless/liverless metabolism you
name = "cybernetic spleen"
icon_state = "spleen-c-u"
desc = "An electronic device designed to mimic the functions of a human spleen. Handles blood and emergency toxins slightly better than an organic spleen."
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
maxHealth = STANDARD_ORGAN_THRESHOLD
emp_vulnerability = 40 //Chance of permanent effects if emp-ed.
@@ -146,7 +146,7 @@ If you have > 135 toxin damage and dont have spleenless/liverless metabolism you
name = "upgraded cybernetic spleen"
icon_state = "spleen-c-u2"
desc = "An upgraded version of the cybernetic spleen designed to mimic hematopoiesis of bone marrow while being able to in emergencies sacrifice its durability to cleans toxins. Stores 50 units of blood for emergency release in case of hypervolemic shock. "
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
maxHealth = STANDARD_ORGAN_THRESHOLD*1.5
emp_vulnerability = 20 //Chance of permanent effects if emp-ed.
@@ -165,5 +165,5 @@ If you have > 135 toxin damage and dont have spleenless/liverless metabolism you
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.
diff --git a/monkestation/code/modules/surgery/organs/internal/stomach.dm b/monkestation/code/modules/surgery/organs/internal/stomach.dm
index 5bba11f3945d..5c694d9bf146 100644
--- a/monkestation/code/modules/surgery/organs/internal/stomach.dm
+++ b/monkestation/code/modules/surgery/organs/internal/stomach.dm
@@ -3,8 +3,7 @@
desc = "A biomechanical furnace, which turns calories into mechanical energy."
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "stomach-clock"
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
/obj/item/organ/internal/stomach/clockwork/emp_act(severity)
owner.adjust_nutrition(-100) //got rid of severity part
@@ -14,8 +13,7 @@
desc = "A biomechanical battery which stores mechanical energy."
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'
icon_state = "stomach-clock"
- status = ORGAN_ROBOTIC
- organ_flags = ORGAN_SYNTHETIC
+ organ_flags = ORGAN_ROBOTIC
//max_charge = 7500
//charge = 7500 //old bee code
@@ -45,7 +43,7 @@
/obj/item/organ/internal/stomach/synth/emp_act(severity)
. = ..()
- if(!owner || . & EMP_PROTECT_SELF)
+ if((. & EMP_PROTECT_SELF) || !owner)
return
if(!COOLDOWN_FINISHED(src, severe_cooldown)) //So we cant just spam emp to kill people.
@@ -54,12 +52,12 @@
switch(severity)
if(EMP_HEAVY)
owner.nutrition = max(0, owner.nutrition - SYNTH_STOMACH_HEAVY_EMP_CHARGE_LOSS)
- apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_HEAVY_EMP_DAMAGE, maxHealth, required_organ_flag = ORGAN_ROBOTIC)
to_chat(owner, span_warning("Alert: Severe battery discharge!"))
if(EMP_LIGHT)
owner.nutrition = max(0, owner.nutrition - SYNTH_STOMACH_LIGHT_EMP_CHARGE_LOSS)
- apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maxHealth, required_organtype = ORGAN_ROBOTIC)
+ apply_organ_damage(SYNTH_ORGAN_LIGHT_EMP_DAMAGE, maxHealth, required_organ_flag = ORGAN_ROBOTIC)
to_chat(owner, span_warning("Alert: Minor battery discharge!"))
/datum/design/synth_stomach
diff --git a/monkestation/code/modules/surgery/organs/internal/tongue.dm b/monkestation/code/modules/surgery/organs/internal/tongue.dm
index 000ad646c48e..4d25454b358a 100644
--- a/monkestation/code/modules/surgery/organs/internal/tongue.dm
+++ b/monkestation/code/modules/surgery/organs/internal/tongue.dm
@@ -63,7 +63,8 @@
maxHealth = 100 //RoboTongue!
zone = BODY_ZONE_PRECISE_MOUTH
slot = ORGAN_SLOT_TONGUE
- organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
+ organ_flags = ORGAN_ROBOTIC
+ //organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES
/obj/item/organ/internal/tongue/synth/get_scream_sound()
return 'monkestation/sound/voice/screams/silicon/scream_silicon.ogg'
@@ -118,7 +119,7 @@
desc = "A voice synthesizer that allows you to emulate the tongues of other species."
say_mod = "beeps"
icon_state = "tonguerobot"
- status = ORGAN_ROBOTIC
+ organ_flags = ORGAN_ROBOTIC
//The current tongue being emulated.
var/current_tongue = "Synth"
var/datum/action/innate/select_tongue/select_tongue
diff --git a/monkestation/code/modules/virology/disease/symtoms/harmful/teratoma.dm b/monkestation/code/modules/virology/disease/symtoms/harmful/teratoma.dm
index 08599736ae0e..f75520b6bb52 100644
--- a/monkestation/code/modules/virology/disease/symtoms/harmful/teratoma.dm
+++ b/monkestation/code/modules/virology/disease/symtoms/harmful/teratoma.dm
@@ -58,7 +58,7 @@
for(var/obj/item/organ/organ in target.organs)
if(is_type_in_typecache(organ, blacklisted_organs))
continue
- if(organ.organ_flags & ORGAN_SYNTHETIC)
+ if(IS_ROBOTIC_ORGAN(organ))
continue
. |= organ.type
diff --git a/tgstation.dme b/tgstation.dme
index bca4c0766b1e..b86a6d23a228 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -509,7 +509,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"