diff --git a/code/datums/diseases/advance/symptoms/fire.dm b/code/datums/diseases/advance/symptoms/fire.dm
index dbbe76abcf0..b55317df3df 100644
--- a/code/datums/diseases/advance/symptoms/fire.dm
+++ b/code/datums/diseases/advance/symptoms/fire.dm
@@ -62,14 +62,14 @@
/datum/symptom/fire/proc/Firestacks_stage_4(mob/living/M, datum/disease/advance/A)
M.adjust_fire_stacks(1 * power)
- M.take_overall_damage(burn = 3 * power, required_status = BODYTYPE_ORGANIC)
+ M.take_overall_damage(burn = 3 * power, required_bodytype = BODYTYPE_ORGANIC)
if(infective)
A.spread(2)
return 1
/datum/symptom/fire/proc/Firestacks_stage_5(mob/living/M, datum/disease/advance/A)
M.adjust_fire_stacks(3 * power)
- M.take_overall_damage(burn = 5 * power, required_status = BODYTYPE_ORGANIC)
+ M.take_overall_damage(burn = 5 * power, required_bodytype = BODYTYPE_ORGANIC)
if(infective)
A.spread(4)
return 1
@@ -149,7 +149,7 @@ Bonus
/datum/symptom/alkali/proc/Alkali_fire_stage_4(mob/living/M, datum/disease/advance/A)
var/get_stacks = 6 * power
M.adjust_fire_stacks(get_stacks)
- M.take_overall_damage(burn = get_stacks / 2, required_status = BODYTYPE_ORGANIC)
+ M.take_overall_damage(burn = get_stacks / 2, required_bodytype = BODYTYPE_ORGANIC)
if(chems)
M.reagents.add_reagent(/datum/reagent/clf3, 2 * power)
return 1
@@ -157,7 +157,7 @@ Bonus
/datum/symptom/alkali/proc/Alkali_fire_stage_5(mob/living/M, datum/disease/advance/A)
var/get_stacks = 8 * power
M.adjust_fire_stacks(get_stacks)
- M.take_overall_damage(burn = get_stacks, required_status = BODYTYPE_ORGANIC)
+ M.take_overall_damage(burn = get_stacks, required_bodytype = BODYTYPE_ORGANIC)
if(chems)
M.reagents.add_reagent_list(list(/datum/reagent/napalm = 4 * power, /datum/reagent/clf3 = 4 * power))
return 1
diff --git a/code/datums/diseases/advance/symptoms/flesh_eating.dm b/code/datums/diseases/advance/symptoms/flesh_eating.dm
index b286f2bd778..dd11a5995a7 100644
--- a/code/datums/diseases/advance/symptoms/flesh_eating.dm
+++ b/code/datums/diseases/advance/symptoms/flesh_eating.dm
@@ -51,7 +51,7 @@ Bonus
/datum/symptom/flesh_eating/proc/Flesheat(mob/living/M, datum/disease/advance/A)
var/get_damage = rand(15,25) * power
- M.take_overall_damage(brute = get_damage, required_status = BODYTYPE_ORGANIC)
+ M.take_overall_damage(brute = get_damage, required_bodytype = BODYTYPE_ORGANIC)
if(pain)
M.adjustStaminaLoss(get_damage * 2)
if(bleed)
@@ -123,7 +123,7 @@ Bonus
/datum/symptom/flesh_death/proc/Flesh_death(mob/living/M, datum/disease/advance/A)
var/get_damage = rand(6,10)
- M.take_overall_damage(brute = get_damage, required_status = BODYTYPE_ORGANIC)
+ M.take_overall_damage(brute = get_damage, required_bodytype = BODYTYPE_ORGANIC)
if(chems)
M.reagents.add_reagent_list(list(/datum/reagent/toxin/heparin = 2, /datum/reagent/toxin/lipolicide = 2))
if(zombie)
diff --git a/code/datums/quirks/positive_quirks.dm b/code/datums/quirks/positive_quirks.dm
index df54a116a61..7e43c0e35b3 100644
--- a/code/datums/quirks/positive_quirks.dm
+++ b/code/datums/quirks/positive_quirks.dm
@@ -43,14 +43,14 @@
/datum/quirk/drunkhealing/process(delta_time)
switch(quirk_holder.get_drunk_amount())
if (6 to 40)
- quirk_holder.adjustBruteLoss(-0.1 * delta_time, FALSE)
- quirk_holder.adjustFireLoss(-0.05 * delta_time)
+ quirk_holder.adjustBruteLoss(-0.1 * delta_time, FALSE, required_bodytype = BODYTYPE_ORGANIC)
+ quirk_holder.adjustFireLoss(-0.05 * delta_time, required_bodytype = BODYTYPE_ORGANIC)
if (41 to 60)
- quirk_holder.adjustBruteLoss(-0.4 * delta_time, FALSE)
- quirk_holder.adjustFireLoss(-0.2 * delta_time)
+ quirk_holder.adjustBruteLoss(-0.4 * delta_time, FALSE, required_bodytype = BODYTYPE_ORGANIC)
+ quirk_holder.adjustFireLoss(-0.2 * delta_time, required_bodytype = BODYTYPE_ORGANIC)
if (61 to INFINITY)
- quirk_holder.adjustBruteLoss(-0.8 * delta_time, FALSE)
- quirk_holder.adjustFireLoss(-0.4 * delta_time)
+ quirk_holder.adjustBruteLoss(-0.8 * delta_time, FALSE, required_bodytype = BODYTYPE_ORGANIC)
+ quirk_holder.adjustFireLoss(-0.4 * delta_time, required_bodytype = BODYTYPE_ORGANIC)
/datum/quirk/empath
name = "Empath"
diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm
index 3337192a938..83b5ba0c22b 100644
--- a/code/datums/status_effects/debuffs/debuffs.dm
+++ b/code/datums/status_effects/debuffs/debuffs.dm
@@ -213,9 +213,9 @@
break //Only count the first bedsheet
if(healing > 0 && health_ratio > 0.8)
- owner.adjustBruteLoss(-1 * healing)
- owner.adjustFireLoss(-1 * healing)
- owner.adjustToxLoss(-1 * healing * 0.5, TRUE, TRUE)
+ owner.adjustBruteLoss(-1 * healing, required_bodytype = BODYTYPE_ORGANIC)
+ owner.adjustFireLoss(-1 * healing, required_bodytype = BODYTYPE_ORGANIC)
+ owner.adjustToxLoss(-1 * healing * 0.5, TRUE, TRUE, required_biotype = MOB_ORGANIC)
owner.adjustStaminaLoss(min(-1 * healing, -1 * HEALING_SLEEP_DEFAULT))
// Drunkenness gets reduced by 0.3% per tick (6% per 2 seconds)
owner.set_drunk_effect(owner.get_drunk_amount() * 0.997)
diff --git a/code/modules/mob/living/basic/health_adjustment.dm b/code/modules/mob/living/basic/health_adjustment.dm
index cdb09d26dfa..c69a4ae70e3 100644
--- a/code/modules/mob/living/basic/health_adjustment.dm
+++ b/code/modules/mob/living/basic/health_adjustment.dm
@@ -18,25 +18,25 @@
//if(AIStatus == AI_IDLE)
// toggle_ai(AI_ON)
-/mob/living/basic/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/basic/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(forced)
. = adjust_health(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[BRUTE])
. = adjust_health(amount * damage_coeff[BRUTE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/basic/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/basic/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(forced)
. = adjust_health(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[BURN])
. = adjust_health(amount * damage_coeff[BURN] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/basic/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/basic/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(forced)
. = adjust_health(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[OXY])
. = adjust_health(amount * damage_coeff[OXY] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/basic/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/basic/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(forced)
. = adjust_health(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[TOX])
@@ -48,7 +48,7 @@
else if(damage_coeff[CLONE])
. = adjust_health(amount * damage_coeff[CLONE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/basic/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
+/mob/living/basic/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
if(forced)
staminaloss = max(0, min(BASIC_MOB_MAX_STAMINALOSS, staminaloss + amount))
else
diff --git a/code/modules/mob/living/carbon/alien/damage_procs.dm b/code/modules/mob/living/carbon/alien/damage_procs.dm
index 609d0093701..8861a55d993 100644
--- a/code/modules/mob/living/carbon/alien/damage_procs.dm
+++ b/code/modules/mob/living/carbon/alien/damage_procs.dm
@@ -3,11 +3,11 @@
return FALSE
///alien immune to tox damage
-/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
return FALSE
///aliens are immune to stamina damage.
-/mob/living/carbon/alien/adjustStaminaLoss(amount, updating_stamina = 1, forced = FALSE)
+/mob/living/carbon/alien/adjustStaminaLoss(amount, updating_stamina = 1, forced = FALSE, required_biotype)
return FALSE
///aliens are immune to stamina damage.
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 2cb1a4416a5..8c0ea20dd50 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -720,7 +720,7 @@
. = FALSE
-/mob/living/carbon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
. = ..()
check_passout(.)
@@ -729,7 +729,7 @@
if(!limb)
return
-/mob/living/carbon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
. = ..()
check_passout(.)
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index a441e28b5bc..19c9b56976b 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -1,5 +1,3 @@
-
-
/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE, attack_direction = null)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
@@ -41,7 +39,6 @@
adjustStaminaLoss(damage_amount, forced = forced)
return TRUE
-
//These procs fetch a cumulative total damage from all bodyparts
/mob/living/carbon/getBruteLoss()
var/amount = 0
@@ -57,39 +54,41 @@
amount += BP.burn_dam
return amount
-/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced && (status_flags & GODMODE))
return FALSE
if(amount > 0)
- take_overall_damage(amount, 0, updating_health, required_status)
+ take_overall_damage(amount, 0, updating_health, required_bodytype)
else
- heal_overall_damage(abs(amount), 0, required_status, updating_health)
+ heal_overall_damage(abs(amount), 0, required_bodytype, updating_health)
return amount
-/mob/living/carbon/setBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/carbon/setBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
var/current = getBruteLoss()
var/diff = amount - current
if(!diff)
return
- adjustBruteLoss(diff, updating_health, forced, required_status)
+ adjustBruteLoss(diff, updating_health, forced, required_bodytype)
-/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced && (status_flags & GODMODE))
return FALSE
if(amount > 0)
- take_overall_damage(0, amount, updating_health, required_status)
+ take_overall_damage(0, amount, updating_health, required_bodytype)
else
- heal_overall_damage(0, abs(amount), required_status, updating_health)
+ heal_overall_damage(0, abs(amount), required_bodytype, updating_health)
return amount
-/mob/living/carbon/setFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/carbon/setFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
var/current = getFireLoss()
var/diff = amount - current
if(!diff)
return
- adjustFireLoss(diff, updating_health, forced, required_status)
+ adjustFireLoss(diff, updating_health, forced, required_bodytype)
-/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
+ if(required_biotype && !(mob_biotypes & required_biotype))
+ return
if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage
amount = -amount
if(HAS_TRAIT(src, TRAIT_TOXIMMUNE)) //Prevents toxin damage, but not healing
@@ -102,7 +101,7 @@
amount = min(amount, 0)
return ..()
-/mob/living/carbon/adjustStaminaLoss(amount, updating_stamina, forced)
+/mob/living/carbon/adjustStaminaLoss(amount, updating_stamina, forced, required_biotype)
. = ..()
if(amount > 0)
update_stamina()
@@ -115,11 +114,15 @@
* * 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
*/
-/mob/living/carbon/adjustOrganLoss(slot, amount, maximum)
- var/obj/item/organ/O = getorganslot(slot)
- if(O && !(status_flags & GODMODE))
- O.applyOrganDamage(amount, maximum)
+/mob/living/carbon/adjustOrganLoss(slot, amount, maximum, required_organtype)
+ var/obj/item/organ/affected_organ = getorganslot(slot)
+ if(!affected_organ || (status_flags & GODMODE))
+ return
+ if(required_organtype && (affected_organ.status != required_organtype))
+ return
+ affected_organ.applyOrganDamage(amount, maximum)
/**
* If an organ exists in the slot requested, and we are capable of taking damage (we don't have [GODMODE] on), call the set damage proc on that organ, which can
@@ -128,11 +131,17 @@
* 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
*/
-/mob/living/carbon/setOrganLoss(slot, amount)
- var/obj/item/organ/O = getorganslot(slot)
- if(O && !(status_flags & GODMODE))
- O.setOrganDamage(amount)
+/mob/living/carbon/setOrganLoss(slot, amount, required_organtype)
+ var/obj/item/organ/affected_organ = getorganslot(slot)
+ if(!affected_organ || (status_flags & GODMODE))
+ return
+ if(required_organtype && (affected_organ.status != required_organtype))
+ return
+ if(affected_organ.damage == amount)
+ return
+ affected_organ.setOrganDamage(amount)
/**
* If an organ exists in the slot requested, return the amount of damage that organ has
@@ -141,29 +150,29 @@
* * slot - organ slot, like [ORGAN_SLOT_HEART]
*/
/mob/living/carbon/getOrganLoss(slot)
- var/obj/item/organ/O = getorganslot(slot)
- if(O)
- return O.damage
+ var/obj/item/organ/affected_organ = getorganslot(slot)
+ if(affected_organ)
+ return affected_organ.damage
////////////////////////////////////////////
///Returns a list of damaged bodyparts
-/mob/living/carbon/proc/get_damaged_bodyparts(brute = FALSE, burn = FALSE, status)
+/mob/living/carbon/proc/get_damaged_bodyparts(brute = FALSE, burn = FALSE, required_bodytype)
var/list/obj/item/bodypart/parts = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
- if(status && !(BP.bodytype & status))
+ if(required_bodytype && !(BP.bodytype & required_bodytype))
continue
if((brute && BP.brute_dam) || (burn && BP.burn_dam))
parts += BP
return parts
///Returns a list of damageable bodyparts
-/mob/living/carbon/proc/get_damageable_bodyparts(status)
+/mob/living/carbon/proc/get_damageable_bodyparts(required_bodytype)
var/list/obj/item/bodypart/parts = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
- if(status && !(BP.bodytype & status))
+ if(required_bodytype && !(BP.bodytype & required_bodytype))
continue
if(BP.brute_dam + BP.burn_dam < BP.max_damage)
parts += BP
@@ -171,10 +180,12 @@
///Returns a list of bodyparts with wounds (in case someone has a wound on an otherwise fully healed limb)
-/mob/living/carbon/proc/get_wounded_bodyparts(brute = FALSE, burn = FALSE, status)
+/mob/living/carbon/proc/get_wounded_bodyparts(brute = FALSE, burn = FALSE, required_bodytype)
var/list/obj/item/bodypart/parts = list()
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
+ if(required_bodytype && !(BP.bodytype & required_bodytype))
+ continue
if(LAZYLEN(BP.wounds))
parts += BP
return parts
@@ -186,13 +197,13 @@
*
* It automatically updates health status
*/
-/mob/living/carbon/heal_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_status)
- var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute,burn,required_status)
+/mob/living/carbon/heal_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype)
+ var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute, burn, required_bodytype)
if(!parts.len)
return
var/obj/item/bodypart/picked = pick(parts)
var/damage_calculator = picked.get_damage(TRUE) //heal_damage returns update status T/F instead of amount healed so we dance gracefully around this
- if(picked.heal_damage(brute, burn, required_status))
+ if(picked.heal_damage(brute, burn, required_bodytype))
update_damage_overlays()
return max(damage_calculator - picked.get_damage(TRUE), 0)
@@ -204,8 +215,8 @@
*
* It automatically updates health status
*/
-/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_status, check_armor = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE)
- var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_status)
+/mob/living/carbon/take_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype, check_armor = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE)
+ var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_bodytype)
if(!parts.len)
return
var/obj/item/bodypart/picked = pick(parts)
@@ -213,8 +224,8 @@
update_damage_overlays()
///Heal MANY bodyparts, in random order
-/mob/living/carbon/heal_overall_damage(brute = 0, burn = 0, required_status, updating_health = TRUE)
- var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute, burn, required_status)
+/mob/living/carbon/heal_overall_damage(brute = 0, burn = 0, required_bodytype, updating_health = TRUE)
+ var/list/obj/item/bodypart/parts = get_damaged_bodyparts(brute, burn, required_bodytype)
var/update = NONE
while(parts.len && (brute > 0 || burn > 0))
@@ -223,7 +234,7 @@
var/brute_was = picked.brute_dam
var/burn_was = picked.burn_dam
- update |= picked.heal_damage(brute, burn, required_status, FALSE)
+ update |= picked.heal_damage(brute, burn, required_bodytype, FALSE)
brute = round(brute - (brute_was - picked.brute_dam), DAMAGE_PRECISION)
burn = round(burn - (burn_was - picked.burn_dam), DAMAGE_PRECISION)
@@ -235,11 +246,11 @@
update_damage_overlays()
/// damage MANY bodyparts, in random order
-/mob/living/carbon/take_overall_damage(brute = 0, burn = 0, updating_health = TRUE, required_status)
+/mob/living/carbon/take_overall_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype)
if(status_flags & GODMODE)
return //godmode
- var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_status)
+ var/list/obj/item/bodypart/parts = get_damageable_bodyparts(required_bodytype)
var/update = 0
while(parts.len && (brute > 0 || burn > 0))
var/obj/item/bodypart/picked = pick(parts)
@@ -250,7 +261,7 @@
var/burn_was = picked.burn_dam
- update |= picked.receive_damage(brute_per_part, burn_per_part, FALSE, updating_health, required_status, wound_bonus = CANT_WOUND) // disabling wounds from these for now cuz your entire body snapping cause your heart stopped would suck
+ update |= picked.receive_damage(brute_per_part, burn_per_part, FALSE, updating_health, required_bodytype, wound_bonus = CANT_WOUND) // disabling wounds from these for now cuz your entire body snapping cause your heart stopped would suck
brute = round(brute - (picked.brute_dam - brute_was), DAMAGE_PRECISION)
burn = round(burn - (picked.burn_dam - burn_was), DAMAGE_PRECISION)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index a878751c01d..0266819bfba 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1703,7 +1703,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
// Very high pressure, show an alert and take damage
if(HAZARD_HIGH_PRESSURE to INFINITY)
if(!HAS_TRAIT(H, TRAIT_RESISTHIGHPRESSURE))
- H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) - 1) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod * delta_time, required_status = BODYTYPE_ORGANIC)
+ H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) - 1) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod * delta_time, required_bodytype = BODYTYPE_ORGANIC)
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/highpressure, 2)
else
H.clear_alert(ALERT_PRESSURE)
@@ -1730,7 +1730,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE))
H.clear_alert(ALERT_PRESSURE)
else
- H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * delta_time, required_status = BODYTYPE_ORGANIC)
+ H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * delta_time, required_bodytype = BODYTYPE_ORGANIC)
H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 2)
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 41fae355eac..ea2b3a42f8a 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -14,7 +14,7 @@
*
* Returns TRUE if damage applied
*/
-/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE, attack_direction = null)
+/mob/living/proc/apply_damage(damage = 0, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE, attack_direction = null)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
if(!damage || (!forced && hit_percent <= 0))
@@ -165,7 +165,7 @@
/mob/living/proc/getBruteLoss()
return bruteloss
-/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_BRUTE, amount) //SKYRAT EDIT ADDITION
if(!forced && (status_flags & GODMODE))
return FALSE
@@ -174,7 +174,7 @@
updatehealth()
return amount
-/mob/living/proc/setBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/proc/setBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced && (status_flags & GODMODE))
return
. = bruteloss
@@ -185,19 +185,23 @@
/mob/living/proc/getOxyLoss()
return oxyloss
-/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_OXY, amount) //SKYRAT EDIT ADDITION
if(!forced && (status_flags & GODMODE))
return
+ if(required_biotype && !(mob_biotypes & required_biotype))
+ return
. = oxyloss
oxyloss = clamp((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
-/mob/living/proc/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/setOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(!forced && (status_flags & GODMODE))
return
+ if(required_biotype && !(mob_biotypes & required_biotype))
+ return
. = oxyloss
oxyloss = amount
if(updating_health)
@@ -207,18 +211,22 @@
/mob/living/proc/getToxLoss()
return toxloss
-/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_TOX, amount) //SKYRAT EDIT ADDITION
if(!forced && (status_flags & GODMODE))
return FALSE
+ if(required_biotype && !(mob_biotypes & required_biotype))
+ return
toxloss = clamp((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
if(updating_health)
updatehealth()
return amount
-/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(!forced && (status_flags & GODMODE))
return FALSE
+ if(required_biotype && !(mob_biotypes & required_biotype))
+ return
toxloss = amount
if(updating_health)
updatehealth()
@@ -227,7 +235,7 @@
/mob/living/proc/getFireLoss()
return fireloss
-/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_FIRE, amount) //SKYRAT EDIT ADDITION
if(!forced && (status_flags & GODMODE))
return FALSE
@@ -236,7 +244,7 @@
updatehealth()
return amount
-/mob/living/proc/setFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/proc/setFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced && (status_flags & GODMODE))
return
. = fireloss
@@ -247,7 +255,7 @@
/mob/living/proc/getCloneLoss()
return cloneloss
-/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_CLONE, amount) //SKYRAT EDIT ADDITION
if(!forced && ( (status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NOCLONELOSS)) )
return FALSE
@@ -256,7 +264,7 @@
updatehealth()
return amount
-/mob/living/proc/setCloneLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/proc/setCloneLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(!forced && ( (status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NOCLONELOSS)) )
return FALSE
cloneloss = amount
@@ -264,11 +272,11 @@
updatehealth()
return amount
-/mob/living/proc/adjustOrganLoss(slot, amount, maximum)
+/mob/living/proc/adjustOrganLoss(slot, amount, maximum, required_organtype)
SEND_SIGNAL(src, COMSIG_MOB_LOSS_ORGAN, slot, amount) //SKYRAT EDIT ADDITION
return
-/mob/living/proc/setOrganLoss(slot, amount, maximum)
+/mob/living/proc/setOrganLoss(slot, amount, maximum, required_organtype)
return
/mob/living/proc/getOrganLoss(slot)
@@ -277,16 +285,18 @@
/mob/living/proc/getStaminaLoss()
return staminaloss
-/mob/living/proc/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
+/mob/living/proc/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
if(!forced && (status_flags & GODMODE))
return FALSE
+ if(required_biotype && !(mob_biotypes & required_biotype))
+ return
staminaloss = clamp((staminaloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, max_stamina)
if(updating_stamina)
update_stamina()
SEND_SIGNAL(src, COMSIG_MOB_LOSS_STAMINA, amount) //SKYRAT EDIT ADDITION
return
-/mob/living/proc/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
+/mob/living/proc/setStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
if(!forced && ( (status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NOCLONELOSS)) )
return FALSE
staminaloss = amount
@@ -298,20 +308,20 @@
*
* needs to return amount healed in order to calculate things like tend wounds xp gain
*/
-/mob/living/proc/heal_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_status)
+/mob/living/proc/heal_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype)
. = (adjustBruteLoss(-brute, FALSE) + adjustFireLoss(-burn, FALSE)) //zero as argument for no instant health update
if(updating_health)
updatehealth()
/// damage ONE external organ, organ gets randomly selected from damaged ones.
-/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_status, check_armor = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE)
+/mob/living/proc/take_bodypart_damage(brute = 0, burn = 0, updating_health = TRUE, required_bodytype, check_armor = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE)
adjustBruteLoss(brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(burn, FALSE)
if(updating_health)
updatehealth()
/// heal MANY bodyparts, in random order
-/mob/living/proc/heal_overall_damage(brute = 0, burn = 0, stamina = 0, required_status, updating_health = TRUE)
+/mob/living/proc/heal_overall_damage(brute = 0, burn = 0, stamina = 0, required_bodytype, updating_health = TRUE)
adjustBruteLoss(-brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(-burn, FALSE)
adjustStaminaLoss(-stamina, FALSE)
@@ -320,7 +330,7 @@
update_stamina()
/// damage MANY bodyparts, in random order
-/mob/living/proc/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_status)
+/mob/living/proc/take_overall_damage(brute = 0, burn = 0, stamina = 0, updating_health = TRUE, required_bodytype)
adjustBruteLoss(brute, FALSE) //zero as argument for no instant health update
adjustFireLoss(burn, FALSE)
adjustStaminaLoss(stamina, FALSE)
diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm
index 49a16c35ed2..3d98b858b69 100644
--- a/code/modules/mob/living/silicon/damage_procs.dm
+++ b/code/modules/mob/living/silicon/damage_procs.dm
@@ -15,7 +15,7 @@
/mob/living/silicon/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE)
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now. (This was written in at least 2016. Help)
-/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) //immune to tox damage
+/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype) //immune to tox damage
return FALSE
/mob/living/silicon/setToxLoss(amount, updating_health = TRUE, forced = FALSE)
@@ -27,25 +27,25 @@
/mob/living/silicon/setCloneLoss(amount, updating_health = TRUE, forced = FALSE)
return FALSE
-/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE) //immune to stamina damage.
+/mob/living/silicon/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype) //immune to stamina damage.
return FALSE
/mob/living/silicon/setStaminaLoss(amount, updating_health = TRUE)
return FALSE
-/mob/living/silicon/adjustOrganLoss(slot, amount, maximum = 500) //immune to organ damage (no organs, duh)
+/mob/living/silicon/adjustOrganLoss(slot, amount, maximum = 500, required_organtype) //immune to organ damage (no organs, duh)
return FALSE
/mob/living/silicon/setOrganLoss(slot, amount)
return FALSE
-/mob/living/silicon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE) //immune to oxygen damage
+/mob/living/silicon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype) //immune to oxygen damage
if(isAI(src)) //ais are snowflakes and use oxyloss for being in AI cards and having no battery
return ..()
return FALSE
-/mob/living/silicon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/silicon/setOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(isAI(src)) //ditto
return ..()
diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm
index 48659d1fea0..cea569247d0 100644
--- a/code/modules/mob/living/simple_animal/damage_procs.dm
+++ b/code/modules/mob/living/simple_animal/damage_procs.dm
@@ -18,25 +18,25 @@
if(AIStatus == AI_IDLE)
toggle_ai(AI_ON)
-/mob/living/simple_animal/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/simple_animal/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(forced)
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[BRUTE])
. = adjustHealth(amount * damage_coeff[BRUTE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/simple_animal/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/simple_animal/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(forced)
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[BURN])
. = adjustHealth(amount * damage_coeff[BURN] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/simple_animal/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/simple_animal/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(forced)
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[OXY])
. = adjustHealth(amount * damage_coeff[OXY] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/simple_animal/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/simple_animal/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(forced)
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
else if(damage_coeff[TOX])
@@ -48,7 +48,7 @@
else if(damage_coeff[CLONE])
. = adjustHealth(amount * damage_coeff[CLONE] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
-/mob/living/simple_animal/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE)
+/mob/living/simple_animal/adjustStaminaLoss(amount, updating_stamina = TRUE, forced = FALSE, required_biotype)
if(forced)
staminaloss = max(0, min(max_staminaloss, staminaloss + amount))
else
diff --git a/code/modules/mob/living/simple_animal/heretic_monsters.dm b/code/modules/mob/living/simple_animal/heretic_monsters.dm
index efeea960f06..fe3057065fd 100644
--- a/code/modules/mob/living/simple_animal/heretic_monsters.dm
+++ b/code/modules/mob/living/simple_animal/heretic_monsters.dm
@@ -205,13 +205,13 @@
prev.icon_state = "armsy_end"
prev.icon_living = "armsy_end"
-/mob/living/simple_animal/hostile/heretic_summon/armsy/adjustBruteLoss(amount, updating_health, forced, required_status)
+/mob/living/simple_animal/hostile/heretic_summon/armsy/adjustBruteLoss(amount, updating_health, forced, required_bodytype)
if(back)
return back.adjustBruteLoss(amount, updating_health, forced)
return ..()
-/mob/living/simple_animal/hostile/heretic_summon/armsy/adjustFireLoss(amount, updating_health, forced, required_status)
+/mob/living/simple_animal/hostile/heretic_summon/armsy/adjustFireLoss(amount, updating_health, forced, required_bodytype)
if(back)
return back.adjustFireLoss(amount, updating_health, forced)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index a444a617ada..8809f6e4013 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -274,7 +274,7 @@ Difficulty: Hard
set_varspeed(move_to_delay)
handle_automated_action() // need to recheck movement otherwise move_to_delay won't update until the next checking aka will be wrong speed for a bit
-/mob/living/simple_animal/hostile/megafauna/bubblegum/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/simple_animal/hostile/megafauna/bubblegum/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
. = ..()
anger_modifier = clamp(((maxHealth - health)/60),0,20)
enrage_time = initial(enrage_time) * clamp(anger_modifier / 20, 0.5, 1)
@@ -342,7 +342,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/Life(delta_time = SSMOBS_DT, times_fired)
return
-/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
return
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/OpenFire()
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index b767f58e278..1c6f91522a9 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -241,7 +241,7 @@
. += "Power Level: [powerlevel]"
-/mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
if(!forced)
amount = -abs(amount)
return ..() //Heals them
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 0e87f667d8c..bb5992a6387 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -312,7 +312,7 @@
if(affecting.heal_damage(brute_heal, burn_heal, BODYTYPE_ROBOTIC))
human.update_damage_overlays()
user.visible_message(span_notice("[user] fixes some of the [brute_damage ? "dents on" : "burnt wires in"] [human]'s [affecting.name]."), \
- span_notice("You fix some of the [brute_damage ? "dents on" : "burnt wires in"] [human == user ? "your" : "[human]'s"] [affecting.name]."))
+ span_notice("You fix some of the [brute_damage ? "dents on" : "burnt wires in"] [human == user ? "your" : "[human]'s"] [affecting.name]."))
return TRUE //successful heal
diff --git a/code/modules/pai/defense.dm b/code/modules/pai/defense.dm
index a6c802f5f3a..feb56ce42c5 100644
--- a/code/modules/pai/defense.dm
+++ b/code/modules/pai/defense.dm
@@ -72,13 +72,13 @@
to_chat(src, span_userdanger("The impact degrades your holochassis!"))
return amount
-/mob/living/silicon/pai/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/silicon/pai/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
return take_holo_damage(amount)
-/mob/living/silicon/pai/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_status)
+/mob/living/silicon/pai/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE, required_bodytype)
return take_holo_damage(amount)
-/mob/living/silicon/pai/adjustStaminaLoss(amount, updating_stamina, forced = FALSE)
+/mob/living/silicon/pai/adjustStaminaLoss(amount, updating_stamina, forced = FALSE, required_biotype)
if(forced)
take_holo_damage(amount)
else
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index af7c68f7145..74479a5c649 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -94,6 +94,15 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
var/list/addiction_types = null
///The amount a robot will pay for a glass of this (20 units but can be higher if you pour more, be frugal!)
var/glass_price
+ /// 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
+ /// The affected biotype, if the reagent damages/heals generic damage (Toxin/Oxygen) of an affected mob.
+ /// See "Mob bio-types flags" in /code/_DEFINES/mobs.dm
+ var/affected_biotype = MOB_ORGANIC
+ /// 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
/datum/reagent/New()
SHOULD_CALL_PARENT(TRUE)
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index 9f3d517d247..07b7311c5be 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -263,7 +263,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
eyes.forceMove(get_turf(drinker))
to_chat(drinker, span_userdanger("You double over in pain as you feel your eyeballs liquify in your head!"))
drinker.emote("scream")
- drinker.adjustBruteLoss(15)
+ drinker.adjustBruteLoss(15, required_bodytype = affected_bodytype)
else
to_chat(drinker, span_userdanger("You scream in terror as you go blind!"))
eyes.applyOrganDamage(eyes.maxHealth)
@@ -593,10 +593,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/carbon/cubano, delta_time, times_fired)
if(cubano.mind && cubano.mind.has_antag_datum(/datum/antagonist/rev)) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries.
- cubano.adjustBruteLoss(-1 * REM * delta_time, 0)
- cubano.adjustFireLoss(-1 * REM * delta_time, 0)
- cubano.adjustToxLoss(-1 * REM * delta_time, 0)
- cubano.adjustOxyLoss(-5 * REM * delta_time, 0)
+ cubano.adjustBruteLoss(-1 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ cubano.adjustFireLoss(-1 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ cubano.adjustToxLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ cubano.adjustOxyLoss(-5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
return ..() || .
@@ -700,7 +700,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(HAS_TRAIT(liver, TRAIT_ENGINEER_METABOLISM))
ADD_TRAIT(drinker, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
if (HAS_TRAIT(drinker, TRAIT_IRRADIATED))
- drinker.adjustToxLoss(-2 * REM * delta_time)
+ drinker.adjustToxLoss(-2 * REM * delta_time, required_biotype = affected_biotype)
return ..()
@@ -842,7 +842,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
// if you have a liver and that liver is an officer's liver
if(liver && HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
. = TRUE
- drinker.adjustStaminaLoss(-10 * REM * delta_time, 0)
+ drinker.adjustStaminaLoss(-10 * REM * delta_time, required_biotype = affected_biotype)
if(DT_PROB(10, delta_time))
drinker.cause_hallucination(get_random_valid_hallucination_subtype(/datum/hallucination/nearby_fake_item), name)
if(DT_PROB(5, delta_time))
@@ -896,8 +896,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/dwarf, delta_time, times_fired)
if(dorf_mode)
- dwarf.adjustBruteLoss(-2 * REM * delta_time)
- dwarf.adjustFireLoss(-2 * REM * delta_time)
+ dwarf.adjustBruteLoss(-2 * REM * delta_time, required_bodytype = affected_bodytype)
+ dwarf.adjustFireLoss(-2 * REM * delta_time, required_bodytype = affected_bodytype)
return ..()
/datum/reagent/consumable/ethanol/longislandicedtea
@@ -938,8 +938,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_EASY
-/datum/reagent/consumable/ethanol/b52/on_mob_metabolize(mob/living/M)
- playsound(M, 'sound/effects/explosion_distant.ogg', 100, FALSE)
+/datum/reagent/consumable/ethanol/b52/on_mob_metabolize(mob/living/drinker)
+ playsound(drinker, 'sound/effects/explosion_distant.ogg', 100, FALSE)
/datum/reagent/consumable/ethanol/irishcoffee
name = "Irish Coffee"
@@ -1054,7 +1054,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(ishuman(drinker)) //Barefoot causes the imbiber to quickly regenerate brute trauma if they're not wearing shoes.
var/mob/living/carbon/human/unshoed = drinker
if(!unshoed.shoes)
- unshoed.adjustBruteLoss(-3 * REM * delta_time, 0)
+ unshoed.adjustBruteLoss(-3 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
. = TRUE
return ..() || .
@@ -1538,9 +1538,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Induces magnetism in the imbiber. Started as a barroom prank but evolved to become popular with miners and scrappers. Metallic aftertaste."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/fetching_fizz/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- for(var/obj/item/stack/ore/O in orange(3, M))
- step_towards(O, get_turf(M))
+
+/datum/reagent/consumable/ethanol/fetching_fizz/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
+ for(var/obj/item/stack/ore/O in orange(3, drinker))
+ step_towards(O, get_turf(drinker))
return ..()
//Another reference. Heals those in critical condition extremely quickly.
@@ -1559,11 +1560,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/hearty_punch/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
if(drinker.health <= 0)
- drinker.adjustBruteLoss(-3 * REM * delta_time, 0)
- drinker.adjustFireLoss(-3 * REM * delta_time, 0)
+ drinker.adjustBruteLoss(-3 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ drinker.adjustFireLoss(-3 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
drinker.adjustCloneLoss(-5 * REM * delta_time, 0)
- drinker.adjustOxyLoss(-4 * REM * delta_time, 0)
- drinker.adjustToxLoss(-3 * REM * delta_time, 0)
+ drinker.adjustOxyLoss(-4 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ drinker.adjustToxLoss(-3 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
return ..() || .
@@ -1605,7 +1606,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
. = TRUE
if(201 to INFINITY)
drinker.AdjustSleeping(40 * REM * delta_time)
- drinker.adjustToxLoss(2 * REM * delta_time, 0)
+ drinker.adjustToxLoss(2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -1633,7 +1634,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(55 to 200)
drinker.set_drugginess(110 SECONDS * REM * delta_time)
if(200 to INFINITY)
- drinker.adjustToxLoss(2 * REM * delta_time, 0)
+ drinker.adjustToxLoss(2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -1656,18 +1657,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
drinker.set_drugginess(100 SECONDS * REM * delta_time)
drinker.adjust_dizzy(4 SECONDS * REM * delta_time)
- drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time, 150)
+ drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time, 150, required_organtype = affected_organtype)
if(DT_PROB(10, delta_time))
- drinker.adjustStaminaLoss(10)
+ drinker.adjustStaminaLoss(10, required_biotype = affected_biotype)
drinker.drop_all_held_items()
to_chat(drinker, span_notice("You cant feel your hands!"))
if(current_cycle > 5)
if(DT_PROB(10, delta_time))
var/paralyzed_limb = pick_paralyzed_limb()
ADD_TRAIT(drinker, paralyzed_limb, type)
- drinker.adjustStaminaLoss(10)
+ drinker.adjustStaminaLoss(10, required_biotype = affected_biotype)
if(current_cycle > 30)
- drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time)
+ drinker.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time, required_organtype = affected_organtype)
if(current_cycle > 50 && DT_PROB(7.5, delta_time))
if(!drinker.undergoing_cardiac_arrest() && drinker.can_heartattack())
drinker.set_heartattack(TRUE)
@@ -1681,7 +1682,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
REMOVE_TRAIT(drinker, TRAIT_PARALYSIS_R_ARM, type)
REMOVE_TRAIT(drinker, TRAIT_PARALYSIS_R_LEG, type)
REMOVE_TRAIT(drinker, TRAIT_PARALYSIS_L_LEG, type)
- drinker.adjustStaminaLoss(10)
+ drinker.adjustStaminaLoss(10, required_biotype = affected_biotype)
..()
/datum/reagent/consumable/ethanol/hippies_delight
@@ -1726,7 +1727,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(DT_PROB(23, delta_time))
drinker.emote(pick("twitch","giggle"))
if(DT_PROB(16, delta_time))
- drinker.adjustToxLoss(2, 0)
+ drinker.adjustToxLoss(2, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -1842,7 +1843,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/obj/item/organ/internal/liver/liver = drinker.getorganslot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
drinker.heal_bodypart_damage(2 * REM * delta_time, 2 * REM * delta_time)
- drinker.adjustStaminaLoss(-2 * REM * delta_time)
+ drinker.adjustStaminaLoss(-2 * REM * delta_time, required_biotype = affected_biotype)
. = TRUE
return ..()
@@ -1891,22 +1892,22 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(drinker.health <= 0)
heal_points = 20 //heal more if we're in softcrit
for(var/counter in 1 to min(volume, heal_points)) //only heals 1 point of damage per unit on add, for balance reasons
- drinker.adjustBruteLoss(-1)
- drinker.adjustFireLoss(-1)
- drinker.adjustToxLoss(-1)
- drinker.adjustOxyLoss(-1)
- drinker.adjustStaminaLoss(-1)
+ drinker.adjustBruteLoss(-1, required_bodytype = affected_bodytype)
+ drinker.adjustFireLoss(-1, required_bodytype = affected_bodytype)
+ drinker.adjustToxLoss(-1, required_biotype = affected_biotype)
+ drinker.adjustOxyLoss(-1, required_biotype = affected_biotype)
+ drinker.adjustStaminaLoss(-1, required_biotype = affected_biotype)
drinker.visible_message(span_warning("[drinker] shivers with renewed vigor!"), span_notice("One taste of [lowertext(name)] fills you with energy!"))
if(!drinker.stat && heal_points == 20) //brought us out of softcrit
drinker.visible_message(span_danger("[drinker] lurches to [drinker.p_their()] feet!"), span_boldnotice("Up and at 'em, kid."))
/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_life(mob/living/drinker, delta_time, times_fired)
if(drinker.health > 0)
- drinker.adjustBruteLoss(-1 * REM * delta_time)
- drinker.adjustFireLoss(-1 * REM * delta_time)
- drinker.adjustToxLoss(-0.5 * REM * delta_time)
- drinker.adjustOxyLoss(-3 * REM * delta_time)
- drinker.adjustStaminaLoss(-5 * REM * delta_time)
+ drinker.adjustBruteLoss(-1 * REM * delta_time, required_bodytype = affected_bodytype)
+ drinker.adjustFireLoss(-1 * REM * delta_time, required_bodytype = affected_bodytype)
+ drinker.adjustToxLoss(-0.5 * REM * delta_time, required_biotype = affected_biotype)
+ drinker.adjustOxyLoss(-3 * REM * delta_time, required_biotype = affected_biotype)
+ drinker.adjustStaminaLoss(-5 * REM * delta_time, required_biotype = affected_biotype)
. = TRUE
..()
@@ -1971,7 +1972,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/ethanol/crevice_spike/on_mob_metabolize(mob/living/drinker) //damage only applies when drink first enters system and won't again until drink metabolizes out
- drinker.adjustBruteLoss(3 * min(5,volume)) //minimum 3 brute damage on ingestion to limit non-drink means of injury - a full 5 unit gulp of the drink trucks you for the full 15
+ drinker.adjustBruteLoss(3 * min(5,volume), required_bodytype = affected_bodytype) //minimum 3 brute damage on ingestion to limit non-drink means of injury - a full 5 unit gulp of the drink trucks you for the full 15
/datum/reagent/consumable/ethanol/sake
name = "Sake"
@@ -2087,13 +2088,13 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(drinker.getBruteLoss() && drinker.getFireLoss()) //If you are damaged by both types, slightly increased healing but it only heals one. The more the merrier wink wink.
if(prob(50))
- drinker.adjustBruteLoss(-0.25 * REM * delta_time)
+ drinker.adjustBruteLoss(-0.25 * REM * delta_time, required_bodytype = affected_bodytype)
else
- drinker.adjustFireLoss(-0.25 * REM * delta_time)
+ drinker.adjustFireLoss(-0.25 * REM * delta_time, required_bodytype = affected_bodytype)
else if(drinker.getBruteLoss()) //If you have only one, it still heals but not as well.
- drinker.adjustBruteLoss(-0.2 * REM * delta_time)
+ drinker.adjustBruteLoss(-0.2 * REM * delta_time, required_bodytype = affected_bodytype)
else if(drinker.getFireLoss())
- drinker.adjustFireLoss(-0.2 * REM * delta_time)
+ drinker.adjustFireLoss(-0.2 * REM * delta_time, required_bodytype = affected_bodytype)
/datum/reagent/consumable/ethanol/kamikaze
name = "Kamikaze"
@@ -2144,7 +2145,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/fernet/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
if(drinker.nutrition <= NUTRITION_LEVEL_STARVING)
- drinker.adjustToxLoss(1 * REM * delta_time, 0)
+ drinker.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
drinker.adjust_nutrition(-5 * REM * delta_time)
drinker.overeatduration = 0
return ..()
@@ -2163,7 +2164,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/fernet_cola/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
if(drinker.nutrition <= NUTRITION_LEVEL_STARVING)
- drinker.adjustToxLoss(0.5 * REM * delta_time, 0)
+ drinker.adjustToxLoss(0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
drinker.adjust_nutrition(-3 * REM * delta_time)
drinker.overeatduration = 0
return ..()
@@ -2189,7 +2190,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/fanciulli/on_mob_metabolize(mob/living/drinker)
if(drinker.health > 0)
- drinker.adjustStaminaLoss(20)
+ drinker.adjustStaminaLoss(20, required_biotype = affected_biotype)
. = TRUE
..()
@@ -2214,7 +2215,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/branca_menta/on_mob_metabolize(mob/living/drinker)
if(drinker.health > 0)
- drinker.adjustStaminaLoss(35)
+ drinker.adjustStaminaLoss(35, required_biotype = affected_biotype)
. = TRUE
..()
@@ -2375,9 +2376,9 @@ All effects don't start immediately, but rather get worse over time; the rate is
//A healing drink similar to Quadruple Sec, Ling Stings, and Screwdrivers for the Wizznerds; the check is consistent with the changeling sting
if(drinker?.mind?.has_antag_datum(/datum/antagonist/wizard))
drinker.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
- drinker.adjustOxyLoss(-1 * REM * delta_time, 0)
- drinker.adjustToxLoss(-1 * REM * delta_time, 0)
- drinker.adjustStaminaLoss(-1 * REM * delta_time)
+ drinker.adjustOxyLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ drinker.adjustToxLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ drinker.adjustStaminaLoss(-1 * REM * delta_time, required_biotype = affected_biotype)
return ..()
/datum/reagent/consumable/ethanol/bug_spray
@@ -2395,7 +2396,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/bug_spray/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
//Bugs should not drink Bug spray.
if(ismoth(drinker) || isflyperson(drinker))
- drinker.adjustToxLoss(1 * REM * delta_time, 0)
+ drinker.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
return ..()
/datum/reagent/consumable/ethanol/bug_spray/on_mob_metabolize(mob/living/carbon/drinker)
@@ -2443,7 +2444,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/turbo/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
if(DT_PROB(2, delta_time))
to_chat(drinker, span_notice("[pick("You feel disregard for the rule of law.", "You feel pumped!", "Your head is pounding.", "Your thoughts are racing..")]"))
- drinker.adjustStaminaLoss(-0.25 * drinker.get_drunk_amount() * REM * delta_time)
+ drinker.adjustStaminaLoss(-0.25 * drinker.get_drunk_amount() * REM * delta_time, required_biotype = affected_biotype)
return ..()
/datum/reagent/consumable/ethanol/old_timer
@@ -2523,7 +2524,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/trappist/on_mob_life(mob/living/carbon/drinker, delta_time, times_fired)
if(drinker.mind?.holy_role)
- drinker.adjustFireLoss(-2.5 * REM * delta_time, 0)
+ drinker.adjustFireLoss(-2.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
drinker.adjust_jitter(-2 SECONDS * REM * delta_time)
drinker.adjust_stutter(-2 SECONDS * REM * delta_time)
return ..()
diff --git a/code/modules/reagents/chemistry/reagents/atmos_gas_reagents.dm b/code/modules/reagents/chemistry/reagents/atmos_gas_reagents.dm
index b38322537b4..2bc0e2ed638 100644
--- a/code/modules/reagents/chemistry/reagents/atmos_gas_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/atmos_gas_reagents.dm
@@ -52,9 +52,9 @@
return ..()
/datum/reagent/healium/on_mob_life(mob/living/breather, delta_time, times_fired)
- breather.adjustFireLoss(-2 * REM * delta_time, FALSE)
- breather.adjustToxLoss(-5 * REM * delta_time, FALSE)
- breather.adjustBruteLoss(-2 * REM * delta_time, FALSE)
+ breather.adjustFireLoss(-2 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ breather.adjustToxLoss(-5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ breather.adjustBruteLoss(-2 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
return ..()
/datum/reagent/hypernoblium
@@ -96,8 +96,8 @@
return ..()
/datum/reagent/nitrium_high_metabolization/on_mob_life(mob/living/carbon/breather, delta_time, times_fired)
- breather.adjustStaminaLoss(-2 * REM * delta_time, 0)
- breather.adjustToxLoss(0.1 * current_cycle * REM * delta_time, 0) // 1 toxin damage per cycle at cycle 10
+ breather.adjustStaminaLoss(-2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ breather.adjustToxLoss(0.1 * current_cycle * REM * delta_time, FALSE, required_biotype = affected_biotype) // 1 toxin damage per cycle at cycle 10
return ..()
/datum/reagent/nitrium_low_metabolization
@@ -146,8 +146,8 @@
chemical_flags = REAGENT_NO_RANDOM_RECIPE
/datum/reagent/zauker/on_mob_life(mob/living/breather, delta_time, times_fired)
- breather.adjustBruteLoss(6 * REM * delta_time, FALSE)
- breather.adjustOxyLoss(1 * REM * delta_time, FALSE)
- breather.adjustFireLoss(2 * REM * delta_time, FALSE)
- breather.adjustToxLoss(2 * REM * delta_time, FALSE)
+ breather.adjustBruteLoss(6 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ breather.adjustOxyLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ breather.adjustFireLoss(2 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ breather.adjustToxLoss(2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
return ..()
diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
index 4e7de073e9a..978890f9f65 100644
--- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
@@ -26,60 +26,60 @@
var/reaping = FALSE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/helbital/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/c2/helbital/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = TRUE
- var/death_is_coming = (M.getToxLoss() + M.getOxyLoss() + M.getFireLoss() + M.getBruteLoss())*normalise_creation_purity()
+ var/death_is_coming = (affected_mob.getToxLoss() + affected_mob.getOxyLoss() + affected_mob.getFireLoss() + affected_mob.getBruteLoss())*normalise_creation_purity()
var/thou_shall_heal = 0
var/good_kind_of_healing = FALSE
- switch(M.stat)
+ switch(affected_mob.stat)
if(CONSCIOUS) //bad
thou_shall_heal = death_is_coming/50
- M.adjustOxyLoss(2 * REM * delta_time, TRUE)
+ affected_mob.adjustOxyLoss(2 * REM * delta_time, TRUE, required_biotype = affected_biotype)
if(SOFT_CRIT) //meh convert
thou_shall_heal = round(death_is_coming/47,0.1)
- M.adjustOxyLoss(1 * REM * delta_time, TRUE)
+ affected_mob.adjustOxyLoss(1 * REM * delta_time, TRUE, required_biotype = affected_biotype)
else //no convert
thou_shall_heal = round(death_is_coming/45, 0.1)
good_kind_of_healing = TRUE
- M.adjustBruteLoss(-thou_shall_heal * REM * delta_time, FALSE)
+ affected_mob.adjustBruteLoss(-thou_shall_heal * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
if(good_kind_of_healing && !reaping && DT_PROB(0.00005, delta_time)) //janken with the grim reaper!
reaping = TRUE
var/list/RockPaperScissors = list("rock" = "paper", "paper" = "scissors", "scissors" = "rock") //choice = loses to
- if(M.apply_status_effect(/datum/status_effect/necropolis_curse,CURSE_BLINDING))
+ if(affected_mob.apply_status_effect(/datum/status_effect/necropolis_curse, CURSE_BLINDING))
helbent = TRUE
- to_chat(M, span_hierophant("Malevolent spirits appear before you, bartering your life in a 'friendly' game of rock, paper, scissors. Which do you choose?"))
+ to_chat(affected_mob, span_hierophant("Malevolent spirits appear before you, bartering your life in a 'friendly' game of rock, paper, scissors. Which do you choose?"))
var/timeisticking = world.time
- var/RPSchoice = tgui_alert(M, "Janken Time! You have 60 Seconds to Choose!", "Rock Paper Scissors", RockPaperScissors, 60)
- if(QDELETED(M) || (timeisticking+(1.1 MINUTES) < world.time))
+ var/RPSchoice = tgui_alert(affected_mob, "Janken Time! You have 60 Seconds to Choose!", "Rock Paper Scissors", RockPaperScissors, 60)
+ if(QDELETED(affected_mob) || (timeisticking+(1.1 MINUTES) < world.time))
reaping = FALSE
return //good job, you ruined it
if(!RPSchoice)
- to_chat(M, span_hierophant("You decide to not press your luck, but the spirits remain... hopefully they'll go away soon."))
+ to_chat(affected_mob, span_hierophant("You decide to not press your luck, but the spirits remain... hopefully they'll go away soon."))
reaping = FALSE
return
var/grim = pick(RockPaperScissors)
if(grim == RPSchoice) //You Tied!
- to_chat(M, span_hierophant("You tie, and the malevolent spirits disappear... for now."))
+ to_chat(affected_mob, span_hierophant("You tie, and the malevolent spirits disappear... for now."))
reaping = FALSE
else if(RockPaperScissors[RPSchoice] == grim) //You lost!
- to_chat(M, span_hierophant("You lose, and the malevolent spirits smirk eerily as they surround your body."))
- M.investigate_log("has lost rock paper scissors with the grim reaper and been dusted.", INVESTIGATE_DEATHS)
- M.dust()
+ to_chat(affected_mob, span_hierophant("You lose, and the malevolent spirits smirk eerily as they surround your body."))
+ affected_mob.investigate_log("has lost rock paper scissors with the grim reaper and been dusted.", INVESTIGATE_DEATHS)
+ affected_mob.dust()
return
else //VICTORY ROYALE
- to_chat(M, span_hierophant("You win, and the malevolent spirits fade away as well as your wounds."))
- M.client.give_award(/datum/award/achievement/misc/helbitaljanken, M)
- M.revive(HEAL_ALL)
+ to_chat(affected_mob, span_hierophant("You win, and the malevolent spirits fade away as well as your wounds."))
+ affected_mob.client.give_award(/datum/award/achievement/misc/helbitaljanken, affected_mob)
+ affected_mob.revive(HEAL_ALL)
holder.del_reagent(type)
return
..()
return
-/datum/reagent/medicine/c2/helbital/overdose_process(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/c2/helbital/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
if(!helbent)
- M.apply_necropolis_curse(CURSE_WASTING | CURSE_BLINDING)
+ affected_mob.apply_necropolis_curse(CURSE_WASTING | CURSE_BLINDING)
helbent = TRUE
..()
return TRUE
@@ -98,9 +98,9 @@
reagent_state = SOLID
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/libital/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * delta_time)
- M.adjustBruteLoss(-3 * REM * normalise_creation_purity() * delta_time)
+/datum/reagent/medicine/c2/libital/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjustBruteLoss(-3 * REM * normalise_creation_purity() * delta_time, required_bodytype = affected_bodytype)
..()
return TRUE
@@ -115,28 +115,28 @@
inverse_chem = /datum/reagent/medicine/metafactor //Seems thematically intact
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/probital/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustBruteLoss(-2.25 * REM * normalise_creation_purity() * delta_time, FALSE)
+/datum/reagent/medicine/c2/probital/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustBruteLoss(-2.25 * REM * normalise_creation_purity() * delta_time, FALSE, required_bodytype = affected_bodytype)
var/ooo_youaregettingsleepy = 3.5
- switch(round(M.getStaminaLoss()))
+ switch(round(affected_mob.getStaminaLoss()))
if(10 to 40)
ooo_youaregettingsleepy = 3
if(41 to 60)
ooo_youaregettingsleepy = 2.5
if(61 to 200) //you really can only go to 120
ooo_youaregettingsleepy = 2
- M.adjustStaminaLoss(ooo_youaregettingsleepy * REM * delta_time, FALSE)
+ affected_mob.adjustStaminaLoss(ooo_youaregettingsleepy * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
-/datum/reagent/medicine/c2/probital/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustStaminaLoss(3 * REM * delta_time, 0)
- if(M.getStaminaLoss() >= 80)
- M.adjust_drowsyness(1 * REM * delta_time)
- if(M.getStaminaLoss() >= 100)
- to_chat(M,span_warning("You feel more tired than you usually do, perhaps if you rest your eyes for a bit..."))
- M.adjustStaminaLoss(-100, TRUE)
- M.Sleeping(10 SECONDS)
+/datum/reagent/medicine/c2/probital/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustStaminaLoss(3 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ if(affected_mob.getStaminaLoss() >= 80)
+ affected_mob.adjust_drowsyness(1 * REM * delta_time)
+ if(affected_mob.getStaminaLoss() >= 100)
+ to_chat(affected_mob,span_warning("You feel more tired than you usually do, perhaps if you rest your eyes for a bit..."))
+ affected_mob.adjustStaminaLoss(-100, TRUE, required_biotype = affected_biotype)
+ affected_mob.Sleeping(10 SECONDS)
..()
. = TRUE
@@ -161,9 +161,9 @@
var/spammer = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/lenturi/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustFireLoss(-3 * REM * normalise_creation_purity() * delta_time)
- M.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.4 * REM * delta_time)
+/datum/reagent/medicine/c2/lenturi/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustFireLoss(-3 * REM * normalise_creation_purity() * delta_time, required_bodytype = affected_bodytype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.4 * REM * delta_time, required_organtype = affected_organtype)
..()
return TRUE
@@ -177,9 +177,9 @@
var/message_cd = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/aiuri/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustFireLoss(-2 * REM * normalise_creation_purity() * delta_time)
- M.adjustOrganLoss(ORGAN_SLOT_EYES, 0.25 * REM * delta_time)
+/datum/reagent/medicine/c2/aiuri/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustFireLoss(-2 * REM * normalise_creation_purity() * delta_time, required_bodytype = affected_bodytype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_EYES, 0.25 * REM * delta_time, required_organtype = affected_organtype)
..()
return TRUE
@@ -195,17 +195,17 @@
inverse_chem_val = 0.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/hercuri/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getFireLoss() > 50)
- M.adjustFireLoss(-2 * REM * delta_time * normalise_creation_purity(), FALSE)
+/datum/reagent/medicine/c2/hercuri/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getFireLoss() > 50)
+ affected_mob.adjustFireLoss(-2 * REM * delta_time * normalise_creation_purity(), FALSE, required_bodytype = affected_bodytype)
else
- M.adjustFireLoss(-1.25 * REM * delta_time * normalise_creation_purity(), FALSE)
- M.adjust_bodytemperature(rand(-25,-5) * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
- if(ishuman(M))
- var/mob/living/carbon/human/humi = M
+ affected_mob.adjustFireLoss(-1.25 * REM * delta_time * normalise_creation_purity(), FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjust_bodytemperature(rand(-25,-5) * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/humi = affected_mob
humi.adjust_coretemperature(rand(-25,-5) * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
- M.reagents?.chem_temp += (-10 * REM * delta_time)
- M.adjust_fire_stacks(-1 * REM * delta_time)
+ affected_mob.reagents?.chem_temp += (-10 * REM * delta_time)
+ affected_mob.adjust_fire_stacks(-1 * REM * delta_time)
..()
. = TRUE
@@ -219,10 +219,10 @@
if(reac_volume >= metabolization_rate)
exposed_mob.extinguish_mob()
-/datum/reagent/medicine/c2/hercuri/overdose_process(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-10 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50) //chilly chilly
- if(ishuman(M))
- var/mob/living/carbon/human/humi = M
+/datum/reagent/medicine/c2/hercuri/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-10 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50) //chilly chilly
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/humi = affected_mob
humi.adjust_coretemperature(-10 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
..()
@@ -242,18 +242,18 @@
inverse_chem = /datum/reagent/inverse/healing/convermol
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/convermol/on_mob_life(mob/living/carbon/human/M, delta_time, times_fired)
+/datum/reagent/medicine/c2/convermol/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
var/oxycalc = 2.5 * REM * current_cycle
if(!overdosed)
- oxycalc = min(oxycalc, M.getOxyLoss() + 0.5) //if NOT overdosing, we lower our toxdamage to only the damage we actually healed with a minimum of 0.1*current_cycle. IE if we only heal 10 oxygen damage but we COULD have healed 20, we will only take toxdamage for the 10. We would take the toxdamage for the extra 10 if we were overdosing.
- M.adjustOxyLoss(-oxycalc * delta_time * normalise_creation_purity(), 0)
- M.adjustToxLoss(oxycalc * delta_time / CONVERMOL_RATIO, 0)
- if(DT_PROB(current_cycle / 2, delta_time) && M.losebreath)
- M.losebreath--
+ oxycalc = min(oxycalc, affected_mob.getOxyLoss() + 0.5) //if NOT overdosing, we lower our toxdamage to only the damage we actually healed with a minimum of 0.1*current_cycle. IE if we only heal 10 oxygen damage but we COULD have healed 20, we will only take toxdamage for the 10. We would take the toxdamage for the extra 10 if we were overdosing.
+ affected_mob.adjustOxyLoss(-oxycalc * delta_time * normalise_creation_purity(), FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(oxycalc * delta_time / CONVERMOL_RATIO, FALSE, required_biotype = affected_biotype)
+ if(DT_PROB(current_cycle / 2, delta_time) && affected_mob.losebreath)
+ affected_mob.losebreath--
..()
return TRUE
-/datum/reagent/medicine/c2/convermol/overdose_process(mob/living/carbon/human/M, delta_time, times_fired)
+/datum/reagent/medicine/c2/convermol/overdose_process(mob/living/carbon/human/affected_mob, delta_time, times_fired)
metabolization_rate += 2.5 * REAGENTS_METABOLISM
..()
return TRUE
@@ -272,11 +272,11 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/tirimol/on_mob_life(mob/living/carbon/human/M, delta_time, times_fired)
- M.adjustOxyLoss(-3 * REM * delta_time * normalise_creation_purity())
- M.adjustStaminaLoss(2 * REM * delta_time)
+/datum/reagent/medicine/c2/tirimol/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOxyLoss(-3 * REM * delta_time * normalise_creation_purity(), required_biotype = affected_biotype)
+ affected_mob.adjustStaminaLoss(2 * REM * delta_time, required_biotype = affected_biotype)
if(drowsycd && COOLDOWN_FINISHED(src, drowsycd))
- M.adjust_drowsyness(10)
+ affected_mob.adjust_drowsyness(10)
COOLDOWN_START(src, drowsycd, 45 SECONDS)
else if(!drowsycd)
COOLDOWN_START(src, drowsycd, 15 SECONDS)
@@ -301,11 +301,11 @@
inverse_chem_val = 0.45
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/seiver/on_mob_metabolize(mob/living/carbon/human/M)
+/datum/reagent/medicine/c2/seiver/on_mob_metabolize(mob/living/carbon/human/affected_mob)
. = ..()
radbonustemp = rand(radbonustemp - 50, radbonustemp + 50) // Basically this means 50K and below will always give the percent heal, and upto 150K could. Calculated once.
-/datum/reagent/medicine/c2/seiver/on_mob_life(mob/living/carbon/human/M, delta_time, times_fired)
+/datum/reagent/medicine/c2/seiver/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
var/chemtemp = min(holder.chem_temp, 1000)
chemtemp = chemtemp ? chemtemp : 273 //why do you have null sweaty
var/healypoints = 0 //5 healypoints = 1 heart damage; 5 rads = 1 tox damage healed for the purpose of healypoints
@@ -313,23 +313,23 @@
//you're hot
var/toxcalc = min(round(5 + ((chemtemp-1000)/175), 0.1), 5) * REM * delta_time * normalise_creation_purity() //max 2.5 tox healing per second
if(toxcalc > 0)
- M.adjustToxLoss(-toxcalc * delta_time * normalise_creation_purity())
+ affected_mob.adjustToxLoss(-toxcalc * delta_time * normalise_creation_purity(), required_biotype = affected_biotype)
healypoints += toxcalc
//and you're cold
var/radcalc = round((T0C-chemtemp) / 6, 0.1) * REM * delta_time //max ~45 rad loss unless you've hit below 0K. if so, wow.
- if(radcalc > 0 && HAS_TRAIT(M, TRAIT_IRRADIATED))
+ if(radcalc > 0 && HAS_TRAIT(affected_mob, TRAIT_IRRADIATED))
radcalc *= normalise_creation_purity()
// no cost percent healing if you are SUPER cold (on top of cost healing)
if(chemtemp < radbonustemp*0.1)
- M.adjustToxLoss(-radcalc * (0.9**(REM * delta_time)))
+ affected_mob.adjustToxLoss(-radcalc * (0.9**(REM * delta_time)), required_biotype = affected_biotype)
else if(chemtemp < radbonustemp)
- M.adjustToxLoss(-radcalc * (0.75**(REM * delta_time)))
+ affected_mob.adjustToxLoss(-radcalc * (0.75**(REM * delta_time)), required_biotype = affected_biotype)
healypoints += (radcalc / 5)
//you're yes and... oh no!
healypoints = round(healypoints, 0.1)
- M.adjustOrganLoss(ORGAN_SLOT_HEART, healypoints / 5)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, healypoints / 5, required_organtype = affected_organtype)
..()
return TRUE
@@ -341,24 +341,24 @@
ph = 9.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/multiver/on_mob_life(mob/living/carbon/human/M, delta_time, times_fired)
+/datum/reagent/medicine/c2/multiver/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
var/medibonus = 0 //it will always have itself which makes it REALLY start @ 1
- for(var/r in M.reagents.reagent_list)
+ for(var/r in affected_mob.reagents.reagent_list)
var/datum/reagent/the_reagent = r
if(istype(the_reagent, /datum/reagent/medicine))
medibonus += 1
if(creation_purity >= 1) //Perfectly pure multivers gives a bonus of 2!
medibonus += 1
- M.adjustToxLoss(-0.5 * min(medibonus, 3 * normalise_creation_purity()) * REM * delta_time) //not great at healing but if you have nothing else it will work
- M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * delta_time) //kills at 40u
- for(var/r2 in M.reagents.reagent_list)
+ affected_mob.adjustToxLoss(-0.5 * min(medibonus, 3 * normalise_creation_purity()) * REM * delta_time, required_biotype = affected_biotype) //not great at healing but if you have nothing else it will work
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * delta_time, required_organtype = affected_organtype) //kills at 40u
+ for(var/r2 in affected_mob.reagents.reagent_list)
var/datum/reagent/the_reagent2 = r2
if(the_reagent2 == src)
continue
var/amount2purge = 3
if(medibonus >= 3 && istype(the_reagent2, /datum/reagent/medicine)) //3 unique meds (2+multiver) | (1 + pure multiver) will make it not purge medicines
continue
- M.reagents.remove_reagent(the_reagent2.type, amount2purge * REM * delta_time)
+ affected_mob.reagents.remove_reagent(the_reagent2.type, amount2purge * REM * delta_time)
..()
return TRUE
@@ -385,7 +385,7 @@
return
var/mob/living/carbon/C = A
if(trans_volume >= 0.6) //prevents cheesing with ultralow doses.
- C.adjustToxLoss((-1.5 * min(2, trans_volume) * REM) * normalise_creation_purity(), 0) //This is to promote iv pole use for that chemotherapy feel.
+ C.adjustToxLoss((-1.5 * min(2, trans_volume) * REM) * normalise_creation_purity(), FALSE, required_biotype = affected_biotype) //This is to promote iv pole use for that chemotherapy feel.
var/obj/item/organ/internal/liver/L = C.internal_organs_slot[ORGAN_SLOT_LIVER]
if(!L || L.organ_flags & ORGAN_FAILING)
return
@@ -394,21 +394,21 @@
C.reagents.add_reagent(/datum/reagent/medicine/c2/musiver, conversion_amount)
..()
-/datum/reagent/medicine/c2/syriniver/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.8 * REM * delta_time)
- M.adjustToxLoss(-1 * REM * delta_time, 0)
- for(var/datum/reagent/R in M.reagents.reagent_list)
+/datum/reagent/medicine/c2/syriniver/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.8 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjustToxLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ for(var/datum/reagent/R in affected_mob.reagents.reagent_list)
if(issyrinormusc(R))
continue
- M.reagents.remove_reagent(R.type, 0.4 * REM * delta_time)
+ affected_mob.reagents.remove_reagent(R.type, 0.4 * REM * delta_time)
..()
. = TRUE
-/datum/reagent/medicine/c2/syriniver/overdose_process(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * delta_time)
- M.adjust_disgust(3 * REM * delta_time)
- M.reagents.add_reagent(/datum/reagent/medicine/c2/musiver, 0.225 * REM * delta_time)
+/datum/reagent/medicine/c2/syriniver/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjust_disgust(3 * REM * delta_time)
+ affected_mob.reagents.add_reagent(/datum/reagent/medicine/c2/musiver, 0.225 * REM * delta_time)
..()
. = TRUE
@@ -420,32 +420,32 @@
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 25
ph = 9.1
- var/datum/brain_trauma/mild/muscle_weakness/U
+ var/datum/brain_trauma/mild/muscle_weakness/trauma
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/musiver/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.1 * REM * delta_time)
- M.adjustToxLoss(-1 * REM * delta_time * normalise_creation_purity(), 0)
- for(var/datum/reagent/R in M.reagents.reagent_list)
+/datum/reagent/medicine/c2/musiver/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.1 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjustToxLoss(-1 * REM * delta_time * normalise_creation_purity(), FALSE, required_biotype = affected_biotype)
+ for(var/datum/reagent/R in affected_mob.reagents.reagent_list)
if(issyrinormusc(R))
continue
- M.reagents.remove_reagent(R.type, 0.2 * REM * delta_time)
+ affected_mob.reagents.remove_reagent(R.type, 0.2 * REM * delta_time)
..()
. = TRUE
-/datum/reagent/medicine/c2/musiver/overdose_start(mob/living/carbon/M)
- U = new()
- M.gain_trauma(U, TRAUMA_RESILIENCE_ABSOLUTE)
+/datum/reagent/medicine/c2/musiver/overdose_start(mob/living/carbon/affected_mob)
+ trauma = new()
+ affected_mob.gain_trauma(trauma, TRAUMA_RESILIENCE_ABSOLUTE)
..()
-/datum/reagent/medicine/c2/musiver/on_mob_delete(mob/living/carbon/M)
- if(U)
- QDEL_NULL(U)
+/datum/reagent/medicine/c2/musiver/on_mob_delete(mob/living/carbon/affected_mob)
+ if(trauma)
+ QDEL_NULL(trauma)
return ..()
-/datum/reagent/medicine/c2/musiver/overdose_process(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * delta_time)
- M.adjust_disgust(3 * REM * delta_time)
+/datum/reagent/medicine/c2/musiver/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjust_disgust(3 * REM * delta_time)
..()
. = TRUE
@@ -469,12 +469,12 @@
show_message = 0
if(!(methods & (PATCH|TOUCH|VAPOR)))
return
- var/harmies = min(carbies.getBruteLoss(),carbies.adjustBruteLoss(-1.25 * reac_volume)*-1)
- var/burnies = min(carbies.getFireLoss(),carbies.adjustFireLoss(-1.25 * reac_volume)*-1)
+ var/harmies = min(carbies.getBruteLoss(), carbies.adjustBruteLoss(-1.25 * reac_volume, required_bodytype = affected_bodytype)*-1)
+ var/burnies = min(carbies.getFireLoss(), carbies.adjustFireLoss(-1.25 * reac_volume, required_bodytype = affected_bodytype)*-1)
for(var/i in carbies.all_wounds)
var/datum/wound/iter_wound = i
iter_wound.on_synthflesh(reac_volume)
- carbies.adjustToxLoss((harmies+burnies)*(0.5 + (0.25*(1-creation_purity)))) //0.5 - 0.75
+ carbies.adjustToxLoss((harmies+burnies)*(0.5 + (0.25*(1-creation_purity))), required_biotype = affected_biotype) //0.5 - 0.75
if(show_message)
to_chat(carbies, span_danger("You feel your burns and bruises healing! It stings like hell!"))
carbies.add_mood_event("painful_medicine", /datum/mood_event/painful_medicine)
@@ -519,17 +519,17 @@
/datum/reagent/medicine/c2/penthrite/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
H.adjustStaminaLoss(-25 * REM) //SKYRAT EDIT ADDITION - COMBAT - makes your heart beat faster, fills you with energy. For miners
- H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.25 * REM * delta_time)
+ H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.25 * REM * delta_time, required_organtype = affected_organtype)
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 * delta_time, 0)
- H.adjustBruteLoss(-2 * REM * delta_time, 0)
- H.adjustFireLoss(-2 * REM * delta_time, 0)
- H.adjustOxyLoss(-6 * REM * delta_time, 0)
+ H.adjustToxLoss(-2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ H.adjustBruteLoss(-2 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ H.adjustFireLoss(-2 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ H.adjustOxyLoss(-6 * REM * delta_time, FALSE, required_biotype = affected_biotype)
H.losebreath = 0
- H.adjustOrganLoss(ORGAN_SLOT_HEART, max(volume/10, 1) * REM * delta_time) // your heart is barely keeping up!
+ H.adjustOrganLoss(ORGAN_SLOT_HEART, max(volume/10, 1) * REM * delta_time, required_organtype = affected_organtype) // your heart is barely keeping up!
H.set_jitter_if_lower(rand(0 SECONDS, 4 SECONDS) * REM * delta_time)
H.set_dizzy_if_lower(rand(0 SECONDS, 4 SECONDS) * REM * delta_time)
@@ -555,8 +555,8 @@
/datum/reagent/medicine/c2/penthrite/overdose_process(mob/living/carbon/human/H, delta_time, times_fired)
REMOVE_TRAIT(H, TRAIT_STABLEHEART, type)
- H.adjustStaminaLoss(10 * REM * delta_time)
- H.adjustOrganLoss(ORGAN_SLOT_HEART, 10 * REM * delta_time)
+ H.adjustStaminaLoss(10 * REM * delta_time, required_biotype = affected_biotype)
+ H.adjustOrganLoss(ORGAN_SLOT_HEART, 10 * REM * delta_time, required_organtype = affected_organtype)
H.set_heartattack(TRUE)
diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
index 8b3331f1c13..3a07a7d52fe 100644
--- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
@@ -15,9 +15,9 @@
ph = 3.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/orangejuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getOxyLoss() && DT_PROB(16, delta_time))
- M.adjustOxyLoss(-1, 0)
+/datum/reagent/consumable/orangejuice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getOxyLoss() && DT_PROB(16, delta_time))
+ affected_mob.adjustOxyLoss(-1, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -31,9 +31,9 @@
glass_desc = "Are you sure this is tomato juice?"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/tomatojuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getFireLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(0, 1)
+/datum/reagent/consumable/tomatojuice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getFireLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(0, 1)
. = TRUE
..()
@@ -48,9 +48,9 @@
ph = 2.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/limejuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getToxLoss() && DT_PROB(10, delta_time))
- M.adjustToxLoss(-1, 0)
+/datum/reagent/consumable/limejuice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getToxLoss() && DT_PROB(10, delta_time))
+ affected_mob.adjustToxLoss(-1, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -64,17 +64,17 @@
glass_desc = "It's just like a carrot but without crunching."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/carrotjuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_blurriness(-1 * REM * delta_time)
- M.adjust_blindness(-1 * REM * delta_time)
+/datum/reagent/consumable/carrotjuice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_blurriness(-1 * REM * delta_time)
+ affected_mob.adjust_blindness(-1 * REM * delta_time)
switch(current_cycle)
if(1 to 20)
//nothing
if(21 to 110)
if(DT_PROB(100 * (1 - (sqrt(110 - current_cycle) / 10)), delta_time))
- M.cure_nearsighted(list(EYE_DAMAGE))
+ affected_mob.cure_nearsighted(list(EYE_DAMAGE))
if(110 to INFINITY)
- M.cure_nearsighted(list(EYE_DAMAGE))
+ affected_mob.cure_nearsighted(list(EYE_DAMAGE))
..()
return
@@ -105,8 +105,8 @@
glass_desc = "Berry juice. Or maybe it's poison. Who cares?"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/poisonberryjuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustToxLoss(1 * REM * delta_time, 0)
+/datum/reagent/consumable/poisonberryjuice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -141,10 +141,10 @@
glass_desc = "The raw essence of a banana. HONK."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/banana/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- var/obj/item/organ/internal/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
- if((liver && HAS_TRAIT(liver, TRAIT_COMEDY_METABOLISM)) || ismonkey(M))
- M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
+/datum/reagent/consumable/banana/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ var/obj/item/organ/internal/liver/liver = affected_mob.getorganslot(ORGAN_SLOT_LIVER)
+ if((liver && HAS_TRAIT(liver, TRAIT_COMEDY_METABOLISM)) || ismonkey(affected_mob))
+ affected_mob.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
. = TRUE
..()
@@ -173,9 +173,9 @@
taste_description = "laughter"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.emote("laugh")
- M.add_mood_event("chemical_laughter", /datum/mood_event/chemical_laughter)
+/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.emote("laugh")
+ affected_mob.add_mood_event("chemical_laughter", /datum/mood_event/chemical_laughter)
..()
/datum/reagent/consumable/superlaughter
@@ -186,11 +186,11 @@
taste_description = "laughter"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/superlaughter/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/consumable/superlaughter/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(16, delta_time))
- M.visible_message(span_danger("[M] bursts out into a fit of uncontrollable laughter!"), span_userdanger("You burst out in a fit of uncontrollable laughter!"))
- M.Stun(5)
- M.add_mood_event("chemical_laughter", /datum/mood_event/chemical_superlaughter)
+ affected_mob.visible_message(span_danger("[affected_mob] bursts out into a fit of uncontrollable laughter!"), span_userdanger("You burst out in a fit of uncontrollable laughter!"))
+ affected_mob.Stun(5)
+ affected_mob.add_mood_event("chemical_laughter", /datum/mood_event/chemical_superlaughter)
..()
/datum/reagent/consumable/potato_juice
@@ -240,9 +240,9 @@
if(myseed)
myseed.adjust_potency(-chems.get_reagent_amount(type) * 0.5)
-/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getBruteLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(1,0)
+/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getBruteLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(1,0)
. = TRUE
if(holder.has_reagent(/datum/reagent/consumable/capsaicin))
holder.remove_reagent(/datum/reagent/consumable/capsaicin, 1 * delta_time)
@@ -258,9 +258,9 @@
glass_desc = "White and nutritious soy goodness!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/soymilk/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getBruteLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(1, 0)
+/datum/reagent/consumable/soymilk/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getBruteLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(1, 0)
. = TRUE
..()
@@ -274,9 +274,9 @@
glass_desc = "Ewwww..."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/cream/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getBruteLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(1, 0)
+/datum/reagent/consumable/cream/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getBruteLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(1, 0)
. = TRUE
..()
@@ -293,16 +293,16 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_STOCK
-/datum/reagent/consumable/coffee/overdose_process(mob/living/M, delta_time, times_fired)
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+/datum/reagent/consumable/coffee/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
..()
-/datum/reagent/consumable/coffee/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-3 * REM * delta_time)
- M.AdjustSleeping(-40 * REM * delta_time)
+/datum/reagent/consumable/coffee/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-3 * REM * delta_time)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
//310.15 is the normal bodytemp.
- M.adjust_bodytemperature(25 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
+ affected_mob.adjust_bodytemperature(25 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, affected_mob.get_body_temp_normal())
if(holder.has_reagent(/datum/reagent/consumable/frostoil))
holder.remove_reagent(/datum/reagent/consumable/frostoil, 5 * REM * delta_time)
..()
@@ -320,14 +320,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_STOCK
-/datum/reagent/consumable/tea/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-4 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-1 * REM * delta_time)
- M.adjust_jitter(-6 SECONDS * REM * delta_time)
- M.AdjustSleeping(-20 * REM * delta_time)
- if(M.getToxLoss() && DT_PROB(10, delta_time))
- M.adjustToxLoss(-1, 0)
- M.adjust_bodytemperature(20 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
+/datum/reagent/consumable/tea/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-4 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-1 * REM * delta_time)
+ affected_mob.adjust_jitter(-6 SECONDS * REM * delta_time)
+ affected_mob.AdjustSleeping(-20 * REM * delta_time)
+ if(affected_mob.getToxLoss() && DT_PROB(10, delta_time))
+ affected_mob.adjustToxLoss(-1, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjust_bodytemperature(20 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, affected_mob.get_body_temp_normal())
..()
. = TRUE
@@ -355,9 +355,9 @@
glass_desc = "You feel like taking a few golf swings after a few swigs of this."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/tea/arnold_palmer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/consumable/tea/arnold_palmer/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(2.5, delta_time))
- to_chat(M, span_notice("[pick("You remember to square your shoulders.","You remember to keep your head down.","You can't decide between squaring your shoulders and keeping your head down.","You remember to relax.","You think about how someday you'll get two strokes off your golf game.")]"))
+ to_chat(affected_mob, span_notice("[pick("You remember to square your shoulders.","You remember to keep your head down.","You can't decide between squaring your shoulders and keeping your head down.","You remember to relax.","You think about how someday you'll get two strokes off your golf game.")]"))
..()
. = TRUE
@@ -372,12 +372,12 @@
glass_desc = "A drink to perk you up and refresh you!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/icecoffee/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-3 * REM * delta_time)
- M.AdjustSleeping(-40 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+/datum/reagent/consumable/icecoffee/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-3 * REM * delta_time)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
..()
. = TRUE
@@ -392,13 +392,13 @@
glass_desc = "A sharp drink, this can't have come cheap"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/hot_ice_coffee/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-3 * REM * delta_time)
- M.AdjustSleeping(-60 * REM * delta_time)
- M.adjust_bodytemperature(-7 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
- M.adjustToxLoss(1 * REM * delta_time, 0)
+/datum/reagent/consumable/hot_ice_coffee/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-3 * REM * delta_time)
+ affected_mob.AdjustSleeping(-60 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-7 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -413,13 +413,13 @@
glass_desc = "All natural, antioxidant-rich flavour sensation."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/icetea/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-4 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-1 * REM * delta_time)
- M.AdjustSleeping(-40 * REM * delta_time)
- if(M.getToxLoss() && DT_PROB(10, delta_time))
- M.adjustToxLoss(-1, 0)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/icetea/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-4 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-1 * REM * delta_time)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
+ if(affected_mob.getToxLoss() && DT_PROB(10, delta_time))
+ affected_mob.adjustToxLoss(-1, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
. = TRUE
@@ -433,9 +433,9 @@
glass_desc = "A glass of refreshing Space Cola."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/space_cola/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_drowsyness(-5 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/space_cola/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_drowsyness(-5 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/roy_rogers
@@ -449,10 +449,10 @@
glass_desc = "90% sugar in a glass."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/roy_rogers/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_jitter_if_lower(12 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-5 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/roy_rogers/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(12 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-5 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
return ..()
/datum/reagent/consumable/nuka_cola
@@ -466,21 +466,21 @@
glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/nuka_cola/on_mob_metabolize(mob/living/L)
+/datum/reagent/consumable/nuka_cola/on_mob_metabolize(mob/living/affected_mob)
..()
- L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
+ affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
-/datum/reagent/consumable/nuka_cola/on_mob_end_metabolize(mob/living/L)
- L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
+/datum/reagent/consumable/nuka_cola/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
..()
-/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_jitter_if_lower(40 SECONDS * REM * delta_time)
- M.set_drugginess(1 MINUTES * REM * delta_time)
- M.adjust_dizzy(3 SECONDS * REM * delta_time)
- M.set_drowsyness(0)
- M.AdjustSleeping(-40 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(40 SECONDS * REM * delta_time)
+ affected_mob.set_drugginess(1 MINUTES * REM * delta_time)
+ affected_mob.adjust_dizzy(3 SECONDS * REM * delta_time)
+ affected_mob.set_drowsyness(0)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
. = TRUE
@@ -500,25 +500,25 @@
var/effect_enabled = FALSE
-/datum/reagent/consumable/rootbeer/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_DOUBLE_TAP, type)
+/datum/reagent/consumable/rootbeer/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_DOUBLE_TAP, type)
if(current_cycle > 10)
- to_chat(L, span_warning("You feel kinda tired as your sugar rush wears off..."))
- L.adjustStaminaLoss(min(80, current_cycle * 3))
- L.adjust_drowsyness(current_cycle)
+ to_chat(affected_mob, span_warning("You feel kinda tired as your sugar rush wears off..."))
+ affected_mob.adjustStaminaLoss(min(80, current_cycle * 3), required_biotype = affected_biotype)
+ affected_mob.adjust_drowsyness(current_cycle)
..()
-/datum/reagent/consumable/rootbeer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/consumable/rootbeer/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle >= 3 && !effect_enabled) // takes a few seconds for the bonus to kick in to prevent microdosing
- to_chat(M, span_notice("You feel your trigger finger getting itchy..."))
- ADD_TRAIT(M, TRAIT_DOUBLE_TAP, type)
+ to_chat(affected_mob, span_notice("You feel your trigger finger getting itchy..."))
+ ADD_TRAIT(affected_mob, TRAIT_DOUBLE_TAP, type)
effect_enabled = TRUE
- M.set_jitter_if_lower(4 SECONDS * REM * delta_time)
+ affected_mob.set_jitter_if_lower(4 SECONDS * REM * delta_time)
if(prob(50))
- M.adjust_dizzy(2 SECONDS * REM * delta_time)
+ affected_mob.adjust_dizzy(2 SECONDS * REM * delta_time)
if(current_cycle > 10)
- M.adjust_dizzy(3 SECONDS * REM * delta_time)
+ affected_mob.adjust_dizzy(3 SECONDS * REM * delta_time)
..()
. = TRUE
@@ -534,20 +534,20 @@
glass_desc = "Surprisingly it isn't grey."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/grey_bull/on_mob_metabolize(mob/living/L)
+/datum/reagent/consumable/grey_bull/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_SHOCKIMMUNE, type)
+ ADD_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
-/datum/reagent/consumable/grey_bull/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_SHOCKIMMUNE, type)
+/datum/reagent/consumable/grey_bull/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_SHOCKIMMUNE, type)
..()
-/datum/reagent/consumable/grey_bull/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_jitter_if_lower(40 SECONDS * REM * delta_time)
- M.adjust_dizzy(2 SECONDS * REM * delta_time)
- M.set_drowsyness(0)
- M.AdjustSleeping(-40 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/grey_bull/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(40 SECONDS * REM * delta_time)
+ affected_mob.adjust_dizzy(2 SECONDS * REM * delta_time)
+ affected_mob.set_drowsyness(0)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/spacemountainwind
@@ -560,11 +560,11 @@
glass_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_drowsyness(-7 * REM * delta_time)
- M.AdjustSleeping(-20 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_drowsyness(-7 * REM * delta_time)
+ affected_mob.AdjustSleeping(-20 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
..()
. = TRUE
@@ -578,9 +578,9 @@
glass_desc = "Dr. Gibb. Not as dangerous as the glass_name might imply."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/dr_gibb/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_drowsyness(-6 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/dr_gibb/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_drowsyness(-6 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/space_up
@@ -594,8 +594,8 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/space_up/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/space_up/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/lemon_lime
@@ -609,8 +609,8 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/lemon_lime/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/lemon_lime/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
@@ -631,10 +631,10 @@
to_chat(exposed_mob, "As you imbibe the Pwr Game, your gamer third eye opens... \
You feel as though a great secret of the universe has been made known to you...")
-/datum/reagent/consumable/pwr_game/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/pwr_game/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
if(DT_PROB(5, delta_time))
- M.mind?.adjust_experience(/datum/skill/gaming, 5)
+ affected_mob.mind?.adjust_experience(/datum/skill/gaming, 5)
..()
/datum/reagent/consumable/shamblers
@@ -647,8 +647,8 @@
glass_desc = "Mmm mm, shambly."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/shamblers/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/shamblers/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/sodawater
@@ -670,10 +670,10 @@
mytray.adjust_waterlevel(round(chems.get_reagent_amount(type) * 1))
mytray.adjust_plant_health(round(chems.get_reagent_amount(type) * 0.1))
-/datum/reagent/consumable/sodawater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-3 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/sodawater/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-3 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/tonic
@@ -686,11 +686,11 @@
glass_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/tonic/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-3 * REM * delta_time)
- M.AdjustSleeping(-40 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/tonic/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-3 * REM * delta_time)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
. = TRUE
@@ -705,26 +705,26 @@
glass_desc = "You can unleash the ape, but without the pop of the can?"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/monkey_energy/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_jitter_if_lower(80 SECONDS * REM * delta_time)
- M.adjust_dizzy(2 SECONDS * REM * delta_time)
- M.set_drowsyness(0)
- M.AdjustSleeping(-40 * REM * delta_time)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/monkey_energy/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(80 SECONDS * REM * delta_time)
+ affected_mob.adjust_dizzy(2 SECONDS * REM * delta_time)
+ affected_mob.set_drowsyness(0)
+ affected_mob.AdjustSleeping(-40 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
-/datum/reagent/consumable/monkey_energy/on_mob_metabolize(mob/living/L)
+/datum/reagent/consumable/monkey_energy/on_mob_metabolize(mob/living/affected_mob)
..()
- if(ismonkey(L))
- L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/monkey_energy)
+ if(ismonkey(affected_mob))
+ affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/monkey_energy)
-/datum/reagent/consumable/monkey_energy/on_mob_end_metabolize(mob/living/L)
- L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/monkey_energy)
+/datum/reagent/consumable/monkey_energy/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/monkey_energy)
..()
-/datum/reagent/consumable/monkey_energy/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/consumable/monkey_energy/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(7.5, delta_time))
- M.say(pick_list_replacements(BOOMER_FILE, "boomer"), forced = /datum/reagent/consumable/monkey_energy)
+ affected_mob.say(pick_list_replacements(BOOMER_FILE, "boomer"), forced = /datum/reagent/consumable/monkey_energy)
..()
/datum/reagent/consumable/ice
@@ -738,8 +738,8 @@
glass_desc = "Generally, you're supposed to put something else in there too..."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/ice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/soy_latte
@@ -754,14 +754,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_EASY
-/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-3 *REM * delta_time)
- M.SetSleeping(0)
- M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
- if(M.getBruteLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(1,0)
+/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-3 *REM * delta_time)
+ affected_mob.SetSleeping(0)
+ affected_mob.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, affected_mob.get_body_temp_normal())
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+ if(affected_mob.getBruteLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(1,0)
..()
. = TRUE
@@ -777,14 +777,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
glass_price = DRINK_PRICE_EASY
-/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_dizzy(-10 SECONDS * REM * delta_time)
- M.adjust_drowsyness(-6 * REM * delta_time)
- M.SetSleeping(0)
- M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
- if(M.getBruteLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(1, 0)
+/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_dizzy(-10 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(-6 * REM * delta_time)
+ affected_mob.SetSleeping(0)
+ affected_mob.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, affected_mob.get_body_temp_normal())
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+ if(affected_mob.getBruteLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(1, 0)
..()
. = TRUE
@@ -799,16 +799,16 @@
glass_desc = "The space doctor's favorite. Guaranteed to restore bodily injury; side effects include cravings and hunger."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/doctor_delight/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustBruteLoss(-0.5 * REM * delta_time, 0)
- M.adjustFireLoss(-0.5 * REM * delta_time, 0)
- M.adjustToxLoss(-0.5 * REM * delta_time, 0)
- M.adjustOxyLoss(-0.5 * REM * delta_time, 0)
- if(M.nutrition && (M.nutrition - 2 > 0))
- var/obj/item/organ/internal/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
+/datum/reagent/consumable/doctor_delight/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustBruteLoss(-0.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-0.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustToxLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOxyLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ if(affected_mob.nutrition && (affected_mob.nutrition - 2 > 0))
+ var/obj/item/organ/internal/liver/liver = affected_mob.getorganslot(ORGAN_SLOT_LIVER)
if(!(HAS_TRAIT(liver, TRAIT_MEDICAL_METABOLISM)))
// Drains the nutrition of the holder. Not medical doctors though, since it's the Doctor's Delight!
- M.adjust_nutrition(-2 * REM * delta_time)
+ affected_mob.adjust_nutrition(-2 * REM * delta_time)
..()
. = TRUE
@@ -823,8 +823,8 @@
glass_desc = "There is not a single drop of alcohol in this thing."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/cinderella/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_disgust(-5 * REM * delta_time)
+/datum/reagent/consumable/cinderella/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_disgust(-5 * REM * delta_time)
return ..()
/datum/reagent/consumable/cherryshake
@@ -975,8 +975,8 @@
glass_desc = "It's grape (soda)!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/grape_soda/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/grape_soda/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/milk/chocolate_milk
@@ -998,10 +998,10 @@
glass_desc = "A favorite winter drink to warm you up."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
- if(M.getBruteLoss() && DT_PROB(10, delta_time))
- M.heal_bodypart_damage(1, 0)
+/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, affected_mob.get_body_temp_normal())
+ if(affected_mob.getBruteLoss() && DT_PROB(10, delta_time))
+ affected_mob.heal_bodypart_damage(1, 0)
. = TRUE
if(holder.has_reagent(/datum/reagent/consumable/capsaicin))
holder.remove_reagent(/datum/reagent/consumable/capsaicin, 2 * REM * delta_time)
@@ -1019,8 +1019,8 @@
glass_desc = "A spin on a winter favourite, made to please."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/italian_coco/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
+/datum/reagent/consumable/italian_coco/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, affected_mob.get_body_temp_normal())
return ..()
/datum/reagent/consumable/menthol
@@ -1033,8 +1033,8 @@
glass_desc = "Tastes naturally minty, and imparts a very mild numbing sensation."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/menthol/on_mob_life(mob/living/L, delta_time, times_fired)
- L.apply_status_effect(/datum/status_effect/throat_soothed)
+/datum/reagent/consumable/menthol/on_mob_life(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.apply_status_effect(/datum/status_effect/throat_soothed)
..()
/datum/reagent/consumable/grenadine
@@ -1082,8 +1082,8 @@
glass_desc = "A classic space-American vanilla flavored soft drink."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/cream_soda/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+/datum/reagent/consumable/cream_soda/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
..()
/datum/reagent/consumable/sol_dry
@@ -1097,8 +1097,8 @@
glass_desc = "A soothing, mellow drink made from ginger."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/sol_dry/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_disgust(-5 * REM * delta_time)
+/datum/reagent/consumable/sol_dry/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_disgust(-5 * REM * delta_time)
..()
/datum/reagent/consumable/shirley_temple
@@ -1112,8 +1112,8 @@
glass_desc = "Ginger ale with processed grenadine. "
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/shirley_temple/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_disgust(-3 * REM * delta_time)
+/datum/reagent/consumable/shirley_temple/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_disgust(-3 * REM * delta_time)
return ..()
/datum/reagent/consumable/red_queen
@@ -1128,23 +1128,23 @@
var/current_size = RESIZE_DEFAULT_SIZE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/H, delta_time, times_fired)
+/datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(50, delta_time))
return ..()
var/newsize = pick(0.5, 0.75, 1, 1.50, 2)
newsize *= RESIZE_DEFAULT_SIZE
- H.resize = newsize/current_size
+ affected_mob.resize = newsize/current_size
current_size = newsize
- H.update_transform()
+ affected_mob.update_transform()
if(DT_PROB(23, delta_time))
- H.emote("sneeze")
+ affected_mob.emote("sneeze")
..()
-/datum/reagent/consumable/red_queen/on_mob_end_metabolize(mob/living/M)
- M.resize = RESIZE_DEFAULT_SIZE/current_size
+/datum/reagent/consumable/red_queen/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.resize = RESIZE_DEFAULT_SIZE/current_size
current_size = RESIZE_DEFAULT_SIZE
- M.update_transform()
+ affected_mob.update_transform()
..()
/datum/reagent/consumable/bungojuice
@@ -1177,9 +1177,9 @@
glass_desc = "A healthy and refreshing juice."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/aloejuice/on_mob_life(mob/living/M, delta_time, times_fired)
- if(M.getToxLoss() && DT_PROB(16, delta_time))
- M.adjustToxLoss(-1, 0)
+/datum/reagent/consumable/aloejuice/on_mob_life(mob/living/affected_mob, delta_time, times_fired)
+ if(affected_mob.getToxLoss() && DT_PROB(16, delta_time))
+ affected_mob.adjustToxLoss(-1, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -1194,10 +1194,10 @@
glass_desc = "90% water, but still refreshing."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/agua_fresca/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
- if(M.getToxLoss() && DT_PROB(10, delta_time))
- M.adjustToxLoss(-0.5, 0)
+/datum/reagent/consumable/agua_fresca/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
+ if(affected_mob.getToxLoss() && DT_PROB(10, delta_time))
+ affected_mob.adjustToxLoss(-0.5, FALSE, required_biotype = affected_biotype)
return ..()
/datum/reagent/consumable/mushroom_tea
@@ -1211,9 +1211,9 @@
glass_desc = "Oddly savoury for a drink."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/mushroom_tea/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(islizard(M))
- M.adjustOxyLoss(-0.5 * REM * delta_time, 0)
+/datum/reagent/consumable/mushroom_tea/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(islizard(affected_mob))
+ affected_mob.adjustOxyLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -1332,5 +1332,5 @@
/datum/reagent/consumable/cucumberlemonade/on_mob_life(mob/living/carbon/doll, delta_time, times_fired)
doll.adjust_bodytemperature(-8 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, doll.get_body_temp_normal())
if(doll.getToxLoss() && DT_PROB(10, delta_time))
- doll.adjustToxLoss(-0.5, 0)
+ doll.adjustToxLoss(-0.5, FALSE, required_biotype = affected_biotype)
return ..()
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index a97ea9f5017..4c006b53620 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -4,9 +4,9 @@
taste_description = "bitterness"
var/trippy = TRUE //Does this drug make you trip?
-/datum/reagent/drug/on_mob_end_metabolize(mob/living/M)
+/datum/reagent/drug/on_mob_end_metabolize(mob/living/affected_mob)
if(trippy)
- M.clear_mood_event("[type]_high")
+ affected_mob.clear_mood_event("[type]_high")
/datum/reagent/drug/space_drugs
name = "Space Drugs"
@@ -17,22 +17,22 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 10) //4 per 2 seconds
-/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_drugginess(30 SECONDS * REM * delta_time)
- if(isturf(M.loc) && !isspaceturf(M.loc) && !HAS_TRAIT(M, TRAIT_IMMOBILIZED) && DT_PROB(5, delta_time))
- step(M, pick(GLOB.cardinals))
+/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_drugginess(30 SECONDS * REM * delta_time)
+ if(isturf(affected_mob.loc) && !isspaceturf(affected_mob.loc) && !HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && DT_PROB(5, delta_time))
+ step(affected_mob, pick(GLOB.cardinals))
if(DT_PROB(3.5, delta_time))
- M.emote(pick("twitch","drool","moan","giggle"))
+ affected_mob.emote(pick("twitch","drool","moan","giggle"))
..()
-/datum/reagent/drug/space_drugs/overdose_start(mob/living/M)
- to_chat(M, span_userdanger("You start tripping hard!"))
- M.add_mood_event("[type]_overdose", /datum/mood_event/overdose, name)
+/datum/reagent/drug/space_drugs/overdose_start(mob/living/affected_mob)
+ to_chat(affected_mob, span_userdanger("You start tripping hard!"))
+ affected_mob.add_mood_event("[type]_overdose", /datum/mood_event/overdose, name)
-/datum/reagent/drug/space_drugs/overdose_process(mob/living/M, delta_time, times_fired)
- var/hallucination_duration_in_seconds = (M.get_timed_status_effect_duration(/datum/status_effect/hallucination) / 10)
+/datum/reagent/drug/space_drugs/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ var/hallucination_duration_in_seconds = (affected_mob.get_timed_status_effect_duration(/datum/status_effect/hallucination) / 10)
if(hallucination_duration_in_seconds < volume && DT_PROB(10, delta_time))
- M.adjust_hallucinations(10 SECONDS)
+ affected_mob.adjust_hallucinations(10 SECONDS)
..()
/datum/reagent/drug/cannabis
@@ -44,20 +44,20 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
metabolization_rate = 0.125 * REAGENTS_METABOLISM
-/datum/reagent/drug/cannabis/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.apply_status_effect(/datum/status_effect/stoned)
+/datum/reagent/drug/cannabis/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.apply_status_effect(/datum/status_effect/stoned)
if(DT_PROB(1, delta_time))
var/smoke_message = pick("You feel relaxed.","You feel calmed.","Your mouth feels dry.","You could use some water.","Your heart beats quickly.","You feel clumsy.","You crave junk food.","You notice you've been moving more slowly.")
- to_chat(M, "[smoke_message]")
+ to_chat(affected_mob, "[smoke_message]")
if(DT_PROB(2, delta_time))
- M.emote(pick("smile","laugh","giggle"))
- M.adjust_nutrition(-0.15 * REM * delta_time) //munchies
- if(DT_PROB(4, delta_time) && M.body_position == LYING_DOWN && !M.IsSleeping()) //chance to fall asleep if lying down
- to_chat(M, "You doze off...")
- M.Sleeping(10 SECONDS)
- if(DT_PROB(4, delta_time) && M.buckled && M.body_position != LYING_DOWN && !M.IsParalyzed()) //chance to be couchlocked if sitting
- to_chat(M, "It's too comfy to move...")
- M.Paralyze(10 SECONDS)
+ affected_mob.emote(pick("smile","laugh","giggle"))
+ affected_mob.adjust_nutrition(-0.15 * REM * delta_time) //munchies
+ if(DT_PROB(4, delta_time) && affected_mob.body_position == LYING_DOWN && !affected_mob.IsSleeping()) //chance to fall asleep if lying down
+ to_chat(affected_mob, "You doze off...")
+ affected_mob.Sleeping(10 SECONDS)
+ if(DT_PROB(4, delta_time) && affected_mob.buckled && affected_mob.body_position != LYING_DOWN && !affected_mob.IsParalyzed()) //chance to be couchlocked if sitting
+ to_chat(affected_mob, "It's too comfy to move...")
+ affected_mob.Paralyze(10 SECONDS)
return ..()
/datum/reagent/drug/nicotine
@@ -80,23 +80,23 @@
mytray.adjust_toxic(round(chems.get_reagent_amount(type)))
mytray.adjust_pestlevel(-rand(1, 2))
-/datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(0.5, delta_time))
var/smoke_message = pick("You feel relaxed.", "You feel calmed.","You feel alert.","You feel rugged.")
- to_chat(M, span_notice("[smoke_message]"))
- M.add_mood_event("smoked", /datum/mood_event/smoked, name)
- M.remove_status_effect(/datum/status_effect/jitter)
- M.AdjustStun(-50 * REM * delta_time)
- M.AdjustKnockdown(-50 * REM * delta_time)
- M.AdjustUnconscious(-50 * REM * delta_time)
- M.AdjustParalyzed(-50 * REM * delta_time)
- M.AdjustImmobilized(-50 * REM * delta_time)
+ to_chat(affected_mob, span_notice("[smoke_message]"))
+ affected_mob.add_mood_event("smoked", /datum/mood_event/smoked, name)
+ affected_mob.remove_status_effect(/datum/status_effect/jitter)
+ affected_mob.AdjustStun(-50 * REM * delta_time)
+ affected_mob.AdjustKnockdown(-50 * REM * delta_time)
+ affected_mob.AdjustUnconscious(-50 * REM * delta_time)
+ affected_mob.AdjustParalyzed(-50 * REM * delta_time)
+ affected_mob.AdjustImmobilized(-50 * REM * delta_time)
..()
. = TRUE
-/datum/reagent/drug/nicotine/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustToxLoss(0.1 * REM * delta_time, 0)
- M.adjustOxyLoss(1.1 * REM * delta_time, 0)
+/datum/reagent/drug/nicotine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(0.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOxyLoss(1.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -111,25 +111,25 @@
addiction_types = list(/datum/addiction/opioids = 18) //7.2 per 2 seconds
-/datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.")
if(DT_PROB(2.5, delta_time))
- to_chat(M, span_notice("[high_message]"))
- M.add_mood_event("smacked out", /datum/mood_event/narcotic_heavy, name)
+ to_chat(affected_mob, span_notice("[high_message]"))
+ affected_mob.add_mood_event("smacked out", /datum/mood_event/narcotic_heavy, name)
if(current_cycle == 35 && creation_purity <= 0.6)
- if(!istype(M.dna.species, /datum/species/human/krokodil_addict))
- to_chat(M, span_userdanger("Your skin falls off easily!"))
- var/mob/living/carbon/human/H = M
- H.facial_hairstyle = "Shaved"
- H.hairstyle = "Bald"
- H.update_body_parts() // makes you loose hair as well
- M.set_species(/datum/species/human/krokodil_addict)
- M.adjustBruteLoss(50 * REM, 0) // holy shit your skin just FELL THE FUCK OFF
+ if(!istype(affected_mob.dna.species, /datum/species/human/krokodil_addict))
+ to_chat(affected_mob, span_userdanger("Your skin falls off easily!"))
+ var/mob/living/carbon/human/affected_human = affected_mob
+ affected_human.facial_hairstyle = "Shaved"
+ affected_human.hairstyle = "Bald"
+ affected_human.update_body_parts() // makes you loose hair as well
+ affected_mob.set_species(/datum/species/human/krokodil_addict)
+ affected_mob.adjustBruteLoss(50 * REM, FALSE, required_bodytype = affected_bodytype) // holy shit your skin just FELL THE FUCK OFF
..()
-/datum/reagent/drug/krokodil/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.25 * REM * delta_time)
- M.adjustToxLoss(0.25 * REM * delta_time, 0)
+/datum/reagent/drug/krokodil/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.25 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjustToxLoss(0.25 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -154,36 +154,36 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine)
..()
-/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/high_message = pick("You feel hyper.", "You feel like you need to go faster.", "You feel like you can run the world.")
if(DT_PROB(2.5, delta_time))
- to_chat(M, span_notice("[high_message]"))
- M.add_mood_event("tweaking", /datum/mood_event/stimulant_medium, name)
- M.AdjustStun(-40 * REM * delta_time)
- M.AdjustKnockdown(-40 * REM * delta_time)
- M.AdjustUnconscious(-40 * REM * delta_time)
- M.AdjustParalyzed(-40 * REM * delta_time)
- M.AdjustImmobilized(-40 * REM * delta_time)
- M.adjustStaminaLoss(-2 * REM * delta_time, 0)
- M.set_jitter_if_lower(4 SECONDS * REM * delta_time)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * delta_time)
+ to_chat(affected_mob, span_notice("[high_message]"))
+ affected_mob.add_mood_event("tweaking", /datum/mood_event/stimulant_medium, name)
+ affected_mob.AdjustStun(-40 * REM * delta_time)
+ affected_mob.AdjustKnockdown(-40 * REM * delta_time)
+ affected_mob.AdjustUnconscious(-40 * REM * delta_time)
+ affected_mob.AdjustParalyzed(-40 * REM * delta_time)
+ affected_mob.AdjustImmobilized(-40 * REM * delta_time)
+ affected_mob.adjustStaminaLoss(-2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.set_jitter_if_lower(4 SECONDS * REM * delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * delta_time, required_organtype = affected_organtype)
if(DT_PROB(2.5, delta_time))
- M.emote(pick("twitch", "shiver"))
+ affected_mob.emote(pick("twitch", "shiver"))
..()
. = TRUE
-/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M, delta_time, times_fired)
- if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !ismovable(M.loc))
+/datum/reagent/drug/methamphetamine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && !ismovable(affected_mob.loc))
for(var/i in 1 to round(4 * REM * delta_time, 1))
- step(M, pick(GLOB.cardinals))
+ step(affected_mob, pick(GLOB.cardinals))
if(DT_PROB(10, delta_time))
- M.emote("laugh")
+ affected_mob.emote("laugh")
if(DT_PROB(18, delta_time))
- M.visible_message(span_danger("[M]'s hands flip out and flail everywhere!"))
- M.drop_all_held_items()
+ affected_mob.visible_message(span_danger("[affected_mob]'s hands flip out and flail everywhere!"))
+ affected_mob.drop_all_held_items()
..()
- M.adjustToxLoss(1 * REM * delta_time, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, (rand(5, 10) / 10) * REM * delta_time)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, (rand(5, 10) / 10) * REM * delta_time, required_organtype = affected_organtype)
. = TRUE
/datum/reagent/drug/bath_salts
@@ -214,29 +214,29 @@
QDEL_NULL(rage)
..()
-/datum/reagent/drug/bath_salts/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/bath_salts/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
if(DT_PROB(2.5, delta_time))
- to_chat(M, span_notice("[high_message]"))
- M.add_mood_event("salted", /datum/mood_event/stimulant_heavy, name)
- M.adjustStaminaLoss(-5 * REM * delta_time, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4 * REM * delta_time)
- M.adjust_hallucinations(10 SECONDS * REM * delta_time)
- if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !ismovable(M.loc))
- step(M, pick(GLOB.cardinals))
- step(M, pick(GLOB.cardinals))
+ to_chat(affected_mob, span_notice("[high_message]"))
+ affected_mob.add_mood_event("salted", /datum/mood_event/stimulant_heavy, name)
+ affected_mob.adjustStaminaLoss(-5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjust_hallucinations(10 SECONDS * REM * delta_time)
+ if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && !ismovable(affected_mob.loc))
+ step(affected_mob, pick(GLOB.cardinals))
+ step(affected_mob, pick(GLOB.cardinals))
..()
. = TRUE
-/datum/reagent/drug/bath_salts/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjust_hallucinations(10 SECONDS * REM * delta_time)
- if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !ismovable(M.loc))
+/datum/reagent/drug/bath_salts/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_hallucinations(10 SECONDS * REM * delta_time)
+ if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && !ismovable(affected_mob.loc))
for(var/i in 1 to round(8 * REM * delta_time, 1))
- step(M, pick(GLOB.cardinals))
+ step(affected_mob, pick(GLOB.cardinals))
if(DT_PROB(10, delta_time))
- M.emote(pick("twitch","drool","moan"))
+ affected_mob.emote(pick("twitch","drool","moan"))
if(DT_PROB(28, delta_time))
- M.drop_all_held_items()
+ affected_mob.drop_all_held_items()
..()
/datum/reagent/drug/aranesp
@@ -247,15 +247,15 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 8)
-/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
if(DT_PROB(2.5, delta_time))
- to_chat(M, span_notice("[high_message]"))
- M.adjustStaminaLoss(-18 * REM * delta_time, 0)
- M.adjustToxLoss(0.5 * REM * delta_time, 0)
+ to_chat(affected_mob, span_notice("[high_message]"))
+ affected_mob.adjustStaminaLoss(-18 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
if(DT_PROB(30, delta_time))
- M.losebreath++
- M.adjustOxyLoss(1, 0)
+ affected_mob.losebreath++
+ affected_mob.adjustOxyLoss(1, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -279,28 +279,28 @@
L.clear_mood_event("happiness_drug")
..()
-/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.remove_status_effect(/datum/status_effect/jitter)
- M.remove_status_effect(/datum/status_effect/confusion)
- M.disgust = 0
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * REM * delta_time)
+/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ 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 * delta_time, required_organtype = affected_organtype)
..()
. = TRUE
-/datum/reagent/drug/happiness/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/drug/happiness/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(16, delta_time))
var/reaction = rand(1,3)
switch(reaction)
if(1)
- M.emote("laugh")
- M.add_mood_event("happiness_drug", /datum/mood_event/happiness_drug_good_od)
+ affected_mob.emote("laugh")
+ affected_mob.add_mood_event("happiness_drug", /datum/mood_event/happiness_drug_good_od)
if(2)
- M.emote("sway")
- M.set_dizzy_if_lower(50 SECONDS)
+ affected_mob.emote("sway")
+ affected_mob.set_dizzy_if_lower(50 SECONDS)
if(3)
- M.emote("frown")
- M.add_mood_event("happiness_drug", /datum/mood_event/happiness_drug_bad_od)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5 * REM * delta_time)
+ 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 * delta_time, required_organtype = affected_organtype)
..()
. = TRUE
@@ -322,31 +322,31 @@
REMOVE_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
..()
-/datum/reagent/drug/pumpup/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+/datum/reagent/drug/pumpup/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
if(DT_PROB(2.5, delta_time))
- to_chat(M, span_notice("[pick("Go! Go! GO!", "You feel ready...", "You feel invincible...")]"))
+ to_chat(affected_mob, span_notice("[pick("Go! Go! GO!", "You feel ready...", "You feel invincible...")]"))
if(DT_PROB(7.5, delta_time))
- M.losebreath++
- M.adjustToxLoss(2, 0)
+ affected_mob.losebreath++
+ affected_mob.adjustToxLoss(2, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
-/datum/reagent/drug/pumpup/overdose_start(mob/living/M)
- to_chat(M, span_userdanger("You can't stop shaking, your heart beats faster and faster..."))
+/datum/reagent/drug/pumpup/overdose_start(mob/living/affected_mob)
+ to_chat(affected_mob, span_userdanger("You can't stop shaking, your heart beats faster and faster..."))
-/datum/reagent/drug/pumpup/overdose_process(mob/living/M, delta_time, times_fired)
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+/datum/reagent/drug/pumpup/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
if(DT_PROB(2.5, delta_time))
- M.drop_all_held_items()
+ affected_mob.drop_all_held_items()
if(DT_PROB(7.5, delta_time))
- M.emote(pick("twitch","drool"))
+ affected_mob.emote(pick("twitch","drool"))
if(DT_PROB(10, delta_time))
- M.losebreath++
- M.adjustStaminaLoss(4, 0)
+ affected_mob.losebreath++
+ affected_mob.adjustStaminaLoss(4, FALSE, required_biotype = affected_biotype)
if(DT_PROB(7.5, delta_time))
- M.adjustToxLoss(2, 0)
+ affected_mob.adjustToxLoss(2, FALSE, required_biotype = affected_biotype)
..()
/datum/reagent/drug/maint
@@ -363,22 +363,22 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/maintenance_drugs = 14)
-/datum/reagent/drug/maint/powder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/maint/powder/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.1 * REM * delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.1 * REM * delta_time, required_organtype = affected_organtype)
// 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)
- M?.mind?.experience_multiplier_reasons |= type
- M?.mind?.experience_multiplier_reasons[type] = amt * REM * delta_time
+ affected_mob?.mind?.experience_multiplier_reasons |= type
+ affected_mob?.mind?.experience_multiplier_reasons[type] = amt * REM * delta_time
-/datum/reagent/drug/maint/powder/on_mob_end_metabolize(mob/living/M)
+/datum/reagent/drug/maint/powder/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
- M?.mind?.experience_multiplier_reasons[type] = null
- M?.mind?.experience_multiplier_reasons -= type
+ affected_mob?.mind?.experience_multiplier_reasons[type] = null
+ affected_mob?.mind?.experience_multiplier_reasons -= type
-/datum/reagent/drug/maint/powder/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/drug/maint/powder/overdose_process(mob/living/affected_mob, delta_time, times_fired)
. = ..()
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 6 * REM * delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 6 * REM * delta_time, required_organtype = affected_organtype)
/datum/reagent/drug/maint/sludge
name = "Maintenance Sludge"
@@ -395,23 +395,23 @@
. = ..()
ADD_TRAIT(L,TRAIT_HARDLY_WOUNDED,type)
-/datum/reagent/drug/maint/sludge/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/maint/sludge/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- M.adjustToxLoss(0.5 * REM * delta_time)
+ affected_mob.adjustToxLoss(0.5 * REM * delta_time, required_biotype = affected_biotype)
-/datum/reagent/drug/maint/sludge/on_mob_end_metabolize(mob/living/M)
+/datum/reagent/drug/maint/sludge/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
- REMOVE_TRAIT(M,TRAIT_HARDLY_WOUNDED,type)
+ REMOVE_TRAIT(affected_mob, TRAIT_HARDLY_WOUNDED,type)
-/datum/reagent/drug/maint/sludge/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/drug/maint/sludge/overdose_process(mob/living/affected_mob, delta_time, times_fired)
. = ..()
- if(!iscarbon(M))
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbie = M
+ var/mob/living/carbon/carbie = affected_mob
//You will be vomiting so the damage is really for a few ticks before you flush it out of your system
- carbie.adjustToxLoss(1 * REM * delta_time)
+ carbie.adjustToxLoss(1 * REM * delta_time, required_biotype = affected_biotype)
if(DT_PROB(5, delta_time))
- carbie.adjustToxLoss(5)
+ carbie.adjustToxLoss(5, required_biotype = affected_biotype)
carbie.vomit()
/datum/reagent/drug/maint/tar
@@ -423,21 +423,21 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/maintenance_drugs = 5)
-/datum/reagent/drug/maint/tar/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/drug/maint/tar/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- M.AdjustStun(-10 * REM * delta_time)
- M.AdjustKnockdown(-10 * REM * delta_time)
- M.AdjustUnconscious(-10 * REM * delta_time)
- M.AdjustParalyzed(-10 * REM * delta_time)
- M.AdjustImmobilized(-10 * REM * delta_time)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * delta_time)
+ affected_mob.AdjustStun(-10 * REM * delta_time)
+ affected_mob.AdjustKnockdown(-10 * REM * delta_time)
+ affected_mob.AdjustUnconscious(-10 * REM * delta_time)
+ affected_mob.AdjustParalyzed(-10 * REM * delta_time)
+ affected_mob.AdjustImmobilized(-10 * REM * delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5 * REM * delta_time, required_organtype = affected_organtype)
-/datum/reagent/drug/maint/tar/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/drug/maint/tar/overdose_process(mob/living/affected_mob, delta_time, times_fired)
. = ..()
- M.adjustToxLoss(5 * REM * delta_time)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 3 * REM * delta_time)
+ affected_mob.adjustToxLoss(5 * REM * delta_time, required_biotype = affected_biotype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 3 * REM * delta_time, required_organtype = affected_organtype)
/datum/reagent/drug/mushroomhallucinogen
name = "Mushroom Hallucinogen"
@@ -578,7 +578,7 @@
/datum/reagent/drug/blastoff/on_mob_life(mob/living/carbon/dancer, delta_time, times_fired)
. = ..()
- dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * delta_time)
+ dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * delta_time, required_organtype = affected_organtype)
dancer.AdjustKnockdown(-20)
if(DT_PROB(BLASTOFF_DANCE_MOVE_CHANCE_PER_UNIT * volume, delta_time))
@@ -586,7 +586,7 @@
/datum/reagent/drug/blastoff/overdose_process(mob/living/dancer, delta_time, times_fired)
. = ..()
- dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * delta_time)
+ dancer.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.3 * REM * delta_time, required_organtype = affected_organtype)
if(DT_PROB(BLASTOFF_DANCE_MOVE_CHANCE_PER_UNIT * volume, delta_time))
dancer.emote("spin")
@@ -649,7 +649,7 @@
/datum/reagent/drug/saturnx/on_mob_life(mob/living/carbon/invisible_man, delta_time, times_fired)
. = ..()
- invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * delta_time)
+ invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3 * REM * delta_time, required_organtype = affected_organtype)
/datum/reagent/drug/saturnx/on_mob_metabolize(mob/living/invisible_man)
. = ..()
@@ -734,7 +734,7 @@
invisible_man.emote("giggle")
if(DT_PROB(5, delta_time))
invisible_man.emote("laugh")
- invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.4 * REM * delta_time)
+ invisible_man.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.4 * REM * delta_time, required_organtype = affected_organtype)
/datum/reagent/drug/kronkaine
name = "Kronkaine"
@@ -769,7 +769,7 @@
/datum/reagent/drug/kronkaine/on_mob_life(mob/living/carbon/kronkaine_fiend, delta_time, times_fired)
. = ..()
kronkaine_fiend.add_mood_event("tweaking", /datum/mood_event/stimulant_medium, name)
- kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 0.4 * REM * delta_time)
+ kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 0.4 * REM * delta_time, required_organtype = affected_organtype)
kronkaine_fiend.set_jitter_if_lower(20 SECONDS * REM * delta_time)
kronkaine_fiend.AdjustSleeping(-20 * REM * delta_time)
kronkaine_fiend.adjust_drowsyness(-5 * REM * delta_time)
@@ -782,7 +782,7 @@
/datum/reagent/drug/kronkaine/overdose_process(mob/living/kronkaine_fiend, delta_time, times_fired)
. = ..()
- kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 1 * REM * delta_time)
+ kronkaine_fiend.adjustOrganLoss(ORGAN_SLOT_HEART, 1 * REM * delta_time, required_organtype = affected_organtype)
kronkaine_fiend.set_jitter_if_lower(20 SECONDS * REM * delta_time)
if(DT_PROB(10, delta_time))
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/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm
index 33f3df5ab1b..d79496ab01e 100644
--- a/code/modules/reagents/chemistry/reagents/food_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm
@@ -66,7 +66,7 @@
/datum/reagent/consumable/nutriment/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(DT_PROB(30, delta_time))
- M.heal_bodypart_damage(brute = brute_heal, burn = burn_heal, updating_health = FALSE, required_status = BODYTYPE_ORGANIC)
+ M.heal_bodypart_damage(brute = brute_heal, burn = burn_heal, updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC)
. = TRUE
..()
@@ -680,10 +680,10 @@
/datum/reagent/consumable/honey/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
holder.add_reagent(/datum/reagent/consumable/sugar, 3 * REM * delta_time)
if(DT_PROB(33, delta_time))
- M.adjustBruteLoss(-1, 0)
- M.adjustFireLoss(-1, 0)
- M.adjustOxyLoss(-1, 0)
- M.adjustToxLoss(-1, 0)
+ M.adjustBruteLoss(-1, FALSE, required_bodytype = affected_bodytype)
+ M.adjustFireLoss(-1, FALSE, required_bodytype = affected_bodytype)
+ M.adjustOxyLoss(-1, FALSE, required_biotype = affected_biotype)
+ M.adjustToxLoss(-1, FALSE, required_biotype = affected_biotype)
..()
/datum/reagent/consumable/honey/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -746,9 +746,9 @@
. = TRUE
if(DT_PROB(10, delta_time))
M.losebreath += 4
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM, 150)
- M.adjustToxLoss(3*REM,0)
- M.adjustStaminaLoss(10*REM,0)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM, 150, affected_biotype)
+ M.adjustToxLoss(3*REM, FALSE, required_biotype = affected_biotype)
+ M.adjustStaminaLoss(10*REM, FALSE, required_biotype = affected_biotype)
M.blur_eyes(5)
. = TRUE
..()
@@ -799,8 +799,8 @@
/datum/reagent/consumable/vitfro/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(DT_PROB(55, delta_time))
- M.adjustBruteLoss(-1, 0)
- M.adjustFireLoss(-1, 0)
+ M.adjustBruteLoss(-1, FALSE, required_bodytype = affected_bodytype)
+ M.adjustFireLoss(-1, FALSE, required_bodytype = affected_bodytype)
. = TRUE
..()
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
index ab0f50e1f57..f19852415bd 100644
--- a/code/modules/reagents/chemistry/reagents/impure_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
@@ -14,12 +14,12 @@
metabolization_rate = 0.1 * REM //default impurity is 0.75, so we get 25% converted. Default metabolisation rate is 0.4, so we're 4 times slower.
var/liver_damage = 0.5
-/datum/reagent/impurity/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- var/obj/item/organ/internal/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
+/datum/reagent/impurity/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ var/obj/item/organ/internal/liver/L = affected_mob.getorganslot(ORGAN_SLOT_LIVER)
if(!L)//Though, lets be safe
- C.adjustToxLoss(1 * REM * delta_time, FALSE)//Incase of no liver!
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)//Incase of no liver!
return ..()
- C.adjustOrganLoss(ORGAN_SLOT_LIVER, liver_damage * REM * delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, liver_damage * REM * delta_time, required_organtype = affected_organtype)
return ..()
//Basically just so people don't forget to adjust metabolization_rate
@@ -34,8 +34,8 @@
var/tox_damage = 1
-/datum/reagent/inverse/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- C.adjustToxLoss(tox_damage * REM * delta_time, FALSE)
+/datum/reagent/inverse/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(tox_damage * REM * delta_time, FALSE, required_biotype = affected_biotype)
return ..()
//Failed chems - generally use inverse if you want to use a impure subtype for it
@@ -59,11 +59,11 @@
ph = 3.3
chemical_flags = REAGENT_DONOTSPLIT
-/datum/reagent/impurity/eigenswap/on_mob_life(mob/living/carbon/carbon_mob)
+/datum/reagent/impurity/eigenswap/on_mob_life(mob/living/carbon/affected_mob)
. = ..()
if(!prob(creation_purity * 100))
return
- var/list/cached_hand_items = carbon_mob.held_items
+ var/list/cached_hand_items = affected_mob.held_items
var/index = 1
for(var/thing in cached_hand_items)
index++
@@ -71,8 +71,8 @@
index = 1
if(!thing)
continue
- carbon_mob.put_in_hand(thing, index, forced = TRUE, ignore_anim = TRUE)
- playsound(carbon_mob, 'sound/effects/phasein.ogg', 20, TRUE)
+ affected_mob.put_in_hand(thing, index, forced = TRUE, ignore_anim = TRUE)
+ playsound(affected_mob, 'sound/effects/phasein.ogg', 20, TRUE)
/*
* Freezes the player in a block of ice, 1s = 1u
* Will be removed when the required reagent is removed too
@@ -94,25 +94,25 @@
var/obj/structure/ice_stasis/cube
var/atom/movable/screen/alert/status_effect/freon/cryostylane_alert
-/datum/reagent/inverse/cryostylane/on_mob_add(mob/living/carbon/owner, amount)
- cube = new /obj/structure/ice_stasis(get_turf(owner))
+/datum/reagent/inverse/cryostylane/on_mob_add(mob/living/carbon/affected_mob, amount)
+ cube = new /obj/structure/ice_stasis(get_turf(affected_mob))
cube.color = COLOR_CYAN
cube.set_anchored(TRUE)
- owner.forceMove(cube)
- owner.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_CHEMICAL_EFFECT)
- cryostylane_alert = owner.throw_alert("cryostylane_alert", /atom/movable/screen/alert/status_effect/freon/cryostylane)
+ affected_mob.forceMove(cube)
+ affected_mob.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_CHEMICAL_EFFECT)
+ cryostylane_alert = affected_mob.throw_alert("cryostylane_alert", /atom/movable/screen/alert/status_effect/freon/cryostylane)
cryostylane_alert.attached_effect = src //so the alert can reference us, if it needs to
..()
-/datum/reagent/inverse/cryostylane/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
- if(!cube || owner.loc != cube)
- owner.reagents.remove_reagent(type, volume) //remove it all if we're past 60s
+/datum/reagent/inverse/cryostylane/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(!cube || affected_mob.loc != cube)
+ affected_mob.reagents.remove_reagent(type, volume) //remove it all if we're past 60s
if(current_cycle > 60)
metabolization_rate += 0.01
..()
-/datum/reagent/inverse/cryostylane/on_mob_delete(mob/living/carbon/owner, amount)
+/datum/reagent/inverse/cryostylane/on_mob_delete(mob/living/carbon/affected_mob, amount)
QDEL_NULL(cube)
- owner.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_CHEMICAL_EFFECT)
- owner.clear_alert("cryostylane_alert")
+ affected_mob.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_CHEMICAL_EFFECT)
+ affected_mob.clear_alert("cryostylane_alert")
..()
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 7fad8b71a93..29f4a1704d6 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
@@ -37,13 +37,13 @@
var/pick = pick("brute", "burn", "tox", "oxy")
switch(pick)
if("brute")
- owner.adjustBruteLoss(-0.5)
+ owner.adjustBruteLoss(-0.5, required_bodytype = affected_bodytype)
if("burn")
- owner.adjustFireLoss(-0.5)
+ owner.adjustFireLoss(-0.5, required_bodytype = affected_bodytype)
if("tox")
- owner.adjustToxLoss(-0.5)
+ owner.adjustToxLoss(-0.5, required_biotype = affected_biotype)
if("oxy")
- owner.adjustOxyLoss(-0.5)
+ owner.adjustOxyLoss(-0.5, required_biotype = affected_biotype)
..()
// C2 medications
@@ -297,7 +297,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
/datum/reagent/inverse/hercuri/overdose_process(mob/living/carbon/owner, delta_time, times_fired)
. = ..()
- owner.adjustOrganLoss(ORGAN_SLOT_LIVER, 2 * REM * delta_time) //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 * delta_time, 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)
var/heating = 10 * creation_purity * REM * delta_time * TEMPERATURE_DAMAGE_COEFFICIENT
owner.adjust_bodytemperature(heating) //hot hot
if(ishuman(owner))
@@ -440,7 +440,7 @@ Basically, we fill the time between now and 2s from now with hands based off the
time_until_next_poison -= delta_time * (1 SECONDS)
if (time_until_next_poison <= 0)
time_until_next_poison = poison_interval
- owner.adjustToxLoss(creation_purity * 1)
+ owner.adjustToxLoss(creation_purity * 1, required_biotype = affected_biotype)
..()
@@ -454,11 +454,11 @@ Basically, we fill the time between now and 2s from now with hands based off the
var/cached_reagent_list = list()
addiction_types = list(/datum/addiction/medicine = 1.75)
-/datum/reagent/inverse/healing/syriniver/on_mob_add(mob/living/living_mob)
- if(!(iscarbon(living_mob)))
+/datum/reagent/inverse/healing/syriniver/on_mob_add(mob/living/affected_mob)
+ if(!(iscarbon(affected_mob)))
return ..()
- var/mob/living/carbon/owner = living_mob
- for(var/datum/reagent/reagent as anything in owner.reagents.reagent_list)
+ var/mob/living/carbon/affected_carbon = affected_mob
+ for(var/datum/reagent/reagent as anything in affected_carbon.reagents.reagent_list)
if(reagent in cached_reagent_list)
continue
if(istype(reagent, /datum/reagent/medicine))
@@ -467,9 +467,9 @@ Basically, we fill the time between now and 2s from now with hands based off the
cached_reagent_list += reagent
..()
-/datum/reagent/inverse/healing/syriniver/on_mob_delete(mob/living/living_mob)
+/datum/reagent/inverse/healing/syriniver/on_mob_delete(mob/living/affected_mob)
. = ..()
- if(!(iscarbon(living_mob)))
+ if(!(iscarbon(affected_mob)))
return
if(!cached_reagent_list)
return
@@ -489,11 +489,11 @@ Basically, we fill the time between now and 2s from now with hands based off the
addiction_types = list(/datum/addiction/medicine = 3.5)
//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/owner, delta_time, times_fired)
- if(length(owner.reagents.reagent_list) > 1)
- owner.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * delta_time) //Hey! It's everyone's favourite drawback from multiver!
+/datum/reagent/inverse/healing/monover/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(length(affected_mob.reagents.reagent_list) > 1)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * delta_time, required_organtype = affected_organtype) //Hey! It's everyone's favourite drawback from multiver!
return ..()
- owner.adjustToxLoss(-2 * REM * creation_purity * delta_time, 0)
+ affected_mob.adjustToxLoss(-2 * REM * creation_purity * delta_time, FALSE, required_biotype = affected_biotype)
..()
return TRUE
@@ -514,81 +514,81 @@ Basically, we fill the time between now and 2s from now with hands based off the
///If we brought someone back from the dead
var/back_from_the_dead = FALSE
-/datum/reagent/inverse/penthrite/on_mob_dead(mob/living/carbon/owner, delta_time)
- var/obj/item/organ/internal/heart/heart = owner.getorganslot(ORGAN_SLOT_HEART)
+/datum/reagent/inverse/penthrite/on_mob_dead(mob/living/carbon/affected_mob, delta_time)
+ var/obj/item/organ/internal/heart/heart = affected_mob.getorganslot(ORGAN_SLOT_HEART)
if(!heart || heart.organ_flags & ORGAN_FAILING)
return ..()
metabolization_rate = 0.2 * REM
- ADD_TRAIT(owner, TRAIT_STABLEHEART, type)
- ADD_TRAIT(owner, TRAIT_NOHARDCRIT, type)
- ADD_TRAIT(owner, TRAIT_NOSOFTCRIT, type)
- ADD_TRAIT(owner, TRAIT_NOCRITDAMAGE, type)
- ADD_TRAIT(owner, TRAIT_NODEATH, type)
- ADD_TRAIT(owner, TRAIT_NOCRITOVERLAY, type)
- owner.set_stat(CONSCIOUS) //This doesn't touch knocked out
- owner.updatehealth()
- owner.update_sight()
- REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, STAT_TRAIT)
- REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, CRIT_HEALTH_TRAIT) //Because these are normally updated using set_health() - but we don't want to adjust health, and the addition of NOHARDCRIT blocks it being added after, but doesn't remove it if it was added before
- REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT) //Prevents the user from being knocked out by oxyloss
- owner.set_resting(FALSE)//Please get up, no one wants a deaththrows juggernaught that lies on the floor all the time
- owner.SetAllImmobility(0)
+ ADD_TRAIT(affected_mob, TRAIT_STABLEHEART, type)
+ ADD_TRAIT(affected_mob, TRAIT_NOHARDCRIT, type)
+ ADD_TRAIT(affected_mob, TRAIT_NOSOFTCRIT, type)
+ ADD_TRAIT(affected_mob, TRAIT_NOCRITDAMAGE, type)
+ ADD_TRAIT(affected_mob, TRAIT_NODEATH, type)
+ ADD_TRAIT(affected_mob, TRAIT_NOCRITOVERLAY, type)
+ affected_mob.set_stat(CONSCIOUS) //This doesn't touch knocked out
+ affected_mob.updatehealth()
+ affected_mob.update_sight()
+ REMOVE_TRAIT(affected_mob, TRAIT_KNOCKEDOUT, STAT_TRAIT)
+ REMOVE_TRAIT(affected_mob, TRAIT_KNOCKEDOUT, CRIT_HEALTH_TRAIT) //Because these are normally updated using set_health() - but we don't want to adjust health, and the addition of NOHARDCRIT blocks it being added after, but doesn't remove it if it was added before
+ REMOVE_TRAIT(affected_mob, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT) //Prevents the user from being knocked out by oxyloss
+ affected_mob.set_resting(FALSE)//Please get up, no one wants a deaththrows juggernaught that lies on the floor all the time
+ affected_mob.SetAllImmobility(0)
back_from_the_dead = TRUE
- owner.emote("gasp")
- owner.playsound_local(owner, 'sound/health/fastbeat.ogg', 65)
+ affected_mob.emote("gasp")
+ affected_mob.playsound_local(affected_mob, 'sound/health/fastbeat.ogg', 65)
..()
-/datum/reagent/inverse/penthrite/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
+/datum/reagent/inverse/penthrite/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(!back_from_the_dead)
return ..()
//Following is for those brought back from the dead only
- REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, CRIT_HEALTH_TRAIT)
- REMOVE_TRAIT(owner, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
- for(var/datum/wound/iter_wound as anything in owner.all_wounds)
+ REMOVE_TRAIT(affected_mob, TRAIT_KNOCKEDOUT, CRIT_HEALTH_TRAIT)
+ REMOVE_TRAIT(affected_mob, TRAIT_KNOCKEDOUT, OXYLOSS_TRAIT)
+ for(var/datum/wound/iter_wound as anything in affected_mob.all_wounds)
iter_wound.adjust_blood_flow(1-creation_purity)
- owner.adjustBruteLoss(5 * (1-creation_purity) * delta_time)
- owner.adjustOrganLoss(ORGAN_SLOT_HEART, (1 + (1-creation_purity)) * delta_time)
- if(owner.health < HEALTH_THRESHOLD_CRIT)
- owner.add_movespeed_modifier(/datum/movespeed_modifier/reagent/nooartrium)
- if(owner.health < HEALTH_THRESHOLD_FULLCRIT)
- owner.add_actionspeed_modifier(/datum/actionspeed_modifier/nooartrium)
- var/obj/item/organ/internal/heart/heart = owner.getorganslot(ORGAN_SLOT_HEART)
+ affected_mob.adjustBruteLoss(5 * (1-creation_purity) * delta_time, required_bodytype = affected_bodytype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, (1 + (1-creation_purity)) * delta_time, required_organtype = affected_organtype)
+ if(affected_mob.health < HEALTH_THRESHOLD_CRIT)
+ affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/nooartrium)
+ if(affected_mob.health < HEALTH_THRESHOLD_FULLCRIT)
+ affected_mob.add_actionspeed_modifier(/datum/actionspeed_modifier/nooartrium)
+ var/obj/item/organ/internal/heart/heart = affected_mob.getorganslot(ORGAN_SLOT_HEART)
if(!heart || heart.organ_flags & ORGAN_FAILING)
- remove_buffs(owner)
+ remove_buffs(affected_mob)
..()
-/datum/reagent/inverse/penthrite/on_mob_delete(mob/living/carbon/owner)
- remove_buffs(owner)
- var/obj/item/organ/internal/heart/heart = owner.getorganslot(ORGAN_SLOT_HEART)
- if(owner.health < -500 || heart.organ_flags & ORGAN_FAILING)//Honestly commendable if you get -500
- explosion(owner, light_impact_range = 1, explosion_cause = src)
+/datum/reagent/inverse/penthrite/on_mob_delete(mob/living/carbon/affected_mob)
+ remove_buffs(affected_mob)
+ var/obj/item/organ/internal/heart/heart = affected_mob.getorganslot(ORGAN_SLOT_HEART)
+ if(affected_mob.health < -500 || heart.organ_flags & ORGAN_FAILING)//Honestly commendable if you get -500
+ explosion(affected_mob, light_impact_range = 1, explosion_cause = src)
qdel(heart)
- owner.visible_message(span_boldwarning("[owner]'s heart explodes!"))
+ affected_mob.visible_message(span_boldwarning("[affected_mob]'s heart explodes!"))
return ..()
-/datum/reagent/inverse/penthrite/overdose_start(mob/living/carbon/owner)
+/datum/reagent/inverse/penthrite/overdose_start(mob/living/carbon/affected_mob)
if(!back_from_the_dead)
return ..()
- var/obj/item/organ/internal/heart/heart = owner.getorganslot(ORGAN_SLOT_HEART)
+ var/obj/item/organ/internal/heart/heart = affected_mob.getorganslot(ORGAN_SLOT_HEART)
if(!heart) //No heart? No life!
- REMOVE_TRAIT(owner, TRAIT_NODEATH, type)
- owner.stat = DEAD
+ REMOVE_TRAIT(affected_mob, TRAIT_NODEATH, type)
+ affected_mob.stat = DEAD
return ..()
- explosion(owner, light_impact_range = 1, explosion_cause = src)
+ explosion(affected_mob, light_impact_range = 1, explosion_cause = src)
qdel(heart)
- owner.visible_message(span_boldwarning("[owner]'s heart explodes!"))
+ affected_mob.visible_message(span_boldwarning("[affected_mob]'s heart explodes!"))
return..()
-/datum/reagent/inverse/penthrite/proc/remove_buffs(mob/living/carbon/owner)
- REMOVE_TRAIT(owner, TRAIT_STABLEHEART, type)
- REMOVE_TRAIT(owner, TRAIT_NOHARDCRIT, type)
- REMOVE_TRAIT(owner, TRAIT_NOSOFTCRIT, type)
- REMOVE_TRAIT(owner, TRAIT_NOCRITDAMAGE, type)
- REMOVE_TRAIT(owner, TRAIT_NODEATH, type)
- REMOVE_TRAIT(owner, TRAIT_NOCRITOVERLAY, type)
- owner.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/nooartrium)
- owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/nooartrium)
- owner.update_sight()
+/datum/reagent/inverse/penthrite/proc/remove_buffs(mob/living/carbon/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_STABLEHEART, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_NOHARDCRIT, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_NOSOFTCRIT, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_NOCRITDAMAGE, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_NODEATH, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_NOCRITOVERLAY, type)
+ affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/nooartrium)
+ affected_mob.remove_actionspeed_modifier(/datum/actionspeed_modifier/nooartrium)
+ affected_mob.update_sight()
/* Non c2 medicines */
@@ -599,15 +599,15 @@ Basically, we fill the time between now and 2s from now with hands based off the
addiction_types = list(/datum/addiction/medicine = 5)
ph = 12.4
liver_damage = 0
- ///The speech we're forcing on the owner
+ ///The speech we're forcing on the affected mob
var/speech_option
-/datum/reagent/impurity/mannitol/on_mob_add(mob/living/owner, amount)
+/datum/reagent/impurity/mannitol/on_mob_add(mob/living/affected_mob, amount)
. = ..()
- if(!iscarbon(owner))
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbon = owner
- if(!carbon.dna)
+ var/mob/living/carbon/affected_carbon = affected_mob
+ if(!affected_carbon.dna)
return
var/list/speech_options = list(
/datum/mutation/human/swedish,
@@ -621,17 +621,17 @@ Basically, we fill the time between now and 2s from now with hands based off the
)
speech_options = shuffle(speech_options)
for(var/option in speech_options)
- if(carbon.dna.get_mutation(option))
+ if(affected_carbon.dna.get_mutation(option))
continue
- carbon.dna.add_mutation(option)
+ affected_carbon.dna.add_mutation(option)
speech_option = option
return
-/datum/reagent/impurity/mannitol/on_mob_delete(mob/living/owner)
+/datum/reagent/impurity/mannitol/on_mob_delete(mob/living/affected_mob)
. = ..()
- if(!iscarbon(owner))
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbon = owner
+ var/mob/living/carbon/carbon = affected_mob
carbon.dna?.remove_mutation(speech_option)
/datum/reagent/inverse/neurine
@@ -642,10 +642,10 @@ Basically, we fill the time between now and 2s from now with hands based off the
addiction_types = list(/datum/addiction/medicine = 8)
metabolization_rate = 0.025 * REM
tox_damage = 0
- //The temporary trauma passed to the owner
+ //The temporary trauma passed to the affected mob
var/datum/brain_trauma/temp_trauma
-/datum/reagent/inverse/neurine/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
+/datum/reagent/inverse/neurine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
.=..()
if(temp_trauma)
return
@@ -660,20 +660,20 @@ Basically, we fill the time between now and 2s from now with hands based off the
forbiddentraumas += typesof(/datum/brain_trauma/very_special)
// SKYRAT EDIT END
traumalist -= forbiddentraumas
- var/obj/item/organ/internal/brain/brain = owner.getorganslot(ORGAN_SLOT_BRAIN)
+ var/obj/item/organ/internal/brain/brain = affected_mob.getorganslot(ORGAN_SLOT_BRAIN)
traumalist = shuffle(traumalist)
for(var/trauma in traumalist)
if(brain.brain_gain_trauma(trauma, TRAUMA_RESILIENCE_MAGIC))
temp_trauma = trauma
return
-/datum/reagent/inverse/neurine/on_mob_delete(mob/living/carbon/owner)
+/datum/reagent/inverse/neurine/on_mob_delete(mob/living/carbon/affected_mob)
.=..()
if(!temp_trauma)
return
if(istype(temp_trauma, /datum/brain_trauma/special/imaginary_friend))//Good friends stay by you, no matter what
return
- owner.cure_trauma_type(temp_trauma, resilience = TRAUMA_RESILIENCE_MAGIC)
+ affected_mob.cure_trauma_type(temp_trauma, resilience = TRAUMA_RESILIENCE_MAGIC)
/datum/reagent/inverse/corazargh
name = "Corazargh" //It's what you yell! Though, if you've a better name feel free. Also an omage to an older chem
@@ -691,11 +691,11 @@ Basically, we fill the time between now and 2s from now with hands based off the
var/obj/item/organ/internal/heart/cursed/manual_heart
///Creates a new cursed heart and puts the old inside of it, then replaces the position of the old
-/datum/reagent/inverse/corazargh/on_mob_metabolize(mob/living/owner)
- if(!iscarbon(owner))
+/datum/reagent/inverse/corazargh/on_mob_metabolize(mob/living/affected_mob)
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbon_mob = owner
- original_heart = owner.getorganslot(ORGAN_SLOT_HEART)
+ var/mob/living/carbon/carbon_mob = affected_mob
+ original_heart = affected_mob.getorganslot(ORGAN_SLOT_HEART)
if(!original_heart)
return
manual_heart = new(null, src)
@@ -706,22 +706,22 @@ Basically, we fill the time between now and 2s from now with hands based off the
//these last so instert doesn't call them
RegisterSignal(carbon_mob, COMSIG_CARBON_GAIN_ORGAN, PROC_REF(on_gained_organ))
RegisterSignal(carbon_mob, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_removed_organ))
- to_chat(owner, span_userdanger("You feel your heart suddenly stop beating on it's own - you'll have to manually beat it!"))
+ to_chat(affected_mob, span_userdanger("You feel your heart suddenly stop beating on it's own - you'll have to manually beat it!"))
..()
///Intercepts the new heart and creates a new cursed heart - putting the old inside of it
-/datum/reagent/inverse/corazargh/proc/on_gained_organ(mob/owner, obj/item/organ/organ)
+/datum/reagent/inverse/corazargh/proc/on_gained_organ(mob/affected_mob, obj/item/organ/organ)
SIGNAL_HANDLER
if(!istype(organ, /obj/item/organ/internal/heart))
return
- var/mob/living/carbon/carbon_mob = owner
+ var/mob/living/carbon/affected_carbon = affected_mob
original_heart = organ
- original_heart.Remove(carbon_mob, special = TRUE)
+ original_heart.Remove(affected_carbon, special = TRUE)
original_heart.forceMove(manual_heart)
original_heart.organ_flags |= ORGAN_FROZEN //Not actually frozen, but we want to pause decay
if(!manual_heart)
manual_heart = new(null, src)
- manual_heart.Insert(carbon_mob, special = TRUE)
+ manual_heart.Insert(affected_carbon, special = TRUE)
///If we're ejecting out the organ - replace it with the original
/datum/reagent/inverse/corazargh/proc/on_removed_organ(mob/prev_owner, obj/item/organ/organ)
@@ -733,18 +733,18 @@ Basically, we fill the time between now and 2s from now with hands based off the
qdel(organ)
///We're done - remove the curse and restore the old one
-/datum/reagent/inverse/corazargh/on_mob_end_metabolize(mob/living/owner)
+/datum/reagent/inverse/corazargh/on_mob_end_metabolize(mob/living/affected_mob)
//Do these first so Insert doesn't call them
- UnregisterSignal(owner, COMSIG_CARBON_LOSE_ORGAN)
- UnregisterSignal(owner, COMSIG_CARBON_GAIN_ORGAN)
- if(!iscarbon(owner))
+ UnregisterSignal(affected_mob, COMSIG_CARBON_LOSE_ORGAN)
+ UnregisterSignal(affected_mob, COMSIG_CARBON_GAIN_ORGAN)
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbon_mob = owner
+ var/mob/living/carbon/affected_carbon = affected_mob
if(original_heart) //Mostly a just in case
original_heart.organ_flags &= ~ORGAN_FROZEN //enable decay again
- original_heart.Insert(carbon_mob, special = TRUE)
+ original_heart.Insert(affected_carbon, special = TRUE)
qdel(manual_heart)
- to_chat(owner, span_userdanger("You feel your heart start beating normally again!"))
+ to_chat(affected_mob, span_userdanger("You feel your heart start beating normally again!"))
..()
/datum/reagent/inverse/antihol
@@ -776,19 +776,19 @@ Basically, we fill the time between now and 2s from now with hands based off the
///Did we get a headache?
var/headache = FALSE
-/datum/reagent/inverse/oculine/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
+/datum/reagent/inverse/oculine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(headache)
return ..()
if(DT_PROB(100*(1-creation_purity), delta_time))
- owner.become_blind(IMPURE_OCULINE)
- to_chat(owner, span_danger("You suddenly develop a pounding headache as your vision fluxuates."))
+ affected_mob.become_blind(IMPURE_OCULINE)
+ to_chat(affected_mob, span_danger("You suddenly develop a pounding headache as your vision fluxuates."))
headache = TRUE
..()
-/datum/reagent/inverse/oculine/on_mob_end_metabolize(mob/living/owner)
- owner.cure_blind(IMPURE_OCULINE)
+/datum/reagent/inverse/oculine/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.cure_blind(IMPURE_OCULINE)
if(headache)
- to_chat(owner, span_notice("Your headache clears up!"))
+ to_chat(affected_mob, span_notice("Your headache clears up!"))
..()
/datum/reagent/impurity/inacusiate
@@ -804,15 +804,15 @@ Basically, we fill the time between now and 2s from now with hands based off the
///The random span we start hearing in
var/randomSpan
-/datum/reagent/impurity/inacusiate/on_mob_metabolize(mob/living/owner, delta_time, times_fired)
+/datum/reagent/impurity/inacusiate/on_mob_metabolize(mob/living/affected_mob, delta_time, times_fired)
randomSpan = pick(list("clown", "small", "big", "hypnophrase", "alien", "cult", "alert", "danger", "emote", "yell", "brass", "sans", "papyrus", "robot", "his_grace", "phobia"))
- RegisterSignal(owner, COMSIG_MOVABLE_HEAR, PROC_REF(owner_hear))
- to_chat(owner, span_warning("Your hearing seems to be a bit off!"))
+ RegisterSignal(affected_mob, COMSIG_MOVABLE_HEAR, PROC_REF(owner_hear))
+ to_chat(affected_mob, span_warning("Your hearing seems to be a bit off!"))
..()
-/datum/reagent/impurity/inacusiate/on_mob_end_metabolize(mob/living/owner)
- UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
- to_chat(owner, span_notice("You start hearing things normally again."))
+/datum/reagent/impurity/inacusiate/on_mob_end_metabolize(mob/living/affected_mob)
+ UnregisterSignal(affected_mob, COMSIG_MOVABLE_HEAR)
+ to_chat(affected_mob, span_notice("You start hearing things normally again."))
..()
/datum/reagent/impurity/inacusiate/proc/owner_hear(mob/living/owner, list/hearing_args)
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 48e8def6285..a6d5224d6c2 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
@@ -32,7 +32,7 @@
var/obj/item/organ/internal/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
if(!eyes)
return ..()
- eyes.applyOrganDamage(0.5 * REM * delta_time)
+ eyes.applyOrganDamage(0.5 * REM * delta_time, required_organtype = affected_organtype)
..()
@@ -46,7 +46,7 @@
liver_damage = 0
/datum/reagent/impurity/chloralax/on_mob_life(mob/living/carbon/owner, delta_time)
- owner.adjustToxLoss(1 * REM * delta_time, 0)
+ owner.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 0890b11878b..e638dc708fa 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -9,11 +9,11 @@
/datum/reagent/medicine
taste_description = "bitterness"
-/datum/reagent/medicine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
current_cycle++
if(length(reagent_removal_skip_list))
return
- holder.remove_reagent(type, metabolization_rate * delta_time / M.metabolism_efficiency) //medicine reagents stay longer if you have a better metabolism
+ holder.remove_reagent(type, metabolization_rate * delta_time / affected_mob.metabolism_efficiency) //medicine reagents stay longer if you have a better metabolism
/datum/reagent/medicine/leporazine
name = "Leporazine"
@@ -22,18 +22,18 @@
color = "#DB90C6"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/leporazine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- var/target_temp = M.get_body_temp_normal(apply_change=FALSE)
- if(M.bodytemperature > target_temp)
- M.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, target_temp)
- else if(M.bodytemperature < (target_temp + 1))
- M.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, target_temp)
- if(ishuman(M))
- var/mob/living/carbon/human/humi = M
- if(humi.coretemperature > target_temp)
- humi.adjust_coretemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, target_temp)
- else if(humi.coretemperature < (target_temp + 1))
- humi.adjust_coretemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, target_temp)
+/datum/reagent/medicine/leporazine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ var/target_temp = affected_mob.get_body_temp_normal(apply_change = FALSE)
+ if(affected_mob.bodytemperature > target_temp)
+ affected_mob.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, target_temp)
+ else if(affected_mob.bodytemperature < (target_temp + 1))
+ affected_mob.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, target_temp)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/affected_human = affected_mob
+ if(affected_human.coretemperature > target_temp)
+ affected_human.adjust_coretemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, target_temp)
+ else if(affected_human.coretemperature < (target_temp + 1))
+ affected_human.adjust_coretemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, target_temp)
..()
/datum/reagent/medicine/adminordrazine //An OP chemical for admins
@@ -65,11 +65,11 @@
if(prob(20))
mytray.visible_message(span_warning("Nothing happens..."))
-/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.heal_bodypart_damage(5 * REM * delta_time, 5 * REM * delta_time, updating_health = FALSE)
- M.adjustToxLoss(-5 * REM * delta_time, FALSE, TRUE)
+/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.heal_bodypart_damage(5 * REM * delta_time, 5 * REM * delta_time, 0, FALSE, affected_bodytype)
+ affected_mob.adjustToxLoss(-5 * REM * delta_time, FALSE, TRUE, affected_biotype)
// Heal everything! That we want to. But really don't heal reagents. Otherwise we'll lose ... us.
- M.fully_heal(full_heal_flags & ~HEAL_ALL_REAGENTS)
+ affected_mob.fully_heal(full_heal_flags & ~HEAL_ALL_REAGENTS)
return ..()
/datum/reagent/medicine/adminordrazine/quantum_heal
@@ -85,18 +85,18 @@
ph = 4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_drowsyness(-5 * REM * delta_time)
- M.AdjustStun(-20 * REM * delta_time)
- M.AdjustKnockdown(-20 * REM * delta_time)
- M.AdjustUnconscious(-20 * REM * delta_time)
- M.AdjustImmobilized(-20 * REM * delta_time)
- M.AdjustParalyzed(-20 * REM * delta_time)
+/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_drowsyness(-5 * REM * delta_time)
+ affected_mob.AdjustStun(-20 * REM * delta_time)
+ affected_mob.AdjustKnockdown(-20 * REM * delta_time)
+ affected_mob.AdjustUnconscious(-20 * REM * delta_time)
+ affected_mob.AdjustImmobilized(-20 * REM * delta_time)
+ affected_mob.AdjustParalyzed(-20 * REM * delta_time)
if(holder.has_reagent(/datum/reagent/toxin/mindbreaker))
holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5 * REM * delta_time)
- M.adjust_hallucinations(-20 SECONDS * REM * delta_time)
+ affected_mob.adjust_hallucinations(-20 SECONDS * REM * delta_time)
if(DT_PROB(16, delta_time))
- M.adjustToxLoss(1, 0)
+ affected_mob.adjustToxLoss(1, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -107,15 +107,15 @@
ph = 5.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_drowsyness(-5 * REM * delta_time)
+/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_drowsyness(-5 * REM * delta_time)
if(holder.has_reagent(/datum/reagent/toxin/mindbreaker))
holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5 * REM * delta_time)
if(holder.has_reagent(/datum/reagent/toxin/histamine))
holder.remove_reagent(/datum/reagent/toxin/histamine, 5 * REM * delta_time)
- M.adjust_hallucinations(-20 SECONDS * REM * delta_time)
+ affected_mob.adjust_hallucinations(-20 SECONDS * REM * delta_time)
if(DT_PROB(16, delta_time))
- M.adjustToxLoss(1, 0)
+ affected_mob.adjustToxLoss(1, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -129,21 +129,21 @@
burning_volume = 0.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (M.bodytemperature ** 2) + 0.5)
- if(M.bodytemperature >= T0C || !HAS_TRAIT(M, TRAIT_KNOCKEDOUT))
+/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (affected_mob.bodytemperature ** 2) + 0.5)
+ if(affected_mob.bodytemperature >= T0C || !HAS_TRAIT(affected_mob, TRAIT_KNOCKEDOUT))
..()
return
- var/power = -0.00003 * (M.bodytemperature ** 2) + 3
- M.adjustOxyLoss(-3 * power * REM * delta_time, 0)
- M.adjustBruteLoss(-power * REM * delta_time, 0)
- M.adjustFireLoss(-power * REM * delta_time, 0)
- M.adjustToxLoss(-power * REM * delta_time, 0, TRUE) //heals TOXINLOVERs
- M.adjustCloneLoss(-power * REM * delta_time, 0)
- for(var/i in M.all_wounds)
+ var/power = -0.00003 * (affected_mob.bodytemperature ** 2) + 3
+ affected_mob.adjustOxyLoss(-3 * power * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(-power * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-power * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustToxLoss(-power * REM * delta_time, FALSE, TRUE, affected_biotype) //heals TOXINLOVERs
+ affected_mob.adjustCloneLoss(-power * REM * delta_time, FALSE, affected_biotype)
+ for(var/i in affected_mob.all_wounds)
var/datum/wound/iter_wound = i
iter_wound.on_xadone(power * REAGENTS_EFFECT_MULTIPLIER * delta_time)
- REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
+ REMOVE_TRAIT(affected_mob, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
..()
return TRUE
@@ -161,12 +161,12 @@
ph = 13
metabolization_rate = 1.5 * REAGENTS_METABOLISM
-/datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.bodytemperature < T0C)
- M.adjustCloneLoss((0.00006 * (M.bodytemperature ** 2) - 6) * REM * delta_time, 0)
- REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
+/datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.bodytemperature < T0C)
+ affected_mob.adjustCloneLoss((0.00006 * (affected_mob.bodytemperature ** 2) - 6) * REM * delta_time, FALSE)
+ REMOVE_TRAIT(affected_mob, TRAIT_DISFIGURED, TRAIT_GENERIC)
. = TRUE
- metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (M.bodytemperature ** 2) + 0.75)
+ metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (affected_mob.bodytemperature ** 2) + 0.75)
..()
/datum/reagent/medicine/pyroxadone
@@ -177,28 +177,28 @@
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
+/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
var/power = 0
- switch(M.bodytemperature)
+ switch(affected_mob.bodytemperature)
if(BODYTEMP_HEAT_DAMAGE_LIMIT to 400)
power = 2
if(400 to 460)
power = 3
else
power = 5
- if(M.on_fire)
+ if(affected_mob.on_fire)
power *= 2
- M.adjustOxyLoss(-2 * power * REM * delta_time, FALSE)
- M.adjustBruteLoss(-power * REM * delta_time, FALSE)
- M.adjustFireLoss(-1.5 * power * REM * delta_time, FALSE)
- M.adjustToxLoss(-power * REM * delta_time, FALSE, TRUE)
- M.adjustCloneLoss(-power * REM * delta_time, FALSE)
- for(var/i in M.all_wounds)
+ affected_mob.adjustOxyLoss(-2 * power * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(-power * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-1.5 * power * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustToxLoss(-power * REM * delta_time, FALSE, TRUE, affected_biotype)
+ affected_mob.adjustCloneLoss(-power * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ for(var/i in affected_mob.all_wounds)
var/datum/wound/iter_wound = i
iter_wound.on_xadone(power * REAGENTS_EFFECT_MULTIPLIER * delta_time)
- REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
+ REMOVE_TRAIT(affected_mob, TRAIT_DISFIGURED, TRAIT_GENERIC)
. = TRUE
..()
@@ -212,17 +212,17 @@
taste_description = "fish"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. // No such luck so far
- M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
- REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
+/datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. // No such luck so far
+ affected_mob.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
+ REMOVE_TRAIT(affected_mob, TRAIT_DISFIGURED, TRAIT_GENERIC)
..()
. = TRUE
-/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustToxLoss(1 * REM * delta_time, 0)
- M.set_dizzy_if_lower(10 SECONDS * REM * delta_time)
- M.set_jitter_if_lower(10 SECONDS * REM * delta_time)
+/datum/reagent/medicine/rezadone/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.set_dizzy_if_lower(10 SECONDS * REM * delta_time)
+ affected_mob.set_jitter_if_lower(10 SECONDS * REM * delta_time)
..()
. = TRUE
@@ -261,17 +261,17 @@
ph = 10.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getFireLoss() > 25)
- M.adjustFireLoss(-4 * REM * delta_time, 0) //Twice as effective as AIURI for severe burns
+/datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getFireLoss() > 25)
+ affected_mob.adjustFireLoss(-4 * REM * delta_time, FALSE, required_bodytype = affected_bodytype) //Twice as effective as AIURI for severe burns
else
- M.adjustFireLoss(-0.5 * REM * delta_time, 0) //But only a quarter as effective for more minor ones
+ affected_mob.adjustFireLoss(-0.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype) //But only a quarter as effective for more minor ones
..()
. = TRUE
-/datum/reagent/medicine/oxandrolone/overdose_process(mob/living/M, delta_time, times_fired)
- if(M.getFireLoss()) //It only makes existing burns worse
- M.adjustFireLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC) // it's going to be healing either 4 or 0.5
+/datum/reagent/medicine/oxandrolone/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ if(affected_mob.getFireLoss()) //It only makes existing burns worse
+ affected_mob.adjustFireLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC) // it's going to be healing either 4 or 0.5
. = TRUE
..()
@@ -289,33 +289,33 @@
ph = 5.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(last_added)
- M.blood_volume -= last_added
+ affected_mob.blood_volume -= last_added
last_added = 0
- if(M.blood_volume < maximum_reachable) //Can only up to double your effective blood level.
- var/amount_to_add = min(M.blood_volume, 5*volume)
- var/new_blood_level = min(M.blood_volume + amount_to_add, maximum_reachable)
- last_added = new_blood_level - M.blood_volume
- M.blood_volume = new_blood_level + (extra_regen * REM * delta_time)
+ if(affected_mob.blood_volume < maximum_reachable) //Can only up to double your effective blood level.
+ var/amount_to_add = min(affected_mob.blood_volume, 5*volume)
+ var/new_blood_level = min(affected_mob.blood_volume + amount_to_add, maximum_reachable)
+ last_added = new_blood_level - affected_mob.blood_volume
+ affected_mob.blood_volume = new_blood_level + (extra_regen * REM * delta_time)
if(DT_PROB(18, delta_time))
- M.adjustBruteLoss(-0.5, 0)
- M.adjustFireLoss(-0.5, 0)
+ affected_mob.adjustBruteLoss(-0.5, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-0.5, FALSE, required_bodytype = affected_bodytype)
. = TRUE
..()
-/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(1.5, delta_time))
- to_chat(M, span_warning("You feel salty."))
+ to_chat(affected_mob, span_warning("You feel salty."))
holder.add_reagent(/datum/reagent/consumable/salt, 1)
holder.remove_reagent(/datum/reagent/medicine/salglu_solution, 0.5)
else if(DT_PROB(1.5, delta_time))
- to_chat(M, span_warning("You feel sweet."))
+ to_chat(affected_mob, span_warning("You feel sweet."))
holder.add_reagent(/datum/reagent/consumable/sugar, 1)
holder.remove_reagent(/datum/reagent/medicine/salglu_solution, 0.5)
if(DT_PROB(18, delta_time))
- M.adjustBruteLoss(0.5, FALSE, FALSE, BODYTYPE_ORGANIC)
- M.adjustFireLoss(0.5, FALSE, FALSE, BODYTYPE_ORGANIC)
+ affected_mob.adjustBruteLoss(0.5, FALSE, FALSE, BODYTYPE_ORGANIC)
+ affected_mob.adjustFireLoss(0.5, FALSE, FALSE, BODYTYPE_ORGANIC)
. = TRUE
..()
@@ -328,9 +328,9 @@
ph = 2.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- C.adjustBruteLoss(-0.25 * REM * delta_time, 0)
- C.adjustFireLoss(-0.25 * REM * delta_time, 0)
+/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustBruteLoss(-0.25 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-0.25 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
..()
return TRUE
@@ -373,19 +373,19 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustToxLoss(-healing * REM * delta_time, 0)
- M.adjustOxyLoss(-healing * REM * delta_time, 0)
- M.adjustBruteLoss(-healing * REM * delta_time, 0)
- M.adjustFireLoss(-healing * REM * delta_time, 0)
+/datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(-healing * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOxyLoss(-healing * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(-healing * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-healing * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
..()
. = TRUE
-/datum/reagent/medicine/omnizine/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustToxLoss(1.5 * REM * delta_time, FALSE)
- M.adjustOxyLoss(1.5 * REM * delta_time, FALSE)
- M.adjustBruteLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC)
- M.adjustFireLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC)
+/datum/reagent/medicine/omnizine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(1.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOxyLoss(1.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC)
+ affected_mob.adjustFireLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC)
..()
. = TRUE
@@ -406,11 +406,11 @@
ph = 1.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/calomel/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- for(var/datum/reagent/toxin/R in M.reagents.reagent_list)
- M.reagents.remove_reagent(R.type, 3 * REM * delta_time)
- if(M.health > 20)
- M.adjustToxLoss(1 * REM * delta_time, 0)
+/datum/reagent/medicine/calomel/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ for(var/datum/reagent/toxin/R in affected_mob.reagents.reagent_list)
+ affected_mob.reagents.remove_reagent(R.type, 3 * REM * delta_time)
+ if(affected_mob.health > 20)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -423,17 +423,17 @@
ph = 12 //It's a reducing agent
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/potass_iodide/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/potass_iodide/on_mob_metabolize(mob/living/affected_mob)
. = ..()
- ADD_TRAIT(L, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
+ ADD_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
-/datum/reagent/medicine/potass_iodide/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
+/datum/reagent/medicine/potass_iodide/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
return ..()
-/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if (HAS_TRAIT(M, TRAIT_IRRADIATED))
- M.adjustToxLoss(-1 * REM * delta_time)
+/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if (HAS_TRAIT(affected_mob, TRAIT_IRRADIATED))
+ affected_mob.adjustToxLoss(-1 * REM * delta_time, required_biotype = affected_biotype)
..()
@@ -446,19 +446,19 @@
ph = 1 //One of the best buffers, NEVERMIND!
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/pen_acid/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/pen_acid/on_mob_metabolize(mob/living/affected_mob)
. = ..()
- ADD_TRAIT(L, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
+ ADD_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
-/datum/reagent/medicine/pen_acid/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
+/datum/reagent/medicine/pen_acid/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_HALT_RADIATION_EFFECTS, "[type]")
return ..()
-/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustToxLoss(-2 * REM * delta_time, 0)
- for(var/datum/reagent/R in M.reagents.reagent_list)
+/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(-2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ for(var/datum/reagent/R in affected_mob.reagents.reagent_list)
if(R != src)
- M.reagents.remove_reagent(R.type, 2 * REM * delta_time)
+ affected_mob.reagents.remove_reagent(R.type, 2 * REM * delta_time)
..()
. = TRUE
@@ -472,17 +472,17 @@
ph = 2.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.getBruteLoss() > 25)
- M.adjustBruteLoss(-4 * REM * delta_time, 0)
+/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.getBruteLoss() > 25)
+ affected_mob.adjustBruteLoss(-4 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
else
- M.adjustBruteLoss(-0.5 * REM * delta_time, 0)
+ affected_mob.adjustBruteLoss(-0.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
..()
. = TRUE
-/datum/reagent/medicine/sal_acid/overdose_process(mob/living/M, delta_time, times_fired)
- if(M.getBruteLoss()) //It only makes existing bruises worse
- M.adjustBruteLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC) // it's going to be healing either 4 or 0.5
+/datum/reagent/medicine/sal_acid/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ if(affected_mob.getBruteLoss()) //It only makes existing bruises worse
+ affected_mob.adjustBruteLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC) // it's going to be healing either 4 or 0.5
. = TRUE
..()
@@ -495,10 +495,10 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOxyLoss(-3 * REM * delta_time, 0)
- if(M.losebreath >= 4)
- M.losebreath -= 2 * REM * delta_time
+/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOxyLoss(-3 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ if(affected_mob.losebreath >= 4)
+ affected_mob.losebreath -= 2 * REM * delta_time
..()
. = TRUE
@@ -516,41 +516,41 @@
inverse_chem = /datum/reagent/inverse/corazargh
inverse_chem_val = 0.4
-/datum/reagent/medicine/ephedrine/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/ephedrine/on_mob_metabolize(mob/living/affected_mob)
..()
- L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
- ADD_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
+ affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
+ ADD_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
-/datum/reagent/medicine/ephedrine/on_mob_end_metabolize(mob/living/L)
- L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
- REMOVE_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
+/datum/reagent/medicine/ephedrine/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/ephedrine)
+ REMOVE_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
..()
-/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(DT_PROB(10 * (1-creation_purity), delta_time) && iscarbon(M))
- var/obj/item/I = M.get_active_held_item()
- if(I && M.dropItemToGround(I))
- to_chat(M, span_notice("Your hands spaz out and you drop what you were holding!"))
- M.set_jitter_if_lower(20 SECONDS)
+/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(DT_PROB(10 * (1-creation_purity), delta_time) && iscarbon(affected_mob))
+ var/obj/item/I = affected_mob.get_active_held_item()
+ if(I && affected_mob.dropItemToGround(I))
+ to_chat(affected_mob, span_notice("Your hands spaz out and you drop what you were holding!"))
+ affected_mob.set_jitter_if_lower(20 SECONDS)
- M.AdjustAllImmobility(-20 * REM * delta_time * normalise_creation_purity())
- M.adjustStaminaLoss(-1 * REM * delta_time * normalise_creation_purity(), FALSE)
+ affected_mob.AdjustAllImmobility(-20 * REM * delta_time * normalise_creation_purity())
+ affected_mob.adjustStaminaLoss(-1 * REM * delta_time * normalise_creation_purity(), FALSE)
..()
return TRUE
-/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M, delta_time, times_fired)
- if(DT_PROB(1 * (1 + (1-normalise_creation_purity())), delta_time) && iscarbon(M))
+/datum/reagent/medicine/ephedrine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ if(DT_PROB(1 * (1 + (1-normalise_creation_purity())), delta_time) && iscarbon(affected_mob))
var/datum/disease/D = new /datum/disease/heart_failure
- M.ForceContractDisease(D)
- to_chat(M, span_userdanger("You're pretty sure you just felt your heart stop for a second there.."))
- M.playsound_local(M, 'sound/effects/singlebeat.ogg', 100, 0)
+ affected_mob.ForceContractDisease(D)
+ to_chat(affected_mob, span_userdanger("You're pretty sure you just felt your heart stop for a second there.."))
+ affected_mob.playsound_local(affected_mob, 'sound/effects/singlebeat.ogg', 100, 0)
if(DT_PROB(3.5 * (1 + (1-normalise_creation_purity())), delta_time))
- to_chat(M, span_notice("[pick("Your head pounds.", "You feel a tight pain in your chest.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]"))
+ to_chat(affected_mob, span_notice("[pick("Your head pounds.", "You feel a tight pain in your chest.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]"))
if(DT_PROB(18 * (1 + (1-normalise_creation_purity())), delta_time))
- M.adjustToxLoss(1, 0)
- M.losebreath++
+ affected_mob.adjustToxLoss(1, FALSE, required_biotype = affected_biotype)
+ affected_mob.losebreath++
. = TRUE
return TRUE
@@ -563,10 +563,10 @@
ph = 11.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(5, delta_time))
- M.adjust_drowsyness(1)
- M.adjust_jitter(-2 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(1)
+ affected_mob.adjust_jitter(-2 SECONDS * REM * delta_time)
holder.remove_reagent(/datum/reagent/toxin/histamine, 3 * REM * delta_time)
..()
@@ -581,36 +581,36 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opioids = 10)
-/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/affected_mob)
..()
- L.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
- ADD_TRAIT(L, TRAIT_NUMBED, REF(src)) // SKYRAT EDIT ADD -- ANAESTHETIC FOR SURGERY PAIN
- L.throw_alert("numbed", /atom/movable/screen/alert/numbed) // SKYRAT EDIT ADD END -- i should probably have worked these both into a status effect, maybe
+ affected_mob.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ ADD_TRAIT(affected_mob, TRAIT_NUMBED, REF(src)) // SKYRAT EDIT ADD -- ANAESTHETIC FOR SURGERY PAIN
+ affected_mob.throw_alert("numbed", /atom/movable/screen/alert/numbed) // SKYRAT EDIT ADD END -- i should probably have worked these both into a status effect, maybe
-/datum/reagent/medicine/morphine/on_mob_end_metabolize(mob/living/L)
- L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
- REMOVE_TRAIT(L, TRAIT_NUMBED, REF(src)) // SKYRAT EDIT ADD -- ANAESTHETIC FOR SURGERY PAIN
- L.clear_alert("numbed") // SKYRAT EDIT ADD END
+/datum/reagent/medicine/morphine/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ REMOVE_TRAIT(affected_mob, TRAIT_NUMBED, REF(src)) // SKYRAT EDIT ADD -- ANAESTHETIC FOR SURGERY PAIN
+ affected_mob.clear_alert("numbed") // SKYRAT EDIT ADD END
..()
-/datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle >= 5)
- M.add_mood_event("numb", /datum/mood_event/narcotic_medium, name)
+ affected_mob.add_mood_event("numb", /datum/mood_event/narcotic_medium, name)
switch(current_cycle)
if(11)
- to_chat(M, span_warning("You start to feel tired...") )
+ to_chat(affected_mob, span_warning("You start to feel tired...") )
if(12 to 24)
- M.adjust_drowsyness(1 * REM * delta_time)
+ affected_mob.adjust_drowsyness(1 * REM * delta_time)
if(24 to INFINITY)
- M.Sleeping(40 * REM * delta_time)
+ affected_mob.Sleeping(40 * REM * delta_time)
. = TRUE
..()
-/datum/reagent/medicine/morphine/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/morphine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(18, delta_time))
- M.drop_all_held_items()
- M.set_dizzy_if_lower(4 SECONDS)
- M.set_jitter_if_lower(4 SECONDS)
+ affected_mob.drop_all_held_items()
+ affected_mob.set_dizzy_if_lower(4 SECONDS)
+ affected_mob.set_jitter_if_lower(4 SECONDS)
..()
@@ -629,71 +629,71 @@
///The lighting alpha that the mob had on addition
var/delta_light
-/datum/reagent/medicine/oculine/on_mob_add(mob/living/owner)
- if(!iscarbon(owner))
+/datum/reagent/medicine/oculine/on_mob_add(mob/living/affected_mob)
+ if(!iscarbon(affected_mob))
return
- RegisterSignal(owner, COMSIG_CARBON_GAIN_ORGAN, PROC_REF(on_gained_organ))
- RegisterSignal(owner, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_removed_organ))
- var/obj/item/organ/internal/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
+ RegisterSignal(affected_mob, COMSIG_CARBON_GAIN_ORGAN, PROC_REF(on_gained_organ))
+ RegisterSignal(affected_mob, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_removed_organ))
+ var/obj/item/organ/internal/eyes/eyes = affected_mob.getorganslot(ORGAN_SLOT_EYES)
if(!eyes)
return
- improve_eyesight(owner, eyes)
+ improve_eyesight(affected_mob, eyes)
-/datum/reagent/medicine/oculine/proc/improve_eyesight(mob/living/carbon/owner, obj/item/organ/internal/eyes/eyes)
+/datum/reagent/medicine/oculine/proc/improve_eyesight(mob/living/carbon/affected_mob, obj/item/organ/internal/eyes/eyes)
delta_light = creation_purity*30
if(eyes.lighting_alpha)
eyes.lighting_alpha -= delta_light
else
eyes.lighting_alpha = 255 - delta_light
eyes.see_in_dark += 3
- owner.update_sight()
+ affected_mob.update_sight()
-/datum/reagent/medicine/oculine/proc/restore_eyesight(mob/living/carbon/owner, obj/item/organ/internal/eyes/eyes)
+/datum/reagent/medicine/oculine/proc/restore_eyesight(mob/living/carbon/affected_mob, obj/item/organ/internal/eyes/eyes)
eyes.lighting_alpha += delta_light
eyes.see_in_dark -= 3
- owner.update_sight()
+ affected_mob.update_sight()
-/datum/reagent/medicine/oculine/proc/on_gained_organ(mob/owner, obj/item/organ/organ)
+/datum/reagent/medicine/oculine/proc/on_gained_organ(mob/affected_mob, obj/item/organ/organ)
+ SIGNAL_HANDLER
+ if(!istype(organ, /obj/item/organ/internal/eyes))
+ return
+ var/obj/item/organ/internal/eyes/affected_eyes = organ
+ improve_eyesight(affected_mob, affected_eyes)
+
+/datum/reagent/medicine/oculine/proc/on_removed_organ(mob/prev_affected_mob, obj/item/organ/organ)
SIGNAL_HANDLER
if(!istype(organ, /obj/item/organ/internal/eyes))
return
var/obj/item/organ/internal/eyes/eyes = organ
- improve_eyesight(owner, eyes)
+ restore_eyesight(prev_affected_mob, eyes)
-/datum/reagent/medicine/oculine/proc/on_removed_organ(mob/prev_owner, obj/item/organ/organ)
- SIGNAL_HANDLER
- if(!istype(organ, /obj/item/organ/internal/eyes))
- return
- var/obj/item/organ/internal/eyes/eyes = organ
- restore_eyesight(prev_owner, eyes)
-
-/datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
- owner.adjust_blindness(-2 * REM * delta_time * normalise_creation_purity())
- owner.adjust_blurriness(-2 * REM * delta_time * normalise_creation_purity())
- var/obj/item/organ/internal/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
+/datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_blindness(-2 * REM * delta_time * normalise_creation_purity())
+ affected_mob.adjust_blurriness(-2 * REM * delta_time * normalise_creation_purity())
+ var/obj/item/organ/internal/eyes/eyes = affected_mob.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return ..()
var/fix_prob = 10
if(creation_purity >= 1)
fix_prob = 100
- eyes.applyOrganDamage(-2 * REM * delta_time * normalise_creation_purity())
- if(HAS_TRAIT_FROM(owner, TRAIT_BLIND, EYE_DAMAGE))
+ eyes.applyOrganDamage(-2 * REM * delta_time * normalise_creation_purity(), required_organtype = affected_organtype)
+ if(HAS_TRAIT_FROM(affected_mob, TRAIT_BLIND, EYE_DAMAGE))
if(DT_PROB(fix_prob, delta_time))
- to_chat(owner, span_warning("Your vision slowly returns..."))
- owner.cure_blind(EYE_DAMAGE)
- owner.cure_nearsighted(EYE_DAMAGE)
- owner.blur_eyes(35)
- else if(HAS_TRAIT_FROM(owner, TRAIT_NEARSIGHT, EYE_DAMAGE))
- to_chat(owner, span_warning("The blackness in your peripheral vision fades."))
- owner.cure_nearsighted(EYE_DAMAGE)
- owner.blur_eyes(10)
+ to_chat(affected_mob, span_warning("Your vision slowly returns..."))
+ affected_mob.cure_blind(EYE_DAMAGE)
+ affected_mob.cure_nearsighted(EYE_DAMAGE)
+ affected_mob.blur_eyes(35)
+ else if(HAS_TRAIT_FROM(affected_mob, TRAIT_NEARSIGHT, EYE_DAMAGE))
+ to_chat(affected_mob, span_warning("The blackness in your peripheral vision fades."))
+ affected_mob.cure_nearsighted(EYE_DAMAGE)
+ affected_mob.blur_eyes(10)
..()
-/datum/reagent/medicine/oculine/on_mob_delete(mob/living/owner)
- var/obj/item/organ/internal/eyes/eyes = owner.getorganslot(ORGAN_SLOT_EYES)
+/datum/reagent/medicine/oculine/on_mob_delete(mob/living/affected_mob)
+ var/obj/item/organ/internal/eyes/eyes = affected_mob.getorganslot(ORGAN_SLOT_EYES)
if(!eyes)
return
- restore_eyesight(owner, eyes)
+ restore_eyesight(affected_mob, eyes)
..()
/datum/reagent/medicine/inacusiate
@@ -706,31 +706,31 @@
inverse_chem_val = 0.3
inverse_chem = /datum/reagent/impurity/inacusiate
-/datum/reagent/medicine/inacusiate/on_mob_add(mob/living/owner, amount)
+/datum/reagent/medicine/inacusiate/on_mob_add(mob/living/affected_mob, amount)
. = ..()
if(creation_purity >= 1)
- RegisterSignal(owner, COMSIG_MOVABLE_HEAR, PROC_REF(owner_hear))
+ RegisterSignal(affected_mob, COMSIG_MOVABLE_HEAR, PROC_REF(owner_hear))
//Lets us hear whispers from far away!
/datum/reagent/medicine/inacusiate/proc/owner_hear(datum/source, message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, list/message_mods = list())
SIGNAL_HANDLER
if(!isliving(holder.my_atom))
return
- var/mob/living/owner = holder.my_atom
+ var/mob/living/affected_mob = holder.my_atom
var/atom/movable/composer = holder.my_atom
if(message_mods[WHISPER_MODE])
- message = composer.compose_message(owner, message_language, message, null, spans, message_mods)
+ message = composer.compose_message(affected_mob, message_language, message, null, spans, message_mods)
-/datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
- var/obj/item/organ/internal/ears/ears = owner.getorganslot(ORGAN_SLOT_EARS)
+/datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ var/obj/item/organ/internal/ears/ears = affected_mob.getorganslot(ORGAN_SLOT_EARS)
if(!ears)
return ..()
ears.adjustEarDamage(-4 * REM * delta_time * normalise_creation_purity(), -4 * REM * delta_time * normalise_creation_purity())
..()
-/datum/reagent/medicine/inacusiate/on_mob_delete(mob/living/owner)
+/datum/reagent/medicine/inacusiate/on_mob_delete(mob/living/affected_mob)
. = ..()
- UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
+ UnregisterSignal(affected_mob, COMSIG_MOVABLE_HEAR)
/datum/reagent/medicine/atropine
name = "Atropine"
@@ -742,32 +742,32 @@
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/atropine/on_mob_add(mob/living/owner)
+/datum/reagent/medicine/atropine/on_mob_add(mob/living/affected_mob)
. = ..()
- ADD_TRAIT(owner, TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION, "[type]")
+ ADD_TRAIT(affected_mob, TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION, "[type]")
-/datum/reagent/medicine/atropine/on_mob_delete(mob/living/owner)
- REMOVE_TRAIT(owner, TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION, "[type]")
+/datum/reagent/medicine/atropine/on_mob_delete(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_PREVENT_IMPLANT_AUTO_EXPLOSION, "[type]")
return ..()
-/datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.health <= M.crit_threshold)
- M.adjustToxLoss(-2 * REM * delta_time, 0)
- M.adjustBruteLoss(-2* REM * delta_time, 0)
- M.adjustFireLoss(-2 * REM * delta_time, 0)
- M.adjustOxyLoss(-5 * REM * delta_time, 0)
+/datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.health <= affected_mob.crit_threshold)
+ affected_mob.adjustToxLoss(-2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(-2* REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-2 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustOxyLoss(-5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
- M.losebreath = 0
+ affected_mob.losebreath = 0
if(DT_PROB(10, delta_time))
- M.set_dizzy_if_lower(10 SECONDS)
- M.set_jitter_if_lower(10 SECONDS)
+ affected_mob.set_dizzy_if_lower(10 SECONDS)
+ affected_mob.set_jitter_if_lower(10 SECONDS)
..()
-/datum/reagent/medicine/atropine/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustToxLoss(0.5 * REM * delta_time, 0)
+/datum/reagent/medicine/atropine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
- M.set_dizzy_if_lower(2 SECONDS * REM * delta_time)
- M.set_jitter_if_lower(2 SECONDS * REM * delta_time)
+ affected_mob.set_dizzy_if_lower(2 SECONDS * REM * delta_time)
+ affected_mob.set_jitter_if_lower(2 SECONDS * REM * delta_time)
..()
/datum/reagent/medicine/epinephrine
@@ -780,15 +780,15 @@
ph = 10.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/epinephrine/on_mob_metabolize(mob/living/carbon/M)
+/datum/reagent/medicine/epinephrine/on_mob_metabolize(mob/living/carbon/affected_mob)
..()
- ADD_TRAIT(M, TRAIT_NOCRITDAMAGE, type)
+ ADD_TRAIT(affected_mob, TRAIT_NOCRITDAMAGE, type)
-/datum/reagent/medicine/epinephrine/on_mob_end_metabolize(mob/living/carbon/M)
- REMOVE_TRAIT(M, TRAIT_NOCRITDAMAGE, type)
+/datum/reagent/medicine/epinephrine/on_mob_end_metabolize(mob/living/carbon/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_NOCRITDAMAGE, type)
..()
-/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = TRUE
if(holder.has_reagent(/datum/reagent/toxin/lexorin))
holder.remove_reagent(/datum/reagent/toxin/lexorin, 2 * REM * delta_time)
@@ -797,25 +797,25 @@
holder.add_reagent(/datum/reagent/toxin/histamine, 4)
..()
return
- if(M.health <= M.crit_threshold)
- M.adjustToxLoss(-0.5 * REM * delta_time, 0)
- M.adjustBruteLoss(-0.5 * REM * delta_time, 0)
- M.adjustFireLoss(-0.5 * REM * delta_time, 0)
- M.adjustOxyLoss(-0.5 * REM * delta_time, 0)
- if(M.losebreath >= 4)
- M.losebreath -= 2 * REM * delta_time
- if(M.losebreath < 0)
- M.losebreath = 0
- M.adjustStaminaLoss(-0.5 * REM * delta_time, 0)
+ if(affected_mob.health <= affected_mob.crit_threshold)
+ affected_mob.adjustToxLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(-0.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-0.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustOxyLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ if(affected_mob.losebreath >= 4)
+ affected_mob.losebreath -= 2 * REM * delta_time
+ if(affected_mob.losebreath < 0)
+ affected_mob.losebreath = 0
+ affected_mob.adjustStaminaLoss(-0.5 * REM * delta_time, 0)
if(DT_PROB(10, delta_time))
- M.AdjustAllImmobility(-20)
+ affected_mob.AdjustAllImmobility(-20)
..()
-/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/epinephrine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(18, REM * delta_time))
- M.adjustStaminaLoss(2.5, 0)
- M.adjustToxLoss(1, 0)
- M.losebreath++
+ affected_mob.adjustStaminaLoss(2.5, 0)
+ affected_mob.adjustToxLoss(1, FALSE, required_biotype = affected_biotype)
+ affected_mob.losebreath++
. = TRUE
..()
@@ -919,10 +919,10 @@
return ..()
-/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/damage_at_random = rand(0, 250)/100 //0 to 2.5
- M.adjustBruteLoss(damage_at_random * REM * delta_time, FALSE)
- M.adjustFireLoss(damage_at_random * REM * delta_time, FALSE)
+ affected_mob.adjustBruteLoss(damage_at_random * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(damage_at_random * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
return ..()
/datum/reagent/medicine/mannitol
@@ -937,23 +937,23 @@
inverse_chem = /datum/reagent/inverse
inverse_chem_val = 0.45
-/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
- owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * delta_time * normalise_creation_purity())
+/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * delta_time * normalise_creation_purity(), required_organtype = affected_organtype)
..()
//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_metabolize(mob/living/carbon/owner)
+/datum/reagent/medicine/mannitol/on_mob_metabolize(mob/living/carbon/affected_mob)
. = ..()
- ADD_TRAIT(owner, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
+ ADD_TRAIT(affected_mob, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
-/datum/reagent/medicine/mannitol/on_mob_end_metabolize(mob/living/carbon/owner)
- REMOVE_TRAIT(owner, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
+/datum/reagent/medicine/mannitol/on_mob_end_metabolize(mob/living/carbon/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC)
. = ..()
-/datum/reagent/medicine/mannitol/overdose_start(mob/living/owner)
- to_chat(owner, span_notice("You suddenly feel E N L I G H T E N E D!"))
+/datum/reagent/medicine/mannitol/overdose_start(mob/living/affected_mob)
+ to_chat(affected_mob, span_notice("You suddenly feel E N L I G H T E N E D!"))
-/datum/reagent/medicine/mannitol/overdose_process(mob/living/owner, delta_time, times_fired)
+/datum/reagent/medicine/mannitol/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(65, delta_time))
return
var/list/tips
@@ -964,7 +964,7 @@
else
tips = world.file2list("strings/chemistrytips.txt")
var/message = pick(tips)
- send_tip_of_the_round(owner, message)
+ send_tip_of_the_round(affected_mob, message)
return ..()
/datum/reagent/medicine/neurine
@@ -978,33 +978,33 @@
///brain damage level when we first started taking the chem
var/initial_bdamage = 200
-/datum/reagent/medicine/neurine/on_mob_add(mob/living/owner, amount)
+/datum/reagent/medicine/neurine/on_mob_add(mob/living/affected_mob, amount)
. = ..()
- ADD_TRAIT(owner, TRAIT_ANTICONVULSANT, name)
- if(!iscarbon(owner))
+ ADD_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbon = owner
+ var/mob/living/carbon/affected_carbon = affected_mob
if(creation_purity >= 1)
- initial_bdamage = carbon.getOrganLoss(ORGAN_SLOT_BRAIN)
+ initial_bdamage = affected_carbon.getOrganLoss(ORGAN_SLOT_BRAIN)
-/datum/reagent/medicine/neurine/on_mob_delete(mob/living/owner)
+/datum/reagent/medicine/neurine/on_mob_delete(mob/living/affected_mob)
. = ..()
- REMOVE_TRAIT(owner, TRAIT_ANTICONVULSANT, name)
- if(!iscarbon(owner))
+ REMOVE_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
+ if(!iscarbon(affected_mob))
return
- var/mob/living/carbon/carbon = owner
- if(initial_bdamage < carbon.getOrganLoss(ORGAN_SLOT_BRAIN))
- carbon.setOrganLoss(ORGAN_SLOT_BRAIN, initial_bdamage)
+ var/mob/living/carbon/affected_carbon = affected_mob
+ if(initial_bdamage < affected_carbon.getOrganLoss(ORGAN_SLOT_BRAIN))
+ affected_carbon.setOrganLoss(ORGAN_SLOT_BRAIN, initial_bdamage)
-/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/owner, delta_time, times_fired)
+/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/consumable/ethanol/neurotoxin))
holder.remove_reagent(/datum/reagent/consumable/ethanol/neurotoxin, 5 * REM * delta_time * normalise_creation_purity())
if(DT_PROB(8 * normalise_creation_purity(), delta_time))
- owner.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
+ affected_mob.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
..()
-/datum/reagent/medicine/neurine/on_mob_dead(mob/living/carbon/owner, delta_time)
- owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * REM * delta_time * normalise_creation_purity())
+/datum/reagent/medicine/neurine/on_mob_dead(mob/living/carbon/affected_mob, delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * REM * delta_time * normalise_creation_purity(), required_organtype = affected_organtype)
..()
/datum/reagent/medicine/mutadone
@@ -1015,11 +1015,11 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.remove_status_effect(/datum/status_effect/jitter)
- if(M.has_dna())
- M.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), TRUE)
- if(!QDELETED(M)) //We were a monkey, now a human
+/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.remove_status_effect(/datum/status_effect/jitter)
+ if(affected_mob.has_dna())
+ affected_mob.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), TRUE)
+ if(!QDELETED(affected_mob)) //We were a monkey, now a human
..()
/datum/reagent/medicine/antihol
@@ -1033,14 +1033,14 @@
inverse_chem_val = 0.35
inverse_chem = /datum/reagent/inverse/antihol
-/datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.remove_status_effect(/datum/status_effect/dizziness)
- M.set_drowsyness(0)
- M.remove_status_effect(/datum/status_effect/speech/slurring/drunk)
- M.remove_status_effect(/datum/status_effect/confusion)
- M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3 * REM * delta_time * normalise_creation_purity(), FALSE, TRUE)
- M.adjustToxLoss(-0.2 * REM * delta_time, 0)
- M.adjust_drunk_effect(-10 * REM * delta_time * normalise_creation_purity())
+/datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.remove_status_effect(/datum/status_effect/dizziness)
+ affected_mob.set_drowsyness(0)
+ affected_mob.remove_status_effect(/datum/status_effect/speech/slurring/drunk)
+ affected_mob.remove_status_effect(/datum/status_effect/confusion)
+ affected_mob.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3 * REM * delta_time * normalise_creation_purity(), FALSE, TRUE)
+ affected_mob.adjustToxLoss(-0.2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjust_drunk_effect(-10 * REM * delta_time * normalise_creation_purity())
..()
. = TRUE
@@ -1054,32 +1054,32 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
addiction_types = list(/datum/addiction/stimulants = 4) //0.8 per 2 seconds
-/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/affected_mob)
..()
- L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/stimulants)
- ADD_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
+ affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/stimulants)
+ ADD_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
-/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L)
- L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/stimulants)
- REMOVE_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
+/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/stimulants)
+ REMOVE_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
..()
-/datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.health < 50 && M.health > 0)
- M.adjustOxyLoss(-1 * REM * delta_time, 0)
- M.adjustToxLoss(-1 * REM * delta_time, 0)
- M.adjustBruteLoss(-1 * REM * delta_time, 0)
- M.adjustFireLoss(-1 * REM * delta_time, 0)
- M.AdjustAllImmobility(-60 * REM * delta_time)
- M.adjustStaminaLoss(-5 * REM * delta_time, 0)
+/datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.health < 50 && affected_mob.health > 0)
+ affected_mob.adjustOxyLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(-1 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-1 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.AdjustAllImmobility(-60 * REM * delta_time)
+ affected_mob.adjustStaminaLoss(-5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
-/datum/reagent/medicine/stimulants/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/stimulants/overdose_process(mob/living/affected_mob, delta_time, times_fired)
if(DT_PROB(18, delta_time))
- M.adjustStaminaLoss(2.5, 0)
- M.adjustToxLoss(1, 0)
- M.losebreath++
+ affected_mob.adjustStaminaLoss(2.5, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(1, FALSE, required_biotype = affected_biotype)
+ affected_mob.losebreath++
. = TRUE
..()
@@ -1092,8 +1092,8 @@
ph = 6.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/insulin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.AdjustSleeping(-20 * REM * delta_time))
+/datum/reagent/medicine/insulin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.AdjustSleeping(-20 * REM * delta_time))
. = TRUE
holder.remove_reagent(/datum/reagent/consumable/sugar, 3 * REM * delta_time)
..()
@@ -1108,9 +1108,9 @@
ph = 8.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/inaprovaline/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.losebreath >= 5)
- M.losebreath -= 5 * REM * delta_time
+/datum/reagent/medicine/inaprovaline/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.losebreath >= 5)
+ affected_mob.losebreath -= 5 * REM * delta_time
..()
/datum/reagent/medicine/regen_jelly
@@ -1134,11 +1134,11 @@
exposed_human.update_mutant_bodyparts(force_update=TRUE)
// SKYRAT EDIT END
-/datum/reagent/medicine/regen_jelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustBruteLoss(-1.5 * REM * delta_time, 0)
- M.adjustFireLoss(-1.5 * REM * delta_time, 0)
- M.adjustOxyLoss(-1.5 * REM * delta_time, 0)
- M.adjustToxLoss(-1.5 * REM * delta_time, 0, TRUE) //heals TOXINLOVERs
+/datum/reagent/medicine/regen_jelly/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustBruteLoss(-1.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-1.5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustOxyLoss(-1.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(-1.5 * REM * delta_time, FALSE, TRUE, affected_biotype) //heals TOXINLOVERs
..()
. = TRUE
@@ -1151,20 +1151,20 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustBruteLoss(-5 * REM * delta_time, 0) //A ton of healing - this is a 50 telecrystal investment.
- M.adjustFireLoss(-5 * REM * delta_time, 0)
- M.adjustOxyLoss(-15 * REM * delta_time, 0)
- M.adjustToxLoss(-5 * REM * delta_time, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -15 * REM * delta_time)
- M.adjustCloneLoss(-3 * REM * delta_time, 0)
+/datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustBruteLoss(-5 * REM * delta_time, FALSE) //A ton of healing - this is a 50 telecrystal investment.
+ affected_mob.adjustFireLoss(-5 * REM * delta_time, FALSE)
+ affected_mob.adjustOxyLoss(-15 * REM * delta_time, FALSE)
+ affected_mob.adjustToxLoss(-5 * REM * delta_time, FALSE)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -15 * REM * delta_time)
+ affected_mob.adjustCloneLoss(-3 * REM * delta_time, FALSE)
..()
. = TRUE
-/datum/reagent/medicine/syndicate_nanites/overdose_process(mob/living/carbon/M, delta_time, times_fired) //wtb flavortext messages that hint that you're vomitting up robots
+/datum/reagent/medicine/syndicate_nanites/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired) //wtb flavortext messages that hint that you're vomitting up robots
if(DT_PROB(13, delta_time))
- M.reagents.remove_reagent(type, metabolization_rate*15) // ~5 units at a rate of 0.4 but i wanted a nice number in code
- M.vomit(20) // nanite safety protocols make your body expel them to prevent harmies
+ affected_mob.reagents.remove_reagent(type, metabolization_rate*15) // ~5 units at a rate of 0.4 but i wanted a nice number in code
+ affected_mob.vomit(20) // nanite safety protocols make your body expel them to prevent harmies
..()
. = TRUE
@@ -1178,46 +1178,46 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 14)
-/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle <= 25) //10u has to be processed before u get into THE FUN ZONE
- M.adjustBruteLoss(-1 * REM * delta_time, 0)
- M.adjustFireLoss(-1 * REM * delta_time, 0)
- M.adjustOxyLoss(-0.5 * REM * delta_time, 0)
- M.adjustToxLoss(-0.5 * REM * delta_time, 0)
- M.adjustCloneLoss(-0.1 * REM * delta_time, 0)
- M.adjustStaminaLoss(-0.5 * REM * delta_time, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
+ affected_mob.adjustBruteLoss(-1 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-1 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustOxyLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustCloneLoss(-0.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustStaminaLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time, 150, affected_organtype) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
else
- M.adjustBruteLoss(-5 * REM * delta_time, 0) //slow to start, but very quick healing once it gets going
- M.adjustFireLoss(-5 * REM * delta_time, 0)
- M.adjustOxyLoss(-3 * REM * delta_time, 0)
- M.adjustToxLoss(-3 * REM * delta_time, 0)
- M.adjustCloneLoss(-1 * REM * delta_time, 0)
- M.adjustStaminaLoss(-3 * REM * delta_time, 0)
- M.adjust_jitter_up_to(6 SECONDS * REM * delta_time, 1 MINUTES)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time, 150)
+ affected_mob.adjustBruteLoss(-5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype) //slow to start, but very quick healing once it gets going
+ affected_mob.adjustFireLoss(-5 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustOxyLoss(-3 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustToxLoss(-3 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustCloneLoss(-1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustStaminaLoss(-3 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjust_jitter_up_to(6 SECONDS * REM * delta_time, 1 MINUTES)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time, 150, affected_organtype)
if(DT_PROB(5, delta_time))
- M.say(pick("Yeah, well, you know, that's just, like, uh, your opinion, man.", "Am I glad he's frozen in there and that we're out here, and that he's the sheriff and that we're frozen out here, and that we're in there, and I just remembered, we're out here. What I wanna know is: Where's the caveman?", "It ain't me, it ain't me...", "Make love, not war!", "Stop, hey, what's that sound? Everybody look what's going down...", "Do you believe in magic in a young girl's heart?"), forced = /datum/reagent/medicine/earthsblood)
- M.adjust_drugginess_up_to(20 SECONDS * REM * delta_time, 30 SECONDS * REM * delta_time)
+ affected_mob.say(pick("Yeah, well, you know, that's just, like, uh, your opinion, man.", "Am I glad he's frozen in there and that we're out here, and that he's the sheriff and that we're frozen out here, and that we're in there, and I just remembered, we're out here. What I wanna know is: Where's the caveman?", "It ain't me, it ain't me...", "Make love, not war!", "Stop, hey, what's that sound? Everybody look what's going down...", "Do you believe in magic in a young girl's heart?"), forced = /datum/reagent/medicine/earthsblood)
+ affected_mob.adjust_drugginess_up_to(20 SECONDS * REM * delta_time, 30 SECONDS * REM * delta_time)
..()
. = TRUE
-/datum/reagent/medicine/earthsblood/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/earthsblood/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_PACIFISM, type)
+ ADD_TRAIT(affected_mob, TRAIT_PACIFISM, type)
-/datum/reagent/medicine/earthsblood/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_PACIFISM, type)
+/datum/reagent/medicine/earthsblood/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_PACIFISM, type)
..()
-/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjust_hallucinations_up_to(10 SECONDS * REM * delta_time, 120 SECONDS)
+/datum/reagent/medicine/earthsblood/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_hallucinations_up_to(10 SECONDS * REM * delta_time, 120 SECONDS)
if(current_cycle > 25)
- M.adjustToxLoss(4 * REM * delta_time, 0)
+ affected_mob.adjustToxLoss(4 * REM * delta_time, FALSE, required_biotype = affected_biotype)
if(current_cycle > 100) //podpeople get out reeeeeeeeeeeeeeeeeeeee
- M.adjustToxLoss(6 * REM * delta_time, 0)
- if(iscarbon(M))
- var/mob/living/carbon/hippie = M
+ affected_mob.adjustToxLoss(6 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ if(iscarbon(affected_mob))
+ var/mob/living/carbon/hippie = affected_mob
hippie.gain_trauma(/datum/brain_trauma/severe/pacifism)
..()
. = TRUE
@@ -1232,20 +1232,20 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
harmful = TRUE
-/datum/reagent/medicine/haloperidol/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- for(var/datum/reagent/drug/R in M.reagents.reagent_list)
- M.reagents.remove_reagent(R.type, 5 * REM * delta_time)
- M.adjust_drowsyness(2 * REM * delta_time)
+/datum/reagent/medicine/haloperidol/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ for(var/datum/reagent/drug/R in affected_mob.reagents.reagent_list)
+ affected_mob.reagents.remove_reagent(R.type, 5 * REM * delta_time)
+ affected_mob.adjust_drowsyness(2 * REM * delta_time)
- if(M.get_timed_status_effect_duration(/datum/status_effect/jitter) >= 6 SECONDS)
- M.adjust_jitter(-6 SECONDS * REM * delta_time)
+ if(affected_mob.get_timed_status_effect_duration(/datum/status_effect/jitter) >= 6 SECONDS)
+ affected_mob.adjust_jitter(-6 SECONDS * REM * delta_time)
- if (M.get_timed_status_effect_duration(/datum/status_effect/hallucination) >= 10 SECONDS)
- M.adjust_hallucinations(-10 SECONDS * REM * delta_time)
+ if (affected_mob.get_timed_status_effect_duration(/datum/status_effect/hallucination) >= 10 SECONDS)
+ affected_mob.adjust_hallucinations(-10 SECONDS * REM * delta_time)
if(DT_PROB(10, delta_time))
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 50)
- M.adjustStaminaLoss(2.5 * REM * delta_time, 0)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 50, affected_organtype)
+ affected_mob.adjustStaminaLoss(2.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
return TRUE
@@ -1265,22 +1265,22 @@
metabolizer.set_dizzy_if_lower(20 SECONDS * REM * delta_time)
return TRUE
-/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, type)
- ADD_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
- L.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ ADD_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
+ ADD_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
+ affected_mob.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
-/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/L)
+/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/affected_mob)
..()
- REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, type)
- REMOVE_TRAIT(L, TRAIT_BATON_RESISTANCE, type)
- L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
- L.remove_status_effect(/datum/status_effect/dizziness)
- L.remove_status_effect(/datum/status_effect/jitter)
+ REMOVE_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_BATON_RESISTANCE, type)
+ affected_mob.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ affected_mob.remove_status_effect(/datum/status_effect/dizziness)
+ affected_mob.remove_status_effect(/datum/status_effect/jitter)
/datum/reagent/medicine/changelingadrenaline/overdose_process(mob/living/metabolizer, delta_time, times_fired)
- metabolizer.adjustToxLoss(1 * REM * delta_time, 0)
+ metabolizer.adjustToxLoss(1 * REM * delta_time, FALSE)
..()
return TRUE
@@ -1291,16 +1291,16 @@
metabolization_rate = 2.5 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/medicine/changelinghaste/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/changelinghaste/on_mob_metabolize(mob/living/affected_mob)
..()
- L.add_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
+ affected_mob.add_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
-/datum/reagent/medicine/changelinghaste/on_mob_end_metabolize(mob/living/L)
- L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
+/datum/reagent/medicine/changelinghaste/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
..()
/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
- metabolizer.adjustToxLoss(2 * REM * delta_time, 0)
+ metabolizer.adjustToxLoss(2 * REM * delta_time, FALSE)
..()
return TRUE
@@ -1311,13 +1311,13 @@
self_consuming = TRUE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/higadrite/on_mob_metabolize(mob/living/M)
+/datum/reagent/medicine/higadrite/on_mob_metabolize(mob/living/affected_mob)
. = ..()
- ADD_TRAIT(M, TRAIT_STABLELIVER, type)
+ ADD_TRAIT(affected_mob, TRAIT_STABLELIVER, type)
-/datum/reagent/medicine/higadrite/on_mob_end_metabolize(mob/living/M)
+/datum/reagent/medicine/higadrite/on_mob_end_metabolize(mob/living/affected_mob)
..()
- REMOVE_TRAIT(M, TRAIT_STABLELIVER, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_STABLELIVER, type)
/datum/reagent/medicine/cordiolis_hepatico
name = "Cordiolis Hepatico"
@@ -1326,28 +1326,28 @@
self_consuming = TRUE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/medicine/cordiolis_hepatico/on_mob_add(mob/living/M)
+/datum/reagent/medicine/cordiolis_hepatico/on_mob_add(mob/living/affected_mob)
..()
- ADD_TRAIT(M, TRAIT_STABLELIVER, type)
- ADD_TRAIT(M, TRAIT_STABLEHEART, type)
+ ADD_TRAIT(affected_mob, TRAIT_STABLELIVER, type)
+ ADD_TRAIT(affected_mob, TRAIT_STABLEHEART, type)
-/datum/reagent/medicine/cordiolis_hepatico/on_mob_end_metabolize(mob/living/M)
+/datum/reagent/medicine/cordiolis_hepatico/on_mob_end_metabolize(mob/living/affected_mob)
..()
- REMOVE_TRAIT(M, TRAIT_STABLEHEART, type)
- REMOVE_TRAIT(M, TRAIT_STABLELIVER, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_STABLEHEART, type)
+ REMOVE_TRAIT(affected_mob, TRAIT_STABLELIVER, type)
/datum/reagent/medicine/muscle_stimulant
name = "Muscle Stimulant"
description = "A potent chemical that allows someone under its influence to be at full physical ability even when under massive amounts of pain."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/medicine/muscle_stimulant/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/muscle_stimulant/on_mob_metabolize(mob/living/affected_mob)
. = ..()
- L.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ affected_mob.add_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
-/datum/reagent/medicine/muscle_stimulant/on_mob_end_metabolize(mob/living/L)
+/datum/reagent/medicine/muscle_stimulant/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
- L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
+ affected_mob.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
/datum/reagent/medicine/modafinil
name = "Modafinil"
@@ -1361,58 +1361,58 @@
ph = 7.89
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/M)
- ADD_TRAIT(M, TRAIT_SLEEPIMMUNE, type)
+/datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/affected_mob)
+ ADD_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
..()
-/datum/reagent/medicine/modafinil/on_mob_end_metabolize(mob/living/M)
- REMOVE_TRAIT(M, TRAIT_SLEEPIMMUNE, type)
+/datum/reagent/medicine/modafinil/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
..()
/datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
if(!overdosed) // We do not want any effects on OD
overdose_threshold = overdose_threshold + ((rand(-10, 10) / 10) * REM * delta_time) // for extra fun
metabolizer.AdjustAllImmobility(-5 * REM * delta_time)
- metabolizer.adjustStaminaLoss(-0.5 * REM * delta_time, 0)
+ metabolizer.adjustStaminaLoss(-0.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
metabolizer.set_jitter_if_lower(1 SECONDS * REM * delta_time)
metabolization_rate = 0.005 * REAGENTS_METABOLISM * rand(5, 20) // randomizes metabolism between 0.02 and 0.08 per second
. = TRUE
..()
-/datum/reagent/medicine/modafinil/overdose_start(mob/living/M)
- to_chat(M, span_userdanger("You feel awfully out of breath and jittery!"))
+/datum/reagent/medicine/modafinil/overdose_start(mob/living/affected_mob)
+ to_chat(affected_mob, span_userdanger("You feel awfully out of breath and jittery!"))
metabolization_rate = 0.025 * REAGENTS_METABOLISM // sets metabolism to 0.005 per second on overdose
-/datum/reagent/medicine/modafinil/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/modafinil/overdose_process(mob/living/affected_mob, delta_time, times_fired)
overdose_progress++
switch(overdose_progress)
if(1 to 40)
- M.adjust_jitter_up_to(2 SECONDS * REM * delta_time, 20 SECONDS)
- M.adjust_stutter_up_to(2 SECONDS * REM * delta_time, 20 SECONDS)
- M.set_dizzy_if_lower(10 SECONDS * REM * delta_time)
+ affected_mob.adjust_jitter_up_to(2 SECONDS * REM * delta_time, 20 SECONDS)
+ affected_mob.adjust_stutter_up_to(2 SECONDS * REM * delta_time, 20 SECONDS)
+ affected_mob.set_dizzy_if_lower(10 SECONDS * REM * delta_time)
if(DT_PROB(30, delta_time))
- M.losebreath++
+ affected_mob.losebreath++
if(41 to 80)
- M.adjustOxyLoss(0.1 * REM * delta_time, 0)
- M.adjustStaminaLoss(0.1 * REM * delta_time, 0)
- M.adjust_jitter_up_to(2 SECONDS * REM * delta_time, 40 SECONDS)
- M.adjust_stutter_up_to(2 SECONDS * REM * delta_time, 40 SECONDS)
- M.set_dizzy_if_lower(20 SECONDS * REM * delta_time)
+ affected_mob.adjustOxyLoss(0.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustStaminaLoss(0.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjust_jitter_up_to(2 SECONDS * REM * delta_time, 40 SECONDS)
+ affected_mob.adjust_stutter_up_to(2 SECONDS * REM * delta_time, 40 SECONDS)
+ affected_mob.set_dizzy_if_lower(20 SECONDS * REM * delta_time)
if(DT_PROB(30, delta_time))
- M.losebreath++
+ affected_mob.losebreath++
if(DT_PROB(10, delta_time))
- to_chat(M, span_userdanger("You have a sudden fit!"))
- M.emote("moan")
- M.Paralyze(20) // you should be in a bad spot at this point unless epipen has been used
+ to_chat(affected_mob, span_userdanger("You have a sudden fit!"))
+ affected_mob.emote("moan")
+ affected_mob.Paralyze(20) // you should be in a bad spot at this point unless epipen has been used
if(81)
- to_chat(M, span_userdanger("You feel too exhausted to continue!")) // at this point you will eventually die unless you get charcoal
- M.adjustOxyLoss(0.1 * REM * delta_time, 0)
- M.adjustStaminaLoss(0.1 * REM * delta_time, 0)
+ to_chat(affected_mob, span_userdanger("You feel too exhausted to continue!")) // at this point you will eventually die unless you get charcoal
+ affected_mob.adjustOxyLoss(0.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustStaminaLoss(0.1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
if(82 to INFINITY)
- REMOVE_TRAIT(M, TRAIT_SLEEPIMMUNE, type)
- M.Sleeping(100 * REM * delta_time)
- M.adjustOxyLoss(1.5 * REM * delta_time, 0)
- M.adjustStaminaLoss(1.5 * REM * delta_time, 0)
+ REMOVE_TRAIT(affected_mob, TRAIT_SLEEPIMMUNE, type)
+ affected_mob.Sleeping(100 * REM * delta_time)
+ affected_mob.adjustOxyLoss(1.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustStaminaLoss(1.5 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
return TRUE
@@ -1426,27 +1426,27 @@
ph = 9.12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/psicodine/on_mob_metabolize(mob/living/L)
+/datum/reagent/medicine/psicodine/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_FEARLESS, type)
+ ADD_TRAIT(affected_mob, TRAIT_FEARLESS, type)
-/datum/reagent/medicine/psicodine/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_FEARLESS, type)
+/datum/reagent/medicine/psicodine/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_FEARLESS, type)
..()
-/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_jitter(-12 SECONDS * REM * delta_time)
- M.adjust_dizzy(-12 SECONDS * REM * delta_time)
- M.adjust_confusion(-6 SECONDS * REM * delta_time)
- M.disgust = max(M.disgust - (6 * REM * delta_time), 0)
- if(M.mob_mood != null && M.mob_mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then...
- M.mob_mood.set_sanity(min(M.mob_mood.sanity + (5 * REM * delta_time), SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
+/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_jitter(-12 SECONDS * REM * delta_time)
+ affected_mob.adjust_dizzy(-12 SECONDS * REM * delta_time)
+ affected_mob.adjust_confusion(-6 SECONDS * REM * delta_time)
+ affected_mob.disgust = max(affected_mob.disgust - (6 * REM * delta_time), 0)
+ if(affected_mob.mob_mood != null && affected_mob.mob_mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then...
+ affected_mob.mob_mood.set_sanity(min(affected_mob.mob_mood.sanity + (5 * REM * delta_time), SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
..()
. = TRUE
-/datum/reagent/medicine/psicodine/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjust_hallucinations_up_to(10 SECONDS * REM * delta_time, 120 SECONDS)
- M.adjustToxLoss(1 * REM * delta_time, 0)
+/datum/reagent/medicine/psicodine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_hallucinations_up_to(10 SECONDS * REM * delta_time, 120 SECONDS)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -1461,12 +1461,12 @@
inverse_chem = /datum/reagent/impurity/probital_failed
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/metafactor/overdose_start(mob/living/carbon/M)
+/datum/reagent/medicine/metafactor/overdose_start(mob/living/carbon/affected_mob)
metabolization_rate = 2 * REAGENTS_METABOLISM
-/datum/reagent/medicine/metafactor/overdose_process(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/metafactor/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(13, delta_time))
- M.vomit()
+ affected_mob.vomit()
..()
/datum/reagent/medicine/silibinin
@@ -1477,8 +1477,8 @@
metabolization_rate = 1.5 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/silibinin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, -2 * REM * delta_time)//Add a chance to cure liver trauma once implemented.
+/datum/reagent/medicine/silibinin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, -2 * REM * delta_time, required_organtype = affected_organtype)//Add a chance to cure liver trauma once implemented.
..()
. = TRUE
@@ -1492,10 +1492,10 @@
taste_description = "numbing bitterness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M, delta_time, times_fired) //I wanted a collection of small positive effects, this is as hard to obtain as coniine after all.
+/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired) //I wanted a collection of small positive effects, this is as hard to obtain as coniine after all.
. = ..()
- M.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25 * REM * delta_time)
- M.adjustBruteLoss(-0.35 * REM * delta_time, 0)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjustBruteLoss(-0.35 * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
return TRUE
/datum/reagent/medicine/polypyr/expose_mob(mob/living/carbon/human/exposed_human, methods=TOUCH, reac_volume)
@@ -1506,8 +1506,8 @@
exposed_human.facial_hair_color = "#9922ff"
exposed_human.update_body_parts()
-/datum/reagent/medicine/polypyr/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * delta_time)
+/datum/reagent/medicine/polypyr/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * delta_time, required_organtype = affected_organtype)
..()
. = TRUE
@@ -1520,17 +1520,17 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM //same as C2s
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/granibitaluri/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- var/healamount = max(0.5 - round(0.01 * (M.getBruteLoss() + M.getFireLoss()), 0.1), 0) //base of 0.5 healing per cycle and loses 0.1 healing for every 10 combined brute/burn damage you have
- M.adjustBruteLoss(-healamount * REM * delta_time, 0)
- M.adjustFireLoss(-healamount * REM * delta_time, 0)
+/datum/reagent/medicine/granibitaluri/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ var/healamount = max(0.5 - round(0.01 * (affected_mob.getBruteLoss() + affected_mob.getFireLoss()), 0.1), 0) //base of 0.5 healing per cycle and loses 0.1 healing for every 10 combined brute/burn damage you have
+ affected_mob.adjustBruteLoss(-healamount * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
+ affected_mob.adjustFireLoss(-healamount * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
..()
. = TRUE
-/datum/reagent/medicine/granibitaluri/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/granibitaluri/overdose_process(mob/living/affected_mob, delta_time, times_fired)
. = TRUE
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.2 * REM * delta_time)
- M.adjustToxLoss(0.2 * REM * delta_time, FALSE) //Only really deadly if you eat over 100u
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.2 * REM * delta_time, required_organtype = affected_organtype)
+ affected_mob.adjustToxLoss(0.2 * REM * delta_time, FALSE, required_biotype = affected_biotype) //Only really deadly if you eat over 100u
..()
// helps bleeding wounds clot faster
@@ -1549,34 +1549,34 @@
var/was_working
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/coagulant/on_mob_metabolize(mob/living/M)
- ADD_TRAIT(M, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
+/datum/reagent/medicine/coagulant/on_mob_metabolize(mob/living/affected_mob)
+ ADD_TRAIT(affected_mob, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
- if(ishuman(M))
- var/mob/living/carbon/human/blood_boy = M
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/blood_boy = affected_mob
blood_boy.physiology?.bleed_mod *= passive_bleed_modifier
return ..()
-/datum/reagent/medicine/coagulant/on_mob_end_metabolize(mob/living/M)
- REMOVE_TRAIT(M, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
+/datum/reagent/medicine/coagulant/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
if(was_working)
- to_chat(M, span_warning("The medicine thickening your blood loses its effect!"))
- if(ishuman(M))
- var/mob/living/carbon/human/blood_boy = M
+ to_chat(affected_mob, span_warning("The medicine thickening your blood loses its effect!"))
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/blood_boy = affected_mob
blood_boy.physiology?.bleed_mod /= passive_bleed_modifier
return ..()
-/datum/reagent/medicine/coagulant/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/medicine/coagulant/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- if(!M.blood_volume || !M.all_wounds)
+ if(!affected_mob.blood_volume || !affected_mob.all_wounds)
return
var/datum/wound/bloodiest_wound
- for(var/i in M.all_wounds)
+ for(var/i in affected_mob.all_wounds)
var/datum/wound/iter_wound = i
if(iter_wound.blood_flow)
if(iter_wound.blood_flow > bloodiest_wound?.blood_flow)
@@ -1584,31 +1584,31 @@
if(bloodiest_wound)
if(!was_working)
- to_chat(M, span_green("You can feel your flowing blood start thickening!"))
+ to_chat(affected_mob, span_green("You can feel your flowing blood start thickening!"))
was_working = TRUE
bloodiest_wound.adjust_blood_flow(-clot_rate * REM * delta_time)
else if(was_working)
was_working = FALSE
-/datum/reagent/medicine/coagulant/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/medicine/coagulant/overdose_process(mob/living/affected_mob, delta_time, times_fired)
. = ..()
- if(!M.blood_volume)
+ if(!affected_mob.blood_volume)
return
if(DT_PROB(7.5, delta_time))
- M.losebreath += rand(2, 4)
- M.adjustOxyLoss(rand(1, 3))
+ affected_mob.losebreath += rand(2, 4)
+ affected_mob.adjustOxyLoss(rand(1, 3), required_biotype = affected_biotype)
if(prob(30))
- to_chat(M, span_danger("You can feel your blood clotting up in your veins!"))
+ to_chat(affected_mob, span_danger("You can feel your blood clotting up in your veins!"))
else if(prob(10))
- to_chat(M, span_userdanger("You feel like your blood has stopped moving!"))
- M.adjustOxyLoss(rand(3, 4))
+ to_chat(affected_mob, span_userdanger("You feel like your blood has stopped moving!"))
+ affected_mob.adjustOxyLoss(rand(3, 4), required_biotype = affected_biotype)
if(prob(50))
- var/obj/item/organ/internal/lungs/our_lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
+ var/obj/item/organ/internal/lungs/our_lungs = affected_mob.getorganslot(ORGAN_SLOT_LUNGS)
our_lungs.applyOrganDamage(1)
else
- var/obj/item/organ/internal/heart/our_heart = M.getorganslot(ORGAN_SLOT_HEART)
+ var/obj/item/organ/internal/heart/our_heart = affected_mob.getorganslot(ORGAN_SLOT_HEART)
our_heart.applyOrganDamage(1)
// i googled "natural coagulant" and a couple of results came up for banana peels, so after precisely 30 more seconds of research, i now dub grinding banana peels good for your blood
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index ea11cd1b1ec..86dbba03c5d 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -238,10 +238,10 @@
exposed_mob.add_mood_event("watersprayed", /datum/mood_event/watersprayed)
-/datum/reagent/water/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/water/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- if(M.blood_volume)
- M.blood_volume += 0.1 * REM * delta_time // water is good for you!
+ if(affected_mob.blood_volume)
+ affected_mob.blood_volume += 0.1 * REM * delta_time // water is good for you!
///For weird backwards situations where water manages to get added to trays nutrients, as opposed to being snowflaked away like usual.
/datum/reagent/water/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
@@ -269,17 +269,17 @@
if(myseed)
myseed.adjust_instability(round(chems.get_reagent_amount(type) * 0.15))
-/datum/reagent/water/holywater/on_mob_metabolize(mob/living/L)
+/datum/reagent/water/holywater/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_HOLY, type)
+ ADD_TRAIT(affected_mob, TRAIT_HOLY, type)
-/datum/reagent/water/holywater/on_mob_add(mob/living/L, amount)
+/datum/reagent/water/holywater/on_mob_add(mob/living/affected_mob, amount)
. = ..()
if(data)
data["misc"] = 0
-/datum/reagent/water/holywater/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_HOLY, type)
+/datum/reagent/water/holywater/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_HOLY, type)
..()
/datum/reagent/water/holywater/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -287,35 +287,35 @@
if(IS_CULTIST(exposed_mob))
to_chat(exposed_mob, span_userdanger("A vile holiness begins to spread its shining tendrils through your mind, purging the Geometer of Blood's influence!"))
-/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.blood_volume)
- M.blood_volume += 0.1 * REM * delta_time // water is good for you!
+/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.blood_volume)
+ affected_mob.blood_volume += 0.1 * REM * delta_time // water is good for you!
if(!data)
data = list("misc" = 0)
data["misc"] += delta_time SECONDS * REM
- M.adjust_jitter_up_to(4 SECONDS * delta_time, 20 SECONDS)
- if(IS_CULTIST(M))
- for(var/datum/action/innate/cult/blood_magic/BM in M.actions)
- to_chat(M, span_cultlarge("Your blood rites falter as holy water scours your body!"))
+ affected_mob.adjust_jitter_up_to(4 SECONDS * delta_time, 20 SECONDS)
+ if(IS_CULTIST(affected_mob))
+ for(var/datum/action/innate/cult/blood_magic/BM in affected_mob.actions)
+ to_chat(affected_mob, span_cultlarge("Your blood rites falter as holy water scours your body!"))
for(var/datum/action/innate/cult/blood_spell/BS in BM.spells)
qdel(BS)
if(data["misc"] >= (25 SECONDS)) // 10 units
- M.adjust_stutter_up_to(4 SECONDS * delta_time, 20 SECONDS)
- M.set_dizzy_if_lower(10 SECONDS)
- if(IS_CULTIST(M) && DT_PROB(10, delta_time))
- M.say(pick("Av'te Nar'Sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","R'ge Na'sie","Diabo us Vo'iscum","Eld' Mon Nobis"), forced = "holy water")
+ affected_mob.adjust_stutter_up_to(4 SECONDS * delta_time, 20 SECONDS)
+ affected_mob.set_dizzy_if_lower(10 SECONDS)
+ if(IS_CULTIST(affected_mob) && DT_PROB(10, delta_time))
+ affected_mob.say(pick("Av'te Nar'Sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","R'ge Na'sie","Diabo us Vo'iscum","Eld' Mon Nobis"), forced = "holy water")
if(prob(10))
- M.visible_message(span_danger("[M] starts having a seizure!"), span_userdanger("You have a seizure!"))
- M.Unconscious(12 SECONDS)
- to_chat(M, "[pick("Your blood is your bond - you are nothing without it", "Do not forget your place", \
+ affected_mob.visible_message(span_danger("[affected_mob] starts having a seizure!"), span_userdanger("You have a seizure!"))
+ affected_mob.Unconscious(12 SECONDS)
+ to_chat(affected_mob, "[pick("Your blood is your bond - you are nothing without it", "Do not forget your place", \
"All that power, and you still fail?", "If you cannot scour this poison, I shall scour your meager life!")].")
if(data["misc"] >= (1 MINUTES)) // 24 units
- if(IS_CULTIST(M))
- M.mind.remove_antag_datum(/datum/antagonist/cult)
- M.Unconscious(100)
- M.remove_status_effect(/datum/status_effect/jitter)
- M.remove_status_effect(/datum/status_effect/speech/stutter)
+ if(IS_CULTIST(affected_mob))
+ affected_mob.mind.remove_antag_datum(/datum/antagonist/cult)
+ affected_mob.Unconscious(100)
+ affected_mob.remove_status_effect(/datum/status_effect/jitter)
+ affected_mob.remove_status_effect(/datum/status_effect/speech/stutter)
holder.remove_reagent(type, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
return
holder.remove_reagent(type, 1 * REAGENTS_METABOLISM * delta_time) //fixed consumption to prevent balancing going out of whack
@@ -377,23 +377,23 @@
ph = 6.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(IS_CULTIST(M))
- M.adjust_drowsyness(-5* REM * delta_time)
- M.AdjustAllImmobility(-40 *REM* REM * delta_time)
- M.adjustStaminaLoss(-10 * REM * delta_time, 0)
- M.adjustToxLoss(-2 * REM * delta_time, 0)
- M.adjustOxyLoss(-2 * REM * delta_time, 0)
- M.adjustBruteLoss(-2 * REM * delta_time, 0)
- M.adjustFireLoss(-2 * REM * delta_time, 0)
- if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL)
- M.blood_volume += 3 * REM * delta_time
+/datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(IS_CULTIST(affected_mob))
+ affected_mob.adjust_drowsyness(-5 * REM * delta_time)
+ affected_mob.AdjustAllImmobility(-40 * REM * delta_time)
+ affected_mob.adjustStaminaLoss(-10 * REM * delta_time, 0)
+ affected_mob.adjustToxLoss(-2 * REM * delta_time, 0)
+ affected_mob.adjustOxyLoss(-2 * REM * delta_time, 0)
+ affected_mob.adjustBruteLoss(-2 * REM * delta_time, 0)
+ affected_mob.adjustFireLoss(-2 * REM * delta_time, 0)
+ if(ishuman(affected_mob) && affected_mob.blood_volume < BLOOD_VOLUME_NORMAL)
+ affected_mob.blood_volume += 3 * REM * delta_time
else // Will deal about 90 damage when 50 units are thrown
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * delta_time, 150)
- M.adjustToxLoss(1 * REM * delta_time, 0)
- M.adjustFireLoss(1 * REM * delta_time, 0)
- M.adjustOxyLoss(1 * REM * delta_time, 0)
- M.adjustBruteLoss(1 * REM * delta_time, 0)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * delta_time, 150)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, 0)
+ affected_mob.adjustFireLoss(1 * REM * delta_time, 0)
+ affected_mob.adjustOxyLoss(1 * REM * delta_time, 0)
+ affected_mob.adjustBruteLoss(1 * REM * delta_time, 0)
..()
/datum/reagent/hellwater //if someone has this in their system they've really pissed off an eldrich god
@@ -403,12 +403,12 @@
ph = 0.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/hellwater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_fire_stacks(min(M.fire_stacks + (1.5 * delta_time), 5))
- M.ignite_mob() //Only problem with igniting people is currently the commonly available fire suits make you immune to being on fire
- M.adjustToxLoss(0.5*delta_time, 0)
- M.adjustFireLoss(0.5*delta_time, 0) //Hence the other damages... ain't I a bastard?
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2.5*delta_time, 150)
+/datum/reagent/hellwater/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_fire_stacks(min(affected_mob.fire_stacks + (1.5 * delta_time), 5))
+ affected_mob.ignite_mob() //Only problem with igniting people is currently the commonly available fire suits make you immune to being on fire
+ affected_mob.adjustToxLoss(0.5*delta_time, 0)
+ affected_mob.adjustFireLoss(0.5*delta_time, 0) //Hence the other damages... ain't I a bastard?
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2.5*delta_time, 150)
holder.remove_reagent(type, 0.5*delta_time)
/datum/reagent/medicine/omnizine/godblood
@@ -513,30 +513,30 @@
to_chat(exposed_mob, span_notice("That tasted horrible."))
-/datum/reagent/spraytan/overdose_process(mob/living/M, delta_time, times_fired)
+/datum/reagent/spraytan/overdose_process(mob/living/affected_mob, delta_time, times_fired)
metabolization_rate = 1 * REAGENTS_METABOLISM
- if(ishuman(M))
- var/mob/living/carbon/human/N = M
- if(!HAS_TRAIT(N, TRAIT_BALD))
- N.hairstyle = "Spiky"
- N.facial_hairstyle = "Shaved"
- N.facial_hair_color = "#000000"
- N.hair_color = "#000000"
- if(!(HAIR in N.dna.species.species_traits)) //No hair? No problem!
- N.dna.species.species_traits += HAIR
- if(N.dna.species.use_skintones)
- N.skin_tone = "orange"
- else if(MUTCOLORS in N.dna.species.species_traits) //Aliens with custom colors simply get turned orange
- N.dna.features["mcolor"] = "#ff8800"
- N.update_body(is_creating = TRUE)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/affected_human = affected_mob
+ if(!HAS_TRAIT(affected_human, TRAIT_BALD))
+ affected_human.hairstyle = "Spiky"
+ affected_human.facial_hairstyle = "Shaved"
+ affected_human.facial_hair_color = "#000000"
+ affected_human.hair_color = "#000000"
+ if(!(HAIR in affected_human.dna.species.species_traits)) //No hair? No problem!
+ affected_human.dna.species.species_traits += HAIR
+ if(affected_human.dna.species.use_skintones)
+ affected_human.skin_tone = "orange"
+ else if(MUTCOLORS in affected_human.dna.species.species_traits) //Aliens with custom colors simply get turned orange
+ affected_human.dna.features["mcolor"] = "#ff8800"
+ affected_human.update_body(is_creating = TRUE)
if(DT_PROB(3.5, delta_time))
- if(N.w_uniform)
- M.visible_message(pick("[M]'s collar pops up without warning.", "[M] flexes [M.p_their()] arms."))
+ if(affected_human.w_uniform)
+ affected_mob.visible_message(pick("[affected_mob]'s collar pops up without warning.", "[affected_mob] flexes [affected_mob.p_their()] arms."))
else
- M.visible_message("[M] flexes [M.p_their()] arms.")
+ affected_mob.visible_message("[affected_mob] flexes [affected_mob.p_their()] arms.")
if(DT_PROB(5, delta_time))
- M.say(pick("Shit was SO cash.", "You are everything bad in the world.", "What sports do you play, other than 'jack off to naked drawn Japanese people?'", "Don???t be a stranger. Just hit me with your best shot.", "My name is John and I hate every single one of you."), forced = /datum/reagent/spraytan)
+ affected_mob.say(pick("Shit was SO cash.", "You are everything bad in the world.", "What sports do you play, other than 'jack off to naked drawn Japanese people?'", "Don???t be a stranger. Just hit me with your best shot.", "My name is John and I hate every single one of you."), forced = /datum/reagent/spraytan)
..()
return
@@ -558,11 +558,11 @@
"You feel as though you're about to change at any moment!" = MUT_MSG_ABOUT2TURN)
var/cycles_to_turn = 20 //the current_cycle threshold / iterations needed before one can transform
-/datum/reagent/mutationtoxin/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
+/datum/reagent/mutationtoxin/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
. = TRUE
- if(!istype(H))
+ if(!istype(affected_mob))
return
- if(!(H.dna?.species) || !(H.mob_biotypes & MOB_ORGANIC))
+ if(!(affected_mob.dna?.species) || !(affected_mob.mob_biotypes & MOB_ORGANIC))
return
if(DT_PROB(5, delta_time))
@@ -578,14 +578,14 @@
for(var/i in mutationtexts)
if(mutationtexts[i] == filter)
pick_ur_fav += i
- to_chat(H, span_warning("[pick(pick_ur_fav)]"))
+ to_chat(affected_mob, span_warning("[pick(pick_ur_fav)]"))
if(current_cycle >= cycles_to_turn)
var/datum/species/species_type = race
- //H.set_species(species_type) //ORIGINAL
- H.set_species(species_type, TRUE, FALSE, null, null, null, null, TRUE) //SKYRAT EDIT CHANGE - CUSTOMIZATION
+ //affected_mob.set_species(species_type) //ORIGINAL
+ affected_mob.set_species(species_type, TRUE, FALSE, null, null, null, null, TRUE) //SKYRAT EDIT CHANGE - CUSTOMIZATION
holder.del_reagent(type)
- to_chat(H, span_warning("You've become \a [lowertext(initial(species_type.name))]!"))
+ to_chat(affected_mob, span_warning("You've become \a [lowertext(initial(species_type.name))]!"))
return
..()
@@ -643,20 +643,20 @@
taste_description = "grandma's gelatin"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/mutationtoxin/jelly/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
- if(isjellyperson(H))
- to_chat(H, span_warning("Your jelly shifts and morphs, turning you into another subspecies!"))
+/datum/reagent/mutationtoxin/jelly/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
+ if(isjellyperson(affected_mob))
+ to_chat(affected_mob, span_warning("Your jelly shifts and morphs, turning you into another subspecies!"))
var/species_type = pick(subtypesof(/datum/species/jelly))
- //H.set_species(species_type) //ORIGINAL
- H.set_species(species_type, TRUE, FALSE, null, null, null, null, TRUE, TRUE) //SKYRAT EDIT CHANGE - CUSTOMIZATION
+ //affected_mob.set_species(species_type) //ORIGINAL
+ affected_mob.set_species(species_type, TRUE, FALSE, null, null, null, null, TRUE, TRUE) //SKYRAT EDIT CHANGE - CUSTOMIZATION
holder.del_reagent(type)
return TRUE
if(current_cycle >= cycles_to_turn) //overwrite since we want subtypes of jelly
var/datum/species/species_type = pick(subtypesof(race))
- //H.set_species(species_type) //ORIGINAL
- H.set_species(species_type, TRUE, FALSE, null, null, null, null, TRUE, TRUE) //SKYRAT EDIT CHANGE - CUSTOMIZATION
+ //affected_mob.set_species(species_type) //ORIGINAL
+ affected_mob.set_species(species_type, TRUE, FALSE, null, null, null, null, TRUE, TRUE) //SKYRAT EDIT CHANGE - CUSTOMIZATION
holder.del_reagent(type)
- to_chat(H, span_warning("You've become \a [initial(species_type.name)]!"))
+ to_chat(affected_mob, span_warning("You've become \a [initial(species_type.name)]!"))
return TRUE
return ..()
@@ -748,13 +748,13 @@
taste_description = "slime"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/mulligan/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
+/datum/reagent/mulligan/on_mob_life(mob/living/carbon/human/affected_mob, delta_time, times_fired)
..()
- if (!istype(H))
+ if (!istype(affected_mob))
return
- to_chat(H, span_warning("You grit your teeth in pain as your body rapidly mutates!"))
- H.visible_message("[H] suddenly transforms!")
- randomize_human(H)
+ to_chat(affected_mob, span_warning("You grit your teeth in pain as your body rapidly mutates!"))
+ affected_mob.visible_message("[affected_mob] suddenly transforms!")
+ randomize_human(affected_mob)
/datum/reagent/aslimetoxin
name = "Advanced Mutation Toxin"
@@ -790,10 +790,10 @@
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/serotrotium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(ishuman(M))
+/datum/reagent/serotrotium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(ishuman(affected_mob))
if(DT_PROB(3.5, delta_time))
- M.emote(pick("twitch","drool","moan","gasp"))
+ affected_mob.emote(pick("twitch","drool","moan","gasp"))
..()
/datum/reagent/oxygen
@@ -827,10 +827,10 @@
if(!istype(exposed_obj, /obj/item/stack/sheet/iron))
return
- var/obj/item/stack/sheet/iron/M = exposed_obj
- reac_volume = min(reac_volume, M.amount)
- new/obj/item/stack/sheet/bronze(get_turf(M), reac_volume)
- M.use(reac_volume)
+ var/obj/item/stack/sheet/iron/metal = exposed_obj
+ reac_volume = min(reac_volume, metal.amount)
+ new/obj/item/stack/sheet/bronze(get_turf(metal), reac_volume)
+ metal.use(reac_volume)
/datum/reagent/nitrogen
name = "Nitrogen"
@@ -870,12 +870,12 @@
taste_mult = 0 // apparently tasteless.
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/mercury/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && !isspaceturf(M.loc))
- step(M, pick(GLOB.cardinals))
+/datum/reagent/mercury/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && !isspaceturf(affected_mob.loc))
+ step(affected_mob, pick(GLOB.cardinals))
if(DT_PROB(3.5, delta_time))
- M.emote(pick("twitch","drool","moan"))
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5*delta_time)
+ affected_mob.emote(pick("twitch","drool","moan"))
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5*delta_time)
..()
/datum/reagent/sulfur
@@ -926,8 +926,8 @@
// White Phosphorous + water -> phosphoric acid. That's not a good thing really.
-/datum/reagent/chlorine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.take_bodypart_damage(0.5*REM*delta_time, 0)
+/datum/reagent/chlorine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.take_bodypart_damage(0.5*REM*delta_time, 0)
. = TRUE
..()
@@ -949,8 +949,8 @@
mytray.adjust_waterlevel(-round(chems.get_reagent_amount(src.type) * 0.5))
mytray.adjust_weedlevel(-rand(1,4))
-/datum/reagent/fluorine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustToxLoss(0.5*REM*delta_time, 0)
+/datum/reagent/fluorine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(0.5*REM*delta_time, 0)
. = TRUE
..()
@@ -989,11 +989,11 @@
ph = 11.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/lithium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !isspaceturf(M.loc) && isturf(M.loc))
- step(M, pick(GLOB.cardinals))
+/datum/reagent/lithium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && !isspaceturf(affected_mob.loc) && isturf(affected_mob.loc))
+ step(affected_mob, pick(GLOB.cardinals))
if(DT_PROB(2.5, delta_time))
- M.emote(pick("twitch","drool","moan"))
+ affected_mob.emote(pick("twitch","drool","moan"))
..()
/datum/reagent/glycerol
@@ -1030,9 +1030,9 @@
color = "#606060" //pure iron? let's make it violet of course
ph = 6
-/datum/reagent/iron/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- if(C.blood_volume < BLOOD_VOLUME_NORMAL)
- C.blood_volume += 0.25 * delta_time
+/datum/reagent/iron/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.blood_volume < BLOOD_VOLUME_NORMAL)
+ affected_mob.blood_volume += 0.25 * delta_time
..()
/datum/reagent/gold
@@ -1065,8 +1065,8 @@
material = /datum/material/uranium
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/uranium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustToxLoss(tox_damage * delta_time * REM)
+/datum/reagent/uranium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(tox_damage * delta_time * REM)
..()
/datum/reagent/uranium/expose_turf(turf/exposed_turf, reac_volume)
@@ -1120,12 +1120,12 @@
if(methods & (TOUCH|VAPOR))
do_teleport(exposed_mob, get_turf(exposed_mob), (reac_volume / 5), asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE) //4 tiles per crystal
-/datum/reagent/bluespace/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/bluespace/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle > 10 && DT_PROB(7.5, delta_time))
- to_chat(M, span_warning("You feel unstable..."))
- M.set_jitter_if_lower(2 SECONDS)
+ to_chat(affected_mob, span_warning("You feel unstable..."))
+ affected_mob.set_jitter_if_lower(2 SECONDS)
current_cycle = 1
- addtimer(CALLBACK(M, TYPE_PROC_REF(/mob/living, bluespace_shuffle)), 30)
+ addtimer(CALLBACK(affected_mob, TYPE_PROC_REF(/mob/living, bluespace_shuffle)), 30)
..()
/mob/living/proc/bluespace_shuffle()
@@ -1170,7 +1170,7 @@
exposed_mob.adjust_fire_stacks(reac_volume / 10)
/datum/reagent/fuel/on_mob_life(mob/living/carbon/victim, delta_time, times_fired)
- victim.adjustToxLoss(0.5 * delta_time, 0)
+ victim.adjustToxLoss(0.5 * delta_time, FALSE, required_biotype = affected_biotype)
..()
return TRUE
@@ -1229,10 +1229,10 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/space_cleaner/ez_clean/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustBruteLoss(1.665*delta_time)
- M.adjustFireLoss(1.665*delta_time)
- M.adjustToxLoss(1.665*delta_time)
+/datum/reagent/space_cleaner/ez_clean/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustBruteLoss(1.665*delta_time)
+ affected_mob.adjustFireLoss(1.665*delta_time)
+ affected_mob.adjustToxLoss(1.665*delta_time)
..()
/datum/reagent/space_cleaner/ez_clean/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -1250,17 +1250,17 @@
ph = 11.9
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/cryptobiolin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.set_dizzy_if_lower(2 SECONDS)
+/datum/reagent/cryptobiolin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.set_dizzy_if_lower(2 SECONDS)
// Cryptobiolin adjusts the mob's confusion down to 20 seconds if it's higher,
// or up to 1 second if it's lower, but will do nothing if it's in between
- var/confusion_left = M.get_timed_status_effect_duration(/datum/status_effect/confusion)
+ var/confusion_left = affected_mob.get_timed_status_effect_duration(/datum/status_effect/confusion)
if(confusion_left < 1 SECONDS)
- M.set_confusion(1 SECONDS)
+ affected_mob.set_confusion(1 SECONDS)
else if(confusion_left > 20 SECONDS)
- M.set_confusion(20 SECONDS)
+ affected_mob.set_confusion(20 SECONDS)
..()
@@ -1273,14 +1273,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opioids = 10)
-/datum/reagent/impedrezene/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_jitter(-5 SECONDS * delta_time)
+/datum/reagent/impedrezene/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_jitter(-5 SECONDS * delta_time)
if(DT_PROB(55, delta_time))
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2)
if(DT_PROB(30, delta_time))
- M.adjust_drowsyness(3)
+ affected_mob.adjust_drowsyness(3)
if(DT_PROB(5, delta_time))
- M.emote("drool")
+ affected_mob.emote("drool")
..()
/datum/reagent/cyborg_mutation_nanomachines
@@ -1431,14 +1431,14 @@
if(methods & VAPOR)
exposed_mob.adjust_drowsyness(max(round(reac_volume, 1), 2))
-/datum/reagent/nitrous_oxide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_drowsyness(2 * REM * delta_time)
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- H.blood_volume = max(H.blood_volume - (10 * REM * delta_time), 0)
+/datum/reagent/nitrous_oxide/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_drowsyness(2 * REM * delta_time)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/affected_human = affected_mob
+ affected_human.blood_volume = max(affected_human.blood_volume - (10 * REM * delta_time), 0)
if(DT_PROB(10, delta_time))
- M.losebreath += 2
- M.adjust_confusion_up_to(2 SECONDS, 5 SECONDS)
+ affected_mob.losebreath += 2
+ affected_mob.adjust_confusion_up_to(2 SECONDS, 5 SECONDS)
..()
/////////////////////////Colorful Powder////////////////////////////
@@ -1582,9 +1582,9 @@
taste_description = "plant food"
ph = 3
-/datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(tox_prob, delta_time))
- M.adjustToxLoss(1, 0)
+ affected_mob.adjustToxLoss(1, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -1682,8 +1682,8 @@
ph = 1.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/stable_plasma/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- C.adjustPlasma(10 * REM * delta_time)
+/datum/reagent/stable_plasma/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustPlasma(10 * REM * delta_time)
..()
/datum/reagent/iodine
@@ -1769,21 +1769,21 @@
name = "Royal Carpet?"
description = "For those that break the game and need to make an issue report."
-/datum/reagent/carpet/royal/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/carpet/royal/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- var/obj/item/organ/internal/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
+ var/obj/item/organ/internal/liver/liver = affected_mob.getorganslot(ORGAN_SLOT_LIVER)
if(liver)
// Heads of staff and the captain have a "royal metabolism"
if(HAS_TRAIT(liver, TRAIT_ROYAL_METABOLISM))
if(DT_PROB(5, delta_time))
- to_chat(M, "You feel like royalty.")
+ to_chat(affected_mob, "You feel like royalty.")
if(DT_PROB(2.5, delta_time))
- M.say(pick("Peasants..","This carpet is worth more than your contracts!","I could fire you at any time..."), forced = "royal carpet")
+ affected_mob.say(pick("Peasants..","This carpet is worth more than your contracts!","I could fire you at any time..."), forced = "royal carpet")
// The quartermaster, as a semi-head, has a "pretender royal" metabolism
else if(HAS_TRAIT(liver, TRAIT_PRETENDER_ROYAL_METABOLISM))
if(DT_PROB(8, delta_time))
- to_chat(M, "You feel like an impostor...")
+ to_chat(affected_mob, "You feel like an impostor...")
/datum/reagent/carpet/royal/black
name = "Royal Black Carpet"
@@ -2014,9 +2014,9 @@
color_callback = null
color = pick(random_color_list)
-/datum/reagent/colorful_reagent/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/colorful_reagent/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(can_colour_mobs)
- M.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
+ affected_mob.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
return ..()
/// Colors anything it touches a random color.
@@ -2094,12 +2094,12 @@
exposed_human.facial_hairstyle = "Beard (Very Long)"
exposed_human.update_body_parts()
-/datum/reagent/concentrated_barbers_aid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/concentrated_barbers_aid/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
if(current_cycle > 20 / creation_purity)
- if(!ishuman(M))
+ if(!ishuman(affected_mob))
return
- var/mob/living/carbon/human/human_mob = M
+ var/mob/living/carbon/human/human_mob = affected_mob
if(creation_purity == 1 && human_mob.has_quirk(/datum/quirk/item_quirk/bald))
human_mob.remove_quirk(/datum/quirk/item_quirk/bald)
var/datum/species/species_datum = human_mob.dna?.species
@@ -2109,11 +2109,11 @@
return
species_datum.species_traits |= HAIR
var/message
- if(HAS_TRAIT(M, TRAIT_BALD))
+ if(HAS_TRAIT(affected_mob, TRAIT_BALD))
message = span_warning("You feel your scalp mutate, but you are still hopelessly bald.")
else
message = span_notice("Your scalp mutates, a full head of hair sprouting from it.")
- to_chat(M, message)
+ to_chat(affected_mob, message)
human_mob.update_body_parts()
/datum/reagent/baldium
@@ -2250,9 +2250,9 @@
ph = 3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(1, delta_time))
- M.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz..."), forced = "royal bee jelly")
+ affected_mob.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz..."), forced = "royal bee jelly")
..()
//Misc reagents
@@ -2284,10 +2284,10 @@
color = "#00f041"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/magillitis/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/magillitis/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
..()
- if((ishuman(M)) && current_cycle >= 10)
- M.gorillize()
+ if((ishuman(affected_mob)) && current_cycle >= 10)
+ affected_mob.gorillize()
/datum/reagent/growthserum
name = "Growth Serum"
@@ -2297,7 +2297,7 @@
taste_description = "bitterness" // apparently what viagra tastes like
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/growthserum/on_mob_life(mob/living/carbon/H, delta_time, times_fired)
+/datum/reagent/growthserum/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/newsize = current_size
switch(volume)
if(0 to 19)
@@ -2311,15 +2311,15 @@
if(200 to INFINITY)
newsize = 3.5*RESIZE_DEFAULT_SIZE
- H.resize = newsize/current_size
+ affected_mob.resize = newsize/current_size
current_size = newsize
- H.update_transform()
+ affected_mob.update_transform()
..()
-/datum/reagent/growthserum/on_mob_end_metabolize(mob/living/M)
- M.resize = RESIZE_DEFAULT_SIZE/current_size
+/datum/reagent/growthserum/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.resize = RESIZE_DEFAULT_SIZE/current_size
current_size = RESIZE_DEFAULT_SIZE
- M.update_transform()
+ affected_mob.update_transform()
..()
/datum/reagent/plastic_polymers
@@ -2374,12 +2374,12 @@
ph = 15
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/pax/on_mob_metabolize(mob/living/L)
+/datum/reagent/pax/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_PACIFISM, type)
+ ADD_TRAIT(affected_mob, TRAIT_PACIFISM, type)
-/datum/reagent/pax/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_PACIFISM, type)
+/datum/reagent/pax/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_PACIFISM, type)
..()
/datum/reagent/bz_metabolites
@@ -2418,12 +2418,12 @@
taste_description = "dizziness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_confusion_up_to(3 SECONDS * REM * delta_time, 5 SECONDS)
- M.adjust_dizzy_up_to(6 SECONDS * REM * delta_time, 12 SECONDS)
+/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_confusion_up_to(3 SECONDS * REM * delta_time, 5 SECONDS)
+ affected_mob.adjust_dizzy_up_to(6 SECONDS * REM * delta_time, 12 SECONDS)
if(DT_PROB(10, delta_time))
- to_chat(M, "You feel confused and disoriented.")
+ to_chat(affected_mob, "You feel confused and disoriented.")
..()
/datum/reagent/peaceborg/tire
@@ -2433,12 +2433,12 @@
taste_description = "tiredness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/peaceborg/tire/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- var/healthcomp = (100 - M.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS.
- if(M.getStaminaLoss() < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.)
- M.adjustStaminaLoss(10 * REM * delta_time)
+/datum/reagent/peaceborg/tire/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ var/healthcomp = (100 - affected_mob.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS.
+ if(affected_mob.getStaminaLoss() < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.)
+ affected_mob.adjustStaminaLoss(10 * REM * delta_time)
if(DT_PROB(16, delta_time))
- to_chat(M, "You should sit down and take a rest...")
+ to_chat(affected_mob, "You should sit down and take a rest...")
..()
/datum/reagent/gondola_mutation_toxin
@@ -2473,33 +2473,33 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
var/yuck_cycle = 0 //! The `current_cycle` when puking starts.
-/datum/reagent/yuck/on_mob_add(mob/living/L)
+/datum/reagent/yuck/on_mob_add(mob/living/affected_mob)
. = ..()
- if(HAS_TRAIT(L, TRAIT_NOHUNGER)) //they can't puke
+ if(HAS_TRAIT(affected_mob, TRAIT_NOHUNGER)) //they can't puke
holder.del_reagent(type)
#define YUCK_PUKE_CYCLES 3 // every X cycle is a puke
#define YUCK_PUKES_TO_STUN 3 // hit this amount of pukes in a row to start stunning
-/datum/reagent/yuck/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+/datum/reagent/yuck/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(!yuck_cycle)
if(DT_PROB(4, delta_time))
var/dread = pick("Something is moving in your stomach...", \
"A wet growl echoes from your stomach...", \
"For a moment you feel like your surroundings are moving, but it's your stomach...")
- to_chat(C, span_userdanger("[dread]"))
+ to_chat(affected_mob, span_userdanger("[dread]"))
yuck_cycle = current_cycle
else
var/yuck_cycles = current_cycle - yuck_cycle
if(yuck_cycles % YUCK_PUKE_CYCLES == 0)
if(yuck_cycles >= YUCK_PUKE_CYCLES * YUCK_PUKES_TO_STUN)
holder.remove_reagent(type, 5)
- C.vomit(rand(14, 26), stun = yuck_cycles >= YUCK_PUKE_CYCLES * YUCK_PUKES_TO_STUN)
+ affected_mob.vomit(rand(14, 26), stun = yuck_cycles >= YUCK_PUKE_CYCLES * YUCK_PUKES_TO_STUN)
if(holder)
return ..()
#undef YUCK_PUKE_CYCLES
#undef YUCK_PUKES_TO_STUN
-/datum/reagent/yuck/on_mob_end_metabolize(mob/living/L)
+/datum/reagent/yuck/on_mob_end_metabolize(mob/living/affected_mob)
yuck_cycle = 0 // reset vomiting
return ..()
@@ -2596,12 +2596,12 @@
exposed_obj.AddElement(/datum/element/forced_gravity, 0)
addtimer(CALLBACK(exposed_obj, PROC_REF(_RemoveElement), list(/datum/element/forced_gravity, 0)), volume * time_multiplier)
-/datum/reagent/gravitum/on_mob_metabolize(mob/living/L)
- L.AddElement(/datum/element/forced_gravity, 0) //0 is the gravity, and in this case weightless
+/datum/reagent/gravitum/on_mob_metabolize(mob/living/affected_mob)
+ affected_mob.AddElement(/datum/element/forced_gravity, 0) //0 is the gravity, and in this case weightless
return ..()
-/datum/reagent/gravitum/on_mob_end_metabolize(mob/living/L)
- L.RemoveElement(/datum/element/forced_gravity, 0)
+/datum/reagent/gravitum/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.RemoveElement(/datum/element/forced_gravity, 0)
/datum/reagent/cellulose
name = "Cellulose Fibers"
@@ -2623,29 +2623,29 @@
/// Whether we've had at least WOUND_DETERMINATION_SEVERE (2.5u) of determination at any given time. No damage slowdown immunity or indication we're having a second wind if it's just a single moderate wound
var/significant = FALSE
-/datum/reagent/determination/on_mob_end_metabolize(mob/living/carbon/M)
+/datum/reagent/determination/on_mob_end_metabolize(mob/living/carbon/affected_mob)
if(significant)
var/stam_crash = 0
- for(var/thing in M.all_wounds)
+ for(var/thing in affected_mob.all_wounds)
var/datum/wound/W = thing
stam_crash += (W.severity + 1) * 3 // spike of 3 stam damage per wound severity (moderate = 6, severe = 9, critical = 12) when the determination wears off if it was a combat rush
- M.adjustStaminaLoss(stam_crash)
- M.remove_status_effect(/datum/status_effect/determined)
+ affected_mob.adjustStaminaLoss(stam_crash)
+ affected_mob.remove_status_effect(/datum/status_effect/determined)
..()
-/datum/reagent/determination/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/determination/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(!significant && volume >= WOUND_DETERMINATION_SEVERE)
significant = TRUE
- M.apply_status_effect(/datum/status_effect/determined) // in addition to the slight healing, limping cooldowns are divided by 4 during the combat high
+ affected_mob.apply_status_effect(/datum/status_effect/determined) // in addition to the slight healing, limping cooldowns are divided by 4 during the combat high
volume = min(volume, WOUND_DETERMINATION_MAX)
- for(var/thing in M.all_wounds)
+ for(var/thing in affected_mob.all_wounds)
var/datum/wound/W = thing
var/obj/item/bodypart/wounded_part = W.limb
if(wounded_part)
wounded_part.heal_damage(0.25 * REM * delta_time, 0.25 * REM * delta_time)
- M.adjustStaminaLoss(-0.25 * REM * delta_time) // the more wounds, the more stamina regen
+ affected_mob.adjustStaminaLoss(-0.25 * REM * delta_time) // the more wounds, the more stamina regen
..()
// unholy water, but for heretics.
@@ -2810,9 +2810,9 @@
taste_description = "burning"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/brimdust/on_mob_life(mob/living/carbon/carbon, delta_time, times_fired)
+/datum/reagent/brimdust/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
- carbon.adjustFireLoss((ispodperson(carbon) ? -1 : 1) * delta_time)
+ affected_mob.adjustFireLoss((ispodperson(affected_mob) ? -1 : 1) * delta_time)
/datum/reagent/brimdust/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
. = ..()
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
index 8358b883906..d5f9d4405dc 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
@@ -12,8 +12,8 @@
if(reac_volume >= 1)
exposed_turf.AddComponent(/datum/component/thermite, reac_volume)
-/datum/reagent/thermite/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustFireLoss(1 * REM * delta_time, 0)
+/datum/reagent/thermite/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustFireLoss(1 * REM * delta_time, 0)
..()
return TRUE
@@ -48,9 +48,9 @@
penetrates_skin = NONE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/clf3/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_fire_stacks(2 * REM * delta_time)
- M.adjustFireLoss(0.3 * max(M.fire_stacks, 1) * REM * delta_time, 0)
+/datum/reagent/clf3/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_fire_stacks(2 * REM * delta_time)
+ affected_mob.adjustFireLoss(0.3 * max(affected_mob.fire_stacks, 1) * REM * delta_time, 0)
..()
return TRUE
@@ -203,8 +203,8 @@
mytray.adjust_toxic(round(chems.get_reagent_amount(type) * 7))
mytray.adjust_weedlevel(-rand(5,9)) //At least give them a small reward if they bother.
-/datum/reagent/napalm/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_fire_stacks(1 * REM * delta_time)
+/datum/reagent/napalm/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_fire_stacks(1 * REM * delta_time)
..()
/datum/reagent/napalm/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -235,28 +235,28 @@
return
burning_temperature = null
-/datum/reagent/cryostylane/on_mob_add(mob/living/consumer, amount)
+/datum/reagent/cryostylane/on_mob_add(mob/living/affected_mob, amount)
. = ..()
- consumer.mob_surgery_speed_mod = 1-((CRYO_SPEED_PREFACTOR * (1 - creation_purity))+CRYO_SPEED_CONSTANT) //10% - 30% slower
- consumer.color = COLOR_CYAN
+ affected_mob.mob_surgery_speed_mod = 1-((CRYO_SPEED_PREFACTOR * (1 - creation_purity))+CRYO_SPEED_CONSTANT) //10% - 30% slower
+ affected_mob.color = COLOR_CYAN
-/datum/reagent/cryostylane/on_mob_delete(mob/living/consumer)
+/datum/reagent/cryostylane/on_mob_delete(mob/living/affected_mob)
. = ..()
- consumer.mob_surgery_speed_mod = 1
- consumer.color = COLOR_WHITE
+ affected_mob.mob_surgery_speed_mod = 1
+ affected_mob.color = COLOR_WHITE
//Pauses decay! Does do something, I promise.
-/datum/reagent/cryostylane/on_mob_dead(mob/living/carbon/consumer, delta_time)
+/datum/reagent/cryostylane/on_mob_dead(mob/living/carbon/affected_mob, delta_time)
. = ..()
metabolization_rate = 0.05 * REM //slower consumption when dead
-/datum/reagent/cryostylane/on_mob_life(mob/living/carbon/consumer, delta_time, times_fired)
+/datum/reagent/cryostylane/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
metabolization_rate = 0.25 * REM//faster consumption when alive
- if(consumer.reagents.has_reagent(/datum/reagent/oxygen))
- consumer.reagents.remove_reagent(/datum/reagent/oxygen, 0.5 * REM * delta_time)
- consumer.adjust_bodytemperature(-15 * REM * delta_time)
- if(ishuman(consumer))
- var/mob/living/carbon/human/humi = consumer
+ if(affected_mob.reagents.has_reagent(/datum/reagent/oxygen))
+ affected_mob.reagents.remove_reagent(/datum/reagent/oxygen, 0.5 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-15 * REM * delta_time)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/humi = affected_mob
humi.adjust_coretemperature(-15 * REM * delta_time)
..()
@@ -281,12 +281,12 @@
burning_volume = 0.05
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/pyrosium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/pyrosium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/oxygen))
holder.remove_reagent(/datum/reagent/oxygen, 0.5 * REM * delta_time)
- M.adjust_bodytemperature(15 * REM * delta_time)
- if(ishuman(M))
- var/mob/living/carbon/human/humi = M
+ affected_mob.adjust_bodytemperature(15 * REM * delta_time)
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/humi = affected_mob
humi.adjust_coretemperature(15 * REM * delta_time)
..()
@@ -307,25 +307,25 @@
var/shock_timer = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/teslium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/teslium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
shock_timer++
if(shock_timer >= rand(5, 30)) //Random shocks are wildly unpredictable
shock_timer = 0
- M.electrocute_act(rand(5, 20), "Teslium in their body", 1, SHOCK_NOGLOVES) //SHOCK_NOGLOVES because it's caused from INSIDE of you
- playsound(M, SFX_SPARKS, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
+ affected_mob.electrocute_act(rand(5, 20), "Teslium in their body", 1, SHOCK_NOGLOVES) //SHOCK_NOGLOVES because it's caused from INSIDE of you
+ playsound(affected_mob, SFX_SPARKS, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
..()
-/datum/reagent/teslium/on_mob_metabolize(mob/living/carbon/human/L)
+/datum/reagent/teslium/on_mob_metabolize(mob/living/carbon/human/affected_mob)
. = ..()
- if(!istype(L))
+ if(!istype(affected_mob))
return
- L.physiology.siemens_coeff *= 2
+ affected_mob.physiology.siemens_coeff *= 2
-/datum/reagent/teslium/on_mob_end_metabolize(mob/living/carbon/human/L)
+/datum/reagent/teslium/on_mob_end_metabolize(mob/living/carbon/human/affected_mob)
. = ..()
- if(!istype(L))
+ if(!istype(affected_mob))
return
- L.physiology.siemens_coeff *= 0.5
+ affected_mob.physiology.siemens_coeff *= 0.5
/datum/reagent/teslium/energized_jelly
name = "Energized Jelly"
@@ -335,15 +335,15 @@
taste_description = "jelly"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(isjellyperson(M))
+/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(isjellyperson(affected_mob))
shock_timer = 0 //immune to shocks
- M.AdjustAllImmobility(-40 *REM * delta_time)
- M.adjustStaminaLoss(-2 * REM * delta_time, 0)
- if(is_species(M, /datum/species/jelly/luminescent))
- var/mob/living/carbon/human/H = M
- var/datum/species/jelly/luminescent/L = H.dna.species
- L.extract_cooldown = max(L.extract_cooldown - (2 SECONDS * REM * delta_time), 0)
+ affected_mob.AdjustAllImmobility(-40 *REM * delta_time)
+ affected_mob.adjustStaminaLoss(-2 * REM * delta_time, 0)
+ if(is_species(affected_mob, /datum/species/jelly/luminescent))
+ var/mob/living/carbon/human/affected_human = affected_mob
+ var/datum/species/jelly/luminescent/slime_species = affected_human.dna.species
+ slime_species.extract_cooldown = max(slime_species.extract_cooldown - (2 SECONDS * REM * delta_time), 0)
..()
/datum/reagent/firefighting_foam
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index 0c17930bda9..70148157f5b 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -22,9 +22,9 @@
if(chems.has_reagent(type, 1))
mytray.adjust_toxic(round(chems.get_reagent_amount(type) * 2))
-/datum/reagent/toxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(toxpwr && M.health > health_required)
- M.adjustToxLoss(toxpwr * REM * normalise_creation_purity() * delta_time, 0)
+/datum/reagent/toxin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(toxpwr && affected_mob.health > health_required)
+ affected_mob.adjustToxLoss(toxpwr * REM * normalise_creation_purity() * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -63,8 +63,8 @@
exposed_mob.updateappearance()
exposed_mob.domutcheck()
-/datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- C.adjustToxLoss(0.5 * delta_time * REM)
+/datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustToxLoss(0.5 * delta_time * REM, required_biotype = affected_biotype)
return ..()
/datum/reagent/toxin/mutagen/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
@@ -98,10 +98,10 @@
UnregisterSignal(holder, COMSIG_REAGENTS_TEMP_CHANGE)
return ..()
-/datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+/datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/medicine/epinephrine))
holder.remove_reagent(/datum/reagent/medicine/epinephrine, 2 * REM * delta_time)
- C.adjustPlasma(20 * REM * delta_time)
+ affected_mob.adjustPlasma(20 * REM * delta_time)
return ..()
/// Handles plasma boiling.
@@ -142,14 +142,14 @@
material = /datum/material/hot_ice
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/hot_ice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/hot_ice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/medicine/epinephrine))
holder.remove_reagent(/datum/reagent/medicine/epinephrine, 2 * REM * delta_time)
- M.adjustPlasma(20 * REM * delta_time)
- M.adjust_bodytemperature(-7 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, M.get_body_temp_normal())
- if(ishuman(M))
- var/mob/living/carbon/human/humi = M
- humi.adjust_coretemperature(-7 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+ affected_mob.adjustPlasma(20 * REM * delta_time)
+ affected_mob.adjust_bodytemperature(-7 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, affected_mob.get_body_temp_normal())
+ if(ishuman(affected_mob))
+ var/mob/living/carbon/human/humi = affected_mob
+ humi.adjust_coretemperature(-7 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, affected_mob.get_body_temp_normal())
return ..()
/datum/reagent/toxin/lexorin
@@ -163,24 +163,24 @@
ph = 1.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
. = TRUE
- if(HAS_TRAIT(C, TRAIT_NOBREATH))
+ if(HAS_TRAIT(affected_mob, TRAIT_NOBREATH))
. = FALSE
if(.)
- C.adjustOxyLoss(5 * REM * normalise_creation_purity() * delta_time, 0)
- C.losebreath += 2 * REM * normalise_creation_purity() * delta_time
+ affected_mob.adjustOxyLoss(5 * REM * normalise_creation_purity() * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.losebreath += 2 * REM * normalise_creation_purity() * delta_time
if(DT_PROB(10, delta_time))
- C.emote("gasp")
+ affected_mob.emote("gasp")
..()
-/datum/reagent/toxin/lexorin/on_mob_metabolize(mob/living/L)
- RegisterSignal(L, COMSIG_CARBON_ATTEMPT_BREATHE, PROC_REF(block_breath))
+/datum/reagent/toxin/lexorin/on_mob_metabolize(mob/living/affected_mob)
+ RegisterSignal(affected_mob, COMSIG_CARBON_ATTEMPT_BREATHE, PROC_REF(block_breath))
-/datum/reagent/toxin/lexorin/on_mob_end_metabolize(mob/living/L)
- UnregisterSignal(L, COMSIG_CARBON_ATTEMPT_BREATHE, PROC_REF(block_breath))
+/datum/reagent/toxin/lexorin/on_mob_end_metabolize(mob/living/affected_mob)
+ UnregisterSignal(affected_mob, COMSIG_CARBON_ATTEMPT_BREATHE, PROC_REF(block_breath))
/datum/reagent/toxin/lexorin/proc/block_breath(mob/living/source)
SIGNAL_HANDLER
@@ -196,13 +196,13 @@
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(5, delta_time))
- to_chat(M, span_danger("Your insides are burning!"))
- M.adjustToxLoss(rand(20, 60), 0)
+ to_chat(affected_mob, span_danger("Your insides are burning!"))
+ affected_mob.adjustToxLoss(rand(20, 60), FALSE, required_biotype = affected_biotype)
. = TRUE
else if(DT_PROB(23, delta_time))
- M.heal_bodypart_damage(5)
+ affected_mob.heal_bodypart_damage(5)
. = TRUE
..()
@@ -215,10 +215,10 @@
ph = 8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(HAS_TRAIT(M, TRAIT_FAT))
- M.investigate_log("has been gibbed by consuming [src] while fat.", INVESTIGATE_DEATHS)
- M.inflate_gib()
+/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(HAS_TRAIT(affected_mob, TRAIT_FAT))
+ affected_mob.investigate_log("has been gibbed by consuming [src] while fat.", INVESTIGATE_DEATHS)
+ affected_mob.inflate_gib()
return ..()
/datum/reagent/toxin/carpotoxin
@@ -247,7 +247,7 @@
/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/holder_mob)
. = ..()
- holder_mob.adjustOxyLoss(0.5*REM, 0)
+ holder_mob.adjustOxyLoss(0.5*REM, FALSE, required_biotype = affected_biotype)
if(data?["method"] & INGEST)
holder_mob.fakedeath(type)
@@ -263,19 +263,19 @@
LAZYINITLIST(zombiepowder.data)
zombiepowder.data["method"] |= INGEST
-/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/M, delta_time, times_fired)
- if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && HAS_TRAIT(M, TRAIT_DEATHCOMA))
+/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/affected_mob, delta_time, times_fired)
+ if(HAS_TRAIT(affected_mob, TRAIT_FAKEDEATH) && HAS_TRAIT(affected_mob, TRAIT_DEATHCOMA))
..()
return TRUE
switch(current_cycle)
if(1 to 5)
- M.adjust_confusion(1 SECONDS * REM * delta_time)
- M.adjust_drowsyness(1 * REM * delta_time)
- M.adjust_slurring(6 SECONDS * REM * delta_time)
+ affected_mob.adjust_confusion(1 SECONDS * REM * delta_time)
+ affected_mob.adjust_drowsyness(1 * REM * delta_time)
+ affected_mob.adjust_slurring(6 SECONDS * REM * delta_time)
if(5 to 8)
- M.adjustStaminaLoss(40 * REM * delta_time, 0)
+ affected_mob.adjustStaminaLoss(40 * REM * delta_time, 0)
if(9 to INFINITY)
- M.fakedeath(type)
+ affected_mob.fakedeath(type)
..()
return TRUE
@@ -291,16 +291,16 @@
ph = 14.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/L)
+/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/affected_mob)
..()
- ADD_TRAIT(L, TRAIT_FAKEDEATH, type)
+ ADD_TRAIT(affected_mob, TRAIT_FAKEDEATH, type)
-/datum/reagent/toxin/ghoulpowder/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_FAKEDEATH, type)
+/datum/reagent/toxin/ghoulpowder/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_FAKEDEATH, type)
..()
-/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOxyLoss(1 * REM * delta_time, 0)
+/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOxyLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -370,12 +370,12 @@
. = ..()
var/damage = min(round(0.4 * reac_volume, 0.1), 10)
if(exposed_mob.mob_biotypes & MOB_PLANT)
- exposed_mob.adjustToxLoss(damage)
+ exposed_mob.adjustToxLoss(damage, required_biotype = affected_biotype)
if(!(methods & VAPOR) || !iscarbon(exposed_mob))
return
var/mob/living/carbon/exposed_carbon = exposed_mob
if(!exposed_carbon.wear_mask)
- exposed_carbon.adjustToxLoss(damage)
+ exposed_carbon.adjustToxLoss(damage, required_biotype = affected_biotype)
/datum/reagent/toxin/plantbgone/weedkiller
name = "Weed Killer"
@@ -412,7 +412,7 @@
. = ..()
if(exposed_mob.mob_biotypes & MOB_BUG)
var/damage = min(round(0.4*reac_volume, 0.1),10)
- exposed_mob.adjustToxLoss(damage)
+ exposed_mob.adjustToxLoss(damage, required_biotype = affected_biotype)
/datum/reagent/toxin/pestkiller/organic
name = "Natural Pest Killer"
@@ -437,10 +437,10 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/spore/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
- C.damageoverlaytemp = 60
- C.update_damage_hud()
- C.blur_eyes(3 * REM * delta_time)
+/datum/reagent/toxin/spore/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.damageoverlaytemp = 60
+ affected_mob.update_damage_hud()
+ affected_mob.blur_eyes(3 * REM * delta_time)
return ..()
/datum/reagent/toxin/spore_burning
@@ -452,9 +452,9 @@
ph = 13
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/spore_burning/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_fire_stacks(2 * REM * delta_time)
- M.ignite_mob()
+/datum/reagent/toxin/spore_burning/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_fire_stacks(2 * REM * delta_time)
+ affected_mob.ignite_mob()
return ..()
/datum/reagent/toxin/chloralhydrate
@@ -471,17 +471,17 @@
inverse_chem = /datum/reagent/impurity/chloralax
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
switch(current_cycle)
if(1 to 10)
- M.adjust_confusion(2 SECONDS * REM * normalise_creation_purity() * delta_time)
- M.adjust_drowsyness(2 * REM * normalise_creation_purity() * delta_time)
+ affected_mob.adjust_confusion(2 SECONDS * REM * normalise_creation_purity() * delta_time)
+ affected_mob.adjust_drowsyness(2 * REM * normalise_creation_purity() * delta_time)
if(10 to 50)
- M.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
+ affected_mob.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
. = TRUE
if(51 to INFINITY)
- M.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
- M.adjustToxLoss(1 * (current_cycle - 50) * REM * normalise_creation_purity() * delta_time, 0)
+ affected_mob.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
+ affected_mob.adjustToxLoss(1 * (current_cycle - 50) * REM * normalise_creation_purity() * delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -497,13 +497,13 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
switch(current_cycle)
if(1 to 50)
- M.Sleeping(40 * REM * delta_time)
+ affected_mob.Sleeping(40 * REM * delta_time)
if(51 to INFINITY)
- M.Sleeping(40 * REM * delta_time)
- M.adjustToxLoss(1 * (current_cycle - 50) * REM * delta_time, 0)
+ affected_mob.Sleeping(40 * REM * delta_time)
+ affected_mob.adjustToxLoss(1 * (current_cycle - 50) * REM * delta_time, FALSE, required_biotype = affected_biotype)
return ..()
/datum/reagent/toxin/coffeepowder
@@ -547,9 +547,9 @@
ph = 12.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
// Gain approximately 12 seconds * creation purity seconds of silence every metabolism tick.
- M.set_silence_if_lower(6 SECONDS * REM * normalise_creation_purity() * delta_time)
+ affected_mob.set_silence_if_lower(6 SECONDS * REM * normalise_creation_purity() * delta_time)
..()
/datum/reagent/toxin/staminatoxin
@@ -561,8 +561,8 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustStaminaLoss(data * REM * delta_time, 0)
+/datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustStaminaLoss(data * REM * delta_time, 0)
data = max(data - 1, 3)
..()
. = TRUE
@@ -576,11 +576,11 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/polonium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if (!HAS_TRAIT(M, TRAIT_IRRADIATED) && SSradiation.can_irradiate_basic(M))
- M.AddComponent(/datum/component/irradiated)
+/datum/reagent/toxin/polonium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if (!HAS_TRAIT(affected_mob, TRAIT_IRRADIATED) && SSradiation.can_irradiate_basic(affected_mob))
+ affected_mob.AddComponent(/datum/component/irradiated)
else
- M.adjustToxLoss(1 * REM * delta_time)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, required_biotype = affected_biotype)
..()
@@ -595,27 +595,27 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(30, delta_time))
switch(pick(1, 2, 3, 4))
if(1)
- to_chat(M, span_danger("You can barely see!"))
- M.blur_eyes(3)
+ to_chat(affected_mob, span_danger("You can barely see!"))
+ affected_mob.blur_eyes(3)
if(2)
- M.emote("cough")
+ affected_mob.emote("cough")
if(3)
- M.emote("sneeze")
+ affected_mob.emote("sneeze")
if(4)
if(prob(75))
- to_chat(M, span_danger("You scratch at an itch."))
- M.adjustBruteLoss(2*REM, 0)
+ to_chat(affected_mob, span_danger("You scratch at an itch."))
+ affected_mob.adjustBruteLoss(2*REM, FALSE, required_bodytype = affected_bodytype)
. = TRUE
..()
-/datum/reagent/toxin/histamine/overdose_process(mob/living/M, delta_time, times_fired)
- M.adjustOxyLoss(2 * REM * delta_time, FALSE)
- M.adjustBruteLoss(2 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC)
- M.adjustToxLoss(2 * REM * delta_time, FALSE)
+/datum/reagent/toxin/histamine/overdose_process(mob/living/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOxyLoss(2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjustBruteLoss(2 * REM * delta_time, FALSE, FALSE, BODYTYPE_ORGANIC)
+ affected_mob.adjustToxLoss(2 * REM * delta_time, FALSE, required_biotype = affected_biotype)
..()
. = TRUE
@@ -633,7 +633,7 @@
inverse_chem = /datum/reagent/impurity/methanol
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/formaldehyde/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/formaldehyde/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(2.5, delta_time))
holder.add_reagent(/datum/reagent/toxin/histamine, pick(5,15))
holder.remove_reagent(/datum/reagent/toxin/formaldehyde, 1.2)
@@ -651,14 +651,14 @@
///Mob Size of the current mob sprite.
var/current_size = RESIZE_DEFAULT_SIZE
-/datum/reagent/toxin/venom/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/venom/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/newsize = 1.1 * RESIZE_DEFAULT_SIZE
- M.resize = newsize/current_size
+ affected_mob.resize = newsize/current_size
current_size = newsize
- M.update_transform()
+ affected_mob.update_transform()
toxpwr = 0.1 * volume
- M.adjustBruteLoss((0.3 * volume) * REM * delta_time, 0)
+ affected_mob.adjustBruteLoss((0.3 * volume) * REM * delta_time, FALSE, required_bodytype = affected_bodytype)
. = TRUE
if(DT_PROB(8, delta_time))
holder.add_reagent(/datum/reagent/toxin/histamine, pick(5, 10))
@@ -666,10 +666,10 @@
else
..()
-/datum/reagent/toxin/venom/on_mob_end_metabolize(mob/living/M)
- M.resize = RESIZE_DEFAULT_SIZE/current_size
+/datum/reagent/toxin/venom/on_mob_end_metabolize(mob/living/affected_mob)
+ affected_mob.resize = RESIZE_DEFAULT_SIZE/current_size
current_size = RESIZE_DEFAULT_SIZE
- M.update_transform()
+ affected_mob.update_transform()
..()
/datum/reagent/toxin/fentanyl
@@ -685,14 +685,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opioids = 25)
-/datum/reagent/toxin/fentanyl/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * normalise_creation_purity() * delta_time, 150)
- if(M.toxloss <= 60)
- M.adjustToxLoss(1 * REM * normalise_creation_purity() * delta_time, 0)
+/datum/reagent/toxin/fentanyl/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * normalise_creation_purity() * delta_time, 150)
+ if(affected_mob.toxloss <= 60)
+ affected_mob.adjustToxLoss(1 * REM * normalise_creation_purity() * delta_time, FALSE, required_biotype = affected_biotype)
if(current_cycle >= 4)
- M.add_mood_event("smacked out", /datum/mood_event/narcotic_heavy, name)
+ affected_mob.add_mood_event("smacked out", /datum/mood_event/narcotic_heavy, name)
if(current_cycle >= 18)
- M.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
+ affected_mob.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
..()
return TRUE
@@ -708,13 +708,13 @@
ph = 9.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/cyanide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/cyanide/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(2.5, delta_time))
- M.losebreath += 1
+ affected_mob.losebreath += 1
if(DT_PROB(4, delta_time))
- to_chat(M, span_danger("You feel horrendously weak!"))
- M.Stun(40)
- M.adjustToxLoss(2*REM * normalise_creation_purity(), 0)
+ to_chat(affected_mob, span_danger("You feel horrendously weak!"))
+ affected_mob.Stun(40)
+ affected_mob.adjustToxLoss(2*REM * normalise_creation_purity(), FALSE, required_biotype = affected_biotype)
return ..()
/datum/reagent/toxin/bad_food
@@ -741,18 +741,18 @@
penetrates_skin = TOUCH|VAPOR
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(8, delta_time))
- to_chat(M, span_danger("You scratch at your head."))
- M.adjustBruteLoss(0.2*REM, 0)
+ to_chat(affected_mob, span_danger("You scratch at your head."))
+ affected_mob.adjustBruteLoss(0.2*REM, FALSE, required_bodytype = affected_bodytype)
. = TRUE
if(DT_PROB(8, delta_time))
- to_chat(M, span_danger("You scratch at your leg."))
- M.adjustBruteLoss(0.2*REM, 0)
+ to_chat(affected_mob, span_danger("You scratch at your leg."))
+ affected_mob.adjustBruteLoss(0.2*REM, FALSE, required_bodytype = affected_bodytype)
. = TRUE
if(DT_PROB(8, delta_time))
- to_chat(M, span_danger("You scratch at your arm."))
- M.adjustBruteLoss(0.2*REM, 0)
+ to_chat(affected_mob, span_danger("You scratch at your arm."))
+ affected_mob.adjustBruteLoss(0.2*REM, FALSE, required_bodytype = affected_bodytype)
. = TRUE
if(DT_PROB(1.5, delta_time))
holder.add_reagent(/datum/reagent/toxin/histamine,rand(1,3))
@@ -770,25 +770,25 @@
toxpwr = 2.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/initropidril/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+/datum/reagent/toxin/initropidril/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(DT_PROB(13, delta_time))
var/picked_option = rand(1,3)
switch(picked_option)
if(1)
- C.Paralyze(60)
+ affected_mob.Paralyze(60)
. = TRUE
if(2)
- C.losebreath += 10
- C.adjustOxyLoss(rand(5,25), 0)
+ affected_mob.losebreath += 10
+ affected_mob.adjustOxyLoss(rand(5,25), FALSE, required_biotype = affected_biotype)
. = TRUE
if(3)
- if(!C.undergoing_cardiac_arrest() && C.can_heartattack())
- C.set_heartattack(TRUE)
- if(C.stat == CONSCIOUS)
- C.visible_message(span_userdanger("[C] clutches at [C.p_their()] chest as if [C.p_their()] heart stopped!"))
+ if(!affected_mob.undergoing_cardiac_arrest() && affected_mob.can_heartattack())
+ affected_mob.set_heartattack(TRUE)
+ if(affected_mob.stat == CONSCIOUS)
+ affected_mob.visible_message(span_userdanger("[affected_mob] clutches at [affected_mob.p_their()] chest as if [affected_mob.p_their()] heart stopped!"))
else
- C.losebreath += 10
- C.adjustOxyLoss(rand(5,25), 0)
+ affected_mob.losebreath += 10
+ affected_mob.adjustOxyLoss(rand(5,25), FALSE, required_biotype = affected_biotype)
. = TRUE
return ..() || .
@@ -803,12 +803,12 @@
taste_mult = 0 // undetectable, I guess?
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/pancuronium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/pancuronium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle >= 10)
- M.Stun(40 * REM * delta_time)
+ affected_mob.Stun(40 * REM * delta_time)
. = TRUE
if(DT_PROB(10, delta_time))
- M.losebreath += 4
+ affected_mob.losebreath += 4
..()
/datum/reagent/toxin/sodium_thiopental
@@ -821,18 +821,18 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/sodium_thiopental/on_mob_add(mob/living/L, amount)
+/datum/reagent/toxin/sodium_thiopental/on_mob_add(mob/living/affected_mob, amount)
. = ..()
- ADD_TRAIT(L, TRAIT_ANTICONVULSANT, name)
+ ADD_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
-/datum/reagent/toxin/sodium_thiopental/on_mob_delete(mob/living/L)
+/datum/reagent/toxin/sodium_thiopental/on_mob_delete(mob/living/affected_mob)
. = ..()
- REMOVE_TRAIT(L, TRAIT_ANTICONVULSANT, name)
+ REMOVE_TRAIT(affected_mob, TRAIT_ANTICONVULSANT, name)
-/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle >= 10)
- M.Sleeping(40 * REM * delta_time)
- M.adjustStaminaLoss(10 * REM * delta_time, 0)
+ affected_mob.Sleeping(40 * REM * delta_time)
+ affected_mob.adjustStaminaLoss(10 * REM * delta_time, 0)
..()
return TRUE
@@ -849,9 +849,9 @@
ph = 6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/sulfonal/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/sulfonal/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle >= 22)
- M.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
+ affected_mob.Sleeping(40 * REM * normalise_creation_purity() * delta_time)
return ..()
/datum/reagent/toxin/amanitin
@@ -865,13 +865,13 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
var/delayed_toxin_damage = 0
-/datum/reagent/toxin/amanitin/on_mob_life(mob/living/M, delta_time, times_fired)
+/datum/reagent/toxin/amanitin/on_mob_life(mob/living/affected_mob, delta_time, times_fired)
delayed_toxin_damage += (delta_time * 3)
. = ..()
-/datum/reagent/toxin/amanitin/on_mob_delete(mob/living/M)
- M.log_message("has taken [delayed_toxin_damage] toxin damage from amanitin toxin", LOG_ATTACK)
- M.adjustToxLoss(delayed_toxin_damage)
+/datum/reagent/toxin/amanitin/on_mob_delete(mob/living/affected_mob)
+ affected_mob.log_message("has taken [delayed_toxin_damage] toxin damage from amanitin toxin", LOG_ATTACK)
+ affected_mob.adjustToxLoss(delayed_toxin_damage, required_biotype = affected_biotype)
. = ..()
/datum/reagent/toxin/lipolicide
@@ -889,11 +889,11 @@
inverse_chem = /datum/reagent/impurity/ipecacide
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/lipolicide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.nutrition <= NUTRITION_LEVEL_STARVING)
- M.adjustToxLoss(1 * REM * delta_time, 0)
- M.adjust_nutrition(-3 * REM * normalise_creation_purity() * delta_time) // making the chef more valuable, one meme trap at a time
- M.overeatduration = 0
+/datum/reagent/toxin/lipolicide/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.nutrition <= NUTRITION_LEVEL_STARVING)
+ affected_mob.adjustToxLoss(1 * REM * delta_time, FALSE, required_biotype = affected_biotype)
+ affected_mob.adjust_nutrition(-3 * REM * normalise_creation_purity() * delta_time) // making the chef more valuable, one meme trap at a time
+ affected_mob.overeatduration = 0
return ..()
/datum/reagent/toxin/coniine
@@ -905,9 +905,9 @@
toxpwr = 1.75
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/coniine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.losebreath < 5)
- M.losebreath = min(M.losebreath + 5 * REM * delta_time, 5)
+/datum/reagent/toxin/coniine/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.losebreath < 5)
+ affected_mob.losebreath = min(affected_mob.losebreath + 5 * REM * delta_time, 5)
return ..()
/datum/reagent/toxin/spewium
@@ -921,20 +921,20 @@
taste_description = "vomit"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
.=..()
if(current_cycle >= 11 && DT_PROB(min(30, current_cycle), delta_time))
- C.vomit(10, prob(10), prob(50), rand(0,4), TRUE)
- for(var/datum/reagent/toxin/R in C.reagents.reagent_list)
+ affected_mob.vomit(10, prob(10), prob(50), rand(0,4), TRUE)
+ for(var/datum/reagent/toxin/R in affected_mob.reagents.reagent_list)
if(R != src)
- C.reagents.remove_reagent(R.type,1)
+ affected_mob.reagents.remove_reagent(R.type,1)
-/datum/reagent/toxin/spewium/overdose_process(mob/living/carbon/C, delta_time, times_fired)
+/datum/reagent/toxin/spewium/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
. = ..()
if(current_cycle >= 33 && DT_PROB(7.5, delta_time))
- C.spew_organ()
- C.vomit(0, TRUE, TRUE, 4)
- to_chat(C, span_userdanger("You feel something lumpy come up as you vomit."))
+ affected_mob.spew_organ()
+ affected_mob.vomit(0, TRUE, TRUE, 4)
+ to_chat(affected_mob, span_userdanger("You feel something lumpy come up as you vomit."))
/datum/reagent/toxin/curare
name = "Curare"
@@ -945,10 +945,10 @@
toxpwr = 1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/curare/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/curare/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle >= 11)
- M.Paralyze(60 * REM * delta_time)
- M.adjustOxyLoss(0.5*REM*delta_time, 0)
+ affected_mob.Paralyze(60 * REM * delta_time)
+ affected_mob.adjustOxyLoss(0.5*REM*delta_time, FALSE, required_biotype = affected_biotype)
. = TRUE
..()
@@ -965,12 +965,12 @@
ph = 11.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/heparin/on_mob_metabolize(mob/living/M)
- ADD_TRAIT(M, TRAIT_BLOODY_MESS, /datum/reagent/toxin/heparin)
+/datum/reagent/toxin/heparin/on_mob_metabolize(mob/living/affected_mob)
+ ADD_TRAIT(affected_mob, TRAIT_BLOODY_MESS, /datum/reagent/toxin/heparin)
return ..()
-/datum/reagent/toxin/heparin/on_mob_end_metabolize(mob/living/M)
- REMOVE_TRAIT(M, TRAIT_BLOODY_MESS, /datum/reagent/toxin/heparin)
+/datum/reagent/toxin/heparin/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_BLOODY_MESS, /datum/reagent/toxin/heparin)
return ..()
/datum/reagent/toxin/rotatium //Rotatium. Fucks up your rotation and is hilarious
@@ -987,10 +987,10 @@
taste_description = "spinning"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/rotatium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- if(M.hud_used)
+/datum/reagent/toxin/rotatium/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(affected_mob.hud_used)
if(current_cycle >= 20 && (current_cycle % 20) == 0)
- var/atom/movable/plane_master_controller/pm_controller = M.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
+ var/atom/movable/plane_master_controller/pm_controller = affected_mob.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
var/rotation = min(round(current_cycle/20), 89) // By this point the player is probably puking and quitting anyway
for(var/atom/movable/screen/plane_master/plane as anything in pm_controller.get_planes())
@@ -998,9 +998,9 @@
animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
return ..()
-/datum/reagent/toxin/rotatium/on_mob_end_metabolize(mob/living/M)
- if(M?.hud_used)
- var/atom/movable/plane_master_controller/pm_controller = M.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
+/datum/reagent/toxin/rotatium/on_mob_end_metabolize(mob/living/affected_mob)
+ if(affected_mob?.hud_used)
+ var/atom/movable/plane_master_controller/pm_controller = affected_mob.hud_used.plane_master_controllers[PLANE_MASTERS_GAME]
for(var/atom/movable/screen/plane_master/plane as anything in pm_controller.get_planes())
animate(plane, transform = matrix(), time = 5, easing = QUAD_EASING)
..()
@@ -1017,12 +1017,12 @@
ph = 8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
var/remove_amt = 5
if(holder.has_reagent(/datum/reagent/medicine/calomel) || holder.has_reagent(/datum/reagent/medicine/pen_acid))
remove_amt = 0.5
- for(var/datum/reagent/medicine/R in M.reagents.reagent_list)
- M.reagents.remove_reagent(R.type, remove_amt * REM * normalise_creation_purity() * delta_time)
+ for(var/datum/reagent/medicine/R in affected_mob.reagents.reagent_list)
+ affected_mob.reagents.remove_reagent(R.type, remove_amt * REM * normalise_creation_purity() * delta_time)
return ..()
//ACID
@@ -1053,10 +1053,10 @@
return
reac_volume = round(reac_volume,0.1)
if(methods & INGEST)
- exposed_carbon.adjustBruteLoss(min(6*toxpwr, reac_volume * toxpwr))
+ exposed_carbon.adjustBruteLoss(min(6*toxpwr, reac_volume * toxpwr), required_bodytype = affected_bodytype)
return
if(methods & INJECT)
- exposed_carbon.adjustBruteLoss(1.5 * min(6*toxpwr, reac_volume * toxpwr))
+ exposed_carbon.adjustBruteLoss(1.5 * min(6*toxpwr, reac_volume * toxpwr), required_bodytype = affected_bodytype)
return
exposed_carbon.acid_act(acidpwr, reac_volume)
@@ -1093,8 +1093,8 @@
mytray.adjust_toxic(round(chems.get_reagent_amount(type) * 3))
mytray.adjust_weedlevel(-rand(1,4))
-/datum/reagent/toxin/acid/fluacid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustFireLoss((current_cycle/15) * REM * normalise_creation_purity() * delta_time, 0)
+/datum/reagent/toxin/acid/fluacid/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustFireLoss((current_cycle/15) * REM * normalise_creation_purity() * delta_time, FALSE, required_bodytype = affected_bodytype)
. = TRUE
..()
@@ -1109,8 +1109,8 @@
ph = 1.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/acid/nitracid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustFireLoss((volume/10) * REM * normalise_creation_purity() * delta_time, FALSE) //here you go nervar
+/datum/reagent/toxin/acid/nitracid/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustFireLoss((volume/10) * REM * normalise_creation_purity() * delta_time, FALSE, required_bodytype = affected_bodytype) //here you go nervar
. = TRUE
..()
@@ -1125,12 +1125,12 @@
var/delay = 30
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED|REAGENT_NO_RANDOM_RECIPE
-/datum/reagent/toxin/delayed/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+/datum/reagent/toxin/delayed/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
if(current_cycle > delay)
- holder.remove_reagent(type, actual_metaboliztion_rate * M.metabolism_efficiency * delta_time)
- M.adjustToxLoss(actual_toxpwr * REM * delta_time, 0)
+ holder.remove_reagent(type, actual_metaboliztion_rate * affected_mob.metabolism_efficiency * delta_time)
+ affected_mob.adjustToxLoss(actual_toxpwr * REM * delta_time, FALSE, required_biotype = affected_biotype)
if(DT_PROB(5, delta_time))
- M.Paralyze(20)
+ affected_mob.Paralyze(20)
. = TRUE
..()
@@ -1146,11 +1146,11 @@
taste_description = "stillness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/mimesbane/on_mob_metabolize(mob/living/L)
- ADD_TRAIT(L, TRAIT_EMOTEMUTE, type)
+/datum/reagent/toxin/mimesbane/on_mob_metabolize(mob/living/affected_mob)
+ ADD_TRAIT(affected_mob, TRAIT_EMOTEMUTE, type)
-/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/L)
- REMOVE_TRAIT(L, TRAIT_EMOTEMUTE, type)
+/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/affected_mob)
+ REMOVE_TRAIT(affected_mob, TRAIT_EMOTEMUTE, type)
/datum/reagent/toxin/bonehurtingjuice //oof ouch
name = "Bone Hurting Juice"
@@ -1165,34 +1165,34 @@
overdose_threshold = 50
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/bonehurtingjuice/on_mob_add(mob/living/carbon/M)
- M.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice)
+/datum/reagent/toxin/bonehurtingjuice/on_mob_add(mob/living/carbon/affected_mob)
+ affected_mob.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice)
return ..()
-/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustStaminaLoss(7.5 * REM * delta_time, 0)
+/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustStaminaLoss(7.5 * REM * delta_time, 0)
if(DT_PROB(10, delta_time))
switch(rand(1, 3))
if(1)
- M.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
+ affected_mob.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
if(2)
- M.manual_emote(pick("oofs silently.", "looks like [M.p_their()] bones hurt.", "grimaces, as though [M.p_their()] bones hurt."))
+ affected_mob.manual_emote(pick("oofs silently.", "looks like [affected_mob.p_their()] bones hurt.", "grimaces, as though [affected_mob.p_their()] bones hurt."))
if(3)
- to_chat(M, span_warning("Your bones hurt!"))
+ to_chat(affected_mob, span_warning("Your bones hurt!"))
return ..()
-/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M, delta_time, times_fired)
- if(DT_PROB(2, delta_time) && iscarbon(M)) //big oof
+/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)
+ if(DT_PROB(2, delta_time) && iscarbon(affected_mob)) //big oof
var/selected_part = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) //God help you if the same limb gets picked twice quickly.
- var/obj/item/bodypart/bp = M.get_bodypart(selected_part)
- if(bp)
- playsound(M, get_sfx(SFX_DESECRATION), 50, TRUE, -1)
- M.visible_message(span_warning("[M]'s bones hurt too much!!"), span_danger("Your bones hurt too much!!"))
- M.say("OOF!!", forced = /datum/reagent/toxin/bonehurtingjuice)
- bp.receive_damage(20, 0, 200, wound_bonus = rand(30, 130))
+ var/obj/item/bodypart/BP = affected_mob.get_bodypart(selected_part)
+ if(BP)
+ playsound(affected_mob, get_sfx(SFX_DESECRATION), 50, TRUE, -1)
+ affected_mob.visible_message(span_warning("[affected_mob]'s bones hurt too much!!"), span_danger("Your bones hurt too much!!"))
+ affected_mob.say("OOF!!", forced = /datum/reagent/toxin/bonehurtingjuice)
+ BP.receive_damage(20, 0, 200, wound_bonus = rand(30, 130))
else //SUCH A LUST FOR REVENGE!!!
- to_chat(M, span_warning("A phantom limb hurts!"))
- M.say("Why are we still here, just to suffer?", forced = /datum/reagent/toxin/bonehurtingjuice)
+ to_chat(affected_mob, span_warning("A phantom limb hurts!"))
+ affected_mob.say("Why are we still here, just to suffer?", forced = /datum/reagent/toxin/bonehurtingjuice)
return ..()
/datum/reagent/toxin/bungotoxin
@@ -1205,18 +1205,18 @@
taste_description = "tannin"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/bungotoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_HEART, 3 * REM * delta_time)
+/datum/reagent/toxin/bungotoxin/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_HEART, 3 * REM * delta_time)
// If our mob's currently dizzy from anything else, we will also gain confusion
- var/mob_dizziness = M.get_timed_status_effect_duration(/datum/status_effect/confusion)
+ var/mob_dizziness = affected_mob.get_timed_status_effect_duration(/datum/status_effect/confusion)
if(mob_dizziness > 0)
// Gain confusion equal to about half the duration of our current dizziness
- M.set_confusion(mob_dizziness / 2)
+ affected_mob.set_confusion(mob_dizziness / 2)
if(current_cycle >= 12 && DT_PROB(4, delta_time))
var/tox_message = pick("You feel your heart spasm in your chest.", "You feel faint.","You feel you need to catch your breath.","You feel a prickle of pain in your chest.")
- to_chat(M, span_notice("[tox_message]"))
+ to_chat(affected_mob, span_notice("[tox_message]"))
. = TRUE
..()
@@ -1230,12 +1230,12 @@
taste_description = "sugary sweetness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/leadacetate/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjustOrganLoss(ORGAN_SLOT_EARS, 1 * REM * delta_time)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time)
+/datum/reagent/toxin/leadacetate/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_EARS, 1 * REM * delta_time)
+ affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time)
if(DT_PROB(0.5, delta_time))
- to_chat(M, span_notice("Ah, what was that? You thought you heard something..."))
- M.adjust_confusion(5 SECONDS)
+ to_chat(affected_mob, span_notice("Ah, what was that? You thought you heard something..."))
+ affected_mob.adjust_confusion(5 SECONDS)
return ..()
/datum/reagent/toxin/hunterspider
@@ -1249,6 +1249,6 @@
description = "An extremely toxic chemical produced by the rare viper spider. Brings their prey to the brink of death and causes hallucinations."
health_required = 10
-/datum/reagent/toxin/viperspider/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
- M.adjust_hallucinations(10 SECONDS * REM * delta_time)
+/datum/reagent/toxin/viperspider/on_mob_life(mob/living/carbon/affected_mob, delta_time, times_fired)
+ affected_mob.adjust_hallucinations(10 SECONDS * REM * delta_time)
return ..()
diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm
index bbf0ea13a82..3ca576b33bc 100644
--- a/code/modules/surgery/bodyparts/_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -404,7 +404,7 @@
//Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all.
//Damage will not exceed max_damage using this proc
//Cannot apply negative damage
-/obj/item/bodypart/proc/receive_damage(brute = 0, burn = 0, blocked = 0, updating_health = TRUE, required_status = null, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE, attack_direction = null)
+/obj/item/bodypart/proc/receive_damage(brute = 0, burn = 0, blocked = 0, updating_health = TRUE, required_bodytype = null, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE, attack_direction = null)
SHOULD_CALL_PARENT(TRUE)
var/hit_percent = (100-blocked)/100
@@ -412,7 +412,7 @@
return FALSE
if(owner && (owner.status_flags & GODMODE))
return FALSE //godmode
- if(required_status && !(bodytype & required_status))
+ if(required_bodytype && !(bodytype & required_bodytype))
return FALSE
var/dmg_multi = CONFIG_GET(number/damage_multiplier) * hit_percent
@@ -529,10 +529,10 @@
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
//Damage cannot go below zero.
//Cannot remove negative damage (i.e. apply damage)
-/obj/item/bodypart/proc/heal_damage(brute, burn, required_status, updating_health = TRUE)
+/obj/item/bodypart/proc/heal_damage(brute, burn, required_bodytype, updating_health = TRUE)
SHOULD_CALL_PARENT(TRUE)
- if(required_status && !(bodytype & required_status)) //So we can only heal certain kinds of limbs, ie robotic vs organic.
+ if(required_bodytype && !(bodytype & required_bodytype)) //So we can only heal certain kinds of limbs, ie robotic vs organic.
return
if(brute)
diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm
index eb1510beb46..4f823f2f3fb 100644
--- a/code/modules/surgery/organs/_organ.dm
+++ b/code/modules/surgery/organs/_organ.dm
@@ -170,11 +170,13 @@ 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/applyOrganDamage(damage_amount, maximum = maxHealth) //use for damaging effects
+/obj/item/organ/proc/applyOrganDamage(damage_amount, maximum = maxHealth, required_organtype) //use for damaging effects
if(!damage_amount) //Micro-optimization.
return
if(maximum < damage)
return
+ if(required_organtype && (status != required_organtype))
+ return
damage = clamp(damage + damage_amount, 0, maximum)
var/mess = check_damage_thresholds(owner)
check_failing_thresholds()
@@ -183,8 +185,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/setOrganDamage(damage_amount) //use mostly for admin heals
- applyOrganDamage(damage_amount - damage)
+/obj/item/organ/proc/setOrganDamage(damage_amount, required_organtype) //use mostly for admin heals
+ applyOrganDamage(damage_amount - damage, required_organtype = required_organtype)
/** check_damage_thresholds
* input: mob/organ_owner (a mob, the owner of the organ we call the proc on)
diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/damage_procs.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/damage_procs.dm
index acc362d7bba..3704ca63ef1 100644
--- a/modular_skyrat/modules/customization/modules/mob/living/carbon/damage_procs.dm
+++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/damage_procs.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
+/mob/living/carbon/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE, required_biotype)
if(HAS_TRAIT(src, TRAIT_OXYIMMUNE)) //Prevents oxygen damage
amount = min(amount, 0)
return ..()
diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm
index c45ec7065a9..659f737ff5c 100644
--- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm
+++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/hemophage.dm
@@ -132,7 +132,7 @@
var/brute_damage = hemophage.getBruteLoss()
// We have to check for the damaged bodyparts like this as well, to account for robotic bodyparts, as we don't want to heal those. Stupid, I know, but that's the best proc we got to check that currently.
- if(brute_damage && length(hemophage.get_damaged_bodyparts(brute = TRUE, burn = FALSE, status = BODYTYPE_ORGANIC)))
+ if(brute_damage && length(hemophage.get_damaged_bodyparts(brute = TRUE, burn = FALSE, required_bodytype = BODYTYPE_ORGANIC)))
brutes_to_heal = min(max_blood_for_regen, min(BLOOD_REGEN_BRUTE_AMOUNT, brute_damage) * delta_time)
blood_used += brutes_to_heal * blood_to_health_multiplier
max_blood_for_regen -= brutes_to_heal * blood_to_health_multiplier
@@ -140,7 +140,7 @@
var/burns_to_heal = NONE
var/burn_damage = hemophage.getFireLoss()
- if(burn_damage && max_blood_for_regen > NONE && length(hemophage.get_damaged_bodyparts(brute = FALSE, burn = TRUE, status = BODYTYPE_ORGANIC)))
+ if(burn_damage && max_blood_for_regen > NONE && length(hemophage.get_damaged_bodyparts(brute = FALSE, burn = TRUE, required_bodytype = BODYTYPE_ORGANIC)))
burns_to_heal = min(max_blood_for_regen, min(BLOOD_REGEN_BURN_AMOUNT, burn_damage) * delta_time)
blood_used += burns_to_heal * blood_to_health_multiplier
max_blood_for_regen -= burns_to_heal * blood_to_health_multiplier
diff --git a/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/medicine_reagents.dm b/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 5c631ef7140..9c97f10573d 100644
--- a/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/modular_skyrat/modules/customization/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -64,7 +64,7 @@
/datum/reagent/medicine/nanite_slurry/on_mob_life(mob/living/carbon/affected_mob, delta_time)
var/heal_amount = healing * REM * delta_time
- affected_mob.heal_bodypart_damage(heal_amount, heal_amount, required_status = BODYTYPE_ROBOTIC)
+ affected_mob.heal_bodypart_damage(heal_amount, heal_amount, required_bodytype = BODYTYPE_ROBOTIC)
..()
/datum/reagent/medicine/nanite_slurry/overdose_process(mob/living/carbon/affected_mob, delta_time, times_fired)