[pick("You stop thinking for a moment. Therefore you are not.",\
"To be or not to be...",\
@@ -305,13 +313,13 @@
for(var/thing in owner)
var/atom/movable/AM = thing
SEND_SIGNAL(AM, COMSIG_MOVABLE_SECLUDED_LOCATION)
- next_crisis = world.time + 600
+ COOLDOWN_START(src, crisis_cooldown, 1 MINUTES)
addtimer(CALLBACK(src, .proc/fade_in), duration)
/datum/brain_trauma/special/existential_crisis/proc/fade_in()
QDEL_NULL(veil)
to_chat(owner, "You fade back into reality.")
- next_crisis = world.time + 600
+ COOLDOWN_START(src, crisis_cooldown, 1 MINUTES)
//base sync holder is in desynchronizer.dm
/obj/effect/abstract/sync_holder/veil
diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm
index 89835809504..5aef72ae16c 100644
--- a/code/datums/brain_damage/split_personality.dm
+++ b/code/datums/brain_damage/split_personality.dm
@@ -42,12 +42,12 @@
else
qdel(src)
-/datum/brain_trauma/severe/split_personality/on_life()
+/datum/brain_trauma/severe/split_personality/on_life(delta_time, times_fired)
if(owner.stat == DEAD)
if(current_controller != OWNER)
switch_personalities()
qdel(src)
- else if(prob(3))
+ else if(DT_PROB(1.5, delta_time))
switch_personalities()
..()
@@ -131,7 +131,7 @@
trauma = _trauma
return ..()
-/mob/living/split_personality/Life()
+/mob/living/split_personality/Life(delta_time = SSMOBS_DT, times_fired)
if(QDELETED(body))
qdel(src) //in case trauma deletion doesn't already do it
@@ -203,7 +203,7 @@
else
qdel(src)
-/datum/brain_trauma/severe/split_personality/brainwashing/on_life()
+/datum/brain_trauma/severe/split_personality/brainwashing/on_life(delta_time, times_fired)
return //no random switching
/datum/brain_trauma/severe/split_personality/brainwashing/handle_hearing(datum/source, list/hearing_args)
diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm
index 4087b71edbd..31863b503fb 100644
--- a/code/datums/components/food/edible.dm
+++ b/code/datums/components/food/edible.dm
@@ -286,14 +286,14 @@ Behavior that's still missing from this component that original food items had t
eater.visible_message("[eater] [eatverb]s \the [parent].", "You [eatverb] \the [parent].")
else if(fullness > 500 && fullness < 600)
eater.visible_message("[eater] unwillingly [eatverb]s a bit of \the [parent].", "You unwillingly [eatverb] a bit of \the [parent].")
- else if(fullness > (600 * (1 + eater.overeatduration / 2000))) // The more you eat - the more you can eat
+ else if(fullness > (600 * (1 + eater.overeatduration / (4000 SECONDS)))) // The more you eat - the more you can eat
eater.visible_message("[eater] cannot force any more of \the [parent] to go down [eater.p_their()] throat!", "You cannot force any more of \the [parent] to go down your throat!")
return
else //If you're feeding it to someone else.
if(isbrain(eater))
to_chat(feeder, "[eater] doesn't seem to have a mouth!")
return
- if(fullness <= (600 * (1 + eater.overeatduration / 1000)))
+ if(fullness <= (600 * (1 + eater.overeatduration / (2000 SECONDS))))
eater.visible_message("[feeder] attempts to feed [eater] [parent].", \
"[feeder] attempts to feed you [parent].")
else
diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm
index b3613dfd835..2306f13407c 100644
--- a/code/datums/diseases/_disease.dm
+++ b/code/datums/diseases/_disease.dm
@@ -15,14 +15,17 @@
//Stages
var/stage = 1
var/max_stages = 0
- var/stage_prob = 4
+ /// The probability of this infection advancing a stage every second the cure is not present.
+ var/stage_prob = 2
//Other
var/list/viable_mobtypes = list() //typepaths of viable mobs
var/mob/living/carbon/affected_mob = null
var/list/cures = list() //list of cures if the disease has the CURABLE flag, these are reagent ids
- var/infectivity = 65
- var/cure_chance = 8
+ /// The probability of spreading through the air every second
+ var/infectivity = 41
+ /// The probability of this infection being cured every second the cure is present
+ var/cure_chance = 4
var/carrier = FALSE //If our host is only a carrier
var/bypasses_immunity = FALSE //Does it skip species virus immunity check? Some things may diseases and not viruses
var/permeability_mod = 1
@@ -64,16 +67,16 @@
///Proc to process the disease and decide on whether to advance, cure or make the sympthoms appear. Returns a boolean on whether to continue acting on the symptoms or not.
-/datum/disease/proc/stage_act()
+/datum/disease/proc/stage_act(delta_time, times_fired)
if(has_cure())
- if(prob(cure_chance))
+ if(DT_PROB(cure_chance, delta_time))
update_stage(max(stage - 1, 1))
- if(disease_flags & CURABLE && prob(cure_chance))
+ if(disease_flags & CURABLE && DT_PROB(cure_chance, delta_time))
cure()
return FALSE
- else if(prob(stage_prob))
+ else if(DT_PROB(stage_prob, delta_time))
update_stage(min(stage + 1, max_stages))
return !carrier
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 1fcd77e6b5e..bfed83f96ab 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -105,7 +105,7 @@
// Randomly pick a symptom to activate.
-/datum/disease/advance/stage_act()
+/datum/disease/advance/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -254,8 +254,8 @@
SetSpread(DISEASE_SPREAD_BLOOD)
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
- cure_chance = 15 - clamp(properties["resistance"], -5, 5) // can be between 10 and 20
- stage_prob = max(properties["stage_rate"], 2)
+ cure_chance = clamp(7.5 - (0.5 * properties["resistance"]), 5, 10) // can be between 5 and 10
+ stage_prob = max(0.5 * properties["stage_rate"], 1)
SetSeverity(properties["severity"])
GenerateCure(properties)
else
diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm
index 282221be95a..e125035a4a0 100644
--- a/code/datums/diseases/advance/symptoms/heal.dm
+++ b/code/datums/diseases/advance/symptoms/heal.dm
@@ -160,10 +160,9 @@
/datum/symptom/heal/metabolism/Heal(mob/living/carbon/C, datum/disease/advance/A, actual_power)
if(!istype(C))
return
- C.reagents.metabolize(C, can_overdose=TRUE) //this works even without a liver; it's intentional since the virus is metabolizing by itself
- if(triple_metabolism)
- C.reagents.metabolize(C, can_overdose=TRUE)
- C.overeatduration = max(C.overeatduration - 2, 0)
+ var/metabolic_boost = triple_metabolism ? 2 : 1
+ C.reagents.metabolize(C, metabolic_boost * SSMOBS_DT, 0, can_overdose=TRUE) //this works even without a liver; it's intentional since the virus is metabolizing by itself
+ C.overeatduration = max(C.overeatduration - 4 SECONDS, 0)
var/lost_nutrition = 9 - (reduced_hunger * 5)
C.adjust_nutrition(-lost_nutrition * HUNGER_FACTOR) //Hunger depletes at 10x the normal speed
if(prob(2))
@@ -417,12 +416,13 @@
if(prob(5))
to_chat(M, "You feel yourself absorbing plasma inside and around you...")
- if(M.bodytemperature > M.get_body_temp_normal())
- M.adjust_bodytemperature(-20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ var/target_temp = M.get_body_temp_normal()
+ if(M.bodytemperature > target_temp)
+ M.adjust_bodytemperature(-20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT, target_temp)
if(prob(5))
to_chat(M, "You feel less hot.")
else if(M.bodytemperature < (M.get_body_temp_normal() + 1))
- M.adjust_bodytemperature(20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT,0, M.get_body_temp_normal())
+ M.adjust_bodytemperature(20 * temp_rate * TEMPERATURE_DAMAGE_COEFFICIENT, 0, target_temp)
if(prob(5))
to_chat(M, "You feel warmer.")
diff --git a/code/datums/diseases/advance/symptoms/weight.dm b/code/datums/diseases/advance/symptoms/weight.dm
index 4f42a597e2f..46a0d04be2c 100644
--- a/code/datums/diseases/advance/symptoms/weight.dm
+++ b/code/datums/diseases/advance/symptoms/weight.dm
@@ -49,5 +49,5 @@ Bonus
to_chat(M, "[pick("You feel hungry.", "You crave for food.")]")
else
to_chat(M, "[pick("So hungry...", "You'd kill someone for a bite of food...", "Hunger cramps seize you...")]")
- M.overeatduration = max(M.overeatduration - 100, 0)
+ M.overeatduration = max(M.overeatduration - 200 SECONDS, 0)
M.adjust_nutrition(-100)
diff --git a/code/datums/diseases/anxiety.dm b/code/datums/diseases/anxiety.dm
index d6bf55b8de7..c3092e310ea 100644
--- a/code/datums/diseases/anxiety.dm
+++ b/code/datums/diseases/anxiety.dm
@@ -12,32 +12,32 @@
severity = DISEASE_SEVERITY_MINOR
-/datum/disease/anxiety/stage_act()
+/datum/disease/anxiety/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2) //also changes say, see say.dm
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "You feel anxious.")
if(3)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "Your stomach flutters.")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "You feel panicky.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You're overtaken with panic!")
affected_mob.add_confusion(rand(2,3))
if(4)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You feel butterflies in your stomach.")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.visible_message("[affected_mob] stumbles around in a panic.", \
"You have a panic attack!")
affected_mob.add_confusion(rand(6,8))
affected_mob.jitteriness += (rand(6,8))
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.visible_message("[affected_mob] coughs up butterflies!", \
"You cough up butterflies!")
new /mob/living/simple_animal/butterfly(affected_mob.loc)
diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm
index d60967f2722..c9b71bb9a0f 100644
--- a/code/datums/diseases/appendicitis.dm
+++ b/code/datums/diseases/appendicitis.dm
@@ -15,26 +15,26 @@
bypasses_immunity = TRUE // Immunity is based on not having an appendix; this isn't a virus
-/datum/disease/appendicitis/stage_act()
+/datum/disease/appendicitis/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(1)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("cough")
if(2)
var/obj/item/organ/appendix/A = affected_mob.getorgan(/obj/item/organ/appendix)
if(A)
A.inflamed = 1
A.update_appearance()
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, "You feel a stabbing pain in your abdomen!")
affected_mob.adjustOrganLoss(ORGAN_SLOT_APPENDIX, 5)
- affected_mob.Stun(rand(40,60))
+ affected_mob.Stun(rand(40, 60))
affected_mob.adjustToxLoss(1, FALSE)
if(3)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.vomit(95)
affected_mob.adjustOrganLoss(ORGAN_SLOT_APPENDIX, 15)
diff --git a/code/datums/diseases/beesease.dm b/code/datums/diseases/beesease.dm
index e5cb6b63751..4e39a0ce851 100644
--- a/code/datums/diseases/beesease.dm
+++ b/code/datums/diseases/beesease.dm
@@ -13,29 +13,29 @@
infectable_biotypes = MOB_ORGANIC|MOB_UNDEAD //bees nesting in corpses
-/datum/disease/beesease/stage_act()
+/datum/disease/beesease/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2) //also changes say, see say.dm
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You taste honey in your mouth.")
if(3)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "Your stomach rumbles.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "Your stomach stings painfully.")
if(prob(20))
affected_mob.adjustToxLoss(2)
if(4)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.visible_message("[affected_mob] buzzes.", \
"Your stomach buzzes violently!")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "You feel something moving in your throat.")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.visible_message("[affected_mob] coughs up a swarm of bees!", \
"You cough up a swarm of bees!")
new /mob/living/simple_animal/hostile/poison/bees(affected_mob.loc)
diff --git a/code/datums/diseases/brainrot.dm b/code/datums/diseases/brainrot.dm
index 48468665eec..bd51e4e50c4 100644
--- a/code/datums/diseases/brainrot.dm
+++ b/code/datums/diseases/brainrot.dm
@@ -7,52 +7,52 @@
cures = list(/datum/reagent/medicine/mannitol)
agent = "Cryptococcus Cosmosis"
viable_mobtypes = list(/mob/living/carbon/human)
- cure_chance = 15//higher chance to cure, since two reagents are required
+ cure_chance = 7.5 //higher chance to cure, since two reagents are required
desc = "This disease destroys the braincells, causing brain fever, brain necrosis and general intoxication."
required_organs = list(/obj/item/organ/brain)
severity = DISEASE_SEVERITY_HARMFUL
-/datum/disease/brainrot/stage_act() //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist -ACTUALLY Removed rather than commented out, I don't see it returning - RR
+/datum/disease/brainrot/stage_act(delta_time, times_fired) //Removed toxloss because damaging diseases are pretty horrible. Last round it killed the entire station because the cure didn't work -- Urist -ACTUALLY Removed rather than commented out, I don't see it returning - RR
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("blink")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("yawn")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You don't feel like yourself.")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 170)
if(3)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("stare")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("drool")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2, 170)
if(prob(2))
to_chat(affected_mob, "Your try to remember something important...but can't.")
if(4)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("stare")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("drool")
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 170)
if(prob(2))
to_chat(affected_mob, "Strange buzzing fills your head, removing all thoughts.")
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, "You lose consciousness...")
affected_mob.visible_message("[affected_mob] suddenly collapses!", \
"You suddenly collapse!")
- affected_mob.Unconscious(rand(100,200))
+ affected_mob.Unconscious(rand(100, 200))
if(prob(1))
affected_mob.emote("snore")
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
affected_mob.stuttering += 3
diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm
index 0a6cd5b5231..8cb94f0bc82 100644
--- a/code/datums/diseases/cold.dm
+++ b/code/datums/diseases/cold.dm
@@ -10,48 +10,40 @@
severity = DISEASE_SEVERITY_NONTHREAT
-/datum/disease/cold/stage_act()
+/datum/disease/cold/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(affected_mob.body_position == LYING_DOWN && prob(40)) //changed FROM prob(10) until sleeping is fixed
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if(prob(0.05))
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your throat feels sore.")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Mucous runs down the back of your throat.")
+ if((affected_mob.body_position == LYING_DOWN && DT_PROB(23, delta_time)) || DT_PROB(0.025, delta_time)) //changed FROM prob(10) until sleeping is fixed // Has sleeping been fixed yet?
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return FALSE
if(3)
- if(affected_mob.body_position == LYING_DOWN && prob(25)) //changed FROM prob(5) until sleeping is fixed
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if(prob(0.01))
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your throat feels sore.")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Mucous runs down the back of your throat.")
- if(prob(0.5) && !LAZYFIND(affected_mob.disease_resistances, /datum/disease/flu))
+ if(DT_PROB(0.25, delta_time) && !LAZYFIND(affected_mob.disease_resistances, /datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu()
affected_mob.ForceContractDisease(Flu, FALSE, TRUE)
cure()
return FALSE
+ if((affected_mob.body_position == LYING_DOWN && DT_PROB(12.5, delta_time)) || DT_PROB(0.005, delta_time)) //changed FROM prob(5) until sleeping is fixed
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return FALSE
diff --git a/code/datums/diseases/cold9.dm b/code/datums/diseases/cold9.dm
index 31aefe85775..408752112a1 100644
--- a/code/datums/diseases/cold9.dm
+++ b/code/datums/diseases/cold9.dm
@@ -11,33 +11,33 @@
severity = DISEASE_SEVERITY_HARMFUL
-/datum/disease/cold9/stage_act()
+/datum/disease/cold9/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- affected_mob.adjust_bodytemperature(-10)
- if(prob(0.1))
+ affected_mob.adjust_bodytemperature(-5 * delta_time)
+ if(DT_PROB(0.5, delta_time))
+ affected_mob.emote("sneeze")
+ if(DT_PROB(0.5, delta_time))
+ affected_mob.emote("cough")
+ if(DT_PROB(0.5, delta_time))
+ to_chat(affected_mob, "Your throat feels sore.")
+ if(DT_PROB(2.5, delta_time))
+ to_chat(affected_mob, "You feel stiff.")
+ if(DT_PROB(0.05, delta_time))
to_chat(affected_mob, "You feel better.")
cure()
return FALSE
- if(prob(1))
- affected_mob.emote("sneeze")
- if(prob(1))
- affected_mob.emote("cough")
- if(prob(1))
- to_chat(affected_mob, "Your throat feels sore.")
- if(prob(5))
- to_chat(affected_mob, "You feel stiff.")
if(3)
- affected_mob.adjust_bodytemperature(-20)
- if(prob(1))
+ affected_mob.adjust_bodytemperature(-10 * delta_time)
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your throat feels sore.")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You feel stiff.")
diff --git a/code/datums/diseases/decloning.dm b/code/datums/diseases/decloning.dm
index f3ca2f08897..3988b955717 100644
--- a/code/datums/diseases/decloning.dm
+++ b/code/datums/diseases/decloning.dm
@@ -2,7 +2,7 @@
form = "Virus"
name = "Cellular Degeneration"
max_stages = 5
- stage_prob = 1
+ stage_prob = 0.5
cure_text = "Rezadone or death."
agent = "Severe Genetic Damage"
viable_mobtypes = list(/mob/living/carbon/human)
@@ -13,7 +13,7 @@
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
process_dead = TRUE
-/datum/disease/decloning/stage_act()
+/datum/disease/decloning/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -24,38 +24,38 @@
switch(stage)
if(2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("itch")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("yawn")
if(3)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("itch")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("drool")
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
affected_mob.adjustCloneLoss(1, FALSE)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "Your skin feels strange.")
if(4)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("itch")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("drool")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 170)
affected_mob.adjustCloneLoss(2, FALSE)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
affected_mob.stuttering += 3
if(5)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("itch")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("drool")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "Your skin starts degrading!")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.adjustCloneLoss(5, FALSE)
affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2, 170)
if(affected_mob.cloneloss >= 100)
diff --git a/code/datums/diseases/dna_spread.dm b/code/datums/diseases/dna_spread.dm
index 514ccb78a68..d04b4f0ecd5 100644
--- a/code/datums/diseases/dna_spread.dm
+++ b/code/datums/diseases/dna_spread.dm
@@ -14,7 +14,7 @@
severity = DISEASE_SEVERITY_MEDIUM
-/datum/disease/dnaspread/stage_act()
+/datum/disease/dnaspread/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -36,16 +36,16 @@
return
switch(stage)
- if(2 || 3) //Pretend to be a cold and give time to spread.
- if(prob(8))
+ if(2, 3) //Pretend to be a cold and give time to spread.
+ if(DT_PROB(4, delta_time))
affected_mob.emote("sneeze")
- if(prob(8))
+ if(DT_PROB(4, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your muscles ache.")
if(prob(20))
affected_mob.take_bodypart_damage(1, updating_health = FALSE)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your stomach hurts.")
if(prob(20))
affected_mob.adjustToxLoss(2, FALSE)
diff --git a/code/datums/diseases/fake_gbs.dm b/code/datums/diseases/fake_gbs.dm
index 935cc12648b..4024d6525f7 100644
--- a/code/datums/diseases/fake_gbs.dm
+++ b/code/datums/diseases/fake_gbs.dm
@@ -11,26 +11,26 @@
severity = DISEASE_SEVERITY_BIOHAZARD
-/datum/disease/fake_gbs/stage_act()
+/datum/disease/fake_gbs/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("sneeze")
if(3)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("cough")
- else if(prob(5))
+ else if(DT_PROB(2.5, delta_time))
affected_mob.emote("gasp")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You're starting to feel very weak...")
if(4)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.emote("cough")
if(5)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.emote("cough")
diff --git a/code/datums/diseases/flu.dm b/code/datums/diseases/flu.dm
index f834d1457be..0566fed6fc5 100644
--- a/code/datums/diseases/flu.dm
+++ b/code/datums/diseases/flu.dm
@@ -4,7 +4,7 @@
spread_text = "Airborne"
cure_text = "Spaceacillin"
cures = list(/datum/reagent/medicine/spaceacillin)
- cure_chance = 10
+ cure_chance = 5
agent = "H13N1 flu virion"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
@@ -12,44 +12,44 @@
severity = DISEASE_SEVERITY_MINOR
-/datum/disease/flu/stage_act()
+/datum/disease/flu/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(affected_mob.body_position == LYING_DOWN && prob(20))
- to_chat(affected_mob, "You feel better.")
- stage--
- return
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your muscles ache.")
if(prob(20))
affected_mob.take_bodypart_damage(1, updating_health = FALSE)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your stomach hurts.")
if(prob(20))
affected_mob.adjustToxLoss(1, FALSE)
+ if(affected_mob.body_position == LYING_DOWN && DT_PROB(10, delta_time))
+ to_chat(affected_mob, "You feel better.")
+ stage--
+ return
if(3)
- if(affected_mob.body_position == LYING_DOWN && prob(15))
- to_chat(affected_mob, "You feel better.")
- stage--
- return
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your muscles ache.")
if(prob(20))
affected_mob.take_bodypart_damage(1, updating_health = FALSE)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "Your stomach hurts.")
if(prob(20))
affected_mob.adjustToxLoss(1, FALSE)
+ if(affected_mob.body_position == LYING_DOWN && DT_PROB(7.5, delta_time))
+ to_chat(affected_mob, "You feel better.")
+ stage--
+ return
diff --git a/code/datums/diseases/fluspanish.dm b/code/datums/diseases/fluspanish.dm
index 3c0d47c16ed..f5cff8cc309 100644
--- a/code/datums/diseases/fluspanish.dm
+++ b/code/datums/diseases/fluspanish.dm
@@ -4,7 +4,7 @@
spread_text = "Airborne"
cure_text = "Spaceacillin & Anti-bodies to the common flu"
cures = list(/datum/reagent/medicine/spaceacillin)
- cure_chance = 10
+ cure_chance = 5
agent = "1nqu1s1t10n flu virion"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
@@ -12,28 +12,28 @@
severity = DISEASE_SEVERITY_DANGEROUS
-/datum/disease/fluspanish/stage_act()
+/datum/disease/fluspanish/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- affected_mob.adjust_bodytemperature(10)
- if(prob(5))
+ affected_mob.adjust_bodytemperature(5 * delta_time)
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("cough")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "You're burning in your own skin!")
affected_mob.take_bodypart_damage(0, 5, updating_health = FALSE)
if(3)
- affected_mob.adjust_bodytemperature(20)
- if(prob(5))
+ affected_mob.adjust_bodytemperature(10 * delta_time)
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("sneeze")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("cough")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "You're burning in your own skin!")
affected_mob.take_bodypart_damage(0, 5, updating_health = FALSE)
diff --git a/code/datums/diseases/gastrolisis.dm b/code/datums/diseases/gastrolisis.dm
index 63994362032..42e75ae13c6 100644
--- a/code/datums/diseases/gastrolisis.dm
+++ b/code/datums/diseases/gastrolisis.dm
@@ -6,12 +6,12 @@
cure_text = "Salt and mutadone"
agent = "Agent S and DNA restructuring"
viable_mobtypes = list(/mob/living/carbon/human)
- stage_prob = 1
+ stage_prob = 0.5
disease_flags = CURABLE
cures = list(/datum/reagent/consumable/salt, /datum/reagent/medicine/mutadone)
-/datum/disease/gastrolosis/stage_act()
+/datum/disease/gastrolosis/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -22,54 +22,58 @@
switch(stage)
if(2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("gag")
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
var/turf/open/OT = get_turf(affected_mob)
if(isopenturf(OT))
OT.MakeSlippery(TURF_WET_LUBE, 40)
if(3)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("gag")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
var/turf/open/OT = get_turf(affected_mob)
if(isopenturf(OT))
OT.MakeSlippery(TURF_WET_LUBE, 100)
if(4)
var/obj/item/organ/eyes/eyes = locate(/obj/item/organ/eyes/snail) in affected_mob.internal_organs
- if(!eyes && prob(5))
+ if(!eyes && DT_PROB(2.5, delta_time))
var/obj/item/organ/eyes/snail/new_eyes = new()
new_eyes.Insert(affected_mob, drop_if_replaced = TRUE)
affected_mob.visible_message("[affected_mob]'s eyes fall out, with snail eyes taking its place!", \
"You scream in pain as your eyes are pushed out by your new snail eyes!")
affected_mob.emote("scream")
return
+
var/obj/item/shell = affected_mob.get_item_by_slot(ITEM_SLOT_BACK)
if(!istype(shell, /obj/item/storage/backpack/snail))
shell = null
- if(!shell && prob(5))
+ if(!shell && DT_PROB(2.5, delta_time))
if(affected_mob.dropItemToGround(affected_mob.get_item_by_slot(ITEM_SLOT_BACK)))
affected_mob.equip_to_slot_or_del(new /obj/item/storage/backpack/snail(affected_mob), ITEM_SLOT_BACK)
affected_mob.visible_message("[affected_mob] grows a grotesque shell on their back!", \
"You scream in pain as a shell pushes itself out from under your skin!")
affected_mob.emote("scream")
return
+
var/obj/item/organ/tongue/tongue = locate(/obj/item/organ/tongue/snail) in affected_mob.internal_organs
- if(!tongue && prob(5))
+ if(!tongue && DT_PROB(2.5, delta_time))
var/obj/item/organ/tongue/snail/new_tongue = new()
new_tongue.Insert(affected_mob)
to_chat(affected_mob, "You feel your speech slow down...")
return
- if(shell && eyes && tongue && prob(5))
+
+ if(shell && eyes && tongue && DT_PROB(2.5, delta_time))
affected_mob.set_species(/datum/species/snail)
affected_mob.client?.give_award(/datum/award/achievement/misc/snail, affected_mob)
affected_mob.visible_message("[affected_mob] turns into a snail!", \
"You turned into a snail person! You feel an urge to cccrrraaawwwlll...")
cure()
return FALSE
- if(prob(10))
+
+ if(DT_PROB(5, delta_time))
affected_mob.emote("gag")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
var/turf/open/OT = get_turf(affected_mob)
if(isopenturf(OT))
OT.MakeSlippery(TURF_WET_LUBE, 100)
diff --git a/code/datums/diseases/gbs.dm b/code/datums/diseases/gbs.dm
index d58950811ae..5bc4548f0e5 100644
--- a/code/datums/diseases/gbs.dm
+++ b/code/datums/diseases/gbs.dm
@@ -5,29 +5,29 @@
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Synaptizine & Sulfur"
cures = list(/datum/reagent/medicine/synaptizine,/datum/reagent/sulfur)
- cure_chance = 15//higher chance to cure, since two reagents are required
+ cure_chance = 7.5 //higher chance to cure, since two reagents are required
agent = "Gravitokinetic Bipotential SADS+"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
permeability_mod = 1
severity = DISEASE_SEVERITY_BIOHAZARD
-/datum/disease/gbs/stage_act()
+/datum/disease/gbs/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("cough")
if(3)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("gasp")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "Your body hurts all over!")
if(4)
to_chat(affected_mob, "Your body feels as if it's trying to rip itself apart!")
- if(prob(50))
+ if(DT_PROB(30, delta_time))
affected_mob.gib()
return FALSE
diff --git a/code/datums/diseases/heart_failure.dm b/code/datums/diseases/heart_failure.dm
index 0040a5c512d..f82542647be 100644
--- a/code/datums/diseases/heart_failure.dm
+++ b/code/datums/diseases/heart_failure.dm
@@ -2,7 +2,7 @@
form = "Condition"
name = "Myocardial Infarction"
max_stages = 5
- stage_prob = 2
+ stage_prob = 1
cure_text = "Heart replacement surgery to cure. Defibrillation (or as a last resort, uncontrolled electric shocking) may also be effective after the onset of cardiac arrest. Penthrite can also mitigate cardiac arrest."
agent = "Shitty Heart"
viable_mobtypes = list(/mob/living/carbon/human)
@@ -22,7 +22,7 @@
return D
-/datum/disease/heart_failure/stage_act()
+/datum/disease/heart_failure/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -33,25 +33,25 @@
switch(stage)
if(1 to 2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel [pick("discomfort", "pressure", "a burning sensation", "pain")] in your chest.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel dizzy.")
affected_mob.add_confusion(6)
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, "You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].")
if(3 to 4)
if(!sound)
affected_mob.playsound_local(affected_mob, 'sound/health/slowbeat.ogg', 40, FALSE, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
sound = TRUE
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, "You feel a sharp pain in your chest!")
if(prob(25))
affected_mob.vomit(95)
affected_mob.emote("cough")
affected_mob.Paralyze(40)
affected_mob.losebreath += 4
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, "You feel very weak and dizzy...")
affected_mob.add_confusion(8)
affected_mob.adjustStaminaLoss(40, FALSE)
diff --git a/code/datums/diseases/magnitis.dm b/code/datums/diseases/magnitis.dm
index 389abee0671..b10915d1581 100644
--- a/code/datums/diseases/magnitis.dm
+++ b/code/datums/diseases/magnitis.dm
@@ -14,16 +14,16 @@
process_dead = TRUE
-/datum/disease/magnitis/stage_act()
+/datum/disease/magnitis/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel a slight shock course through your body.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
for(var/obj/nearby_object in orange(2, affected_mob))
if(nearby_object.anchored || !(nearby_object.flags_1 & CONDUCT_1))
continue
@@ -35,11 +35,11 @@
var/move_dir = get_dir(nearby_silicon, affected_mob)
nearby_silicon.Move(get_step(nearby_silicon, move_dir), move_dir)
if(3)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel a strong shock course through your body.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel like clowning around.")
- if(prob(4))
+ if(DT_PROB(2, delta_time))
for(var/obj/nearby_object in orange(4, affected_mob))
if(nearby_object.anchored || !(nearby_object.flags_1 & CONDUCT_1))
continue
@@ -55,11 +55,11 @@
if(!nearby_silicon.Move(get_step(nearby_silicon, move_dir), move_dir))
break
if(4)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel a powerful shock course through your body.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You query upon the nature of miracles.")
- if(prob(8))
+ if(DT_PROB(4, delta_time))
for(var/obj/nearby_object in orange(6, affected_mob))
if(nearby_object.anchored || !(nearby_object.flags_1 & CONDUCT_1))
continue
diff --git a/code/datums/diseases/parasitic_infection.dm b/code/datums/diseases/parasitic_infection.dm
index 82cd48b3b87..c6840f5b90f 100644
--- a/code/datums/diseases/parasitic_infection.dm
+++ b/code/datums/diseases/parasitic_infection.dm
@@ -15,7 +15,7 @@
bypasses_immunity = TRUE
-/datum/disease/parasite/stage_act()
+/datum/disease/parasite/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -28,20 +28,20 @@
switch(stage)
if(1)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("cough")
if(2)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
if(prob(50))
to_chat(affected_mob, "You feel the weight loss already!")
affected_mob.adjust_nutrition(-3)
if(3)
- if(prob(20))
+ if(DT_PROB(10, delta_time))
if(prob(20))
to_chat(affected_mob, "You're... REALLY starting to feel the weight loss.")
affected_mob.adjust_nutrition(-6)
if(4)
- if(prob(30))
+ if(DT_PROB(16, delta_time))
if(affected_mob.nutrition >= 100)
if(prob(10))
to_chat(affected_mob, "You feel like your body's shedding weight rapidly!")
diff --git a/code/datums/diseases/parrotpossession.dm b/code/datums/diseases/parrotpossession.dm
index c034567ef0d..a7188a0bd77 100644
--- a/code/datums/diseases/parrotpossession.dm
+++ b/code/datums/diseases/parrotpossession.dm
@@ -6,7 +6,7 @@
disease_flags = CURABLE
cure_text = "Holy Water."
cures = list(/datum/reagent/water/holywater)
- cure_chance = 20
+ cure_chance = 10
agent = "Avian Vengence"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Subject is possessed by the vengeful spirit of a parrot. Call the priest."
@@ -16,7 +16,7 @@
var/mob/living/simple_animal/parrot/poly/ghost/parrot
-/datum/disease/parrot_possession/stage_act()
+/datum/disease/parrot_possession/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -25,7 +25,7 @@
cure()
return FALSE
- if(length(parrot.speech_buffer) && prob(parrot.speak_chance))
+ if(length(parrot.speech_buffer) && DT_PROB(parrot.speak_chance, delta_time)) // I'm not going to dive into polycode trying to adjust that probability. Enjoy doubled ghost parrot speach
affected_mob.say(pick(parrot.speech_buffer), forced = "parrot possession")
diff --git a/code/datums/diseases/pierrot_throat.dm b/code/datums/diseases/pierrot_throat.dm
index 4bd4645e4da..403fad4613f 100644
--- a/code/datums/diseases/pierrot_throat.dm
+++ b/code/datums/diseases/pierrot_throat.dm
@@ -4,7 +4,7 @@
spread_text = "Airborne"
cure_text = "Banana products, especially banana bread."
cures = list(/datum/reagent/consumable/banana)
- cure_chance = 75
+ cure_chance = 50
agent = "H0NI<42 Virus"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
@@ -12,23 +12,23 @@
severity = DISEASE_SEVERITY_MEDIUM
-/datum/disease/pierrot_throat/stage_act()
+/datum/disease/pierrot_throat/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(1)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You feel a little silly.")
if(2)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You start seeing rainbows.")
if(3)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "Your thoughts are interrupted by a loud HONK!")
if(4)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) , forced = "pierrot's throat")
diff --git a/code/datums/diseases/retrovirus.dm b/code/datums/diseases/retrovirus.dm
index c0a4aeb7b2c..deb1312e8e4 100644
--- a/code/datums/diseases/retrovirus.dm
+++ b/code/datums/diseases/retrovirus.dm
@@ -4,13 +4,13 @@
spread_text = "Contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Rest or an injection of mutadone"
- cure_chance = 6
+ cure_chance = 3
agent = ""
viable_mobtypes = list(/mob/living/carbon/human)
desc = "A DNA-altering retrovirus that scrambles the structural and unique enzymes of a host constantly."
severity = DISEASE_SEVERITY_HARMFUL
permeability_mod = 0.4
- stage_prob = 2
+ stage_prob = 1
var/restcure = 0
/datum/disease/dna_retrovirus/New()
@@ -26,62 +26,56 @@
D.restcure = restcure
return D
-/datum/disease/dna_retrovirus/stage_act()
+/datum/disease/dna_retrovirus/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(1)
- if(restcure)
- if(affected_mob.body_position == LYING_DOWN && prob(30))
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if (prob(8))
+ if(DT_PROB(4, delta_time))
to_chat(affected_mob, "Your head hurts.")
- if (prob(9))
+ if(DT_PROB(4.5, delta_time))
to_chat(affected_mob, "You feel a tingling sensation in your chest.")
- if (prob(9))
+ if(DT_PROB(4.5, delta_time))
to_chat(affected_mob, "You feel angry.")
+ if(restcure && affected_mob.body_position == LYING_DOWN && DT_PROB(16, delta_time))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return FALSE
if(2)
- if(restcure)
- if(affected_mob.body_position == LYING_DOWN && prob(20))
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if (prob(8))
+ if(DT_PROB(4, delta_time))
to_chat(affected_mob, "Your skin feels loose.")
- if (prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You feel very strange.")
- if (prob(4))
+ if(DT_PROB(2, delta_time))
to_chat(affected_mob, "You feel a stabbing pain in your head!")
affected_mob.Unconscious(40)
- if (prob(4))
+ if(DT_PROB(2, delta_time))
to_chat(affected_mob, "Your stomach churns.")
+ if(restcure && affected_mob.body_position == LYING_DOWN && DT_PROB(10, delta_time))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return FALSE
if(3)
- if(restcure)
- if(affected_mob.body_position == LYING_DOWN && prob(20))
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if (prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "Your entire body vibrates.")
-
- if (prob(35))
+ if(DT_PROB(19, delta_time))
if(prob(50))
scramble_dna(affected_mob, 1, 0, rand(15,45))
else
scramble_dna(affected_mob, 0, 1, rand(15,45))
-
+ if(restcure && affected_mob.body_position == LYING_DOWN && DT_PROB(10, delta_time))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return FALSE
if(4)
- if(restcure)
- if(affected_mob.body_position == LYING_DOWN && prob(5))
- to_chat(affected_mob, "You feel better.")
- cure()
- return FALSE
- if (prob(60))
+ if(DT_PROB(37, delta_time))
if(prob(50))
scramble_dna(affected_mob, 1, 0, rand(50,75))
else
scramble_dna(affected_mob, 0, 1, rand(50,75))
+ if(restcure && affected_mob.body_position == LYING_DOWN && DT_PROB(2.5, delta_time))
+ to_chat(affected_mob, "You feel better.")
+ cure()
+ return FALSE
diff --git a/code/datums/diseases/rhumba_beat.dm b/code/datums/diseases/rhumba_beat.dm
index 0dc7897879e..32c81f43be2 100644
--- a/code/datums/diseases/rhumba_beat.dm
+++ b/code/datums/diseases/rhumba_beat.dm
@@ -10,27 +10,27 @@
permeability_mod = 1
severity = DISEASE_SEVERITY_BIOHAZARD
-/datum/disease/rhumba_beat/stage_act()
+/datum/disease/rhumba_beat/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(45))
+ if(DT_PROB(26, delta_time))
affected_mob.adjustFireLoss(5, FALSE)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
to_chat(affected_mob, "You feel strange...")
if(3)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "You feel the urge to dance...")
- else if(prob(5))
+ else if(DT_PROB(2.5, delta_time))
affected_mob.emote("gasp")
- else if(prob(10))
+ else if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You feel the need to chick chicky boom...")
if(4)
- if(prob(20))
- if (prob(50))
+ if(DT_PROB(10, delta_time))
+ if(prob(50))
affected_mob.adjust_fire_stacks(2)
affected_mob.IgniteMob()
else
@@ -38,5 +38,5 @@
to_chat(affected_mob, "You feel a burning beat inside...")
if(5)
to_chat(affected_mob, "Your body is unable to contain the Rhumba Beat...")
- if(prob(50))
+ if(DT_PROB(29, delta_time))
explosion(get_turf(affected_mob), -1, 0, 2, 3, 0, 2) // This is equivalent to a lvl 1 fireball
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index c9404e49440..4cacbd4414f 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -7,7 +7,7 @@
agent = "Shenanigans"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/alien)
severity = DISEASE_SEVERITY_BIOHAZARD
- stage_prob = 10
+ stage_prob = 5
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
disease_flags = CURABLE
var/list/stage1 = list("You feel unremarkable.")
@@ -30,23 +30,23 @@
return D
-/datum/disease/transformation/stage_act()
+/datum/disease/transformation/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(1)
- if (stage1 && prob(stage_prob))
+ if (stage1 && DT_PROB(stage_prob, delta_time))
to_chat(affected_mob, pick(stage1))
if(2)
- if (stage2 && prob(stage_prob))
+ if (stage2 && DT_PROB(stage_prob, delta_time))
to_chat(affected_mob, pick(stage2))
if(3)
- if (stage3 && prob(stage_prob * 2))
+ if (stage3 && DT_PROB(stage_prob * 2, delta_time))
to_chat(affected_mob, pick(stage3))
if(4)
- if (stage4 && prob(stage_prob * 2))
+ if (stage4 && DT_PROB(stage_prob * 2, delta_time))
to_chat(affected_mob, pick(stage4))
if(5)
do_disease_transformation(affected_mob)
@@ -105,11 +105,11 @@
spread_flags = DISEASE_SPREAD_SPECIAL
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1
- cure_chance = 1
+ cure_chance = 0.5
disease_flags = CAN_CARRY|CAN_RESIST
desc = "Monkeys with this disease will bite humans, causing humans to mutate into a monkey."
severity = DISEASE_SEVERITY_BIOHAZARD
- stage_prob = 4
+ stage_prob = 2
visibility_flags = NONE
agent = "Kongey Vibrion M-909"
new_form = /mob/living/carbon/human/species/monkey
@@ -130,21 +130,21 @@
ADD_TRAIT(affected_mob, TRAIT_VENTCRAWLER_ALWAYS, type)
-/datum/disease/transformation/jungle_fever/stage_act()
+/datum/disease/transformation/jungle_fever/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "Your [pick("back", "arm", "leg", "elbow", "head")] itches.")
if(3)
- if(prob(4))
+ if(DT_PROB(2, delta_time))
to_chat(affected_mob, "You feel a stabbing pain in your head.")
affected_mob.add_confusion(10)
if(4)
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh."), forced = "jungle fever")
@@ -167,7 +167,7 @@
name = "Robotic Transformation"
cure_text = "An injection of copper."
cures = list(/datum/reagent/copper)
- cure_chance = 5
+ cure_chance = 2.5
agent = "R2D2 Nanomachines"
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
severity = DISEASE_SEVERITY_BIOHAZARD
@@ -182,20 +182,20 @@
bantype = "Cyborg"
-/datum/disease/transformation/robot/stage_act()
+/datum/disease/transformation/robot/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(3)
- if (prob(8))
+ if (DT_PROB(4, delta_time))
affected_mob.say(pick("Beep, boop", "beep, beep!", "Boop...bop"), forced = "robotic transformation")
- if (prob(4))
+ if (DT_PROB(2, delta_time))
to_chat(affected_mob, "You feel a stabbing pain in your head.")
affected_mob.Unconscious(40)
if(4)
- if (prob(20))
+ if (DT_PROB(10, delta_time))
affected_mob.say(pick("beep, beep!", "Boop bop boop beep.", "kkkiiiill mmme", "I wwwaaannntt tttoo dddiiieeee..."), forced = "robotic transformation")
@@ -204,7 +204,7 @@
name = "Xenomorph Transformation"
cure_text = "Spaceacillin & Glycerol"
cures = list(/datum/reagent/medicine/spaceacillin, /datum/reagent/glycerol)
- cure_chance = 5
+ cure_chance = 2.5
agent = "Rip-LEY Alien Microbes"
desc = "This disease changes the victim into a xenomorph."
severity = DISEASE_SEVERITY_BIOHAZARD
@@ -218,18 +218,18 @@
bantype = ROLE_ALIEN
-/datum/disease/transformation/xeno/stage_act()
+/datum/disease/transformation/xeno/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(3)
- if (prob(4))
+ if(DT_PROB(2, delta_time))
to_chat(affected_mob, "You feel a stabbing pain in your head.")
affected_mob.Unconscious(40)
if(4)
- if (prob(20))
+ if(DT_PROB(10, delta_time))
affected_mob.say(pick("You look delicious.", "Going to... devour you...", "Hsssshhhhh!"), forced = "xenomorph transformation")
@@ -237,7 +237,7 @@
name = "Advanced Mutation Transformation"
cure_text = "frost oil"
cures = list(/datum/reagent/consumable/frostoil)
- cure_chance = 80
+ cure_chance = 55
agent = "Advanced Mutation Toxin"
desc = "This highly concentrated extract converts anything into more of itself."
severity = DISEASE_SEVERITY_BIOHAZARD
@@ -250,7 +250,7 @@
new_form = /mob/living/simple_animal/slime/random
-/datum/disease/transformation/slime/stage_act()
+/datum/disease/transformation/slime/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
@@ -283,16 +283,16 @@
new_form = /mob/living/simple_animal/pet/dog/corgi
-/datum/disease/transformation/corgi/stage_act()
+/datum/disease/transformation/corgi/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(3)
- if (prob(8))
+ if (DT_PROB(4, delta_time))
affected_mob.say(pick("YAP", "Woof!"), forced = "corgi transformation")
if(4)
- if (prob(20))
+ if (DT_PROB(10, delta_time))
affected_mob.say(pick("Bark!", "AUUUUUU"), forced = "corgi transformation")
@@ -302,7 +302,7 @@
cures = list(/datum/reagent/consumable/nothing)
agent = "Gluttony's Blessing"
desc = "A 'gift' from somewhere terrible."
- stage_prob = 20
+ stage_prob = 10
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = NONE
stage1 = list("Your stomach rumbles.")
@@ -318,8 +318,8 @@
name = "Gondola Transformation"
cure_text = "Condensed Capsaicin, ingested or injected." //getting pepper sprayed doesn't help
cures = list(/datum/reagent/consumable/condensedcapsaicin) //beats the hippie crap right out of your system
- cure_chance = 80
- stage_prob = 5
+ cure_chance = 55
+ stage_prob = 2.5
agent = "Tranquility"
desc = "Consuming the flesh of a Gondola comes at a terrible price."
severity = DISEASE_SEVERITY_BIOHAZARD
@@ -332,28 +332,28 @@
new_form = /mob/living/simple_animal/pet/gondola
-/datum/disease/transformation/gondola/stage_act()
+/datum/disease/transformation/gondola/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if (prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("smile")
- if (prob(20))
+ if(DT_PROB(10, delta_time))
affected_mob.reagents.add_reagent_list(list(/datum/reagent/pax = 5))
if(3)
- if (prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("smile")
- if (prob(20))
+ if(DT_PROB(10, delta_time))
affected_mob.reagents.add_reagent_list(list(/datum/reagent/pax = 5))
if(4)
- if (prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("smile")
- if (prob(20))
+ if(DT_PROB(10, delta_time))
affected_mob.reagents.add_reagent_list(list(/datum/reagent/pax = 5))
- if (prob(2))
+ if(DT_PROB(1, delta_time))
var/obj/item/held_item = affected_mob.get_active_held_item()
if(held_item)
to_chat(affected_mob, "You let go of what you were holding.")
diff --git a/code/datums/diseases/tuberculosis.dm b/code/datums/diseases/tuberculosis.dm
index c822148e430..fa94110d31d 100644
--- a/code/datums/diseases/tuberculosis.dm
+++ b/code/datums/diseases/tuberculosis.dm
@@ -7,55 +7,55 @@
cures = list(/datum/reagent/medicine/spaceacillin, /datum/reagent/medicine/c2/convermol)
agent = "Fungal Tubercle bacillus Cosmosis"
viable_mobtypes = list(/mob/living/carbon/human)
- cure_chance = 5//like hell are you getting out of hell
+ cure_chance = 2.5 //like hell are you getting out of hell
desc = "A rare highly transmissible virulent virus. Few samples exist, rumoured to be carefully grown and cultured by clandestine bio-weapon specialists. Causes fever, blood vomiting, lung damage, weight loss, and fatigue."
required_organs = list(/obj/item/organ/lungs)
severity = DISEASE_SEVERITY_BIOHAZARD
bypasses_immunity = TRUE // TB primarily impacts the lungs; it's also bacterial or fungal in nature; viral immunity should do nothing.
-/datum/disease/tuberculosis/stage_act() //it begins
+/datum/disease/tuberculosis/stage_act(delta_time, times_fired) //it begins
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
affected_mob.emote("cough")
to_chat(affected_mob, "Your chest hurts.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "Your stomach violently rumbles!")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(affected_mob, "You feel a cold sweat form.")
if(4)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You see four of everything!")
affected_mob.Dizzy(5)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel a sharp pain from your lower chest!")
affected_mob.adjustOxyLoss(5, FALSE)
affected_mob.emote("gasp")
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(affected_mob, "You feel air escape from your lungs painfully.")
affected_mob.adjustOxyLoss(25, FALSE)
affected_mob.emote("gasp")
if(5)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "[pick("You feel your heart slowing...", "You relax and slow your heartbeat.")]")
affected_mob.adjustStaminaLoss(70, FALSE)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.adjustStaminaLoss(100, FALSE)
affected_mob.visible_message("[affected_mob] faints!", "You surrender yourself and feel at peace...")
affected_mob.AdjustSleeping(100)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(affected_mob, "You feel your mind relax and your thoughts drift!")
affected_mob.set_confusion(min(100, affected_mob.get_confusion() + 8))
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.vomit(20)
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
to_chat(affected_mob, "[pick("Your stomach silently rumbles...", "Your stomach seizes up and falls limp, muscles dead and lifeless.", "You could eat a crayon")]")
- affected_mob.overeatduration = max(affected_mob.overeatduration - 100, 0)
+ affected_mob.overeatduration = max(affected_mob.overeatduration - (200 SECONDS), 0)
affected_mob.adjust_nutrition(-100)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
to_chat(affected_mob, "[pick("You feel uncomfortably hot...", "You feel like unzipping your jumpsuit...", "You feel like taking off some clothes...")]")
affected_mob.adjust_bodytemperature(40)
diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm
index fa8a1f3f014..688c8aa6bda 100644
--- a/code/datums/diseases/wizarditis.dm
+++ b/code/datums/diseases/wizarditis.dm
@@ -23,30 +23,30 @@ TARCOL MINTI ZHERI - forcewall
STI KALY - blind
*/
-/datum/disease/wizarditis/stage_act()
+/datum/disease/wizarditis/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
switch(stage)
if(2)
- if(prob(0.5))
+ if(DT_PROB(0.25, delta_time))
affected_mob.say(pick("You shall not pass!", "Expeliarmus!", "By Merlins beard!", "Feel the power of the Dark Side!"), forced = "wizarditis")
- if(prob(0.5))
+ if(DT_PROB(0.25, delta_time))
to_chat(affected_mob, "You feel [pick("that you don't have enough mana", "that the winds of magic are gone", "an urge to summon familiar")].")
if(3)
- if(prob(0.5))
+ if(DT_PROB(0.25, delta_time))
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!", "STI KALY!", "TARCOL MINTI ZHERI!"), forced = "wizarditis")
- if(prob(0.5))
+ if(DT_PROB(0.25, delta_time))
to_chat(affected_mob, "You feel [pick("the magic bubbling in your veins","that this location gives you a +1 to INT","an urge to summon familiar")].")
if(4)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
affected_mob.say(pick("NEC CANTIO!","AULIE OXIN FIERA!","STI KALY!","EI NATH!"), forced = "wizarditis")
return
- if(prob(0.5))
+ if(DT_PROB(0.25, delta_time))
to_chat(affected_mob, "You feel [pick("the tidal wave of raw power building inside","that this location gives you a +2 to INT and +1 to WIS","an urge to teleport")].")
spawn_wizard_clothes(50)
- if(prob(0.01))
+ if(DT_PROB(0.005, delta_time))
teleport()
diff --git a/code/datums/mutations/_mutations.dm b/code/datums/mutations/_mutations.dm
index a362aa6a9bb..363db599d1f 100644
--- a/code/datums/mutations/_mutations.dm
+++ b/code/datums/mutations/_mutations.dm
@@ -91,7 +91,7 @@
/datum/mutation/human/proc/get_visual_indicator()
return
-/datum/mutation/human/proc/on_life()
+/datum/mutation/human/proc/on_life(delta_time, times_fired)
return
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
diff --git a/code/datums/mutations/actions.dm b/code/datums/mutations/actions.dm
index 9c4b4ff25f5..9aadccf9971 100644
--- a/code/datums/mutations/actions.dm
+++ b/code/datums/mutations/actions.dm
@@ -167,10 +167,10 @@
energy_coeff = 1
synchronizer_coeff = 1
-/datum/mutation/human/void/on_life()
+/datum/mutation/human/void/on_life(delta_time, times_fired)
if(!isturf(owner.loc))
return
- if(prob((0.5+((100-dna.stability)/20))) * GET_MUTATION_SYNCHRONIZER(src)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
+ if(DT_PROB((0.25+((100-dna.stability)/40)) * GET_MUTATION_SYNCHRONIZER(src), delta_time)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
new /obj/effect/immortality_talisman/void(get_turf(owner), owner)
/obj/effect/proc_holder/spell/self/void
diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm
index f616f60ec66..eb04fb86557 100644
--- a/code/datums/mutations/body.dm
+++ b/code/datums/mutations/body.dm
@@ -9,8 +9,8 @@
synchronizer_coeff = 1
power_coeff = 1
-/datum/mutation/human/epilepsy/on_life()
- if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
+/datum/mutation/human/epilepsy/on_life(delta_time, times_fired)
+ if(DT_PROB(0.5 * GET_MUTATION_SYNCHRONIZER(src), delta_time) && owner.stat == CONSCIOUS)
owner.visible_message("[owner] starts having a seizure!", "You have a seizure!")
owner.Unconscious(200 * GET_MUTATION_POWER(src))
owner.Jitter(1000 * GET_MUTATION_POWER(src))
@@ -57,8 +57,8 @@
synchronizer_coeff = 1
power_coeff = 1
-/datum/mutation/human/cough/on_life()
- if(prob(5 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
+/datum/mutation/human/cough/on_life(delta_time, times_fired)
+ if(DT_PROB(2.5 * GET_MUTATION_SYNCHRONIZER(src), delta_time) && owner.stat == CONSCIOUS)
owner.drop_all_held_items()
owner.emote("cough")
if(GET_MUTATION_POWER(src) > 1)
@@ -73,8 +73,8 @@
text_gain_indication = "You feel screams echo through your mind..."
text_lose_indication = "The screaming in your mind fades."
-/datum/mutation/human/paranoia/on_life()
- if(prob(5) && owner.stat == CONSCIOUS)
+/datum/mutation/human/paranoia/on_life(delta_time, times_fired)
+ if(DT_PROB(2.5, delta_time) && owner.stat == CONSCIOUS)
owner.emote("scream")
if(prob(25))
owner.hallucination += 20
@@ -135,8 +135,8 @@
text_gain_indication = "You twitch."
synchronizer_coeff = 1
-/datum/mutation/human/tourettes/on_life()
- if(prob(10 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS && !owner.IsStun())
+/datum/mutation/human/tourettes/on_life(delta_time, times_fired)
+ if(DT_PROB(5 * GET_MUTATION_SYNCHRONIZER(src), delta_time) && owner.stat == CONSCIOUS && !owner.IsStun())
owner.Stun(200)
switch(rand(1, 3))
if(1)
@@ -284,8 +284,8 @@
synchronizer_coeff = 1
power_coeff = 1
-/datum/mutation/human/fire/on_life()
- if(prob((1+(100-dna.stability)/10)) * GET_MUTATION_SYNCHRONIZER(src))
+/datum/mutation/human/fire/on_life(delta_time, times_fired)
+ if(DT_PROB((0.05+(100-dna.stability)/19.5) * GET_MUTATION_SYNCHRONIZER(src), delta_time))
owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src))
owner.IgniteMob()
@@ -312,8 +312,8 @@
power_coeff = 1
var/warpchance = 0
-/datum/mutation/human/badblink/on_life()
- if(prob(warpchance))
+/datum/mutation/human/badblink/on_life(delta_time, times_fired)
+ if(DT_PROB(warpchance, delta_time))
var/warpmessage = pick(
"With a sickening 720-degree twist of [owner.p_their()] back, [owner] vanishes into thin air.",
"[owner] does some sort of strange backflip into another dimension. It looks pretty painful.",
@@ -321,13 +321,13 @@
"[owner]'s torso starts folding inside out until it vanishes from reality, taking [owner] with it.",
"One moment, you see [owner]. The next, [owner] is gone.")
owner.visible_message(warpmessage, "You feel a wave of nausea as you fall through reality!")
- var/warpdistance = rand(10,15) * GET_MUTATION_POWER(src)
+ var/warpdistance = rand(10, 15) * GET_MUTATION_POWER(src)
do_teleport(owner, get_turf(owner), warpdistance, channel = TELEPORT_CHANNEL_FREE)
owner.adjust_disgust(GET_MUTATION_SYNCHRONIZER(src) * (warpchance * warpdistance))
warpchance = 0
owner.visible_message("[owner] appears out of nowhere!")
else
- warpchance += 0.25 * GET_MUTATION_ENERGY(src)
+ warpchance += 0.0625 * GET_MUTATION_ENERGY(src) * delta_time
/datum/mutation/human/acidflesh
name = "Acidic Flesh"
@@ -336,15 +336,16 @@
text_gain_indication = "A horrible burning sensation envelops you as your flesh turns to acid!"
text_lose_indication = "A feeling of relief fills you as your flesh goes back to normal."
difficulty = 18//high so it's hard to unlock and use on others
- var/msgcooldown = 0
+ /// The cooldown for the warning message
+ COOLDOWN_DECLARE(msgcooldown)
-/datum/mutation/human/acidflesh/on_life()
- if(prob(25))
- if(world.time > msgcooldown)
+/datum/mutation/human/acidflesh/on_life(delta_time, times_fired)
+ if(DT_PROB(13, delta_time))
+ if(COOLDOWN_FINISHED(src, msgcooldown))
to_chat(owner, "Your acid flesh bubbles...")
- msgcooldown = world.time + 200
+ COOLDOWN_START(src, msgcooldown, 20 SECONDS)
if(prob(15))
- owner.acid_act(rand(30,50), 10)
+ owner.acid_act(rand(30, 50), 10)
owner.visible_message("[owner]'s skin bubbles and pops.", "Your bubbling flesh pops! It burns!")
playsound(owner,'sound/weapons/sear.ogg', 50, TRUE)
diff --git a/code/datums/mutations/chameleon.dm b/code/datums/mutations/chameleon.dm
index ab609b54cf2..5bf9b470e94 100644
--- a/code/datums/mutations/chameleon.dm
+++ b/code/datums/mutations/chameleon.dm
@@ -16,8 +16,8 @@
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/on_move)
RegisterSignal(owner, COMSIG_HUMAN_EARLY_UNARMED_ATTACK, .proc/on_attack_hand)
-/datum/mutation/human/chameleon/on_life()
- owner.alpha = max(0, owner.alpha - 25)
+/datum/mutation/human/chameleon/on_life(delta_time, times_fired)
+ owner.alpha = max(owner.alpha - (12.5 * delta_time), 0)
/datum/mutation/human/chameleon/proc/on_move()
SIGNAL_HANDLER
diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm
index 763641cc18e..138ab931656 100644
--- a/code/datums/mutations/hulk.dm
+++ b/code/datums/mutations/hulk.dm
@@ -65,7 +65,7 @@
if(35 to 41)
arm.force_wound_upwards(/datum/wound/blunt/moderate)
-/datum/mutation/human/hulk/on_life()
+/datum/mutation/human/hulk/on_life(delta_time, times_fired)
if(owner.health < 0)
on_losing(owner)
to_chat(owner, "You suddenly feel very weak.")
diff --git a/code/datums/mutations/radioactive.dm b/code/datums/mutations/radioactive.dm
index 00155ad0a17..516220925da 100644
--- a/code/datums/mutations/radioactive.dm
+++ b/code/datums/mutations/radioactive.dm
@@ -9,8 +9,8 @@
power_coeff = 1
-/datum/mutation/human/radioactive/on_life()
- radiation_pulse(owner, 20 * GET_MUTATION_POWER(src))
+/datum/mutation/human/radioactive/on_life(delta_time, times_fired)
+ radiation_pulse(owner, 10 * GET_MUTATION_POWER(src) * delta_time)
/datum/mutation/human/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
..()
diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm
index 696efea36a7..780225a8d1a 100644
--- a/code/datums/mutations/speech.dm
+++ b/code/datums/mutations/speech.dm
@@ -7,8 +7,8 @@
quality = MINOR_NEGATIVE
text_gain_indication = "You feel nervous."
-/datum/mutation/human/nervousness/on_life()
- if(prob(10))
+/datum/mutation/human/nervousness/on_life(delta_time, times_fired)
+ if(DT_PROB(5, delta_time))
owner.stuttering = max(10, owner.stuttering)
@@ -152,15 +152,15 @@
text_gain_indication = "You feel pretty good, honeydoll."
text_lose_indication = "You feel a little less conversation would be great."
-/datum/mutation/human/elvis/on_life()
+/datum/mutation/human/elvis/on_life(delta_time, times_fired)
switch(pick(1,2))
if(1)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
var/list/dancetypes = list("swinging", "fancy", "stylish", "20'th century", "jivin'", "rock and roller", "cool", "salacious", "bashing", "smashing")
var/dancemoves = pick(dancetypes)
owner.visible_message("[owner] busts out some [dancemoves] moves!")
if(2)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
owner.visible_message("[owner] [pick("jiggles their hips", "rotates their hips", "gyrates their hips", "taps their foot", "dances to an imaginary song", "jiggles their legs", "snaps their fingers")]!")
/datum/mutation/human/elvis/on_acquiring(mob/living/carbon/human/owner)
diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm
index 19d3e9004ba..ca0b1c59181 100644
--- a/code/datums/quirks/negative.dm
+++ b/code/datums/quirks/negative.dm
@@ -36,9 +36,9 @@
var/mob/living/carbon/human/H = quirk_holder
if(NOBLOOD in H.dna.species.species_traits) //can't lose blood if your species doesn't have any
return
- else
- if (H.blood_volume > (BLOOD_VOLUME_SAFE - 25)) // just barely survivable without treatment
- H.blood_volume -= 0.275 * delta_time
+
+ if (H.blood_volume > (BLOOD_VOLUME_SAFE - 25)) // just barely survivable without treatment
+ H.blood_volume -= 0.275 * delta_time
/datum/quirk/blindness
name = "Blind"
diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm
index 7e07bbb0d45..9390e4c6c7f 100644
--- a/code/datums/wounds/_wounds.dm
+++ b/code/datums/wounds/_wounds.dm
@@ -316,7 +316,7 @@
return
/// If var/processing is TRUE, this is run on each life tick
-/datum/wound/proc/handle_process()
+/datum/wound/proc/handle_process(delta_time, times_fired)
return
/// For use in do_after callback checks
@@ -338,7 +338,7 @@
return
/// Called when the patient is undergoing stasis, so that having fully treated a wound doesn't make you sit there helplessly until you think to unbuckle them
-/datum/wound/proc/on_stasis()
+/datum/wound/proc/on_stasis(delta_time, times_fired)
return
/// Used when we're being dragged while bleeding, the value we return is how much bloodloss this wound causes from being dragged. Since it's a proc, you can let bandages soak some of the blood
diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm
index 5690a593bc8..7e3845e35dd 100644
--- a/code/datums/wounds/bones.dm
+++ b/code/datums/wounds/bones.dm
@@ -63,7 +63,7 @@
UnregisterSignal(victim, COMSIG_HUMAN_EARLY_UNARMED_ATTACK)
return ..()
-/datum/wound/blunt/handle_process()
+/datum/wound/blunt/handle_process(delta_time, times_fired)
. = ..()
if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group && world.time > next_trauma_cycle)
if(active_trauma)
@@ -77,12 +77,12 @@
regen_ticks_current++
if(victim.body_position == LYING_DOWN)
- if(prob(50))
+ if(DT_PROB(30, delta_time))
regen_ticks_current += 0.5
- if(victim.IsSleeping() && prob(50))
+ if(victim.IsSleeping() && DT_PROB(30, delta_time))
regen_ticks_current += 0.5
- if(prob(severity * 3))
+ if(DT_PROB(severity * 1.5, delta_time))
victim.take_bodypart_damage(rand(1, severity * 2), stamina=rand(2, severity * 2.5), wound_bonus=CANT_WOUND)
if(prob(33))
to_chat(victim, "You feel a sharp pain in your body as your bones are reforming!")
diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm
index 5e01d9d24cc..0b1c9735858 100644
--- a/code/datums/wounds/burns.dm
+++ b/code/datums/wounds/burns.dm
@@ -34,11 +34,11 @@
var/strikes_to_lose_limb = 3
-/datum/wound/burn/handle_process()
+/datum/wound/burn/handle_process(delta_time, times_fired)
. = ..()
if(strikes_to_lose_limb == 0) // we've already hit sepsis, nothing more to do
- victim.adjustToxLoss(0.5)
- if(prob(1))
+ victim.adjustToxLoss(0.25 * delta_time)
+ if(DT_PROB(0.5, delta_time))
victim.visible_message("The infection on the remnants of [victim]'s [limb.name] shift and bubble nauseatingly!", "You can feel the infection on the remnants of your [limb.name] coursing through your veins!", vision_distance = COMBAT_MESSAGE_RANGE)
return
@@ -52,12 +52,12 @@
flesh_healing += 0.5
if(limb.current_gauze)
- limb.seep_gauze(WOUND_BURN_SANITIZATION_RATE)
+ limb.seep_gauze(WOUND_BURN_SANITIZATION_RATE * delta_time)
if(flesh_healing > 0) // good bandages multiply the length of flesh healing
var/bandage_factor = (limb.current_gauze ? limb.current_gauze.splint_factor : 1)
- flesh_damage = max(0, flesh_damage - 1)
- flesh_healing = max(0, flesh_healing - bandage_factor)
+ flesh_damage = max(flesh_damage - (0.5 * delta_time), 0)
+ flesh_healing = max(flesh_healing - (0.5 * bandage_factor * delta_time), 0) // good bandages multiply the length of flesh healing
// if we have little/no infection, the limb doesn't have much burn damage, and our nutrition is good, heal some flesh
if(infestation <= WOUND_INFECTION_MODERATE && (limb.burn_dam < 5) && (victim.nutrition >= NUTRITION_LEVEL_FED))
@@ -72,42 +72,52 @@
// sanitization is checked after the clearing check but before the actual ill-effects, because we freeze the effects of infection while we have sanitization
if(sanitization > 0)
var/bandage_factor = (limb.current_gauze ? limb.current_gauze.splint_factor : 1)
- infestation = max(0, infestation - WOUND_BURN_SANITIZATION_RATE)
- sanitization = max(0, sanitization - (WOUND_BURN_SANITIZATION_RATE * bandage_factor))
+ infestation = max(infestation - (WOUND_BURN_SANITIZATION_RATE * delta_time), 0)
+ sanitization = max(sanitization - (WOUND_BURN_SANITIZATION_RATE * bandage_factor * delta_time), 0)
return
- infestation += infestation_rate
-
+ infestation += infestation_rate * delta_time
switch(infestation)
if(0 to WOUND_INFECTION_MODERATE)
if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
- if(prob(30))
+ if(DT_PROB(15, delta_time))
victim.adjustToxLoss(0.2)
if(prob(6))
to_chat(victim, "The blisters on your [limb.name] ooze a strange pus...")
if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
- if(!disabling && prob(2))
- to_chat(victim, "Your [limb.name] completely locks up, as you struggle for control against the infection!")
- set_disabling(TRUE)
- else if(disabling && prob(8))
+ if(!disabling)
+ if(DT_PROB(1, delta_time))
+ to_chat(victim, "Your [limb.name] completely locks up, as you struggle for control against the infection!")
+ set_disabling(TRUE)
+ return
+ else if(DT_PROB(4, delta_time))
to_chat(victim, "You regain sensation in your [limb.name], but it's still in terrible shape!")
set_disabling(FALSE)
- else if(prob(20))
+ return
+
+ if(DT_PROB(10, delta_time))
victim.adjustToxLoss(0.5)
+
if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
- if(!disabling && prob(3))
- to_chat(victim, "You suddenly lose all sensation of the festering infection in your [limb.name]!")
- set_disabling(TRUE)
- else if(disabling && prob(3))
+ if(!disabling)
+ if(DT_PROB(1.5, delta_time))
+ to_chat(victim, "You suddenly lose all sensation of the festering infection in your [limb.name]!")
+ set_disabling(TRUE)
+ return
+ else if(DT_PROB(1.5, delta_time))
to_chat(victim, "You can barely feel your [limb.name] again, and you have to strain to retain motor control!")
set_disabling(FALSE)
- else if(prob(1))
- to_chat(victim, "You contemplate life without your [limb.name]...")
- victim.adjustToxLoss(0.75)
- else if(prob(4))
- victim.adjustToxLoss(1)
+ return
+
+ if(DT_PROB(2.48, delta_time))
+ if(prob(20))
+ to_chat(victim, "You contemplate life without your [limb.name]...")
+ victim.adjustToxLoss(0.75)
+ else
+ victim.adjustToxLoss(1)
+
if(WOUND_INFECTION_SEPTIC to INFINITY)
- if(prob(infestation))
+ if(DT_PROB(0.5 * infestation, delta_time))
switch(strikes_to_lose_limb)
if(3 to INFINITY)
to_chat(victim, "The skin on your [limb.name] is literally dripping off, you feel awful!")
@@ -230,16 +240,16 @@
uv(I, user)
// people complained about burns not healing on stasis beds, so in addition to checking if it's cured, they also get the special ability to very slowly heal on stasis beds if they have the healing effects stored
-/datum/wound/burn/on_stasis()
+/datum/wound/burn/on_stasis(delta_time, times_fired)
. = ..()
if(flesh_healing > 0)
- flesh_damage = max(0, flesh_damage - 0.2)
+ flesh_damage = max(flesh_damage - (0.1 * delta_time), 0)
if((flesh_damage <= 0) && (infestation <= 1))
to_chat(victim, "The burns on your [limb.name] have cleared up!")
qdel(src)
return
if(sanitization > 0)
- infestation = max(0, infestation - WOUND_BURN_SANITIZATION_RATE * 0.2)
+ infestation = max(infestation - (0.1 * WOUND_BURN_SANITIZATION_RATE * delta_time), 0)
/datum/wound/burn/on_synthflesh(amount)
flesh_healing += amount * 0.5 // 20u patch will heal 10 flesh standard
@@ -288,7 +298,7 @@
threshold_penalty = 80
status_effect_type = /datum/status_effect/wound/burn/critical
treatable_by = list(/obj/item/flashlight/pen/paramedic, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh)
- infestation_rate = 0.15 // appx 4.33 minutes to reach sepsis without any treatment
+ infestation_rate = 0.075 // appx 4.33 minutes to reach sepsis without any treatment
flesh_damage = 20
scar_keyword = "burncritical"
*/
diff --git a/code/datums/wounds/pierce.dm b/code/datums/wounds/pierce.dm
index 340b16cff06..4be923b6a60 100644
--- a/code/datums/wounds/pierce.dm
+++ b/code/datums/wounds/pierce.dm
@@ -58,25 +58,25 @@
return BLOOD_FLOW_DECREASING
return BLOOD_FLOW_STEADY
-/datum/wound/pierce/handle_process()
+/datum/wound/pierce/handle_process(delta_time, times_fired)
blood_flow = min(blood_flow, WOUND_SLASH_MAX_BLOODFLOW)
if(victim.bodytemperature < (BODYTEMP_NORMAL - 10))
- blood_flow -= 0.2
- if(prob(5))
+ blood_flow -= 0.1 * delta_time
+ if(DT_PROB(2.5, delta_time))
to_chat(victim, "You feel the [lowertext(name)] in your [limb.name] firming up from the cold!")
if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
- blood_flow += 0.5 // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
+ blood_flow += 0.25 * delta_time // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
if(limb.current_gauze)
- blood_flow -= limb.current_gauze.absorption_rate * gauzed_clot_rate
- limb.current_gauze.absorption_capacity -= limb.current_gauze.absorption_rate
+ blood_flow -= limb.current_gauze.absorption_rate * gauzed_clot_rate * delta_time
+ limb.current_gauze.absorption_capacity -= limb.current_gauze.absorption_rate * delta_time
if(blood_flow <= 0)
qdel(src)
-/datum/wound/pierce/on_stasis()
+/datum/wound/pierce/on_stasis(delta_time, times_fired)
. = ..()
if(blood_flow <= 0)
qdel(src)
@@ -97,7 +97,7 @@
/datum/wound/pierce/on_synthflesh(power)
. = ..()
- blood_flow -= 0.05 * power // 20u * 0.05 = -1 blood flow, less than with slashes but still good considering smaller bleed rates
+ blood_flow -= 0.025 * power // 20u * 0.05 = -1 blood flow, less than with slashes but still good considering smaller bleed rates
/// If someone is using a suture to close this puncture
/datum/wound/pierce/proc/suture(obj/item/stack/medical/suture/I, mob/user)
diff --git a/code/datums/wounds/slash.dm b/code/datums/wounds/slash.dm
index c6e155960f8..d74dd9e7ea7 100644
--- a/code/datums/wounds/slash.dm
+++ b/code/datums/wounds/slash.dm
@@ -92,9 +92,9 @@
if(clot_rate < 0)
return BLOOD_FLOW_INCREASING
-/datum/wound/slash/handle_process()
+/datum/wound/slash/handle_process(delta_time, times_fired)
if(victim.stat == DEAD)
- blood_flow -= max(clot_rate, WOUND_SLASH_DEAD_CLOT_MIN)
+ blood_flow -= max(clot_rate, WOUND_SLASH_DEAD_CLOT_MIN) * delta_time
if(blood_flow < minimum_flow)
if(demotes_to)
replace_wound(demotes_to)
@@ -105,15 +105,15 @@
blood_flow = min(blood_flow, WOUND_SLASH_MAX_BLOODFLOW)
if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
- blood_flow += 0.5 // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
+ blood_flow += 0.25 // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
if(limb.current_gauze)
if(clot_rate > 0)
- blood_flow -= clot_rate
- blood_flow -= limb.current_gauze.absorption_rate
- limb.seep_gauze(limb.current_gauze.absorption_rate)
+ blood_flow -= clot_rate * delta_time
+ blood_flow -= limb.current_gauze.absorption_rate * delta_time
+ limb.seep_gauze(limb.current_gauze.absorption_rate * delta_time)
else
- blood_flow -= clot_rate
+ blood_flow -= clot_rate * delta_time
if(blood_flow > highest_flow)
highest_flow = blood_flow
@@ -126,7 +126,7 @@
qdel(src)
-/datum/wound/slash/on_stasis()
+/datum/wound/slash/on_stasis(delta_time, times_fired)
if(blood_flow >= minimum_flow)
return
if(demotes_to)
@@ -262,7 +262,7 @@
severity = WOUND_SEVERITY_MODERATE
initial_flow = 2
minimum_flow = 0.5
- clot_rate = 0.12
+ clot_rate = 0.06
threshold_minimum = 20
threshold_penalty = 10
status_effect_type = /datum/status_effect/wound/slash/moderate
@@ -278,7 +278,7 @@
severity = WOUND_SEVERITY_SEVERE
initial_flow = 3.25
minimum_flow = 2.75
- clot_rate = 0.06
+ clot_rate = 0.03
threshold_minimum = 50
threshold_penalty = 25
demotes_to = /datum/wound/slash/moderate
@@ -295,7 +295,7 @@
severity = WOUND_SEVERITY_CRITICAL
initial_flow = 4.25
minimum_flow = 4
- clot_rate = -0.05 // critical cuts actively get worse instead of better
+ clot_rate = -0.025 // critical cuts actively get worse instead of better
threshold_minimum = 80
threshold_penalty = 40
demotes_to = /datum/wound/slash/severe
diff --git a/code/game/objects/items/body_egg.dm b/code/game/objects/items/body_egg.dm
index 95bbccf4602..7a15ccf0b1c 100644
--- a/code/game/objects/items/body_egg.dm
+++ b/code/game/objects/items/body_egg.dm
@@ -29,17 +29,17 @@
INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner)
..()
-/obj/item/organ/body_egg/on_death()
+/obj/item/organ/body_egg/on_death(delta_time, times_fired)
. = ..()
if(!owner)
return
- egg_process()
+ egg_process(delta_time, times_fired)
-/obj/item/organ/body_egg/on_life()
+/obj/item/organ/body_egg/on_life(delta_time, times_fired)
. = ..()
- egg_process()
+ egg_process(delta_time, times_fired)
-/obj/item/organ/body_egg/proc/egg_process()
+/obj/item/organ/body_egg/proc/egg_process(delta_time, times_fired)
return
/obj/item/organ/body_egg/proc/RefreshInfectionImage()
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index c193fcadfd0..0334c818567 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -130,7 +130,7 @@
amount = 6
grind_results = list(/datum/reagent/cellulose = 2)
custom_price = PAYCHECK_ASSISTANT * 2
- absorption_rate = 0.25
+ absorption_rate = 0.125
absorption_capacity = 5
splint_factor = 0.35
merge_type = /obj/item/stack/medical/gauze
@@ -200,7 +200,7 @@
desc = "A roll of cloth roughly cut from something that does a decent job of stabilizing wounds, but less efficiently so than real medical gauze."
self_delay = 6 SECONDS
other_delay = 3 SECONDS
- absorption_rate = 0.15
+ absorption_rate = 0.075
absorption_capacity = 4
merge_type = /obj/item/stack/medical/gauze/improvised
gauze_type = /datum/bodypart_aid/gauze/improvised //SKYRAT EDIT ADDITION - MEDICAL
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 1660f702154..eb1a36fec3a 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -35,7 +35,7 @@
var/splint_factor
/// How much blood flow this stack can absorb if used as a bandage on a cut wound, note that absorption is how much we lower the flow rate, not the raw amount of blood we suck up
var/absorption_capacity
- /// How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
+ /// How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in seconds is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
var/absorption_rate
/// Amount of matter for RCD
var/matter_amount = 0
diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm
index 7ef620a88ba..b86b8df2971 100644
--- a/code/modules/antagonists/abductor/equipment/gland.dm
+++ b/code/modules/antagonists/abductor/equipment/gland.dm
@@ -7,10 +7,15 @@
organ_flags = NONE
beating = TRUE
var/true_name = "baseline placebo referencer"
- var/cooldown_low = 300
- var/cooldown_high = 300
- var/next_activation = 0
- var/uses // -1 For infinite
+
+ /// The minimum time between activations
+ var/cooldown_low = 30 SECONDS
+ /// The maximum time between activations
+ var/cooldown_high = 30 SECONDS
+ /// The cooldown for activations
+ COOLDOWN_DECLARE(activation_cooldown)
+ /// The number of remaining uses this gland has.
+ var/uses = 0 // -1 For infinite
var/human_only = FALSE
var/active = FALSE
@@ -36,7 +41,7 @@
/obj/item/organ/heart/gland/proc/Start()
active = 1
- next_activation = world.time + rand(cooldown_low,cooldown_high)
+ COOLDOWN_START(src, activation_cooldown, rand(cooldown_low, cooldown_high))
/obj/item/organ/heart/gland/proc/update_gland_hud()
if(!owner)
@@ -91,7 +96,7 @@
hud.add_to_hud(owner)
update_gland_hud()
-/obj/item/organ/heart/gland/on_life()
+/obj/item/organ/heart/gland/on_life(delta_time, times_fired)
if(!beating)
// alien glands are immune to stopping.
beating = TRUE
@@ -100,10 +105,10 @@
if(!ownerCheck())
active = FALSE
return
- if(next_activation <= world.time)
+ if(COOLDOWN_FINISHED(src, activation_cooldown))
activate()
uses--
- next_activation = world.time + rand(cooldown_low,cooldown_high)
+ COOLDOWN_START(src, activation_cooldown, rand(cooldown_low, cooldown_high))
if(!uses)
active = FALSE
diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm
index 1dcdf3f5231..bf1b3d08ec9 100644
--- a/code/modules/antagonists/blob/blob_mobs.dm
+++ b/code/modules/antagonists/blob/blob_mobs.dm
@@ -124,7 +124,7 @@
notify_ghosts("A controllable spore has been created in \the [get_area(src)].", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Sentient Spore Created")
add_cell_sample()
-/mob/living/simple_animal/hostile/blob/blobspore/Life()
+/mob/living/simple_animal/hostile/blob/blobspore/Life(delta_time = SSMOBS_DT, times_fired)
if(!is_zombie && isturf(src.loc))
for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile
if(!is_weak && H.stat == DEAD)
@@ -278,39 +278,41 @@
/mob/living/simple_animal/hostile/blob/blobbernaut/add_cell_sample()
AddElement(/datum/element/swabable, CELL_LINE_TABLE_BLOBBERNAUT, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
-/mob/living/simple_animal/hostile/blob/blobbernaut/Life()
- if(..())
- var/list/blobs_in_area = range(2, src)
- if(independent)
- return // strong independent blobbernaut that don't need no blob
- var/damagesources = 0
- if(!(locate(/obj/structure/blob) in blobs_in_area))
- damagesources++
- if(!factory)
- damagesources++
- else
- if(locate(/obj/structure/blob/special/core) in blobs_in_area)
- adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_CORE)
- var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed
- if(overmind)
- H.color = overmind.blobstrain.complementary_color
- else
- H.color = "#000000"
- if(locate(/obj/structure/blob/special/node) in blobs_in_area)
- adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_NODE)
- var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src))
- if(overmind)
- H.color = overmind.blobstrain.complementary_color
- else
- H.color = "#000000"
- if(damagesources)
- for(var/i in 1 to damagesources)
- adjustHealth(maxHealth*BLOBMOB_BLOBBERNAUT_HEALTH_DECAY) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both
- var/image/I = new('icons/mob/blob.dmi', src, "nautdamage", MOB_LAYER+0.01)
- I.appearance_flags = RESET_COLOR
+/mob/living/simple_animal/hostile/blob/blobbernaut/Life(delta_time = SSMOBS_DT, times_fired)
+ if(!..())
+ return
+ var/list/blobs_in_area = range(2, src)
+ if(independent)
+ return // strong independent blobbernaut that don't need no blob
+ var/damagesources = 0
+ if(!(locate(/obj/structure/blob) in blobs_in_area))
+ damagesources++
+
+ if(!factory)
+ damagesources++
+ else
+ if(locate(/obj/structure/blob/special/core) in blobs_in_area)
+ adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_CORE * delta_time)
+ var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed
if(overmind)
- I.color = overmind.blobstrain.complementary_color
- flick_overlay_view(I, src, 8)
+ H.color = overmind.blobstrain.complementary_color
+ else
+ H.color = "#000000"
+ if(locate(/obj/structure/blob/special/node) in blobs_in_area)
+ adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_NODE * delta_time)
+ var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src))
+ if(overmind)
+ H.color = overmind.blobstrain.complementary_color
+ else
+ H.color = "#000000"
+
+ if(damagesources)
+ adjustHealth(maxHealth * BLOBMOB_BLOBBERNAUT_HEALTH_DECAY * damagesources * delta_time) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both
+ var/image/I = new('icons/mob/blob.dmi', src, "nautdamage", MOB_LAYER+0.01)
+ I.appearance_flags = RESET_COLOR
+ if(overmind)
+ I.color = overmind.blobstrain.complementary_color
+ flick_overlay_view(I, src, 8)
/mob/living/simple_animal/hostile/blob/blobbernaut/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
diff --git a/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm b/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm
index c093f650c77..4c2153d5889 100644
--- a/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm
+++ b/code/modules/antagonists/blob/blobstrains/cryogenic_poison.dm
@@ -25,9 +25,9 @@
exposed_mob.reagents.add_reagent(/datum/reagent/blob/cryogenic_poison, 0.3*reac_volume)
exposed_mob.apply_damage(0.2*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
-/datum/reagent/blob/cryogenic_poison/on_mob_life(mob/living/carbon/exposed_mob)
- exposed_mob.adjustBruteLoss(0.5*REAGENTS_EFFECT_MULTIPLIER, FALSE)
- exposed_mob.adjustFireLoss(0.5*REAGENTS_EFFECT_MULTIPLIER, FALSE)
- exposed_mob.adjustToxLoss(0.5*REAGENTS_EFFECT_MULTIPLIER, FALSE)
+/datum/reagent/blob/cryogenic_poison/on_mob_life(mob/living/carbon/exposed_mob, delta_time, times_fired)
+ exposed_mob.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, FALSE)
+ exposed_mob.adjustFireLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, FALSE)
+ exposed_mob.adjustToxLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, FALSE)
. = 1
..()
diff --git a/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm b/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm
index d948999a449..168b842f1af 100644
--- a/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm
+++ b/code/modules/antagonists/blob/blobstrains/regenerative_materia.dm
@@ -24,8 +24,8 @@
exposed_mob.reagents.add_reagent(/datum/reagent/toxin/spore, 0.2*reac_volume)
exposed_mob.apply_damage(0.7*reac_volume, TOX)
-/datum/reagent/blob/regenerative_materia/on_mob_life(mob/living/carbon/C)
- C.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER)
+/datum/reagent/blob/regenerative_materia/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+ C.adjustToxLoss(1 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
C.hal_screwyhud = SCREWYHUD_HEALTHY //fully healed, honest
..()
diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm
index 04e0c4dff7d..08cdca75988 100644
--- a/code/modules/antagonists/changeling/changeling.dm
+++ b/code/modules/antagonists/changeling/changeling.dm
@@ -24,7 +24,7 @@
var/trueabsorbs = 0//dna gained using absorb, not dna sting
var/chem_charges = 20
var/chem_storage = 75
- var/chem_recharge_rate = 1
+ var/chem_recharge_rate = 0.5
var/chem_recharge_slowdown = 0
var/sting_range = 2
var/geneticdamage = 0
@@ -209,15 +209,15 @@
return FALSE
//Called in life()
-/datum/antagonist/changeling/proc/regenerate()//grants the HuD in life.dm
+/datum/antagonist/changeling/proc/regenerate(delta_time, times_fired)//grants the HuD in life.dm
var/mob/living/carbon/the_ling = owner.current
if(istype(the_ling))
if(the_ling.stat == DEAD)
- chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), (chem_storage*0.5))
- geneticdamage = max(LING_DEAD_GENETICDAMAGE_HEAL_CAP,geneticdamage-1)
+ chem_charges = min(max(0, chem_charges + ((chem_recharge_rate - chem_recharge_slowdown) * delta_time)), (chem_storage * 0.5))
+ geneticdamage = max(geneticdamage - (0.5 * delta_time), LING_DEAD_GENETICDAMAGE_HEAL_CAP)
else //not dead? no chem/geneticdamage caps.
- chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), chem_storage)
- geneticdamage = max(0, geneticdamage-1)
+ chem_charges = min(max(0, chem_charges + ((chem_recharge_rate - chem_recharge_slowdown) * delta_time)), chem_storage)
+ geneticdamage = max(geneticdamage - (0.5 * delta_time), 0)
/datum/antagonist/changeling/proc/get_dna(dna_owner)
diff --git a/code/modules/antagonists/changeling/powers/mimic_voice.dm b/code/modules/antagonists/changeling/powers/mimic_voice.dm
index d337bddda0d..9add270de3d 100644
--- a/code/modules/antagonists/changeling/powers/mimic_voice.dm
+++ b/code/modules/antagonists/changeling/powers/mimic_voice.dm
@@ -12,7 +12,7 @@
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling.mimicing)
changeling.mimicing = ""
- changeling.chem_recharge_slowdown -= 0.5
+ changeling.chem_recharge_slowdown -= 0.25
to_chat(user, "We return our vocal glands to their original position.")
return
@@ -21,7 +21,7 @@
return
..()
changeling.mimicing = mimic_voice
- changeling.chem_recharge_slowdown += 0.5
+ changeling.chem_recharge_slowdown += 0.25
to_chat(user, "We shape our glands to take the voice of [mimic_voice], this will slow down regenerating chemicals while active.")
to_chat(user, "Use this power again to return to our original voice and return chemical production to normal levels.")
return TRUE
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index bc3481691a2..7267f22991e 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -465,7 +465,7 @@
helmet_type = /obj/item/clothing/head/helmet/space/changeling
suit_name_simple = "flesh shell"
helmet_name_simple = "space helmet"
- recharge_slowdown = 0.5
+ recharge_slowdown = 0.25
blood_on_castoff = 1
/obj/item/clothing/suit/space/changeling
@@ -520,7 +520,7 @@
chemical_cost = 20
dna_cost = 1
req_human = 1
- recharge_slowdown = 0.25
+ recharge_slowdown = 0.125
suit_type = /obj/item/clothing/suit/armor/changeling
helmet_type = /obj/item/clothing/head/helmet/changeling
diff --git a/code/modules/antagonists/changeling/powers/pheromone_receptors.dm b/code/modules/antagonists/changeling/powers/pheromone_receptors.dm
index 5980993958b..f9012eea96e 100644
--- a/code/modules/antagonists/changeling/powers/pheromone_receptors.dm
+++ b/code/modules/antagonists/changeling/powers/pheromone_receptors.dm
@@ -16,11 +16,11 @@
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
if(!receptors_active)
to_chat(user, "We search for the scent of any nearby changelings.")
- changeling.chem_recharge_slowdown += 0.5
+ changeling.chem_recharge_slowdown += 0.25
user.apply_status_effect(/datum/status_effect/agent_pinpointer/changeling)
else
to_chat(user, "We stop searching for now.")
- changeling.chem_recharge_slowdown -= 0.5
+ changeling.chem_recharge_slowdown -= 0.25
user.remove_status_effect(/datum/status_effect/agent_pinpointer/changeling)
receptors_active = !receptors_active
diff --git a/code/modules/antagonists/nightmare/nightmare_organs.dm b/code/modules/antagonists/nightmare/nightmare_organs.dm
index 3503ee97969..34fa3af27b5 100644
--- a/code/modules/antagonists/nightmare/nightmare_organs.dm
+++ b/code/modules/antagonists/nightmare/nightmare_organs.dm
@@ -1,5 +1,5 @@
/// How many life ticks are required for the nightmare's heart to revive the nightmare.
-#define HEART_RESPAWN_THRESHHOLD 40
+#define HEART_RESPAWN_THRESHHOLD (80 SECONDS)
/// A special flag value used to make a nightmare heart not grant a light eater. Appears to be unused.
#define HEART_SPECIAL_SHADOWIFY 2
@@ -73,14 +73,14 @@
/obj/item/organ/heart/nightmare/Stop()
return 0
-/obj/item/organ/heart/nightmare/on_death()
+/obj/item/organ/heart/nightmare/on_death(delta_time, times_fired)
if(!owner)
return
var/turf/T = get_turf(owner)
if(istype(T))
var/light_amount = T.get_lumcount()
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
- respawn_progress++
+ respawn_progress += delta_time SECONDS
playsound(owner, 'sound/effects/singlebeat.ogg', 40, TRUE)
if(respawn_progress < HEART_RESPAWN_THRESHHOLD)
return
diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm
index 32535d228f2..ffdc5d6e618 100644
--- a/code/modules/antagonists/revenant/revenant.dm
+++ b/code/modules/antagonists/revenant/revenant.dm
@@ -57,7 +57,7 @@
var/essence = 75 //The resource, and health, of revenants.
var/essence_regen_cap = 75 //The regeneration cap of essence (go figure); regenerates every Life() tick up to this amount.
var/essence_regenerating = TRUE //If the revenant regenerates essence or not
- var/essence_regen_amount = 5 //How much essence regenerates
+ var/essence_regen_amount = 2.5 //How much essence regenerates per second
var/essence_accumulated = 0 //How much essence the revenant has stolen
var/essence_excess = 0 //How much stolen essence avilable for unlocks
var/revealed = FALSE //If the revenant can take damage from normal sources.
@@ -113,7 +113,7 @@
mind.add_antag_datum(/datum/antagonist/revenant)
//Life, Stat, Hud Updates, and Say
-/mob/living/simple_animal/revenant/Life()
+/mob/living/simple_animal/revenant/Life(delta_time = SSMOBS_DT, times_fired)
if(stasis)
return
if(revealed && essence <= 0)
@@ -129,7 +129,7 @@
notransform = FALSE
to_chat(src, "You can move again!")
if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate
- essence = min(essence_regen_cap, essence+essence_regen_amount)
+ essence = min(essence + (essence_regen_amount * delta_time), essence_regen_cap)
update_action_buttons_icon() //because we update something required by our spells in life, we need to update our buttons
update_spooky_icon()
update_health_hud()
diff --git a/code/modules/antagonists/revenant/revenant_blight.dm b/code/modules/antagonists/revenant/revenant_blight.dm
index 7a0e1062cc5..304b95ce460 100644
--- a/code/modules/antagonists/revenant/revenant_blight.dm
+++ b/code/modules/antagonists/revenant/revenant_blight.dm
@@ -1,12 +1,12 @@
/datum/disease/revblight
name = "Unnatural Wasting"
max_stages = 5
- stage_prob = 10
+ stage_prob = 5
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
cure_text = "Holy water or extensive rest."
spread_text = "A burst of unholy energy"
cures = list(/datum/reagent/water/holywater)
- cure_chance = 50 //higher chance to cure, because revenants are assholes
+ cure_chance = 30 //higher chance to cure, because revenants are assholes
agent = "Unholy Forces"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CURABLE
@@ -25,42 +25,42 @@
..()
-/datum/disease/revblight/stage_act()
+/datum/disease/revblight/stage_act(delta_time, times_fired)
. = ..()
if(!.)
return
if(!finalstage)
- if(affected_mob.body_position == LYING_DOWN && prob(stage * 6))
+ if(affected_mob.body_position == LYING_DOWN && DT_PROB(3 * stage, delta_time))
cure()
return FALSE
- if(prob(stage * 3))
+ if(DT_PROB(1.5 * stage, delta_time))
to_chat(affected_mob, "You suddenly feel [pick("sick and tired", "disoriented", "tired and confused", "nauseated", "faint", "dizzy")]...")
affected_mob.add_confusion(8)
affected_mob.adjustStaminaLoss(20, FALSE)
new /obj/effect/temp_visual/revenant(affected_mob.loc)
if(stagedamage < stage)
stagedamage++
- affected_mob.adjustToxLoss(stage * 2, FALSE) //should, normally, do about 30 toxin damage.
+ affected_mob.adjustToxLoss(1 * stage * delta_time, FALSE) //should, normally, do about 30 toxin damage.
new /obj/effect/temp_visual/revenant(affected_mob.loc)
- if(prob(45))
+ if(DT_PROB(25, delta_time))
affected_mob.adjustStaminaLoss(stage, FALSE)
switch(stage)
if(2)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
affected_mob.emote("pale")
if(3)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
affected_mob.emote(pick("pale","shiver"))
if(4)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
affected_mob.emote(pick("pale","shiver","cries"))
if(5)
if(!finalstage)
finalstage = TRUE
to_chat(affected_mob, "You feel like [pick("nothing's worth it anymore", "nobody ever needed your help", "nothing you did mattered", "everything you tried to do was worthless")].")
- affected_mob.adjustStaminaLoss(45, FALSE)
+ affected_mob.adjustStaminaLoss(22.5 * delta_time, FALSE)
new /obj/effect/temp_visual/revenant(affected_mob.loc)
if(affected_mob.dna && affected_mob.dna.species)
affected_mob.dna.species.handle_mutant_bodyparts(affected_mob,"#1d2953")
diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm
index 8b748ce21da..989b9bddd66 100644
--- a/code/modules/clothing/spacesuits/_spacesuits.dm
+++ b/code/modules/clothing/spacesuits/_spacesuits.dm
@@ -72,7 +72,7 @@
human.update_spacesuit_hud_icon("0")
// Space Suit temperature regulation and power usage
-/obj/item/clothing/suit/space/process()
+/obj/item/clothing/suit/space/process(delta_time)
var/mob/living/carbon/human/user = src.loc
if(!user || !ishuman(user) || !(user.wear_suit == src))
return
@@ -97,7 +97,7 @@
// If we got here, it means thermals are on, the cell is in and the cell has
// just had enough charge subtracted from it to power the thermal regulator
- user.adjust_bodytemperature(get_temp_change_amount((temperature_setting - user.bodytemperature), 0.16))
+ user.adjust_bodytemperature(get_temp_change_amount((temperature_setting - user.bodytemperature), 0.08 * delta_time))
update_hud_icon(user)
// Clean up the cell on destroy
diff --git a/code/modules/events/crystal_event.dm b/code/modules/events/crystal_event.dm
index e377053f416..d17bbf14d8e 100644
--- a/code/modules/events/crystal_event.dm
+++ b/code/modules/events/crystal_event.dm
@@ -661,7 +661,7 @@ This section is for the crystal monsters variations
attack_verb_simple = "smash"
attack_sound = 'sound/effects/supermatter.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 10
+ unsuitable_atmos_damage = 5
robust_searching = 1
stat_attack = HARD_CRIT
faction = list("crystal")
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 40e11bb5e8b..cf9f0dd001c 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -25,12 +25,11 @@ GLOBAL_LIST_INIT(hallucination_list, list(
))
-/mob/living/carbon/proc/handle_hallucinations()
+/mob/living/carbon/proc/handle_hallucinations(delta_time, times_fired)
if(!hallucination)
return
- hallucination = max(hallucination - 1, 0)
-
+ hallucination = max(hallucination - (0.5 * delta_time), 0)
if(world.time < next_hallucination)
return
diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm
index 93eb6b6aabf..bb5eb745f61 100644
--- a/code/modules/mining/equipment/regenerative_core.dm
+++ b/code/modules/mining/equipment/regenerative_core.dm
@@ -64,7 +64,7 @@
owner.revive(full_heal = TRUE, admin_revive = FALSE)
qdel(src)
-/obj/item/organ/regenerative_core/on_life()
+/obj/item/organ/regenerative_core/on_life(delta_time, times_fired)
..()
if(owner.health <= owner.crit_threshold)
ui_action_click()
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 488deb305b4..951c0160ad9 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -966,7 +966,7 @@
cures = list(/datum/reagent/medicine/adminordrazine)
agent = "dragon's blood"
desc = "What do dragons have to do with Space Station 13?"
- stage_prob = 20
+ stage_prob = 10
severity = DISEASE_SEVERITY_BIOHAZARD
visibility_flags = 0
stage1 = list("Your bones ache.")
diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm
index 6abc0268ee0..a626745e2c9 100644
--- a/code/modules/mob/living/blood.dm
+++ b/code/modules/mob/living/blood.dm
@@ -5,7 +5,7 @@
****************************************************/
// Takes care blood loss and regeneration
-/mob/living/carbon/human/handle_blood()
+/mob/living/carbon/human/handle_blood(delta_time, times_fired)
if(NOBLOOD in dna.species.species_traits || HAS_TRAIT(src, TRAIT_NOBLEED) || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
return
@@ -28,31 +28,31 @@
nutrition_ratio = 1
if(satiety > 80)
nutrition_ratio *= 1.25
- adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
- blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
+ adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR * delta_time)
+ blood_volume = min(blood_volume + (BLOOD_REGEN_FACTOR * nutrition_ratio * delta_time), BLOOD_VOLUME_NORMAL)
//Effects of bloodloss
var/word = pick("dizzy","woozy","faint")
switch(blood_volume)
if(BLOOD_VOLUME_EXCESS to BLOOD_VOLUME_MAX_LETHAL)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
to_chat(src, "Blood starts to tear your skin apart. You're going to burst!")
inflate_gib()
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(src, "You feel terribly bloated.")
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(src, "You feel [word].")
- adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
+ adjustOxyLoss(round(0.005 * (BLOOD_VOLUME_NORMAL - blood_volume) * delta_time, 1))
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
- adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
- if(prob(5))
+ adjustOxyLoss(round(0.01 * (BLOOD_VOLUME_NORMAL - blood_volume) * delta_time, 1))
+ if(DT_PROB(2.5, delta_time))
blur_eyes(6)
to_chat(src, "You feel very [word].")
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
- adjustOxyLoss(5)
- if(prob(15))
+ adjustOxyLoss(2.5 * delta_time)
+ if(DT_PROB(7.5, delta_time))
Unconscious(rand(20,60))
to_chat(src, "You feel extremely [word].")
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
@@ -63,7 +63,7 @@
//Bleeding out
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
- temp_bleed += BP.get_bleed_rate()
+ temp_bleed += BP.get_bleed_rate() * delta_time
BP.generic_bleedstacks = max(0, BP.generic_bleedstacks - 1)
if(temp_bleed)
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index 7ff719aca4b..f4a6297a509 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -229,7 +229,7 @@
owner.mind.current = null
return ..()
-/obj/item/organ/brain/on_life()
+/obj/item/organ/brain/on_life(delta_time, times_fired)
if(damage >= BRAIN_DAMAGE_DEATH) //rip
to_chat(owner, "The last spark of life in your brain fizzles out...")
owner.death()
diff --git a/code/modules/mob/living/brain/life.dm b/code/modules/mob/living/brain/life.dm
index e78c9c8a801..f4e5bd31248 100644
--- a/code/modules/mob/living/brain/life.dm
+++ b/code/modules/mob/living/brain/life.dm
@@ -1,37 +1,40 @@
-/mob/living/brain/Life()
+/mob/living/brain/Life(delta_time = SSMOBS_DT, times_fired)
if (notransform)
return
if(!loc)
return
. = ..()
- handle_emp_damage()
+ handle_emp_damage(delta_time, times_fired)
/mob/living/brain/update_stat()
if(status_flags & GODMODE)
return
- if(health <= HEALTH_THRESHOLD_DEAD)
- if(stat != DEAD)
- death()
- var/obj/item/organ/brain/BR
- if(container?.brain)
- BR = container.brain
- else if(istype(loc, /obj/item/organ/brain))
- BR = loc
- if(BR)
- BR.damage = BRAIN_DAMAGE_DEATH //beaten to a pulp
+ if(health > HEALTH_THRESHOLD_DEAD)
+ return
+ if(stat != DEAD)
+ death()
+ var/obj/item/organ/brain/BR
+ if(container?.brain)
+ BR = container.brain
+ else if(istype(loc, /obj/item/organ/brain))
+ BR = loc
+ if(BR)
+ BR.damage = BRAIN_DAMAGE_DEATH //beaten to a pulp
-/mob/living/brain/proc/handle_emp_damage()
- if(emp_damage)
- if(stat == DEAD)
- emp_damage = 0
- else
- emp_damage = max(emp_damage-1, 0)
+/mob/living/brain/proc/handle_emp_damage(delta_time, times_fired)
+ if(!emp_damage)
+ return
-/mob/living/brain/handle_status_effects()
+ if(stat == DEAD)
+ emp_damage = 0
+ else
+ emp_damage = max(emp_damage - (0.5 * delta_time), 0)
+
+/mob/living/brain/handle_status_effects(delta_time, times_fired)
return
-/mob/living/brain/handle_traits()
+/mob/living/brain/handle_traits(delta_time, times_fired)
return
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 9df9ae26043..572c8125b62 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -48,7 +48,7 @@
/mob/living/carbon/alien/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) // beepsky won't hunt aliums
return -10
-/mob/living/carbon/alien/handle_environment(datum/gas_mixture/environment)
+/mob/living/carbon/alien/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
// Run base mob body temperature proc before taking damage
// this balances body temp to the environment and natural stabilization
. = ..()
@@ -58,19 +58,19 @@
throw_alert("alien_fire", /atom/movable/screen/alert/alien_fire)
switch(bodytemperature)
if(360 to 400)
- apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
+ apply_damage(HEAT_DAMAGE_LEVEL_1 * delta_time, BURN)
if(400 to 460)
- apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
+ apply_damage(HEAT_DAMAGE_LEVEL_2 * delta_time, BURN)
if(460 to INFINITY)
if(on_fire)
- apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
+ apply_damage(HEAT_DAMAGE_LEVEL_3 * delta_time, BURN)
else
- apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
+ apply_damage(HEAT_DAMAGE_LEVEL_2 * delta_time, BURN)
else
clear_alert("alien_fire")
-/mob/living/carbon/alien/reagent_check(datum/reagent/R) //can metabolize all reagents
- return 0
+/mob/living/carbon/alien/reagent_check(datum/reagent/R, delta_time, times_fired) //can metabolize all reagents
+ return FALSE
/mob/living/carbon/alien/get_status_tab_items()
. = ..()
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index ef9e640b89e..ef5a4ad51f0 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -1,13 +1,13 @@
-/mob/living/carbon/alien/larva/Life()
+/mob/living/carbon/alien/larva/Life(delta_time = SSMOBS_DT, times_fired)
if (notransform)
return
- if(..() && !IS_IN_STASIS(src)) //not dead and not in stasis
- // GROW!
- if(amount_grown < max_grown)
- amount_grown++
- update_icons()
+ if(!..() || IS_IN_STASIS(src) || (amount_grown >= max_grown))
+ return // We're dead, in stasis, or already grown.
+ // GROW!
+ amount_grown = min(amount_grown + (0.5 * delta_time), max_grown)
+ update_icons()
/mob/living/carbon/alien/larva/update_stat()
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index 0dc31d8b5e1..1d8c8ca2b1e 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/alien/Life()
+/mob/living/carbon/alien/Life(delta_time = SSMOBS_DT, times_fired)
findQueen()
return..()
@@ -38,17 +38,17 @@
//BREATH TEMPERATURE
handle_breath_temperature(breath)
-/mob/living/carbon/alien/handle_status_effects()
+/mob/living/carbon/alien/handle_status_effects(delta_time, times_fired)
..()
//natural reduction of movement delay due to stun.
if(move_delay_add > 0)
- move_delay_add = max(0, move_delay_add - rand(1, 2))
+ move_delay_add = max(0, move_delay_add - (0.5 * rand(1, 2) * delta_time))
/mob/living/carbon/alien/handle_changeling()
return
-/mob/living/carbon/alien/handle_fire()//Aliens on fire code
+/mob/living/carbon/alien/handle_fire(delta_time, times_fired)//Aliens on fire code
. = ..()
if(.) //if the mob isn't on fire anymore
return
- adjust_bodytemperature(BODYTEMP_HEATING_MAX) //If you're on fire, you heat up!
+ adjust_bodytemperature(BODYTEMP_HEATING_MAX * 0.5 * delta_time) //If you're on fire, you heat up!
diff --git a/code/modules/mob/living/carbon/alien/organs.dm b/code/modules/mob/living/carbon/alien/organs.dm
index 35ea3c1d43d..93f3d3948f9 100644
--- a/code/modules/mob/living/carbon/alien/organs.dm
+++ b/code/modules/mob/living/carbon/alien/organs.dm
@@ -35,10 +35,14 @@
alien_powers = list(/obj/effect/proc_holder/alien/plant, /obj/effect/proc_holder/alien/transfer)
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/plasma = 10)
+ /// The current amount of stored plasma.
var/storedPlasma = 100
+ /// The maximum plasma this organ can store.
var/max_plasma = 250
- var/heal_rate = 5
- var/plasma_rate = 10
+ /// The rate this organ regenerates its owners health at per damage type per second.
+ var/heal_rate = 2.5
+ /// The rate this organ regenerates plasma at per second.
+ var/plasma_rate = 5
/obj/item/organ/alien/plasmavessel/large
name = "large plasma vessel"
@@ -46,10 +50,10 @@
w_class = WEIGHT_CLASS_BULKY
storedPlasma = 200
max_plasma = 500
- plasma_rate = 15
+ plasma_rate = 7.5
/obj/item/organ/alien/plasmavessel/large/queen
- plasma_rate = 20
+ plasma_rate = 10
/obj/item/organ/alien/plasmavessel/small
name = "small plasma vessel"
@@ -57,7 +61,7 @@
w_class = WEIGHT_CLASS_SMALL
storedPlasma = 100
max_plasma = 150
- plasma_rate = 5
+ plasma_rate = 2.5
/obj/item/organ/alien/plasmavessel/small/tiny
name = "tiny plasma vessel"
@@ -66,22 +70,22 @@
max_plasma = 100
alien_powers = list(/obj/effect/proc_holder/alien/transfer)
-/obj/item/organ/alien/plasmavessel/on_life()
+/obj/item/organ/alien/plasmavessel/on_life(delta_time, times_fired)
//If there are alien weeds on the ground then heal if needed or give some plasma
if(locate(/obj/structure/alien/weeds) in owner.loc)
if(owner.health >= owner.maxHealth)
- owner.adjustPlasma(plasma_rate)
+ owner.adjustPlasma(plasma_rate * delta_time)
else
var/heal_amt = heal_rate
if(!isalien(owner))
heal_amt *= 0.2
- owner.adjustPlasma(plasma_rate*0.5)
- owner.adjustBruteLoss(-heal_amt)
- owner.adjustFireLoss(-heal_amt)
- owner.adjustOxyLoss(-heal_amt)
- owner.adjustCloneLoss(-heal_amt)
+ owner.adjustPlasma(0.5 * plasma_rate * delta_time)
+ owner.adjustBruteLoss(-heal_amt * delta_time)
+ owner.adjustFireLoss(-heal_amt * delta_time)
+ owner.adjustOxyLoss(-heal_amt * delta_time)
+ owner.adjustCloneLoss(-heal_amt * delta_time)
else
- owner.adjustPlasma(plasma_rate * 0.1)
+ owner.adjustPlasma(0.1 * plasma_rate * delta_time)
/obj/item/organ/alien/plasmavessel/Insert(mob/living/carbon/M, special = 0)
..()
diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
index 705ded877e7..42c92edff69 100644
--- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
+++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm
@@ -25,34 +25,34 @@
if(prob(10))
AttemptGrow(0)
-/obj/item/organ/body_egg/alien_embryo/on_life()
+/obj/item/organ/body_egg/alien_embryo/on_life(delta_time, times_fired)
. = ..()
switch(stage)
if(3, 4)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
owner.emote("sneeze")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
owner.emote("cough")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(owner, "Your throat feels sore.")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
to_chat(owner, "Mucous runs down the back of your throat.")
if(5)
- if(prob(2))
+ if(DT_PROB(1, delta_time))
owner.emote("sneeze")
- if(prob(2))
+ if(DT_PROB(1, delta_time))
owner.emote("cough")
- if(prob(4))
+ if(DT_PROB(2, delta_time))
to_chat(owner, "Your muscles ache.")
if(prob(20))
owner.take_bodypart_damage(1)
- if(prob(4))
+ if(DT_PROB(2, delta_time))
to_chat(owner, "Your stomach hurts.")
if(prob(20))
owner.adjustToxLoss(1)
if(6)
to_chat(owner, "You feel something tearing its way out of your chest...")
- owner.adjustToxLoss(10)
+ owner.adjustToxLoss(5 * delta_time) // Why is this [TOX]?
/// Controls Xenomorph Embryo growth. If embryo is fully grown (or overgrown), stop the proc. If not, increase the stage by one and if it's not fully grown (stage 6), add a timer to do this proc again after however long the growth time variable is.
/obj/item/organ/body_egg/alien_embryo/proc/advance_embryo_stage()
@@ -62,7 +62,6 @@
INVOKE_ASYNC(src, .proc/RefreshInfectionImage)
addtimer(CALLBACK(src, .proc/advance_embryo_stage), growth_time)
-
/obj/item/organ/body_egg/alien_embryo/egg_process()
if(stage == 6 && prob(50))
for(var/datum/surgery/S in owner.surgeries)
diff --git a/code/modules/mob/living/carbon/human/dummy.dm b/code/modules/mob/living/carbon/human/dummy.dm
index 3ac0640413e..0d8af0ddc1d 100644
--- a/code/modules/mob/living/carbon/human/dummy.dm
+++ b/code/modules/mob/living/carbon/human/dummy.dm
@@ -11,7 +11,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
in_use = FALSE
return ..()
-/mob/living/carbon/human/dummy/Life()
+/mob/living/carbon/human/dummy/Life(delta_time = SSMOBS_DT, times_fired)
return
/mob/living/carbon/human/dummy/attach_rot(mapload)
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index caf2b21cf5b..79567f5440e 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -84,8 +84,8 @@
//Check inventory slots
return (wear_id?.GetID() || belt?.GetID())
-/mob/living/carbon/human/reagent_check(datum/reagent/R)
- return dna.species.handle_chemicals(R,src)
+/mob/living/carbon/human/reagent_check(datum/reagent/R, delta_time, times_fired)
+ return dna.species.handle_chemicals(R, src, delta_time, times_fired)
// if it returns 0, it will run the usual on_mob_life for that reagent. otherwise, it will stop after running handle_chemicals for the species.
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index ccfd551d2d8..a41c01d471f 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -18,34 +18,33 @@
#define THERMAL_PROTECTION_HAND_LEFT 0.025
#define THERMAL_PROTECTION_HAND_RIGHT 0.025
-/mob/living/carbon/human/Life()
- if (notransform)
+/mob/living/carbon/human/Life(delta_time = SSMOBS_DT, times_fired)
+ if(notransform)
return
. = ..()
-
- if (QDELETED(src))
+ if(QDELETED(src))
return FALSE
//Body temperature stability and damage
- dna.species.handle_body_temperature(src)
+ dna.species.handle_body_temperature(src, delta_time, times_fired)
if(!IS_IN_STASIS(src))
if(.) //not dead
for(var/datum/mutation/human/HM in dna.mutations) // Handle active genes
- HM.on_life()
+ HM.on_life(delta_time, times_fired)
if(stat != DEAD)
//heart attack stuff
- handle_heart()
- handle_liver()
+ handle_heart(delta_time, times_fired)
+ handle_liver(delta_time, times_fired)
- dna.species.spec_life(src) // for mutantraces
+ dna.species.spec_life(src, delta_time, times_fired) // for mutantraces
else
for(var/i in all_wounds)
var/datum/wound/iter_wound = i
- iter_wound.on_stasis()
+ iter_wound.on_stasis(delta_time, times_fired)
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
@@ -68,15 +67,15 @@
return pressure
-/mob/living/carbon/human/handle_traits()
+/mob/living/carbon/human/handle_traits(delta_time, times_fired)
if (getOrganLoss(ORGAN_SLOT_BRAIN) >= 60)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "brain_damage", /datum/mood_event/brain_damage)
else
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "brain_damage")
return ..()
-/mob/living/carbon/human/handle_mutations_and_radiation()
- if(!dna || !dna.species.handle_mutations_and_radiation(src))
+/mob/living/carbon/human/handle_mutations_and_radiation(delta_time, times_fired)
+ if(!dna || !dna.species.handle_mutations_and_radiation(src, delta_time, times_fired))
..()
/mob/living/carbon/human/breathe()
@@ -113,12 +112,12 @@
lun.check_breath(breath,src)
/// Environment handlers for species
-/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment)
+/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
// If we are in a cryo bed do not process life functions
if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
return
- dna.species.handle_environment(environment, src)
+ dna.species.handle_environment(src, environment, delta_time, times_fired)
/**
* Adjust the core temperature of a mob
@@ -146,13 +145,13 @@
return dna.species.bodytemp_normal + get_body_temp_normal_change()
///FIRE CODE
-/mob/living/carbon/human/handle_fire()
+/mob/living/carbon/human/handle_fire(delta_time, times_fired)
. = ..()
if(.) //if the mob isn't on fire anymore
return
if(dna)
- . = dna.species.handle_fire(src) //do special handling based on the mob's species. TRUE = they are immune to the effects of the fire.
+ . = dna.species.handle_fire(src, delta_time, times_fired) //do special handling based on the mob's species. TRUE = they are immune to the effects of the fire.
if(!last_fire_update)
last_fire_update = fire_stacks
@@ -303,14 +302,17 @@
return min(1, thermal_protection)
-/mob/living/carbon/human/handle_random_events()
+/mob/living/carbon/human/handle_random_events(delta_time, times_fired)
//Puke if toxloss is too high
- if(!stat)
- if(getToxLoss() >= 45 && nutrition > 20)
- lastpuke += prob(50)
- if(lastpuke >= 50) // about 25 second delay I guess
- vomit(20)
- lastpuke = 0
+ if(stat)
+ return
+ if(getToxLoss() < 45 || nutrition <= 20)
+ return
+
+ lastpuke += DT_PROB(30, delta_time)
+ if(lastpuke >= 50) // about 25 second delay I guess // This is actually closer to 150 seconds
+ vomit(20)
+ lastpuke = 0
/mob/living/carbon/human/has_smoke_protection()
@@ -326,17 +328,17 @@
return TRUE
return ..()
-/mob/living/carbon/human/proc/handle_heart()
+/mob/living/carbon/human/proc/handle_heart(delta_time, times_fired)
var/we_breath = !HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT)
if(!undergoing_cardiac_arrest())
return
if(we_breath)
- adjustOxyLoss(8)
+ adjustOxyLoss(4 * delta_time)
Unconscious(80)
// Tissues die without blood circulation
- adjustBruteLoss(2)
+ adjustBruteLoss(1 * delta_time)
#undef THERMAL_PROTECTION_HEAD
#undef THERMAL_PROTECTION_CHEST
diff --git a/code/modules/mob/living/carbon/human/monkey/monkey.dm b/code/modules/mob/living/carbon/human/monkey/monkey.dm
index f0ea641a031..a2225b51167 100644
--- a/code/modules/mob/living/carbon/human/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/human/monkey/monkey.dm
@@ -67,7 +67,7 @@
if(relic_mask)
equip_to_slot_or_del(new relic_mask, ITEM_SLOT_MASK)
-/mob/living/carbon/human/species/monkey/punpun/Life()
+/mob/living/carbon/human/species/monkey/punpun/Life(delta_time = SSMOBS_DT, times_fired)
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory(FALSE, FALSE)
memory_saved = TRUE
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index bcae34f30b6..7356bb54231 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -973,14 +973,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return "FRONT"
-/datum/species/proc/spec_life(mob/living/carbon/human/H)
+/datum/species/proc/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(HAS_TRAIT(H, TRAIT_NOBREATH))
H.setOxyLoss(0)
H.losebreath = 0
var/takes_crit_damage = (!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE))
if((H.health < H.crit_threshold) && takes_crit_damage)
- H.adjustBruteLoss(1)
+ H.adjustBruteLoss(0.5 * delta_time)
if(flying_species)
HandleFlight(H)
@@ -1149,7 +1149,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/after_equip_job(datum/job/J, mob/living/carbon/human/H)
H.update_mutant_bodyparts()
-/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(chem.type == exotic_blood)
H.blood_volume = min(H.blood_volume + round(chem.volume, 0.1), BLOOD_VOLUME_MAXIMUM)
H.reagents.del_reagent(chem.type)
@@ -1173,20 +1173,20 @@ GLOBAL_LIST_EMPTY(roundstart_races)
////////
//LIFE//
////////
-/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
+/datum/species/proc/handle_digestion(mob/living/carbon/human/H, delta_time, times_fired)
if(HAS_TRAIT(H, TRAIT_NOHUNGER))
return //hunger is for BABIES
//The fucking TRAIT_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(HAS_TRAIT_FROM(H, TRAIT_FAT, OBESITY))//I share your pain, past coder.
- if(H.overeatduration < 100)
+ if(H.overeatduration < (200 SECONDS))
to_chat(H, "You feel fit again!")
REMOVE_TRAIT(H, TRAIT_FAT, OBESITY)
H.remove_movespeed_modifier(/datum/movespeed_modifier/obesity)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
else
- if(H.overeatduration >= 100)
+ if(H.overeatduration >= (200 SECONDS))
to_chat(H, "You suddenly feel blubbery!")
ADD_TRAIT(H, TRAIT_FAT, OBESITY)
H.add_movespeed_modifier(/datum/movespeed_modifier/obesity)
@@ -1199,7 +1199,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/hunger_rate = HUNGER_FACTOR
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
if(mood && mood.sanity > SANITY_DISTURBED)
- hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
+ hunger_rate *= max(1 - 0.002 * mood.sanity, 0.5) //0.85 to 0.75
// Whether we cap off our satiety or move it towards 0
if(H.satiety > MAX_SATIETY)
H.satiety = MAX_SATIETY
@@ -1209,19 +1209,18 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.satiety = -MAX_SATIETY
else if(H.satiety < 0)
H.satiety++
- if(prob(round(-H.satiety/40)))
+ if(DT_PROB(round(-H.satiety/77), delta_time))
H.Jitter(5)
hunger_rate = 3 * HUNGER_FACTOR
hunger_rate *= H.physiology.hunger_mod
- H.adjust_nutrition(-hunger_rate)
+ H.adjust_nutrition(-hunger_rate * delta_time)
-
- if (H.nutrition > NUTRITION_LEVEL_FULL)
- if(H.overeatduration < 600) //capped so people don't take forever to unfat
- H.overeatduration++
+ if(H.nutrition > NUTRITION_LEVEL_FULL)
+ if(H.overeatduration < 20 MINUTES) //capped so people don't take forever to unfat
+ H.overeatduration = min(H.overeatduration + (1 SECONDS * delta_time), 20 MINUTES)
else
- if(H.overeatduration > 1)
- H.overeatduration -= 2 //doubled the unfat rate
+ if(H.overeatduration > 0)
+ H.overeatduration = max(H.overeatduration - (2 SECONDS * delta_time), 0) //doubled the unfat rate
//metabolism change
if(H.nutrition > NUTRITION_LEVEL_FAT)
@@ -1265,41 +1264,53 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
return FALSE
-/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/H)
- if(HAS_TRAIT(H, TRAIT_RADIMMUNE))
- H.radiation = 0
+/**
+ * Species based handling for irradiation
+ *
+ * Arguments:
+ * - [source][/mob/living/carbon/human]: The mob requesting handling
+ * - delta_time: The amount of time that has passed since the last tick
+ * - times_fired: The number of times SSmobs has fired
+ */
+/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/source, delta_time, times_fired)
+ if(HAS_TRAIT(source, TRAIT_RADIMMUNE))
+ source.radiation = 0
return TRUE
. = FALSE
- var/radiation = H.radiation
+ var/radiation = source.radiation
+ if(radiation > RAD_MOB_KNOCKDOWN && DT_PROB(RAD_MOB_KNOCKDOWN_PROB, delta_time))
+ if(!source.IsParalyzed())
+ source.emote("collapse")
+ source.Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
+ to_chat(source, "You feel weak.")
- if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
- if(!H.IsParalyzed())
- H.emote("collapse")
- H.Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
- to_chat(H, "You feel weak.")
+ if(radiation > RAD_MOB_VOMIT && DT_PROB(RAD_MOB_VOMIT_PROB, delta_time))
+ source.vomit(10, TRUE)
- if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
- H.vomit(10, TRUE)
+ if(radiation > RAD_MOB_MUTATE && DT_PROB(RAD_MOB_MUTATE_PROB, delta_time))
+ to_chat(source, "You mutate!")
+ source.easy_randmut(NEGATIVE + MINOR_NEGATIVE)
+ source.emote("gasp")
+ source.domutcheck()
- if(radiation > RAD_MOB_MUTATE)
- if(prob(1))
- to_chat(H, "You mutate!")
- H.easy_randmut(NEGATIVE+MINOR_NEGATIVE)
- H.emote("gasp")
- H.domutcheck()
+ if(radiation > RAD_MOB_HAIRLOSS && DT_PROB(RAD_MOB_HAIRLOSS_PROB, delta_time))
+ if(!(source.hairstyle == "Bald") && (HAIR in species_traits))
+ to_chat(source, "Your hair starts to fall out in clumps...")
+ addtimer(CALLBACK(src, .proc/go_bald, source), 5 SECONDS)
- if(radiation > RAD_MOB_HAIRLOSS)
- if(prob(15) && !(H.hairstyle == "Bald") && (HAIR in species_traits))
- to_chat(H, "Your hair starts to fall out in clumps...")
- addtimer(CALLBACK(src, .proc/go_bald, H), 50)
-
-/datum/species/proc/go_bald(mob/living/carbon/human/H)
- if(QDELETED(H)) //may be called from a timer
+/**
+ * Makes the target human bald.
+ *
+ * Arguments:
+ * - [target][/mob/living/carbon/human]: The mob to make go bald.
+ */
+/datum/species/proc/go_bald(mob/living/carbon/human/target)
+ if(QDELETED(target)) //may be called from a timer
return
- H.facial_hairstyle = "Shaved"
- H.hairstyle = "Bald"
- H.update_hair()
+ target.facial_hairstyle = "Shaved"
+ target.hairstyle = "Bald"
+ target.update_hair()
//////////////////
// ATTACK PROCS //
@@ -1677,8 +1688,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
* * environment (required) The environment gas mix
* * humi (required)(type: /mob/living/carbon/human) The mob we will target
*/
-/datum/species/proc/handle_environment(datum/gas_mixture/environment, mob/living/carbon/human/humi)
- handle_environment_pressure(environment, humi)
+/datum/species/proc/handle_environment(mob/living/carbon/human/humi, datum/gas_mixture/environment, delta_time, times_fired)
+ handle_environment_pressure(humi, environment, delta_time, times_fired)
/**
* Body temperature handler for species
@@ -1688,18 +1699,22 @@ GLOBAL_LIST_EMPTY(roundstart_races)
* vars:
* * humi (required)(type: /mob/living/carbon/human) The mob we will target
*/
-/datum/species/proc/handle_body_temperature(mob/living/carbon/human/humi)
+/datum/species/proc/handle_body_temperature(mob/living/carbon/human/humi, delta_time, times_fired)
//when in a cryo unit we suspend all natural body regulation
if(istype(humi.loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
return
- //when dead the air still effects your skin temp
- if(humi.stat == DEAD || IS_IN_STASIS(humi))
- body_temperature_skin(humi)
- else //when alive do all the things
- body_temperature_core(humi)
- body_temperature_skin(humi)
- body_temperature_alerts(humi)
- body_temperature_damage(humi)
+
+ //Only stabilise core temp when alive and not in statis
+ if(humi.stat < DEAD && !IS_IN_STASIS(humi))
+ body_temperature_core(humi, delta_time, times_fired)
+
+ //These do run in statis
+ body_temperature_skin(humi, delta_time, times_fired)
+ body_temperature_alerts(humi, delta_time, times_fired)
+
+ //Do not cause more damage in statis
+ if(!IS_IN_STASIS(humi))
+ body_temperature_damage(humi, delta_time, times_fired)
/**
* Used to stabilize the core temperature back to normal on living mobs
@@ -1708,8 +1723,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
* vars:
* * humi (required) The mob we will stabilize
*/
-/datum/species/proc/body_temperature_core(mob/living/carbon/human/humi)
- var/natural_change = get_temp_change_amount(humi.get_body_temp_normal() - humi.coretemperature, 0.12)
+/datum/species/proc/body_temperature_core(mob/living/carbon/human/humi, delta_time, times_fired)
+ var/natural_change = get_temp_change_amount(humi.get_body_temp_normal() - humi.coretemperature, 0.06 * delta_time)
humi.adjust_coretemperature(humi.metabolism_efficiency * natural_change)
/**
@@ -1719,13 +1734,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
* This happens even when dead so bodies revert to room temp over time.
* vars:
* * humi (required) The mob we will targeting
+ * - delta_time: The amount of time that is considered as elapsing
+ * - times_fired: The number of times SSmobs has fired
*/
-/datum/species/proc/body_temperature_skin(mob/living/carbon/human/humi)
+/datum/species/proc/body_temperature_skin(mob/living/carbon/human/humi, delta_time, times_fired)
// change the core based on the skin temp
var/skin_core_diff = humi.bodytemperature - humi.coretemperature
- // change rate of 0.08 to be slightly below area to skin change rate and still have a solid curve
- var/skin_core_change = get_temp_change_amount(skin_core_diff, 0.08)
+ // change rate of 0.04 per second to be slightly below area to skin change rate and still have a solid curve
+ var/skin_core_change = get_temp_change_amount(skin_core_diff, 0.04 * delta_time)
humi.adjust_coretemperature(skin_core_change)
@@ -1743,8 +1760,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
// Changes to the skin temperature based on the area
var/area_skin_diff = area_temp - humi.bodytemperature
if(!humi.on_fire || area_skin_diff > 0)
- // change rate of 0.1 as area temp has large impact on the surface
- var/area_skin_change = get_temp_change_amount(area_skin_diff, 0.1)
+ // change rate of 0.05 as area temp has large impact on the surface
+ var/area_skin_change = get_temp_change_amount(area_skin_diff, 0.05 * delta_time)
// We need to apply the thermal protection of the clothing when applying area to surface change
// If the core bodytemp goes over the normal body temp you are overheating and becom sweaty
@@ -1762,8 +1779,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!humi.on_fire)
// Get the changes to the skin from the core temp
var/core_skin_diff = humi.coretemperature - humi.bodytemperature
- // change rate of 0.09 to reflect temp back to the skin at the slight higher rate then core to skin
- var/core_skin_change = (1 + thermal_protection) * get_temp_change_amount(core_skin_diff, 0.09)
+ // change rate of 0.045 to reflect temp back to the skin at the slight higher rate then core to skin
+ var/core_skin_change = (1 + thermal_protection) * get_temp_change_amount(core_skin_diff, 0.045 * delta_time)
// We do not want to over shoot after using protection
if(core_skin_diff > 0)
@@ -1825,17 +1842,17 @@ GLOBAL_LIST_EMPTY(roundstart_races)
* vars:
* * humi (required) The mob we will targeting
*/
-/datum/species/proc/body_temperature_damage(mob/living/carbon/human/humi)
+/datum/species/proc/body_temperature_damage(mob/living/carbon/human/humi, delta_time, times_fired)
//If the body temp is above the wound limit start adding exposure stacks
if(humi.bodytemperature > BODYTEMP_HEAT_WOUND_LIMIT)
- humi.heat_exposure_stacks = min(humi.heat_exposure_stacks + 1, 40)
+ humi.heat_exposure_stacks = min(humi.heat_exposure_stacks + (0.5 * delta_time), 40)
else //When below the wound limit, reduce the exposure stacks fast.
- humi.heat_exposure_stacks = max(humi.heat_exposure_stacks - 4, 0)
+ humi.heat_exposure_stacks = max(humi.heat_exposure_stacks - (2 * delta_time), 0)
//when exposure stacks are greater then 10 + rand20 try to apply wounds and reset stacks
if(humi.heat_exposure_stacks > (10 + rand(0, 20)))
- apply_burn_wounds(humi)
+ apply_burn_wounds(humi, delta_time, times_fired)
humi.heat_exposure_stacks = 0
// Body temperature is too hot, and we do not have resist traits
@@ -1846,10 +1863,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
firemodifier = min(firemodifier, 0)
// this can go below 5 at log 2.5
- var/burn_damage = max(log(2 - firemodifier, (humi.coretemperature - humi.get_body_temp_normal(apply_change=FALSE))) - 5,0)
+ var/burn_damage = max(log(2 - firemodifier, (humi.coretemperature - humi.get_body_temp_normal(apply_change=FALSE))) - 5, 0)
// Apply species and physiology modifiers to heat damage
- burn_damage = burn_damage * heatmod * humi.physiology.heat_mod
+ burn_damage = burn_damage * heatmod * humi.physiology.heat_mod * 0.5 * delta_time
// 40% for level 3 damage on humans to scream in pain
if (humi.stat < UNCONSCIOUS && (prob(burn_damage) * 10) / 4)
@@ -1864,15 +1881,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/cold_damage_limit = bodytemp_cold_damage_limit + (is_hulk ? BODYTEMP_HULK_COLD_DAMAGE_LIMIT_MODIFIER : 0)
if(humi.coretemperature < cold_damage_limit && !HAS_TRAIT(humi, TRAIT_RESISTCOLD))
- var/damage_type = is_hulk ? BRUTE : BURN
+ var/damage_type = is_hulk ? BRUTE : BURN // Why?
var/damage_mod = coldmod * humi.physiology.cold_mod * (is_hulk ? HULK_COLD_DAMAGE_MOD : 1)
switch(humi.coretemperature)
if(201 to cold_damage_limit)
- humi.apply_damage(COLD_DAMAGE_LEVEL_1 * damage_mod, damage_type)
+ humi.apply_damage(COLD_DAMAGE_LEVEL_1 * damage_mod * delta_time, damage_type)
if(120 to 200)
- humi.apply_damage(COLD_DAMAGE_LEVEL_2 * damage_mod, damage_type)
+ humi.apply_damage(COLD_DAMAGE_LEVEL_2 * damage_mod * delta_time, damage_type)
else
- humi.apply_damage(COLD_DAMAGE_LEVEL_3 * damage_mod, damage_type)
+ humi.apply_damage(COLD_DAMAGE_LEVEL_3 * damage_mod * delta_time, damage_type)
/**
* Used to apply burn wounds on random limbs
@@ -1882,7 +1899,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
* vars:
* * humi (required) The mob we will targeting
*/
-/datum/species/proc/apply_burn_wounds(mob/living/carbon/human/humi)
+/datum/species/proc/apply_burn_wounds(mob/living/carbon/human/humi, delta_time, times_fired)
// If we are resistant to heat exit
if(HAS_TRAIT(humi, TRAIT_RESISTHEAT))
return
@@ -1914,21 +1931,19 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(humi.bodytemperature > BODYTEMP_HEAT_WOUND_LIMIT + 2800)
burn_damage = HEAT_DAMAGE_LEVEL_3
- humi.apply_damage(burn_damage, BURN, bodypart)
+ humi.apply_damage(burn_damage * delta_time, BURN, bodypart)
/// Handle the air pressure of the environment
-/datum/species/proc/handle_environment_pressure(datum/gas_mixture/environment, mob/living/carbon/human/H)
+/datum/species/proc/handle_environment_pressure(mob/living/carbon/human/H, datum/gas_mixture/environment, delta_time, times_fired)
var/pressure = environment.return_pressure()
var/adjusted_pressure = H.calculate_affecting_pressure(pressure)
// Set alerts and apply damage based on the amount of pressure
switch(adjusted_pressure)
-
// 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)
+ H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) - 1) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod * delta_time)
H.throw_alert("pressure", /atom/movable/screen/alert/highpressure, 2)
else
H.clear_alert("pressure")
@@ -1955,7 +1970,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE))
H.clear_alert("pressure")
else
- H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod)
+ H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * delta_time)
H.throw_alert("pressure", /atom/movable/screen/alert/lowpressure, 2)
@@ -1963,7 +1978,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
// FIRE //
//////////
-/datum/species/proc/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
+/datum/species/proc/handle_fire(mob/living/carbon/human/H, delta_time, times_fired, no_protection = FALSE)
if(!CanIgniteMob(H))
return TRUE
if(H.on_fire)
@@ -2020,9 +2035,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT && !no_protection)
return
if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT && !no_protection)
- H.adjust_bodytemperature(11)
+ H.adjust_bodytemperature(5.5 * delta_time)
else
- H.adjust_bodytemperature(BODYTEMP_HEATING_MAX + (H.fire_stacks * 12))
+ H.adjust_bodytemperature((BODYTEMP_HEATING_MAX + (H.fire_stacks * 12)) * 0.5 * delta_time)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "on_fire", /datum/mood_event/on_fire)
/datum/species/proc/CanIgniteMob(mob/living/carbon/human/H)
diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
index 2900ef060cb..6fbbeffbff0 100644
--- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm
+++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm
@@ -48,7 +48,7 @@
H.regenerate_limb(BODY_ZONE_HEAD,FALSE)
..()
-/datum/species/dullahan/spec_life(mob/living/carbon/human/H)
+/datum/species/dullahan/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(QDELETED(myhead))
myhead = null
H.gib()
diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm
index 07c9589cb52..6a038ea96c8 100644
--- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm
+++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm
@@ -121,9 +121,9 @@
source.emp_act(EMP_LIGHT)
return COMPONENT_BLOCK_LIGHT_EATER
-/datum/species/ethereal/spec_life(mob/living/carbon/human/H)
+/datum/species/ethereal/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
.=..()
- handle_charge(H)
+ handle_charge(H, delta_time, times_fired)
/datum/species/ethereal/proc/stop_emp(mob/living/carbon/human/H)
@@ -144,7 +144,7 @@
spec_updatehealth(H)
H.visible_message("[H] stops flickering and goes back to their normal state!")
-/datum/species/ethereal/proc/handle_charge(mob/living/carbon/human/H)
+/datum/species/ethereal/proc/handle_charge(mob/living/carbon/human/H, delta_time, times_fired)
switch(get_charge(H))
if(-INFINITY to ETHEREAL_CHARGE_NONE)
H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 3)
@@ -153,7 +153,7 @@
if(ETHEREAL_CHARGE_NONE to ETHEREAL_CHARGE_LOWPOWER)
H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 2)
if(H.health > 10.5)
- apply_damage(0.65, TOX, null, null, H)
+ apply_damage(0.325 * delta_time, TOX, null, null, H)
if(ETHEREAL_CHARGE_LOWPOWER to ETHEREAL_CHARGE_NORMAL)
H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 1)
if(ETHEREAL_CHARGE_FULL to ETHEREAL_CHARGE_OVERLOAD)
@@ -161,8 +161,8 @@
apply_damage(0.2, TOX, null, null, H)
if(ETHEREAL_CHARGE_OVERLOAD to ETHEREAL_CHARGE_DANGEROUS)
H.throw_alert("ethereal_overcharge", /atom/movable/screen/alert/ethereal_overcharge, 2)
- apply_damage(0.65, TOX, null, null, H)
- if(prob(10)) //10% each tick for ethereals to explosively release excess energy if it reaches dangerous levels
+ apply_damage(0.325 * delta_time, TOX, null, null, H)
+ if(DT_PROB(5, delta_time)) // 5% each seacond for ethereals to explosively release excess energy if it reaches dangerous levels
discharge_process(H)
else
H.clear_alert("ethereal_charge")
diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm
index d8f27a439d8..d99202ab77e 100644
--- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm
@@ -21,10 +21,10 @@
mutantappendix = /obj/item/organ/appendix/fly
mutant_organs = list(/obj/item/organ/fly, /obj/item/organ/fly/groin)
-/datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(chem.type == /datum/reagent/toxin/pestkiller)
- H.adjustToxLoss(3)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
+ H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
return TRUE
..()
@@ -70,7 +70,7 @@
name = odd_organ_name()
icon_state = pick("brain-x-d", "liver-x", "kidneys-x", "stomach-x", "lungs-x", "random_fly_1", "random_fly_2", "random_fly_3", "random_fly_4", "random_fly_5")
-/obj/item/organ/stomach/fly/on_life()
+/obj/item/organ/stomach/fly/on_life(delta_time, times_fired)
if(locate(/datum/reagent/consumable) in reagents.reagent_list)
var/mob/living/carbon/body = owner
// we do not loss any nutrition as a fly when vomiting out food
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index dbd633338af..f39f4d597d7 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -96,7 +96,7 @@
var/boom_warning = FALSE
var/datum/action/innate/ignite/ignite
-/datum/species/golem/plasma/spec_life(mob/living/carbon/human/H)
+/datum/species/golem/plasma/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(H.bodytemperature > 750)
if(!boom_warning && H.on_fire)
to_chat(H, "You feel like you could blow up at any moment!")
@@ -107,11 +107,11 @@
boom_warning = FALSE
if(H.bodytemperature > 850 && H.on_fire && prob(25))
- explosion(get_turf(H),1,2,4,flame_range = 5)
+ explosion(get_turf(H), 1, 2, 4, flame_range = 5)
if(H)
H.gib()
if(H.fire_stacks < 2) //flammable
- H.adjust_fire_stacks(1)
+ H.adjust_fire_stacks(0.5 * delta_time)
..()
/datum/species/golem/plasma/on_species_gain(mob/living/carbon/C, datum/species/old_species)
@@ -263,12 +263,12 @@
special_names = list("Outsider", "Technology", "Watcher", "Stranger") //ominous and unknown
//Regenerates because self-repairing super-advanced alien tech
-/datum/species/golem/alloy/spec_life(mob/living/carbon/human/H)
+/datum/species/golem/alloy/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(H.stat == DEAD)
return
- H.heal_overall_damage(2,2, 0, BODYPART_ORGANIC)
- H.adjustToxLoss(-2)
- H.adjustOxyLoss(-2)
+ H.heal_overall_damage(1 * delta_time, 1 * delta_time, 0, BODYPART_ORGANIC)
+ H.adjustToxLoss(-1 * delta_time)
+ H.adjustOxyLoss(-1 * delta_time)
//Since this will usually be created from a collaboration between podpeople and free golems, wood golems are a mix between the two races
/datum/species/golem/wood
@@ -288,29 +288,29 @@
special_name_chance = 100
inherent_factions = list("plants", "vines")
-/datum/species/golem/wood/spec_life(mob/living/carbon/human/H)
+/datum/species/golem/wood/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(H.stat == DEAD)
return
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
- light_amount = min(1,T.get_lumcount()) - 0.5
- H.adjust_nutrition(light_amount * 10)
+ light_amount = min(1, T.get_lumcount()) - 0.5
+ H.adjust_nutrition(5 * light_amount * delta_time)
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)
if(light_amount > 0.2) //if there's enough light, heal
- H.heal_overall_damage(1,1,0, BODYPART_ORGANIC)
- H.adjustToxLoss(-1)
- H.adjustOxyLoss(-1)
+ H.heal_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
+ H.adjustToxLoss(-0.5 * delta_time)
+ H.adjustOxyLoss(-0.5 * delta_time)
if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
H.take_overall_damage(2,0)
-/datum/species/golem/wood/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/golem/wood/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(chem.type == /datum/reagent/toxin/plantbgone)
- H.adjustToxLoss(3)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
- return 1
+ H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
+ return TRUE
//Radioactive puncher, hits for burn but only as hard as human, slightly more durable against brute but less against everything else
/datum/species/golem/uranium
@@ -556,16 +556,19 @@
prefix = "Bananium"
special_names = null
- var/last_honk = 0
- var/honkooldown = 0
- var/last_banana = 0
- var/banana_cooldown = 100
- var/active = null
+ /// Cooldown for producing honks
+ COOLDOWN_DECLARE(honkooldown)
+ /// Cooldown for producing bananas
+ COOLDOWN_DECLARE(banana_cooldown)
+ /// Time between possible banana productions
+ var/banana_delay = 10 SECONDS
+ /// Same as the uranium golem. I'm pretty sure this is vestigial.
+ var/active = FALSE
/datum/species/golem/bananium/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
- last_banana = world.time
- last_honk = world.time
+ COOLDOWN_START(src, honkooldown, 0)
+ COOLDOWN_START(src, banana_cooldown, banana_delay)
RegisterSignal(C, COMSIG_MOB_SAY, .proc/handle_speech)
var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER)
if(liver)
@@ -586,21 +589,21 @@
/datum/species/golem/bananium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
..()
- if(world.time > last_banana + banana_cooldown && M != H && M.combat_mode)
- new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
- last_banana = world.time
+ if(COOLDOWN_FINISHED(src, banana_cooldown) && M != H && M.combat_mode)
+ new /obj/item/grown/bananapeel/specialpeel(get_turf(H))
+ COOLDOWN_START(src, banana_cooldown, banana_delay)
/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
..()
- if(world.time > last_banana + banana_cooldown && user != H)
- new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
- last_banana = world.time
+ if((user != H) && COOLDOWN_FINISHED(src, banana_cooldown))
+ new /obj/item/grown/bananapeel/specialpeel(get_turf(H))
+ COOLDOWN_START(src, banana_cooldown, banana_delay)
/datum/species/golem/bananium/on_hit(obj/projectile/P, mob/living/carbon/human/H)
..()
- if(world.time > last_banana + banana_cooldown)
- new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
- last_banana = world.time
+ if(COOLDOWN_FINISHED(src, banana_cooldown))
+ new /obj/item/grown/bananapeel/specialpeel(get_turf(H))
+ COOLDOWN_START(src, banana_cooldown, banana_delay)
/datum/species/golem/bananium/spec_hitby(atom/movable/AM, mob/living/carbon/human/H)
..()
@@ -611,16 +614,14 @@
return 0
else
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
- last_banana = world.time
+ COOLDOWN_START(src, banana_cooldown, banana_delay)
-/datum/species/golem/bananium/spec_life(mob/living/carbon/human/H)
- if(!active)
- if(world.time > last_honk + honkooldown)
- active = 1
- playsound(get_turf(H), 'sound/items/bikehorn.ogg', 50, TRUE)
- last_honk = world.time
- honkooldown = rand(20, 80)
- active = null
+/datum/species/golem/bananium/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
+ if(!active && COOLDOWN_FINISHED(src, honkooldown))
+ active = TRUE
+ playsound(get_turf(H), 'sound/items/bikehorn.ogg', 50, TRUE)
+ COOLDOWN_START(src, honkooldown, rand(2 SECONDS, 8 SECONDS))
+ active = FALSE
..()
/datum/species/golem/bananium/spec_death(gibbed, mob/living/carbon/human/H)
@@ -673,15 +674,15 @@
if(dominate)
C.RemoveSpell(dominate)
-/datum/species/golem/runic/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/golem/runic/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(istype(chem, /datum/reagent/water/holywater))
- H.adjustFireLoss(4)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
+ H.adjustFireLoss(4 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
if(chem.type == /datum/reagent/fuel/unholywater)
- H.adjustBruteLoss(-4)
- H.adjustFireLoss(-4)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
+ H.adjustBruteLoss(-4 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.adjustFireLoss(-4 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
/datum/species/golem/cloth
name = "Cloth Golem"
@@ -995,12 +996,12 @@
bonechill.Remove(C)
..()
-/datum/species/golem/bone/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/golem/bone/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
. = ..()
if(chem.type == /datum/reagent/toxin/bonehurtingjuice)
- H.adjustStaminaLoss(7.5, 0)
- H.adjustBruteLoss(0.5, 0)
- if(prob(20))
+ H.adjustStaminaLoss(7.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
+ H.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
+ if(DT_PROB(10, delta_time))
switch(rand(1, 3))
if(1)
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
@@ -1009,7 +1010,7 @@
if(3)
to_chat(H, "Your bones hurt!")
if(chem.overdosed)
- if(prob(4) && iscarbon(H)) //big oof
+ if(DT_PROB(2, delta_time) && iscarbon(H)) //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 = H.get_bodypart(selected_part) //We're so sorry skeletons, you're so misunderstood
if(bp)
@@ -1020,7 +1021,7 @@
else
to_chat(H, "Your missing arm aches from wherever you left it.")
H.emote("sigh")
- H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
+ H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
return TRUE
/datum/action/innate/bonechill
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index e951c1870ed..fd81c0a06e0 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -41,23 +41,27 @@
slime_change.Grant(C)
//SKYRAT EDIT ADDITION END
-/datum/species/jelly/spec_life(mob/living/carbon/human/H)
+/datum/species/jelly/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely
return
+
if(!H.blood_volume)
- H.blood_volume += 5
- H.adjustBruteLoss(5)
+ H.blood_volume += 2.5 * delta_time
+ H.adjustBruteLoss(2.5 * delta_time)
to_chat(H, "You feel empty!")
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
- H.blood_volume += 3
- H.adjust_nutrition(-2.5)
+ H.blood_volume += 1.5 * delta_time
+ H.adjust_nutrition(-1.25 * delta_time)
+
if(H.blood_volume < BLOOD_VOLUME_OKAY)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(H, "You feel drained!")
+
if(H.blood_volume < BLOOD_VOLUME_BAD)
Cannibalize_Body(H)
+
if(regenerate_limbs)
regenerate_limbs.UpdateButtonIcon()
@@ -175,13 +179,14 @@
/datum/species/jelly/slime/copy_properties_from(datum/species/jelly/slime/old_species)
bodies = old_species.bodies
-/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H)
+/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(H, "You feel very bloated!")
+
else if(H.nutrition >= NUTRITION_LEVEL_WELL_FED)
- H.blood_volume += 3
- H.adjust_nutrition(-2.5)
+ H.blood_volume += 1.5 * delta_time
+ H.adjust_nutrition(-1.25 * delta_time)
..()
diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
index 49afe452903..11fe0bb8541 100644
--- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
@@ -33,7 +33,7 @@
ass_image = 'icons/ass/asslizard.png'
/// Lizards are cold blooded and do not stabilize body temperature naturally
-/datum/species/lizard/body_temperature_core(mob/living/carbon/human/humi)
+/datum/species/lizard/body_temperature_core(mob/living/carbon/human/humi, delta_time, times_fired)
return
/datum/species/lizard/random_name(gender,unique,lastname)
diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
index 8a2e4fa4def..e55a611f78d 100644
--- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
@@ -37,7 +37,7 @@
return randname
-/datum/species/moth/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
+/datum/species/moth/handle_fire(mob/living/carbon/human/H, delta_time, times_fired, no_protection = FALSE)
. = ..()
if(.) //if the mob is immune to fire, don't burn wings off.
return
@@ -59,11 +59,11 @@
H.dna.features["wings"] = "None"
handle_mutant_bodyparts(H)
-/datum/species/moth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/moth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
. = ..()
if(chem.type == /datum/reagent/toxin/pestkiller)
- H.adjustToxLoss(3)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
+ H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
/datum/species/moth/check_species_weakness(obj/item/weapon, mob/living/attacker)
if(istype(weapon, /obj/item/melee/flyswatter))
diff --git a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm
index 7970ea7c404..e61c2402956 100644
--- a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm
@@ -46,10 +46,10 @@
mush.remove(C)
QDEL_NULL(mush)
-/datum/species/mush/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/mush/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(chem.type == /datum/reagent/toxin/plantbgone/weedkiller)
- H.adjustToxLoss(3)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
+ H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
return TRUE
/datum/species/mush/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
index c32b37c9b7c..8fd866b5a67 100644
--- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
@@ -41,22 +41,21 @@
. = ..()
C.set_safe_hunger_level()
-/datum/species/plasmaman/spec_life(mob/living/carbon/human/H)
+/datum/species/plasmaman/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
var/atmos_sealed = CanIgniteMob(H) && (isclothing(H.wear_suit) && H.wear_suit.clothing_flags & STOPSPRESSUREDAMAGE) && (isclothing(H.head) && H.head.clothing_flags & STOPSPRESSUREDAMAGE)
if(!atmos_sealed && (!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman) || !istype(H.gloves, /obj/item/clothing/gloves)))
var/datum/gas_mixture/environment = H.loc.return_air()
- if(environment)
- if(environment.total_moles())
- if(environment.gases[/datum/gas/hypernoblium] && (environment.gases[/datum/gas/hypernoblium][MOLES]) >= 5)
- if(H.on_fire && H.fire_stacks > 0)
- H.adjust_fire_stacks(-20)
- else if(!HAS_TRAIT(H, TRAIT_NOFIRE))
- if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire
- H.adjust_fire_stacks(0.5)
- if(!H.on_fire && H.fire_stacks > 0)
- H.visible_message("[H]'s body reacts with the atmosphere and bursts into flames!","Your body reacts with the atmosphere and bursts into flame!")
- H.IgniteMob()
- internal_fire = TRUE
+ if(environment?.total_moles())
+ if(environment.gases[/datum/gas/hypernoblium] && (environment.gases[/datum/gas/hypernoblium][MOLES]) >= 5)
+ if(H.on_fire && H.fire_stacks > 0)
+ H.adjust_fire_stacks(-10 * delta_time)
+ else if(!HAS_TRAIT(H, TRAIT_NOFIRE))
+ if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire
+ H.adjust_fire_stacks(0.25 * delta_time)
+ if(!H.on_fire && H.fire_stacks > 0)
+ H.visible_message("[H]'s body reacts with the atmosphere and bursts into flames!","Your body reacts with the atmosphere and bursts into flame!")
+ H.IgniteMob()
+ internal_fire = TRUE
else if(H.fire_stacks)
var/obj/item/clothing/under/plasmaman/P = H.w_uniform
if(istype(P))
@@ -66,7 +65,7 @@
internal_fire = FALSE
H.update_fire()
-/datum/species/plasmaman/handle_fire(mob/living/carbon/human/H, no_protection)
+/datum/species/plasmaman/handle_fire(mob/living/carbon/human/H, delta_time, times_fired, no_protection = FALSE)
if(internal_fire)
no_protection = TRUE
. = ..()
@@ -180,18 +179,18 @@
return randname
-/datum/species/plasmaman/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/plasmaman/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
. = ..()
if(istype(chem, /datum/reagent/toxin/plasma))
- H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
+ H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
for(var/i in H.all_wounds)
var/datum/wound/iter_wound = i
- iter_wound.on_xadone(4) // plasmamen use plasma to reform their bones or whatever
+ iter_wound.on_xadone(4 * REAGENTS_EFFECT_MULTIPLIER * delta_time) // plasmamen use plasma to reform their bones or whatever
return TRUE
if(istype(chem, /datum/reagent/toxin/bonehurtingjuice))
- H.adjustStaminaLoss(7.5, 0)
- H.adjustBruteLoss(0.5, 0)
- if(prob(20))
+ H.adjustStaminaLoss(7.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
+ H.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
+ if(DT_PROB(10, delta_time))
switch(rand(1, 3))
if(1)
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
@@ -200,7 +199,7 @@
if(3)
to_chat(H, "Your bones hurt!")
if(chem.overdosed)
- if(prob(4) && iscarbon(H)) //big oof
+ if(DT_PROB(2, delta_time) && iscarbon(H)) //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 = H.get_bodypart(selected_part) //We're so sorry skeletons, you're so misunderstood
if(bp)
@@ -211,5 +210,5 @@
else
to_chat(H, "Your missing arm aches from wherever you left it.")
H.emote("sigh")
- H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
+ H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
return TRUE
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 0366650cbab..c00bbe4424c 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -17,29 +17,30 @@
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
species_language_holder = /datum/language_holder/plant
-/datum/species/pod/spec_life(mob/living/carbon/human/H)
+/datum/species/pod/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
if(H.stat == DEAD)
return
+
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
- light_amount = min(1,T.get_lumcount()) - 0.5
- H.adjust_nutrition(light_amount * 10)
+ light_amount = min(1, T.get_lumcount()) - 0.5
+ H.adjust_nutrition(5 * light_amount * delta_time)
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)
if(light_amount > 0.2) //if there's enough light, heal
- H.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
- H.adjustToxLoss(-1)
- H.adjustOxyLoss(-1)
+ H.heal_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
+ H.adjustToxLoss(-0.5 * delta_time)
+ H.adjustOxyLoss(-0.5 * delta_time)
if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
- H.take_overall_damage(2,0)
+ H.take_overall_damage(1 * delta_time, 0)
-/datum/species/pod/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/pod/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(chem.type == /datum/reagent/toxin/plantbgone)
- H.adjustToxLoss(3)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
- return 1
+ H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
+ return TRUE
/datum/species/pod/on_hit(obj/projectile/P, mob/living/carbon/human/H)
switch(P.type)
diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
index 599521b1115..673ad3f18bc 100644
--- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm
@@ -12,15 +12,15 @@
species_language_holder = /datum/language_holder/shadowpeople
-/datum/species/shadow/spec_life(mob/living/carbon/human/H)
+/datum/species/shadow/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
var/turf/T = H.loc
if(istype(T))
var/light_amount = T.get_lumcount()
if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying
- H.take_overall_damage(1,1, 0, BODYPART_ORGANIC)
+ H.take_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
- H.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
+ H.heal_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
/datum/species/shadow/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm
index ab8546daba0..ae42fd148c1 100644
--- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm
+++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm
@@ -28,12 +28,12 @@
return ..()
//Can still metabolize milk through meme magic
-/datum/species/skeleton/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/skeleton/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
. = ..()
if(chem.type == /datum/reagent/toxin/bonehurtingjuice)
- H.adjustStaminaLoss(7.5, 0)
- H.adjustBruteLoss(0.5, 0)
- if(prob(20))
+ H.adjustStaminaLoss(7.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
+ H.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
+ if(DT_PROB(10, delta_time))
switch(rand(1, 3))
if(1)
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
@@ -42,7 +42,7 @@
if(3)
to_chat(H, "Your bones hurt!")
if(chem.overdosed)
- if(prob(4) && iscarbon(H)) //big oof
+ if(DT_PROB(2, delta_time) && iscarbon(H)) //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 = H.get_bodypart(selected_part) //We're so sorry skeletons, you're so misunderstood
if(bp)
@@ -53,5 +53,5 @@
else
to_chat(H, "Your missing arm aches from wherever you left it.")
H.emote("sigh")
- H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
+ H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
return TRUE
diff --git a/code/modules/mob/living/carbon/human/species_types/snail.dm b/code/modules/mob/living/carbon/human/species_types/snail.dm
index 1d7013dc13c..e8c2bfa6706 100644
--- a/code/modules/mob/living/carbon/human/species_types/snail.dm
+++ b/code/modules/mob/living/carbon/human/species_types/snail.dm
@@ -20,12 +20,12 @@
mutanttongue = /obj/item/organ/tongue/snail
exotic_blood = /datum/reagent/lube
-/datum/species/snail/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/snail/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(istype(chem,/datum/reagent/consumable/salt))
- H.adjustFireLoss(2)
+ H.adjustFireLoss(2 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
playsound(H, 'sound/weapons/sear.ogg', 30, TRUE)
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
- return 1
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
+ return TRUE
/datum/species/snail/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load)
. = ..()
diff --git a/code/modules/mob/living/carbon/human/species_types/synths.dm b/code/modules/mob/living/carbon/human/species_types/synths.dm
index 227dc3f1d3d..da8ae965821 100644
--- a/code/modules/mob/living/carbon/human/species_types/synths.dm
+++ b/code/modules/mob/living/carbon/human/species_types/synths.dm
@@ -42,13 +42,12 @@
. = ..()
UnregisterSignal(H, COMSIG_MOB_SAY)
-/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
if(chem.type == /datum/reagent/medicine/c2/synthflesh)
- chem.expose_mob(H, TOUCH, 2 ,0) //heal a little
- H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
- return 1
- else
- return ..()
+ chem.expose_mob(H, TOUCH, 2 * REAGENTS_EFFECT_MULTIPLIER * delta_time,0) //heal a little
+ H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
+ return TRUE
+ return ..()
/datum/species/synth/proc/assume_disguise(datum/species/S, mob/living/carbon/human/H)
diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm
index 899856c040d..e4a21c6130e 100644
--- a/code/modules/mob/living/carbon/human/species_types/vampire.dm
+++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm
@@ -37,15 +37,15 @@
C.RemoveSpell(batform)
QDEL_NULL(batform)
-/datum/species/vampire/spec_life(mob/living/carbon/human/C)
+/datum/species/vampire/spec_life(mob/living/carbon/human/C, delta_time, times_fired)
. = ..()
if(istype(C.loc, /obj/structure/closet/crate/coffin))
- C.heal_overall_damage(4,4,0, BODYPART_ORGANIC)
- C.adjustToxLoss(-4)
- C.adjustOxyLoss(-4)
- C.adjustCloneLoss(-4)
+ C.heal_overall_damage(2 * delta_time, 2 * delta_time, 0, BODYPART_ORGANIC)
+ C.adjustToxLoss(-2 * delta_time)
+ C.adjustOxyLoss(-2 * delta_time)
+ C.adjustCloneLoss(-2 * delta_time)
return
- C.blood_volume -= 0.25
+ C.blood_volume -= 0.125 * delta_time
if(C.blood_volume <= BLOOD_VOLUME_SURVIVE)
to_chat(C, "You ran out of blood!")
var/obj/shapeshift_holder/H = locate() in C
@@ -55,8 +55,8 @@
var/area/A = get_area(C)
if(istype(A, /area/service/chapel))
to_chat(C, "You don't belong here!")
- C.adjustFireLoss(20)
- C.adjust_fire_stacks(6)
+ C.adjustFireLoss(10 * delta_time)
+ C.adjust_fire_stacks(3 * delta_time)
C.IgniteMob()
/datum/species/vampire/check_species_weakness(obj/item/weapon, mob/living/attacker)
diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm
index 1bf1ea98fa0..a4991d95c4a 100644
--- a/code/modules/mob/living/carbon/human/species_types/zombies.dm
+++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm
@@ -32,12 +32,14 @@
armor = 20 // 120 damage to KO a zombie, which kills it
speedmod = 1.6
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
- var/heal_rate = 1
- var/regen_cooldown = 0
changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN
+ /// The rate the zombies regenerate at
+ var/heal_rate = 0.5
+ /// The cooldown before the zombie can start regenerating
+ COOLDOWN_DECLARE(regen_cooldown)
/// Zombies do not stabilize body temperature they are the walking dead and are cold blooded
-/datum/species/zombie/body_temperature_core(mob/living/carbon/human/humi)
+/datum/species/zombie/body_temperature_core(mob/living/carbon/human/humi, delta_time, times_fired)
return
/datum/species/zombie/infectious/check_roundstart_eligible()
@@ -49,25 +51,25 @@
/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, spread_damage = FALSE, forced = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE)
. = ..()
if(.)
- regen_cooldown = world.time + REGENERATION_DELAY
+ COOLDOWN_START(src, regen_cooldown, REGENERATION_DELAY)
-/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
+/datum/species/zombie/infectious/spec_life(mob/living/carbon/C, delta_time, times_fired)
. = ..()
C.set_combat_mode(TRUE) // THE SUFFERING MUST FLOW
//Zombies never actually die, they just fall down until they regenerate enough to rise back up.
//They must be restrained, beheaded or gibbed to stop being a threat.
- if(regen_cooldown < world.time)
+ if(COOLDOWN_FINISHED(src, regen_cooldown))
var/heal_amt = heal_rate
if(HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION))
heal_amt *= 2
- C.heal_overall_damage(heal_amt,heal_amt)
- C.adjustToxLoss(-heal_amt)
+ C.heal_overall_damage(heal_amt * delta_time, heal_amt * delta_time)
+ C.adjustToxLoss(-heal_amt * delta_time)
for(var/i in C.all_wounds)
var/datum/wound/iter_wound = i
- if(prob(4-iter_wound.severity))
+ if(DT_PROB(2-(iter_wound.severity/2), delta_time))
iter_wound.remove_wound()
- if(!HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION) && prob(4))
+ if(!HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION) && DT_PROB(2, delta_time))
playsound(C, pick(spooks), 50, TRUE, 10)
//Congrats you somehow died so hard you stopped being a zombie
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 13233da3e3b..05c0194e33a 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -1,4 +1,4 @@
-/mob/living/carbon/Life()
+/mob/living/carbon/Life(delta_time = SSMOBS_DT, times_fired)
if(notransform)
return
@@ -7,37 +7,34 @@
damageoverlaytemp = 0
update_damage_hud()
- if(!IS_IN_STASIS(src))
-
+ if(IS_IN_STASIS(src))
+ . = ..()
+ else
//Reagent processing needs to come before breathing, to prevent edge cases.
- handle_organs()
+ handle_organs(delta_time, times_fired)
. = ..()
-
- if (QDELETED(src))
+ if(QDELETED(src))
return
if(.) //not dead
- handle_blood()
+ handle_blood(delta_time, times_fired)
if(stat != DEAD)
- handle_brain_damage()
-
- else
- . = ..()
+ handle_brain_damage(delta_time, times_fired)
if(stat == DEAD)
stop_sound_channel(CHANNEL_HEARTBEAT)
else
- var/bprv = handle_bodyparts()
+ var/bprv = handle_bodyparts(delta_time, times_fired)
if(bprv & BODYPART_LIFE_UPDATE_HEALTH)
update_stamina() //needs to go before updatehealth to remove stamcrit
updatehealth()
- check_cremation()
+ check_cremation(delta_time, times_fired)
//Updates the number of stored chemicals for powers
- handle_changeling()
+ handle_changeling(delta_time, times_fired)
if(staminaloss) //SKYRAT EDIT ADDITION bEGIN
//Stamina regeneration: Regens faster, the more health you have, and the more staminaloss you have
@@ -64,7 +61,7 @@
if(mind)
for(var/key in mind.addiction_points)
var/datum/addiction/addiction = SSaddiction.all_addictions[key]
- addiction.process_addiction(src)
+ addiction.process_addiction(src, delta_time, times_fired)
if(stat != DEAD)
return 1
@@ -73,7 +70,7 @@
///////////////
//Start of a breath chain, calls breathe()
-/mob/living/carbon/handle_breathing(times_fired)
+/mob/living/carbon/handle_breathing(delta_time, times_fired)
var/next_breath = 4
var/obj/item/organ/lungs/L = getorganslot(ORGAN_SLOT_LUNGS)
var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART)
@@ -85,7 +82,7 @@
next_breath--
if((times_fired % next_breath) == 0 || failed_last_breath)
- breathe() //Breathe per 4 ticks if healthy, down to 2 if our lungs or heart are damaged, unless suffocating
+ breathe(delta_time, times_fired) //Breathe per 4 ticks if healthy, down to 2 if our lungs or heart are damaged, unless suffocating
if(failed_last_breath)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation)
else
@@ -96,7 +93,7 @@
location_as_object.handle_internal_lifeform(src,0)
//Second link in a breath chain, calls check_breath()
-/mob/living/carbon/proc/breathe()
+/mob/living/carbon/proc/breathe(delta_time, times_fired)
var/obj/item/organ/lungs = getorganslot(ORGAN_SLOT_LUNGS)
if(reagents.has_reagent(/datum/reagent/toxin/lexorin, needs_metabolizing = TRUE))
return
@@ -352,12 +349,13 @@
if(!.)
return FALSE //to differentiate between no internals and active, but empty internals
-/mob/living/carbon/proc/handle_blood()
+/mob/living/carbon/proc/handle_blood(delta_time, times_fired)
return
-/mob/living/carbon/proc/handle_bodyparts()
+/mob/living/carbon/proc/handle_bodyparts(delta_time, times_fired)
return //SKYRAT EDIT ADDITION
/* SKYRAT EDIT REMVOAL
+/mob/living/carbon/proc/handle_bodyparts(delta_time, times_fired)
var/stam_regen = FALSE
if(stam_regen_start_time <= world.time)
stam_regen = TRUE
@@ -368,50 +366,50 @@
for(var/I in bodyparts)
var/obj/item/bodypart/BP = I
if(BP.needs_processing)
- . |= BP.on_life(stam_regen)
+ . |= BP.on_life(delta_time, times_fired, stam_regen)
*/ //SKYRAT EDIT END
-/mob/living/carbon/proc/handle_organs()
+/mob/living/carbon/proc/handle_organs(delta_time, times_fired)
if(stat != DEAD)
for(var/organ_slot in GLOB.organ_process_order)
var/obj/item/organ/organ = getorganslot(organ_slot)
if(organ?.owner) // This exist mostly because reagent metabolization can cause organ reshuffling
- organ.on_life()
+ organ.on_life(delta_time, times_fired)
else
if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1)) // No organ decay if the body contains formaldehyde.
return
for(var/V in internal_organs)
var/obj/item/organ/O = V
- O.on_death() //Needed so organs decay while inside the body.
+ O.on_death(delta_time, times_fired) //Needed so organs decay while inside the body.
-/mob/living/carbon/handle_diseases()
+/mob/living/carbon/handle_diseases(delta_time, times_fired)
for(var/thing in diseases)
var/datum/disease/D = thing
- if(prob(D.infectivity))
+ if(DT_PROB(D.infectivity, delta_time))
D.spread()
if(stat != DEAD || D.process_dead)
- D.stage_act()
+ D.stage_act(delta_time, times_fired)
-/mob/living/carbon/handle_wounds()
+/mob/living/carbon/handle_wounds(delta_time, times_fired)
for(var/thing in all_wounds)
var/datum/wound/W = thing
if(W.processes) // meh
- W.handle_process()
+ W.handle_process(delta_time, times_fired)
//todo generalize this and move hud out
-/mob/living/carbon/proc/handle_changeling()
+/mob/living/carbon/proc/handle_changeling(delta_time, times_fired)
if(mind && hud_used?.lingchemdisplay)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
- changeling.regenerate()
+ changeling.regenerate(delta_time, times_fired)
hud_used.lingchemdisplay.invisibility = 0
hud_used.lingchemdisplay.maptext = MAPTEXT("[round(changeling.chem_charges)]
")
else
hud_used.lingchemdisplay.invisibility = INVISIBILITY_ABSTRACT
-/mob/living/carbon/handle_mutations_and_radiation()
+/mob/living/carbon/handle_mutations_and_radiation(delta_time, times_fired)
if(dna?.temporary_mutations.len)
for(var/mut in dna.temporary_mutations)
if(dna.temporary_mutations[mut] < world.time)
@@ -439,9 +437,9 @@
if(HM?.timed)
dna.remove_mutation(HM.type)
- radiation -= min(radiation, RAD_LOSS_PER_TICK)
+ radiation = max(radiation - (RAD_LOSS_PER_SECOND * delta_time), 0)
if(radiation > RAD_MOB_SAFE)
- adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT)
+ adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT*delta_time)
/*
@@ -465,10 +463,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
#define BALLMER_POINTS 5
//this updates all special effects: stun, sleeping, knockdown, druggy, stuttering, etc..
-/mob/living/carbon/handle_status_effects()
+/mob/living/carbon/handle_status_effects(delta_time, times_fired)
..()
- var/restingpwr = 1 + 4 * resting
+ var/restingpwr = 0.5 + 2 * resting
//Dizziness
if(dizziness)
@@ -481,7 +479,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/oldsrc = src
var/amplitude = dizziness*(sin(dizziness * world.time) + 1) // This shit is annoying at high strength
src = null
- spawn(0)
+ spawn(0) // AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
if(C)
temp = amplitude * sin(saved_dizz * world.time)
pixel_x_diff += temp
@@ -502,48 +500,48 @@ All effects don't start immediately, but rather get worse over time; the rate is
C.pixel_x -= pixel_x_diff
C.pixel_y -= pixel_y_diff
src = oldsrc
- dizziness = max(dizziness - restingpwr, 0)
+ dizziness = max(dizziness - (restingpwr * delta_time), 0)
if(drowsyness)
- drowsyness = max(drowsyness - restingpwr, 0)
- blur_eyes(2)
- if(prob(5))
+ drowsyness = max(drowsyness - (restingpwr * delta_time), 0)
+ blur_eyes(1 * delta_time)
+ if(DT_PROB(2.5, delta_time))
AdjustSleeping(100)
//Jitteriness
if(jitteriness)
do_jitter_animation(jitteriness)
- jitteriness = max(jitteriness - restingpwr, 0)
+ jitteriness = max(jitteriness - (restingpwr * delta_time), 0)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "jittery", /datum/mood_event/jittery)
else
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "jittery")
if(stuttering)
- stuttering = max(stuttering-1, 0)
+ stuttering = max(stuttering - (0.5 * delta_time), 0)
if(slurring)
- slurring = max(slurring-1,0)
+ slurring = max(slurring - (0.5 * delta_time),0)
if(cultslurring)
- cultslurring = max(cultslurring-1, 0)
+ cultslurring = max(cultslurring - (0.5 * delta_time), 0)
if(silent)
- silent = max(silent-1, 0)
+ silent = max(silent - (0.5 * delta_time), 0)
if(druggy)
- adjust_drugginess(-1)
+ adjust_drugginess(-0.5 * delta_time)
if(hallucination)
- handle_hallucinations()
+ handle_hallucinations(delta_time, times_fired)
if(drunkenness)
- //drunkenness = max(drunkenness - (drunkenness * 0.04) - 0.01, 0) //ORIGINAL
+ //drunkenness = max(drunkenness - ((0.005 + (drunkenness * 0.02)) * delta_time), 0) //ORIGINAL
drunkenness = max(drunkenness - (drunkenness * 0.01) - 0.01, 0) //SKYRAT EDIT CHANGE - booze
if(drunkenness >= 6)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "drunk", /datum/mood_event/drunk)
- if(prob(25))
+ if(DT_PROB(16, delta_time))
slurring += 2
- jitteriness = max(jitteriness - 3, 0)
+ jitteriness = max(jitteriness - (1.5 * delta_time), 0)
throw_alert("drunk", /atom/movable/screen/alert/drunk)
sound_environment_override = SOUND_ENVIRONMENT_PSYCHOTIC
else
@@ -552,7 +550,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
sound_environment_override = SOUND_ENVIRONMENT_NONE
if(drunkenness >= 11 && slurring < 5)
- slurring += 1.2
+ slurring += 0.6 * delta_time
if(mind && (mind.assigned_role == "Scientist" || mind.assigned_role == "Research Director"))
if(SSresearch.science_tech)
@@ -563,41 +561,41 @@ All effects don't start immediately, but rather get worse over time; the rate is
ballmer_percent = 1
else
ballmer_percent = (-abs(drunkenness - 13.35) / 0.9) + 1
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
say(pick_list_replacements(VISTA_FILE, "ballmer_good_msg"), forced = "ballmer")
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = BALLMER_POINTS * ballmer_percent))
if(drunkenness > 26) // by this point you're into windows ME territory
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
SSresearch.science_tech.remove_point_list(list(TECHWEB_POINT_TYPE_GENERIC = BALLMER_POINTS))
say(pick_list_replacements(VISTA_FILE, "ballmer_windows_me_msg"), forced = "ballmer")
if(drunkenness >= 41)
- if(prob(25))
+ if(DT_PROB(16, delta_time))
add_confusion(2)
- Dizzy(10)
+ Dizzy(5 * delta_time)
if(drunkenness >= 51)
- if(prob(3))
+ if(DT_PROB(1.5, delta_time))
add_confusion(15)
vomit() // vomiting clears toxloss, consider this a blessing
- Dizzy(25)
+ Dizzy(12.5 * delta_time)
if(drunkenness >= 61)
- if(prob(50))
+ if(DT_PROB(30, delta_time))
blur_eyes(5)
if(drunkenness >= 71)
- blur_eyes(5)
+ blur_eyes(2.5 * delta_time)
if(drunkenness >= 81)
- adjustToxLoss(1)
- if(prob(5) && !stat)
+ adjustToxLoss(0.5 * delta_time)
+ if(!stat && DT_PROB(2.5, delta_time))
to_chat(src, "Maybe you should lie down for a bit...")
if(drunkenness >= 91)
- adjustToxLoss(1)
- adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.4)
- if(prob(20) && !stat)
+ adjustToxLoss(0.5 * delta_time)
+ adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * delta_time)
+ if(DT_PROB(10, delta_time) && !stat)
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && is_station_level(z)) //QoL mainly
to_chat(src, "You're so tired... but you can't miss that shuttle...")
else
@@ -605,14 +603,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
Sleeping(900)
if(drunkenness >= 101)
- adjustToxLoss(2) //Let's be honest you shouldn't be alive by now
+ adjustToxLoss(1 * delta_time) //Let's be honest you shouldn't be alive by now
/// Base carbon environment handler, adds natural stabilization
-/mob/living/carbon/handle_environment(datum/gas_mixture/environment)
+/mob/living/carbon/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
var/areatemp = get_temperature(environment)
if(stat != DEAD) // If you are dead your body does not stabilize naturally
- natural_bodytemperature_stabilization(environment)
+ natural_bodytemperature_stabilization(environment, delta_time, times_fired)
if(!on_fire || areatemp > bodytemperature) // If we are not on fire or the area is hotter
adjust_bodytemperature((areatemp - bodytemperature), use_insulation=TRUE, use_steps=TRUE)
@@ -620,15 +618,17 @@ All effects don't start immediately, but rather get worse over time; the rate is
/**
* Used to stabilize the body temperature back to normal on living mobs
*
- * vars:
- * * environment The environment gas mix
+ * Arguments:
+ * - [environemnt][/datum/gas_mixture]: The environment gas mix
+ * - delta_time: The amount of time that has elapsed since the last tick
+ * - times_fired: The number of times SSmobs has ticked
*/
-/mob/living/carbon/proc/natural_bodytemperature_stabilization(datum/gas_mixture/environment)
+/mob/living/carbon/proc/natural_bodytemperature_stabilization(datum/gas_mixture/environment, delta_time, times_fired)
var/areatemp = get_temperature(environment)
var/body_temperature_difference = get_body_temp_normal() - bodytemperature
var/natural_change = 0
- // We are very cold, increate body temperature
+ // We are very cold, increase body temperature
if(bodytemperature <= BODYTEMP_COLD_DAMAGE_LIMIT)
natural_change = max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), \
BODYTEMP_AUTORECOVERY_MINIMUM)
@@ -669,7 +669,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
natural_change = (1 / (thermal_protection + 1)) * natural_change
// Apply the natural stabilization changes
- adjust_bodytemperature(natural_change)
+ adjust_bodytemperature(natural_change * delta_time)
/**
* Get the insulation that is appropriate to the temperature you're being exposed to.
@@ -772,31 +772,31 @@ All effects don't start immediately, but rather get worse over time; the rate is
/////////
///Decides if the liver is failing or not.
-/mob/living/carbon/proc/handle_liver()
+/mob/living/carbon/proc/handle_liver(delta_time, times_fired)
if(!dna)
return
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if(!liver)
- liver_failure()
+ liver_failure(delta_time, times_fired)
/mob/living/carbon/proc/undergoing_liver_failure()
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if(liver && (liver.organ_flags & ORGAN_FAILING))
return TRUE
-/mob/living/carbon/proc/liver_failure()
+/mob/living/carbon/proc/liver_failure(delta_time, times_fired)
reagents.end_metabolization(src, keep_liverless = TRUE) //Stops trait-based effects on reagents, to prevent permanent buffs
- reagents.metabolize(src, can_overdose=FALSE, liverless = TRUE)
+ reagents.metabolize(src, delta_time, times_fired, can_overdose=FALSE, liverless = TRUE)
if(HAS_TRAIT(src, TRAIT_STABLELIVER) || HAS_TRAIT(src, TRAIT_NOMETABOLISM))
return
- adjustToxLoss(4, TRUE, TRUE)
- if(prob(30))
+ adjustToxLoss(2 * delta_time, TRUE, TRUE)
+ if(DT_PROB(15, delta_time))
to_chat(src, "You feel a stabbing pain in your abdomen!")
/////////////
//CREMATION//
/////////////
-/mob/living/carbon/proc/check_cremation()
+/mob/living/carbon/proc/check_cremation(delta_time, times_fired)
//Only cremate while actively on fire
if(!on_fire)
return
@@ -815,7 +815,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(limb)
still_has_limbs = TRUE
if(limb.get_damage() >= limb.max_damage)
- limb.cremation_progress += rand(2,5)
+ limb.cremation_progress += rand(1 * delta_time, 2.5 * delta_time)
if(limb.cremation_progress >= 100)
if(limb.status == BODYPART_ORGANIC) //Non-organic limbs don't burn
limb.drop_limb()
@@ -831,7 +831,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/obj/item/bodypart/head = get_bodypart(BODY_ZONE_HEAD)
if(head)
if(head.get_damage() >= head.max_damage)
- head.cremation_progress += rand(2,5)
+ head.cremation_progress += rand(1 * delta_time, 2.5 * delta_time)
if(head.cremation_progress >= 100)
if(head.status == BODYPART_ORGANIC) //Non-organic limbs don't burn
head.drop_limb()
@@ -843,7 +843,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
return
//Nothing left: dust the body, drop the items (if they're flammable they'll burn on their own)
- chest.cremation_progress += rand(2,5)
+ chest.cremation_progress += rand(1 * delta_time, 2.5 * delta_time)
if(chest.cremation_progress >= 100)
visible_message("[src]'s body crumbles into a pile of ash!")
dust(TRUE, TRUE)
@@ -852,10 +852,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
//BRAIN DAMAGE//
////////////////
-/mob/living/carbon/proc/handle_brain_damage()
+/mob/living/carbon/proc/handle_brain_damage(delta_time, times_fired)
for(var/T in get_traumas())
var/datum/brain_trauma/BT = T
- BT.on_life()
+ BT.on_life(delta_time, times_fired)
/////////////////////////////////////
//MONKEYS WITH TOO MUCH CHOLOESTROL//
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index a0fd6fcae02..38aa4a87266 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -1,7 +1,15 @@
/// This divisor controls how fast body temperature changes to match the environment
-#define BODYTEMP_DIVISOR 8
+#define BODYTEMP_DIVISOR 16
-/mob/living/proc/Life(times_fired)
+/**
+ * Handles the biological and general over-time processes of the mob.
+ *
+ *
+ * Arguments:
+ * - delta_time: The amount of time that has elapsed since this last fired.
+ * - times_fired: The number of times SSmobs has fired
+ */
+/mob/living/proc/Life(delta_time = SSMOBS_DT, times_fired)
set waitfor = FALSE
if (client)
@@ -33,35 +41,35 @@
if(stat != DEAD)
//Mutations and radiation
- handle_mutations_and_radiation()
+ handle_mutations_and_radiation(delta_time, times_fired)
if(stat != DEAD)
//Breathing, if applicable
- handle_breathing(times_fired)
+ handle_breathing(delta_time, times_fired)
- handle_diseases()// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
+ handle_diseases(delta_time, times_fired)// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
- handle_wounds()
+ handle_wounds(delta_time, times_fired)
if (QDELETED(src)) // diseases can qdel the mob via transformations
return
if(stat != DEAD)
//Random events (vomiting etc)
- handle_random_events()
+ handle_random_events(delta_time, times_fired)
//Handle temperature/pressure differences between body and environment
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
- handle_environment(environment)
+ handle_environment(environment, delta_time, times_fired)
- handle_gravity()
+ handle_gravity(delta_time, times_fired)
if(stat != DEAD)
- handle_traits() // eye, ear, brain damages
- handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
+ handle_traits(delta_time, times_fired) // eye, ear, brain damages
+ handle_status_effects(delta_time, times_fired) //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
- handle_fire()
+ handle_fire(delta_time, times_fired)
if(machine)
machine.check_eye(src)
@@ -69,39 +77,40 @@
if(stat != DEAD)
return 1
-/mob/living/proc/handle_breathing(times_fired)
+/mob/living/proc/handle_breathing(delta_time, times_fired)
return
-/mob/living/proc/handle_mutations_and_radiation()
+/mob/living/proc/handle_mutations_and_radiation(delta_time, times_fired)
radiation = 0 //so radiation don't accumulate in simple animals
return
-/mob/living/proc/handle_diseases()
+/mob/living/proc/handle_diseases(delta_time, times_fired)
return
-/mob/living/proc/handle_wounds()
+/mob/living/proc/handle_wounds(delta_time, times_fired)
return
-/mob/living/proc/handle_random_events()
+/mob/living/proc/handle_random_events(delta_time, times_fired)
return
// Base mob environment handler for body temperature
-/mob/living/proc/handle_environment(datum/gas_mixture/environment)
+/mob/living/proc/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
var/loc_temp = get_temperature(environment)
+ var/temp_delta = loc_temp - bodytemperature
- if(loc_temp < bodytemperature) // it is cold here
+ if(temp_delta < 0) // it is cold here
if(!on_fire) // do not reduce body temp when on fire
- adjust_bodytemperature(max((loc_temp - bodytemperature) / BODYTEMP_DIVISOR, BODYTEMP_COOLING_MAX))
+ adjust_bodytemperature(max(max(temp_delta / BODYTEMP_DIVISOR, BODYTEMP_COOLING_MAX) * delta_time, temp_delta))
else // this is a hot place
- adjust_bodytemperature(min((loc_temp - bodytemperature) / BODYTEMP_DIVISOR, BODYTEMP_HEATING_MAX))
+ adjust_bodytemperature(min(min(temp_delta / BODYTEMP_DIVISOR, BODYTEMP_HEATING_MAX) * delta_time, temp_delta))
-/mob/living/proc/handle_fire()
+/mob/living/proc/handle_fire(delta_time, times_fired)
if(fire_stacks < 0) //If we've doused ourselves in water to avoid fire, dry off slowly
- set_fire_stacks(min(0, fire_stacks + 1)) //So we dry ourselves back to default, nonflammable.
+ set_fire_stacks(min(0, fire_stacks + (0.5 * delta_time))) //So we dry ourselves back to default, nonflammable.
if(!on_fire)
return TRUE //the mob is no longer on fire, no need to do the rest.
if(fire_stacks > 0)
- adjust_fire_stacks(-0.1) //the fire is slowly consumed
+ adjust_fire_stacks(-0.05 * delta_time) //the fire is slowly consumed
else
extinguish_mob()
return TRUE //mob was put out, on_fire = FALSE via extinguish_mob(), no need to update everything down the chain.
@@ -110,7 +119,7 @@
extinguish_mob() //If there's no oxygen in the tile we're on, put out the fire
return TRUE
var/turf/location = get_turf(src)
- location.hotspot_expose(700, 50, 1)
+ location.hotspot_expose(700, 25 * delta_time, TRUE)
/**
* Get the fullness of the mob
@@ -142,28 +151,29 @@
return reagents.has_reagent(reagent, amount, needs_metabolizing)
//this updates all special effects: knockdown, druggy, stuttering, etc..
-/mob/living/proc/handle_status_effects()
+/mob/living/proc/handle_status_effects(delta_time, times_fired)
+ return
-/mob/living/proc/handle_traits()
+/mob/living/proc/handle_traits(delta_time, times_fired)
//Eyes
if(eye_blind) //blindness, heals slowly over time
if(HAS_TRAIT_FROM(src, TRAIT_BLIND, EYES_COVERED)) //covering your eyes heals blurry eyes faster
- adjust_blindness(-3)
+ adjust_blindness(-1.5 * delta_time)
else if(!stat && !(HAS_TRAIT(src, TRAIT_BLIND)))
- adjust_blindness(-1)
+ adjust_blindness(-0.5 * delta_time)
else if(eye_blurry) //blurry eyes heal slowly
- adjust_blurriness(-1)
+ adjust_blurriness(-0.5 * delta_time)
/mob/living/proc/update_damage_hud()
return
-/mob/living/proc/handle_gravity()
+/mob/living/proc/handle_gravity(delta_time, times_fired)
var/gravity = mob_has_gravity()
update_gravity(gravity)
if(gravity > STANDARD_GRAVITY)
gravity_animate()
- handle_high_gravity(gravity)
+ handle_high_gravity(gravity, delta_time, times_fired)
/mob/living/proc/gravity_animate()
if(!get_filter("gravity"))
@@ -175,9 +185,11 @@
sleep(10)
animate(get_filter("gravity"), y = 0, time = 10)
-/mob/living/proc/handle_high_gravity(gravity)
- if(gravity >= GRAVITY_DAMAGE_TRESHOLD) //Aka gravity values of 3 or more
- var/grav_stregth = gravity - GRAVITY_DAMAGE_TRESHOLD
- adjustBruteLoss(min(grav_stregth,3))
+/mob/living/proc/handle_high_gravity(gravity, delta_time, times_fired)
+ if(gravity < GRAVITY_DAMAGE_THRESHOLD) //Aka gravity values of 3 or more
+ return
+
+ var/grav_strength = gravity - GRAVITY_DAMAGE_THRESHOLD
+ adjustBruteLoss(min(GRAVITY_DAMAGE_SCALING * grav_strength, GRAVITY_DAMAGE_MAXIMUM) * delta_time)
#undef BODYTEMP_DIVISOR
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index d1aa2d581fa..f18684f341a 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1015,7 +1015,7 @@
if(has_gravity == 1)
clear_alert("gravity")
else
- if(has_gravity >= GRAVITY_DAMAGE_TRESHOLD)
+ if(has_gravity >= GRAVITY_DAMAGE_THRESHOLD)
throw_alert("gravity", /atom/movable/screen/alert/veryhighgravity)
else
throw_alert("gravity", /atom/movable/screen/alert/highgravity)
@@ -1905,7 +1905,7 @@
// Trait removal if obese
if(HAS_TRAIT_FROM(src, TRAIT_FAT, OBESITY))
- if(overeatduration >= 100)
+ if(overeatduration >= (200 SECONDS))
to_chat(src, "Your transformation restores your body's natural fitness!")
REMOVE_TRAIT(src, TRAIT_FAT, OBESITY)
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index c39b8e775dc..559a7e24796 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -1,4 +1,4 @@
-/mob/living/silicon/ai/Life()
+/mob/living/silicon/ai/Life(delta_time = SSMOBS_DT, times_fired)
if (stat == DEAD)
return
else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist
@@ -6,7 +6,7 @@
update_gravity(mob_has_gravity())
- handle_status_effects()
+ handle_status_effects(delta_time, times_fired)
handle_traits()
@@ -29,16 +29,16 @@
to_chat(src, "Your backup battery's output drops below usable levels. It takes only a moment longer for your systems to fail, corrupted and unusable.")
adjustOxyLoss(200)
else
- battery --
+ battery--
else
// Gain Power
if (battery < 200)
- battery ++
+ battery++
if(!lacks_power())
var/area/home = get_area(src)
if(home.powered(AREA_USAGE_EQUIP))
- home.use_power(1000, AREA_USAGE_EQUIP)
+ home.use_power(500 * delta_time, AREA_USAGE_EQUIP)
if(aiRestorePowerRoutine >= POWER_RESTORATION_SEARCH_APC)
ai_restore_power()
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 34a8786b1ad..718c36019c6 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -163,11 +163,11 @@
aiPDA.ownjob = "pAI Messenger"
aiPDA.name = real_name + " (" + aiPDA.ownjob + ")"
-/mob/living/silicon/pai/proc/process_hack()
+/mob/living/silicon/pai/proc/process_hack(delta_time, times_fired)
if(hacking_cable && hacking_cable.machine && istype(hacking_cable.machine, /obj/machinery/door) && hacking_cable.machine == hackdoor && get_dist(src, hackdoor) <= 1)
- hackprogress = clamp(hackprogress + 4, 0, 100)
+ hackprogress = clamp(hackprogress + (2 * delta_time), 0, 100)
else
temp = "Door Jack: Connection to airlock has been lost. Hack aborted."
hackprogress = 0
@@ -293,7 +293,7 @@
. = ..()
. += "A personal AI in holochassis mode. Its master ID string seems to be [master]."
-/mob/living/silicon/pai/Life()
+/mob/living/silicon/pai/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(QDELETED(src) || stat == DEAD)
return
@@ -305,8 +305,8 @@
if(!QDELETED(card))
card.update_appearance()
else if(hacking)
- process_hack()
- silent = max(silent - 1, 0)
+ process_hack(delta_time, times_fired)
+ silent = max(silent - (0.5 * delta_time), 0)
/mob/living/silicon/pai/updatehealth()
if(status_flags & GODMODE)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 1934fe22c99..e7c7cc7f91a 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -1,25 +1,27 @@
-/mob/living/silicon/robot/Life()
+/mob/living/silicon/robot/Life(delta_time = SSMOBS_DT, times_fired)
if (src.notransform)
return
..()
handle_robot_hud_updates()
- handle_robot_cell()
+ handle_robot_cell(delta_time, times_fired)
-/mob/living/silicon/robot/proc/handle_robot_cell()
- if(stat != DEAD)
- if(low_power_mode)
- if(cell?.charge)
- low_power_mode = FALSE
- else if(stat == CONSCIOUS)
- use_power()
+/mob/living/silicon/robot/proc/handle_robot_cell(delta_time, times_fired)
+ if(stat == DEAD)
+ return
-/mob/living/silicon/robot/proc/use_power()
+ if(low_power_mode)
+ if(cell?.charge)
+ low_power_mode = FALSE
+ else if(stat == CONSCIOUS)
+ use_power(delta_time, times_fired)
+
+/mob/living/silicon/robot/proc/use_power(delta_time, times_fired)
if(cell?.charge)
if(cell.charge <= 100)
uneq_all()
- var/amt = clamp((lamp_enabled * lamp_intensity),1,cell.charge) //Lamp will use a max of 5 charge, depending on brightness of lamp. If lamp is off, borg systems consume 1 point of charge, or the rest of the cell if it's lower than that.
- cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
+ var/amt = clamp(lamp_enabled * lamp_intensity * delta_time, 0.5 * delta_time, cell.charge) //Lamp will use a max of 5 charge, depending on brightness of lamp. If lamp is off, borg systems consume 1 point of charge, or the rest of the cell if it's lower than that.
+ cell.use(amt) //Usage table: 0.5/second if off/lowest setting, 4 = 2/second, 6 = 4/second, 8 = 6/second, 10 = 8/second
else
uneq_all()
low_power_mode = TRUE
@@ -70,12 +72,12 @@
throw_alert("charge", /atom/movable/screen/alert/nocell)
//Robots on fire
-/mob/living/silicon/robot/handle_fire()
+/mob/living/silicon/robot/handle_fire(delta_time, times_fired)
. = ..()
if(.) //if the mob isn't on fire anymore
return
if(fire_stacks > 0)
- adjust_fire_stacks(-1)
+ adjust_fire_stacks(-0.5 * delta_time)
else
extinguish_mob()
return TRUE
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 44380030e07..ba1afd9709f 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -440,7 +440,7 @@
/mob/living/silicon/get_inactive_held_item()
return FALSE
-/mob/living/silicon/handle_high_gravity(gravity)
+/mob/living/silicon/handle_high_gravity(gravity, delta_time, times_fired)
return
/mob/living/silicon/rust_heretic_act()
diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm
index acb453d1c9f..4c431b1dbd5 100644
--- a/code/modules/mob/living/simple_animal/eldritch_demons.dm
+++ b/code/modules/mob/living/simple_animal/eldritch_demons.dm
@@ -327,13 +327,13 @@
. = ..()
playsound(src, 'sound/effects/footstep/rustystep1.ogg', 100, TRUE)
-/mob/living/simple_animal/hostile/eldritch/rust_spirit/Life()
+/mob/living/simple_animal/hostile/eldritch/rust_spirit/Life(delta_time = SSMOBS_DT, times_fired)
if(stat == DEAD)
return ..()
var/turf/T = get_turf(src)
if(istype(T,/turf/open/floor/plating/rust))
- adjustBruteLoss(-3, FALSE)
- adjustFireLoss(-3, FALSE)
+ adjustBruteLoss(-1.5 * delta_time, FALSE)
+ adjustFireLoss(-1.5 * delta_time, FALSE)
return ..()
/mob/living/simple_animal/hostile/eldritch/ash_spirit
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index b8d5b0c4ae1..822b81af410 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -18,7 +18,7 @@
mob_biotypes = MOB_ORGANIC|MOB_BEAST
minbodytemp = 200
maxbodytemp = 400
- unsuitable_atmos_damage = 1
+ unsuitable_atmos_damage = 0.5
animal_species = /mob/living/simple_animal/pet/cat
childtype = list(/mob/living/simple_animal/pet/cat/kitten)
butcher_results = list(/obj/item/food/meat/slab = 1, /obj/item/organ/ears/cat = 1, /obj/item/organ/tail/cat = 1, /obj/item/stack/sheet/animalhide/cat = 1)
@@ -32,7 +32,7 @@
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
///Limits how often cats can spam chasing mice.
- var/emote_cooldown = 0
+ COOLDOWN_DECLARE(emote_cooldown)
///Can this cat catch special mice?
var/inept_hunter = FALSE
gold_core_spawnable = FRIENDLY_SPAWN
@@ -126,7 +126,7 @@
Read_Memory()
. = ..()
-/mob/living/simple_animal/pet/cat/runtime/Life()
+/mob/living/simple_animal/pet/cat/runtime/Life(delta_time = SSMOBS_DT, times_fired)
if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP)
Deploy_The_Cats()
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
@@ -202,17 +202,17 @@
regenerate_icons()
-/mob/living/simple_animal/pet/cat/Life()
+/mob/living/simple_animal/pet/cat/Life(delta_time = SSMOBS_DT, times_fired)
if(!stat && !buckled && !client)
- if(prob(1))
+ if(DT_PROB(0.5, delta_time))
manual_emote(pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
set_resting(TRUE)
- else if (prob(1))
+ else if(DT_PROB(0.5, delta_time))
manual_emote(pick("sits down.", "crouches on its hind legs.", "looks alert."))
set_resting(TRUE)
icon_state = "[icon_living]_sit"
collar_type = "[initial(collar_type)]_sit"
- else if (prob(1))
+ else if(DT_PROB(0.5, delta_time))
if (resting)
manual_emote(pick("gets up and meows.", "walks around.", "stops resting."))
set_resting(FALSE)
@@ -224,10 +224,10 @@
if(!stat && !resting && !buckled)
for(var/mob/living/simple_animal/mouse/M in view(1,src))
if(istype(M, /mob/living/simple_animal/mouse/brown/tom) && inept_hunter)
- if (emote_cooldown < (world.time - 600))
+ if(COOLDOWN_FINISHED(src, emote_cooldown))
visible_message("[src] chases [M] around, to no avail!")
step(M, pick(GLOB.cardinals))
- emote_cooldown = world.time
+ COOLDOWN_START(src, emote_cooldown, 1 MINUTES)
break
if(!M.stat && Adjacent(M))
manual_emote("splats \the [M]!")
@@ -247,7 +247,7 @@
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
- walk_to(src,0)
+ walk_to(src, 0)
turns_since_scan = 0
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
movement_target = null
@@ -305,12 +305,12 @@
to_chat(src, "Your name is now \"new_name\"!")
name = new_name
-/mob/living/simple_animal/pet/cat/cak/Life()
+/mob/living/simple_animal/pet/cat/cak/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(stat)
return
if(health < maxHealth)
- adjustBruteLoss(-8) //Fast life regen
+ adjustBruteLoss(-4 * delta_time) //Fast life regen
for(var/obj/item/food/donut/D in range(1, src)) //Frosts nearby donuts!
if(!D.is_decorated)
D.decorate_donut()
diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm
index a83a8b1bb57..17109552a44 100644
--- a/code/modules/mob/living/simple_animal/friendly/crab.dm
+++ b/code/modules/mob/living/simple_animal/friendly/crab.dm
@@ -28,14 +28,14 @@
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
-/mob/living/simple_animal/crab/Life()
+/mob/living/simple_animal/crab/Life(delta_time = SSMOBS_DT, times_fired)
..()
//CRAB movement
if(!ckey && !stat)
if(isturf(loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
turns_since_move++
if(turns_since_move >= turns_per_move)
- var/east_vs_west = pick(4,8)
+ var/east_vs_west = pick(4, 8)
if(Process_Spacemove(east_vs_west))
Move(get_step(src,east_vs_west), east_vs_west)
turns_since_move = 0
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 0c38f56c5e0..3e3d43940f1 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -28,57 +28,60 @@
. = ..()
add_cell_sample()
-/mob/living/simple_animal/pet/dog/Life()
+/mob/living/simple_animal/pet/dog/Life(delta_time = SSMOBS_DT, times_fired)
..()
//Feeding, chasing food, FOOOOODDDD
- if(!stat && !resting && !buckled)
- turns_since_scan++
- if(turns_since_scan > 5)
- turns_since_scan = 0
- if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
- movement_target = null
- stop_automated_movement = FALSE
- if( !movement_target || !(movement_target.loc in oview(src, 3)) )
- movement_target = null
- stop_automated_movement = FALSE
- for(var/obj/item/potential_snack in oview(src,3))
- if(IS_EDIBLE(potential_snack) && (isturf(potential_snack.loc) || ishuman(potential_snack.loc)))
- movement_target = potential_snack
- break
- if(movement_target)
- stop_automated_movement = TRUE
- step_to(src,movement_target,1)
- sleep(3)
- step_to(src,movement_target,1)
- sleep(3)
- step_to(src,movement_target,1)
+ if(stat || resting || buckled)
+ return
- if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
- var/turf/T = get_turf(movement_target)
- if(!T)
- return
- if (T.x < src.x)
- setDir(WEST)
- else if (T.x > src.x)
- setDir(EAST)
- else if (T.y < src.y)
- setDir(SOUTH)
- else if (T.y > src.y)
- setDir(NORTH)
- else
- setDir(SOUTH)
+ turns_since_scan++
+ if(turns_since_scan > 5)
+ turns_since_scan = 0
+ if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc)))
+ movement_target = null
+ stop_automated_movement = FALSE
+ if(!movement_target || !(movement_target.loc in oview(src, 3)))
+ movement_target = null
+ stop_automated_movement = FALSE
+ for(var/obj/item/potential_snack in oview(src,3))
+ if(IS_EDIBLE(potential_snack) && (isturf(potential_snack.loc) || ishuman(potential_snack.loc)))
+ movement_target = potential_snack
+ break
- if(!Adjacent(movement_target)) //can't reach food through windows.
- return
+ if(movement_target)
+ stop_automated_movement = TRUE
+ step_to(src, movement_target, 1)
+ sleep(3)
+ step_to(src, movement_target, 1)
+ sleep(3)
+ step_to(src, movement_target, 1)
- if(isturf(movement_target.loc))
- movement_target.attack_animal(src)
- else if(ishuman(movement_target.loc) )
- if(prob(20))
- manual_emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
+ if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
+ var/turf/T = get_turf(movement_target)
+ if(!T)
+ return
+ if(T.x < src.x)
+ setDir(WEST)
+ else if (T.x > src.x)
+ setDir(EAST)
+ else if (T.y < src.y)
+ setDir(SOUTH)
+ else if (T.y > src.y)
+ setDir(NORTH)
+ else
+ setDir(SOUTH)
- if(prob(1))
+ if(!Adjacent(movement_target)) //can't reach food through windows.
+ return
+
+ if(isturf(movement_target.loc))
+ movement_target.attack_animal(src)
+ else if(ishuman(movement_target.loc))
+ if(DT_PROB(10, delta_time))
+ manual_emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
+
+ if(DT_PROB(0.5, delta_time))
manual_emote(pick("dances around.","chases its tail!"))
INVOKE_ASYNC(GLOBAL_PROC, .proc/dance_rotate, src)
@@ -448,7 +451,7 @@
desc = "At a ripe old age of [record_age], Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP
turns_per_move = 20
-/mob/living/simple_animal/pet/dog/corgi/ian/Life()
+/mob/living/simple_animal/pet/dog/corgi/ian/Life(delta_time = SSMOBS_DT, times_fired)
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory(FALSE)
memory_saved = TRUE
@@ -519,7 +522,7 @@
unique_pet = TRUE
held_state = "narsian"
-/mob/living/simple_animal/pet/dog/corgi/narsie/Life()
+/mob/living/simple_animal/pet/dog/corgi/narsie/Life(delta_time = SSMOBS_DT, times_fired)
..()
for(var/mob/living/simple_animal/pet/P in range(1, src))
if(P != src && !istype(P,/mob/living/simple_animal/pet/dog/corgi/narsie))
@@ -656,7 +659,6 @@
return
..()
-/mob/living/simple_animal/pet/dog/corgi/lisa/Life()
- ..()
-
+/mob/living/simple_animal/pet/dog/corgi/lisa/Life(delta_time = SSMOBS_DT, times_fired)
+ . = ..()
make_babies()
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 9429c8cde44..21e05bec577 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -46,26 +46,29 @@
udder = null
return ..()
-/mob/living/simple_animal/hostile/retaliate/goat/Life()
+/mob/living/simple_animal/hostile/retaliate/goat/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(.)
//chance to go crazy and start wacking stuff
- if(!enemies.len && prob(1))
+ if(!enemies.len && DT_PROB(0.5, delta_time))
Retaliate()
- if(enemies.len && prob(10))
+ if(enemies.len && DT_PROB(5, delta_time))
enemies = list()
LoseTarget()
src.visible_message("[src] calms down.")
- if(stat == CONSCIOUS)
- udder.generateMilk()
- eat_plants()
- if(!pulledby)
- for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
- var/step = get_step(src, direction)
- if(step)
- if(locate(/obj/structure/spacevine) in step || locate(/obj/structure/glowshroom) in step)
- Move(step, get_dir(src, step))
+ if(stat != CONSCIOUS)
+ return
+
+ udder.generateMilk()
+ eat_plants()
+ if(pulledby)
+ return
+
+ for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
+ var/step = get_step(src, direction)
+ if(step && ((locate(/obj/structure/spacevine) in step) || (locate(/obj/structure/glowshroom) in step)))
+ Move(step, get_dir(src, step))
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
..()
@@ -173,7 +176,7 @@
buckle_lying = 0
AddElement(/datum/element/ridable, /datum/component/riding/creature/cow)
-/mob/living/simple_animal/cow/Life()
+/mob/living/simple_animal/cow/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(stat == CONSCIOUS)
udder.generateMilk()
@@ -277,17 +280,17 @@
/mob/living/simple_animal/chick/add_cell_sample()
AddElement(/datum/element/swabable, CELL_LINE_TABLE_CHICKEN, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
-/mob/living/simple_animal/chick/Life()
+/mob/living/simple_animal/chick/Life(delta_time = SSMOBS_DT, times_fired)
. =..()
if(!.)
return
if(!stat && !ckey)
- amount_grown += rand(1,2)
+ amount_grown += rand(0.5 * delta_time, 1 * delta_time)
if(amount_grown >= 100)
new /mob/living/simple_animal/chicken(src.loc)
qdel(src)
-/mob/living/simple_animal/chick/holo/Life()
+/mob/living/simple_animal/chick/holo/Life(delta_time = SSMOBS_DT, times_fired)
..()
amount_grown = 0
@@ -366,16 +369,16 @@
else
..()
-/mob/living/simple_animal/chicken/Life()
+/mob/living/simple_animal/chicken/Life(delta_time = SSMOBS_DT, times_fired)
. =..()
if(!.)
return
- if((!stat && prob(3) && eggsleft > 0) && egg_type)
+ if((!stat && DT_PROB(1.5, delta_time) && eggsleft > 0) && egg_type)
visible_message("[src] [pick(layMessage)]")
eggsleft--
var/obj/item/E = new egg_type(get_turf(src))
- E.pixel_x = rand(-6,6)
- E.pixel_y = rand(-6,6)
+ E.pixel_x = rand(-6, 6)
+ E.pixel_y = rand(-6, 6)
if(eggsFertile)
if(chicken_count < MAX_CHICKENS && prob(25))
START_PROCESSING(SSobj, E)
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index fd6f1e52530..87f1dc68113 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
visible_message("Your new name [new_name] anchors itself in your mind.")
fully_replace_character_name(null, new_name)
-/mob/living/simple_animal/hostile/guardian/Life() //Dies if the summoner dies
+/mob/living/simple_animal/hostile/guardian/Life(delta_time = SSMOBS_DT, times_fired) //Dies if the summoner dies
. = ..()
update_health_hud() //we need to update all of our health displays to match our summoner and we can't practically give the summoner a hook to do it
med_hud_set_health()
diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm
index 6d22a0871e7..9292dfd5037 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm
@@ -21,7 +21,7 @@
. = ..()
stealthcooldown = 0
-/mob/living/simple_animal/hostile/guardian/assassin/Life()
+/mob/living/simple_animal/hostile/guardian/assassin/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
updatestealthalert()
if(loc == summoner && toggle)
diff --git a/code/modules/mob/living/simple_animal/guardian/types/charger.dm b/code/modules/mob/living/simple_animal/guardian/types/charger.dm
index 67ea439df01..55ef6644a99 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/charger.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/charger.dm
@@ -15,7 +15,7 @@
var/charging = 0
var/atom/movable/screen/alert/chargealert
-/mob/living/simple_animal/hostile/guardian/charger/Life()
+/mob/living/simple_animal/hostile/guardian/charger/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(ranged_cooldown <= world.time)
if(!chargealert)
diff --git a/code/modules/mob/living/simple_animal/guardian/types/fire.dm b/code/modules/mob/living/simple_animal/guardian/types/fire.dm
index 5108ceb7e02..78ebd90470b 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/fire.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/fire.dm
@@ -14,11 +14,11 @@
carp_fluff_string = "CARP CARP CARP! You caught one! OH GOD, EVERYTHING'S ON FIRE. Except you and the fish."
miner_fluff_string = "You encounter... Plasma, the bringer of fire."
-/mob/living/simple_animal/hostile/guardian/fire/Life()
+/mob/living/simple_animal/hostile/guardian/fire/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(summoner)
summoner.extinguish_mob()
- summoner.adjust_fire_stacks(-20)
+ summoner.adjust_fire_stacks(-10 * delta_time)
/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
. = ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm
index a8f7aa03b22..7090e92a068 100644
--- a/code/modules/mob/living/simple_animal/hostile/bear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bear.dm
@@ -147,11 +147,11 @@
/mob/living/simple_animal/hostile/bear/butter/add_cell_sample()
return //You cannot grow a real bear from butter.
-/mob/living/simple_animal/hostile/bear/butter/Life() //Heals butter bear really fast when he takes damage.
+/mob/living/simple_animal/hostile/bear/butter/Life(delta_time = SSMOBS_DT, times_fired) //Heals butter bear really fast when he takes damage.
if(stat)
return
if(health < maxHealth)
- heal_overall_damage(10) //Fast life regen, makes it hard for you to get eaten to death.
+ heal_overall_damage(5 * delta_time) //Fast life regen, makes it hard for you to get eaten to death.
/mob/living/simple_animal/hostile/bear/butter/attack_hand(mob/living/user, list/modifiers) //Borrowed code from Cak, feeds people if they hit you. More nutriment but less vitamin to represent BUTTER.
..()
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index 6cfff98ab3c..ec8188b3ee9 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -116,7 +116,7 @@
adjustBruteLoss(5)
qdel(tasty_plastic)
-/mob/living/simple_animal/hostile/carp/Life()
+/mob/living/simple_animal/hostile/carp/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(stat == CONSCIOUS)
chomp_plastic()
@@ -214,10 +214,10 @@
can_buckle = TRUE
buckle_lying = 0
-/mob/living/simple_animal/hostile/carp/megacarp/Life()
+/mob/living/simple_animal/hostile/carp/megacarp/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(regen_cooldown < world.time)
- heal_overall_damage(4)
+ heal_overall_damage(2 * delta_time)
/mob/living/simple_animal/hostile/carp/cayenne
name = "Cayenne"
diff --git a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
index b009b0bc3ba..df2cae20d27 100644
--- a/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
+++ b/code/modules/mob/living/simple_animal/hostile/cat_butcher.dm
@@ -23,7 +23,7 @@
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
loot = list(/obj/effect/mob_spawn/human/corpse/cat_butcher, /obj/item/circular_saw)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
faction = list("hostile")
check_friendly_fire = 1
status_flags = CANPUSH
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index f01d1dedc10..ad08822da2f 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -55,8 +55,8 @@
maxHealth = 80
health = 80
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
- unsuitable_cold_damage = 20
- unsuitable_heat_damage = 20
+ unsuitable_cold_damage = 10
+ unsuitable_heat_damage = 10
obj_damage = 30
melee_damage_lower = 20
melee_damage_upper = 25
diff --git a/code/modules/mob/living/simple_animal/hostile/goose.dm b/code/modules/mob/living/simple_animal/hostile/goose.dm
index d4daa999432..ceb0b120e01 100644
--- a/code/modules/mob/living/simple_animal/hostile/goose.dm
+++ b/code/modules/mob/living/simple_animal/hostile/goose.dm
@@ -156,11 +156,11 @@
else
addtimer(CALLBACK(src, .proc/suffocate), 300)
-/mob/living/simple_animal/hostile/retaliate/goose/Life()
+/mob/living/simple_animal/hostile/retaliate/goose/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(choking && !stat)
do_jitter_animation(50)
- if(prob(20))
+ if(DT_PROB(10, delta_time))
emote("gasp")
/mob/living/simple_animal/hostile/retaliate/goose/proc/suffocate()
diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
index 850c9b6f974..ae36d792ee0 100644
--- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm
+++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
@@ -1,4 +1,4 @@
-#define EGG_INCUBATION_TIME 120
+#define EGG_INCUBATION_TIME 4 MINUTES
/mob/living/simple_animal/hostile/headcrab
name = "headslug"
@@ -57,11 +57,11 @@
name = "changeling egg"
desc = "Twitching and disgusting."
var/datum/mind/origin
- var/time
+ var/time = 0
-/obj/item/organ/body_egg/changeling_egg/egg_process()
+/obj/item/organ/body_egg/changeling_egg/egg_process(delta_time, times_fired)
// Changeling eggs grow in dead people
- time++
+ time += delta_time
if(time >= EGG_INCUBATION_TIME)
Pop()
Remove(owner)
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 693751aaf37..7d4c265758a 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -76,7 +76,7 @@
targets_from = null
return ..()
-/mob/living/simple_animal/hostile/Life()
+/mob/living/simple_animal/hostile/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!.) //dead
walk(src, 0) //stops walking
diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm
index ea9216ef0d2..3d2bc4e9429 100644
--- a/code/modules/mob/living/simple_animal/hostile/illusion.dm
+++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm
@@ -23,7 +23,7 @@
deathmessage = "vanishes into thin air! It was a fake!"
-/mob/living/simple_animal/hostile/illusion/Life()
+/mob/living/simple_animal/hostile/illusion/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(world.time > life_span)
death()
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
index 59689523481..5ad18414c57 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
@@ -116,9 +116,9 @@
taste_description = "french cuisine"
taste_mult = 1.3
-/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(volume >= 10)
- M.adjustToxLoss(5, 0)
+ M.adjustToxLoss(5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
..()
/obj/effect/temp_visual/leaper_crush
@@ -172,7 +172,7 @@
if(!hopping)
Hop()
-/mob/living/simple_animal/hostile/jungle/leaper/Life()
+/mob/living/simple_animal/hostile/jungle/leaper/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
update_icons()
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm b/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm
index 841d24e8cf7..2f602a69792 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm
@@ -27,7 +27,7 @@
footstep_type = FOOTSTEP_MOB_CLAW
-/mob/living/simple_animal/hostile/jungle/mega_arachnid/Life()
+/mob/living/simple_animal/hostile/jungle/mega_arachnid/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(target && ranged_cooldown > world.time && iscarbon(target))
var/mob/living/carbon/C = target
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 f4d12c108cc..0542edef734 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -550,7 +550,7 @@ Difficulty: Hard
if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum)) // hallucinations should not be stopping bubblegum or eachother
return TRUE
-/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/Life()
+/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)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index c206452662a..f63cd43fa3b 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -380,7 +380,7 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/burst(turf/original, spread_speed)
hierophant_burst(src, original, burst_range, spread_speed)
-/mob/living/simple_animal/hostile/megafauna/hierophant/Life()
+/mob/living/simple_animal/hostile/megafauna/hierophant/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(. && spawned_beacon && !QDELETED(spawned_beacon) && !client)
if(target || loc == spawned_beacon.loc)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm
index 8e336ebd51c..a206ce0f857 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm
@@ -75,7 +75,7 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
step(R, ddir) //Step the swarmers, instead of spawning them there, incase the turf is solid
-/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/Life()
+/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(.)
var/createtype = GetUncappedAISwarmerType()
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
index 70610ad0540..c9260fa8871 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
@@ -115,7 +115,7 @@ Difficulty: Hard
if(3)
disorienting_scream()
-/mob/living/simple_animal/hostile/megafauna/wendigo/Life()
+/mob/living/simple_animal/hostile/megafauna/wendigo/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!.)
return
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index 32fe764df80..85ab7a0a9cc 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -116,10 +116,10 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
overlay_googly_eyes = FALSE
CopyObject(copy, creator, destroy_original)
-/mob/living/simple_animal/hostile/mimic/copy/Life()
+/mob/living/simple_animal/hostile/mimic/copy/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(idledamage && !target && !ckey) //Objects eventually revert to normal if no one is around to terrorize
- adjustBruteLoss(1)
+ adjustBruteLoss(0.5 * delta_time)
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
death()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
index 8cf0cc0e234..7cbff030d51 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
@@ -120,7 +120,7 @@
search_objects = 1
wanted_objects = list(/obj/item/pen/survival, /obj/item/stack/ore/diamond)
-/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/Life()
+/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(stat == CONSCIOUS)
consume_bait()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm
index bd68d9371d8..3a7ba71219a 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/goliath_broodmother.dm
@@ -97,7 +97,7 @@
if(CALL_CHILDREN)
call_children()
-/mob/living/simple_animal/hostile/asteroid/elite/broodmother/Life()
+/mob/living/simple_animal/hostile/asteroid/elite/broodmother/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!.) //Checks if they are dead as a rock.
return
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm
index 7ed0997f5b7..4e8ea8d0b16 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm
@@ -95,7 +95,7 @@
if(AOE_SQUARES)
aoe_squares(target)
-/mob/living/simple_animal/hostile/asteroid/elite/pandora/Life()
+/mob/living/simple_animal/hostile/asteroid/elite/pandora/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(health >= maxHealth * 0.5)
cooldown_time = 2 SECONDS
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm
index bcb8723df78..7c3439d8864 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/goliath.dm
@@ -39,7 +39,7 @@
footstep_type = FOOTSTEP_MOB_HEAVY
-/mob/living/simple_animal/hostile/asteroid/goliath/Life()
+/mob/living/simple_animal/hostile/asteroid/goliath/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
handle_preattack()
@@ -150,7 +150,7 @@
var/turf/last_location
var/tentacle_recheck_cooldown = 100
-/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life()
+/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!.) // dead
return
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
index b3e0cbdf8f1..63d92bbc0d9 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/gutlunch.dm
@@ -114,7 +114,7 @@
name = "guthen"
gender = FEMALE
-/mob/living/simple_animal/hostile/asteroid/gutlunch/guthen/Life()
+/mob/living/simple_animal/hostile/asteroid/gutlunch/guthen/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(udder.reagents.total_volume == udder.reagents.maximum_volume) //Only breed when we're full.
make_babies()
@@ -138,7 +138,7 @@
resize = 0.45
update_transform()
-/mob/living/simple_animal/hostile/asteroid/gutlunch/grublunch/Life()
+/mob/living/simple_animal/hostile/asteroid/gutlunch/grublunch/Life(delta_time = SSMOBS_DT, times_fired)
..()
growth++
if(growth > 50) //originally used a timer for this but was more problem that it's worth.
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm
index 8290617c0ac..4e2d30f2bd1 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/hivelord.dm
@@ -188,7 +188,7 @@
var/can_infest_dead = FALSE
-/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life()
+/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(stat == DEAD || !isturf(loc))
return
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice demon.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice demon.dm
index 109a82734c6..20bd36ee931 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice demon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice demon.dm
@@ -67,11 +67,11 @@
SLEEP_CHECK_DEATH(8)
return ..()
-/mob/living/simple_animal/hostile/asteroid/ice_demon/Life()
+/mob/living/simple_animal/hostile/asteroid/ice_demon/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!. || target)
return
- adjustHealth(-maxHealth*0.025)
+ adjustHealth(-0.0125 * maxHealth * delta_time)
/mob/living/simple_animal/hostile/asteroid/ice_demon/death(gibbed)
move_force = MOVE_FORCE_DEFAULT
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice whelp.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice whelp.dm
index 80f39f8eb3c..9f44062a709 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice whelp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/ice whelp.dm
@@ -44,11 +44,11 @@
var/list/burn_turfs = getline(src, T) - get_turf(src)
dragon_fire_line(src, burn_turfs)
-/mob/living/simple_animal/hostile/asteroid/ice_whelp/Life()
+/mob/living/simple_animal/hostile/asteroid/ice_whelp/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!. || target)
return
- adjustHealth(-maxHealth*0.025)
+ adjustHealth(-0.0125 * maxHealth * delta_time)
/mob/living/simple_animal/hostile/asteroid/ice_whelp/death(gibbed)
move_force = MOVE_FORCE_DEFAULT
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm
index d7ac6e0d3e7..80760c6c768 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm
@@ -45,11 +45,11 @@
aggressive_message_said = TRUE
rapid_melee = 2
-/mob/living/simple_animal/hostile/asteroid/polarbear/Life()
+/mob/living/simple_animal/hostile/asteroid/polarbear/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!. || target)
return
- adjustHealth(-maxHealth*0.025)
+ adjustHealth(-0.0125 * maxHealth * delta_time)
aggressive_message_said = FALSE
/mob/living/simple_animal/hostile/asteroid/polarbear/death(gibbed)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm
index 77fdf2824a6..d48c5736ab4 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm
@@ -52,9 +52,9 @@
retreat_message_said = TRUE
retreat_distance = 30
-/mob/living/simple_animal/hostile/asteroid/wolf/Life()
+/mob/living/simple_animal/hostile/asteroid/wolf/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!. || target)
return
- adjustHealth(-maxHealth*0.025)
+ adjustHealth(-0.0125 * maxHealth * delta_time)
retreat_message_said = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
index 514b9b57fbf..7fe0f5179eb 100644
--- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
@@ -47,10 +47,10 @@
else
. += "It looks like it's been roughed up."
-/mob/living/simple_animal/hostile/mushroom/Life()
+/mob/living/simple_animal/hostile/mushroom/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
- adjustBruteLoss(-2)
+ adjustBruteLoss(-1 * delta_time)
/mob/living/simple_animal/hostile/mushroom/Initialize()//Makes every shroom a little unique
melee_damage_lower += rand(3, 5)
diff --git a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm
index c69a5d94082..5917678e162 100644
--- a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm
+++ b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm
@@ -23,7 +23,7 @@
combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
faction = list(ROLE_DEATHSQUAD)
check_friendly_fire = TRUE
status_flags = CANPUSH
diff --git a/code/modules/mob/living/simple_animal/hostile/netherworld.dm b/code/modules/mob/living/simple_animal/hostile/netherworld.dm
index d07bb175952..63bfbdb7759 100644
--- a/code/modules/mob/living/simple_animal/hostile/netherworld.dm
+++ b/code/modules/mob/living/simple_animal/hostile/netherworld.dm
@@ -115,11 +115,11 @@
var/chosen_sound = pick(migo_sounds)
playsound(src, chosen_sound, 50, TRUE)
-/mob/living/simple_animal/hostile/netherworld/migo/Life()
+/mob/living/simple_animal/hostile/netherworld/migo/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(stat)
return
- if(prob(10))
+ if(DT_PROB(5, delta_time))
var/chosen_sound = pick(migo_sounds)
playsound(src, chosen_sound, 50, TRUE)
diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm
index dd13298ecc6..74f94f93303 100644
--- a/code/modules/mob/living/simple_animal/hostile/ooze.dm
+++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm
@@ -58,7 +58,7 @@
eat_atom(A)
///Handles nutrition gain/loss of mob and also makes it take damage if it's too low on nutrition, only happens for sentient mobs.
-/mob/living/simple_animal/hostile/ooze/Life()
+/mob/living/simple_animal/hostile/ooze/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(!mind && stat != DEAD)//no mind no change
@@ -69,7 +69,7 @@
//Eat a bit of all the reagents we have. Gaining nutrition for actual nutritional ones.
for(var/i in reagents.reagent_list)
var/datum/reagent/reagent = i
- var/consumption_amount = min(reagents.get_reagent_amount(reagent.type), ooze_metabolism_modifier * REAGENTS_METABOLISM)
+ var/consumption_amount = min(reagents.get_reagent_amount(reagent.type), ooze_metabolism_modifier * REAGENTS_METABOLISM * delta_time)
if(istype(reagent, /datum/reagent/consumable))
var/datum/reagent/consumable/consumable = reagent
nutrition_change += consumption_amount * consumable.nutriment_factor
@@ -77,7 +77,7 @@
adjust_ooze_nutrition(nutrition_change)
if(ooze_nutrition <= 0)
- adjustBruteLoss(0.5)
+ adjustBruteLoss(0.25 * delta_time)
///Returns whether or not the supplied movable atom is edible.
/mob/living/simple_animal/hostile/ooze/proc/check_edible(atom/movable/potential_food)
diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm
index c18567cc855..9a5b54afd02 100644
--- a/code/modules/mob/living/simple_animal/hostile/pirate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm
@@ -21,7 +21,7 @@
attack_sound = 'sound/weapons/punch1.ogg'
combat_mode = TRUE
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
speak_emote = list("yarrs")
loot = list(/obj/effect/mob_spawn/human/corpse/pirate,
/obj/item/melee/transforming/energy/sword/pirate)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
index 23b3283a881..6fd4e45a883 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
@@ -43,7 +43,7 @@
..()
playsound(loc, 'sound/items/bikehorn.ogg', 50, TRUE)
-/mob/living/simple_animal/hostile/retaliate/clown/Life()
+/mob/living/simple_animal/hostile/retaliate/clown/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(banana_time && banana_time < world.time)
var/turf/T = get_turf(src)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm
index dc721f10936..c97de727f92 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm
@@ -52,7 +52,7 @@
combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
status_flags = CANPUSH
search_objects = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm
index 589d508d50c..257542fa0e6 100644
--- a/code/modules/mob/living/simple_animal/hostile/russian.dm
+++ b/code/modules/mob/living/simple_animal/hostile/russian.dm
@@ -22,7 +22,7 @@
loot = list(/obj/effect/mob_spawn/human/corpse/russian,
/obj/item/kitchen/knife)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
faction = list("russian")
status_flags = CANPUSH
del_on_death = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm
index 5dc96fd65ee..3b97bfec436 100644
--- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm
+++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm
@@ -24,7 +24,7 @@
attack_verb_simple = "slash"
attack_sound = 'sound/hallucinations/growl1.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 10
+ unsuitable_atmos_damage = 5
robust_searching = 1
stat_attack = HARD_CRIT
faction = list("skeleton")
diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
index 8c32f679941..3140dba91d7 100644
--- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
@@ -98,9 +98,9 @@
color_selection()
-/mob/living/simple_animal/hostile/space_dragon/Life(mapload)
+/mob/living/simple_animal/hostile/space_dragon/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
- tiredness = max(tiredness - 1, 0)
+ tiredness = max(tiredness - (0.5 * delta_time), 0)
for(var/mob/living/consumed_mob in src)
if(consumed_mob.stat == DEAD)
continue
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 2abc62b78f1..c1ee0aed3d9 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -82,7 +82,7 @@
return
return ..()
-/mob/living/simple_animal/hostile/statue/Life()
+/mob/living/simple_animal/hostile/statue/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(!client && target) // If we have a target and we're AI controlled
var/mob/watching = can_be_seen()
diff --git a/code/modules/mob/living/simple_animal/hostile/stickman.dm b/code/modules/mob/living/simple_animal/hostile/stickman.dm
index 653cf5c27ce..655f2e3be23 100644
--- a/code/modules/mob/living/simple_animal/hostile/stickman.dm
+++ b/code/modules/mob/living/simple_animal/hostile/stickman.dm
@@ -24,7 +24,7 @@
attack_sound = 'sound/weapons/punch1.ogg'
combat_mode = TRUE
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
faction = list("hostile","stickman")
check_friendly_fire = 1
status_flags = CANPUSH
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index 785061cfc8a..c2c5355f91a 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -39,7 +39,7 @@
combat_mode = TRUE
loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier)
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
faction = list(ROLE_SYNDICATE)
check_friendly_fire = 1
status_flags = CANPUSH
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index ed000d910da..785605ed5fd 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -34,7 +34,7 @@
taunt_chance = 20
atmos_requirements = list("min_oxy" = 2, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 5
+ unsuitable_atmos_damage = 2.5
minbodytemp = 0
maxbodytemp = 1200
@@ -49,17 +49,19 @@
. = ..()
add_cell_sample()
-/mob/living/simple_animal/hostile/tree/Life()
+/mob/living/simple_animal/hostile/tree/Life(delta_time = SSMOBS_DT, times_fired)
..()
- if(is_tree && isopenturf(loc))
- var/turf/open/T = src.loc
- if(T.air && T.air.gases[/datum/gas/carbon_dioxide])
- var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES]
- if(co2 > 0)
- if(prob(25))
- var/amt = min(co2, 9)
- T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt
- T.atmos_spawn_air("o2=[amt]")
+ if(!is_tree || !isopenturf(loc))
+ return
+ var/turf/open/T = src.loc
+ if(!T.air || !T.air.gases[/datum/gas/carbon_dioxide])
+ return
+
+ var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES]
+ if(co2 > 0 && DT_PROB(13, delta_time))
+ var/amt = min(co2, 9)
+ T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt
+ T.atmos_spawn_air("o2=[amt]")
/mob/living/simple_animal/hostile/tree/AttackingTarget()
. = ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index e85bfef2b1f..b1f5e172f58 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -130,7 +130,7 @@
/// Whether or not this plant is ghost possessable
var/playable_plant = TRUE
-/mob/living/simple_animal/hostile/venus_human_trap/Life()
+/mob/living/simple_animal/hostile/venus_human_trap/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
pull_vines()
@@ -210,8 +210,8 @@
if(istype(B.target, /atom/movable))
var/atom/movable/AM = B.target
if(!AM.anchored)
- step(AM,get_dir(AM,src))
- if(get_dist(src,B.target) == 0)
+ step(AM, get_dir(AM, src))
+ if(get_dist(src, B.target) == 0)
qdel(B)
/**
diff --git a/code/modules/mob/living/simple_animal/hostile/wizard.dm b/code/modules/mob/living/simple_animal/hostile/wizard.dm
index 20ded1a4112..5219a70654a 100644
--- a/code/modules/mob/living/simple_animal/hostile/wizard.dm
+++ b/code/modules/mob/living/simple_animal/hostile/wizard.dm
@@ -19,7 +19,7 @@
attack_sound = 'sound/weapons/punch1.ogg'
combat_mode = TRUE
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
- unsuitable_atmos_damage = 15
+ unsuitable_atmos_damage = 7.5
faction = list(ROLE_WIZARD)
status_flags = CANPUSH
diff --git a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
index c2e567674a5..5b784580c5a 100644
--- a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
+++ b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
@@ -47,9 +47,9 @@
QDEL_NULL(E)
return ..()
-/mob/living/simple_animal/hostile/asteroid/fugu/Life()
+/mob/living/simple_animal/hostile/asteroid/fugu/Life(delta_time = SSMOBS_DT, times_fired)
if(!wumbo)
- inflate_cooldown = max((inflate_cooldown - 1), 0)
+ inflate_cooldown = max((inflate_cooldown - (0.5 * delta_time)), 0)
if(target && AIStatus == AI_ON)
E.Activate()
..()
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 2b9169b8906..d40ce093e68 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -367,7 +367,7 @@
/*
* AI - Not really intelligent, but I'm calling it AI anyway.
*/
-/mob/living/simple_animal/parrot/Life()
+/mob/living/simple_animal/parrot/Life(delta_time = SSMOBS_DT, times_fired)
..()
//Sprite update for when a parrot gets pulled
@@ -909,7 +909,7 @@
. = ..()
-/mob/living/simple_animal/parrot/poly/Life()
+/mob/living/simple_animal/parrot/poly/Life(delta_time = SSMOBS_DT, times_fired)
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory(FALSE)
memory_saved = TRUE
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 3a5648e8545..983a5678ecc 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -52,8 +52,8 @@
var/force_threshold = 0
///Maximum amount of stamina damage the mob can be inflicted with total
var/max_staminaloss = 200
- ///How much stamina the mob recovers per call of update_stamina
- var/stamina_recovery = 10
+ ///How much stamina the mob recovers per second
+ var/stamina_recovery = 5
///Minimal body temperature without receiving damage
var/minbodytemp = 250
@@ -71,7 +71,7 @@
///Leaving something at 0 means it's off - has no maximum.
var/list/atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
///This damage is taken when atmos doesn't fit all the requirements above.
- var/unsuitable_atmos_damage = 2
+ var/unsuitable_atmos_damage = 1
//Defaults to zero so Ian can still be cuddly. Moved up the tree to living! This allows us to bypass some hardcoded stuff.
melee_damage_lower = 0
@@ -208,10 +208,10 @@
if(!unsuitable_heat_damage)
unsuitable_heat_damage = unsuitable_atmos_damage
-/mob/living/simple_animal/Life()
+/mob/living/simple_animal/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
if(staminaloss > 0)
- adjustStaminaLoss(-stamina_recovery, FALSE, TRUE)
+ adjustStaminaLoss(-stamina_recovery * delta_time, FALSE, TRUE)
/mob/living/simple_animal/Destroy()
GLOB.simple_animals[AIStatus] -= src
@@ -274,7 +274,7 @@
set_stat(CONSCIOUS)
med_hud_set_status()
-/mob/living/simple_animal/handle_status_effects()
+/mob/living/simple_animal/handle_status_effects(delta_time, times_fired)
..()
if(stuttering)
stuttering = 0
@@ -385,27 +385,31 @@
if((areatemp < minbodytemp) || (areatemp > maxbodytemp))
. = FALSE
-/mob/living/simple_animal/handle_environment(datum/gas_mixture/environment)
+/mob/living/simple_animal/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
var/atom/A = loc
if(isturf(A))
var/areatemp = get_temperature(environment)
- if(abs(areatemp - bodytemperature) > 5)
- var/diff = areatemp - bodytemperature
- diff = diff / 5
- adjust_bodytemperature(diff)
+ var/temp_delta = areatemp - bodytemperature
+ if(abs(temp_delta) > 5)
+ if(temp_delta < 0)
+ if(!on_fire)
+ adjust_bodytemperature(clamp(temp_delta * delta_time / 10, temp_delta, 0))
+ else
+ adjust_bodytemperature(clamp(temp_delta * delta_time / 10, 0, temp_delta))
- if(!environment_air_is_safe())
- adjustHealth(unsuitable_atmos_damage)
+ if(!environment_air_is_safe() && unsuitable_atmos_damage)
+ adjustHealth(unsuitable_atmos_damage * delta_time)
if(unsuitable_atmos_damage > 0)
throw_alert("not_enough_oxy", /atom/movable/screen/alert/not_enough_oxy)
else
clear_alert("not_enough_oxy")
- handle_temperature_damage()
+ handle_temperature_damage(delta_time, times_fired)
-/mob/living/simple_animal/proc/handle_temperature_damage()
- if(bodytemperature < minbodytemp)
- adjustHealth(unsuitable_cold_damage)
+/mob/living/simple_animal/proc/handle_temperature_damage(delta_time, times_fired)
+ . = FALSE
+ if((bodytemperature < minbodytemp) && unsuitable_cold_damage)
+ adjustHealth(unsuitable_cold_damage * delta_time)
switch(unsuitable_cold_damage)
if(1 to 5)
throw_alert("temp", /atom/movable/screen/alert/cold, 1)
@@ -413,8 +417,10 @@
throw_alert("temp", /atom/movable/screen/alert/cold, 2)
if(10 to INFINITY)
throw_alert("temp", /atom/movable/screen/alert/cold, 3)
- else if(bodytemperature > maxbodytemp)
- adjustHealth(unsuitable_heat_damage)
+ . = TRUE
+
+ if((bodytemperature > maxbodytemp) && unsuitable_heat_damage)
+ adjustHealth(unsuitable_heat_damage * delta_time)
switch(unsuitable_heat_damage)
if(1 to 5)
throw_alert("temp", /atom/movable/screen/alert/hot, 1)
@@ -422,7 +428,9 @@
throw_alert("temp", /atom/movable/screen/alert/hot, 2)
if(10 to INFINITY)
throw_alert("temp", /atom/movable/screen/alert/hot, 3)
- else
+ . = TRUE
+
+ if(!.)
clear_alert("temp")
/mob/living/simple_animal/gib()
@@ -516,7 +524,7 @@
return FALSE
return TRUE
-/mob/living/simple_animal/handle_fire()
+/mob/living/simple_animal/handle_fire(delta_time, times_fired)
return TRUE
/mob/living/simple_animal/IgniteMob()
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 4aeba9b5cda..56c44976961 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -6,21 +6,26 @@
var/SStun = 0 // stun variable
-/mob/living/simple_animal/slime/Life()
+/mob/living/simple_animal/slime/Life(delta_time = SSMOBS_DT, times_fired)
if (notransform)
return
- if(..())
- if(buckled)
- handle_feeding()
- if(!stat) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech
- handle_nutrition()
- if(QDELETED(src)) // Stop if the slime split during handle_nutrition()
- return
- reagents.remove_all(0.5 * REAGENTS_METABOLISM * reagents.reagent_list.len) //Slimes are such snowflakes
- handle_targets()
- if (!ckey)
- handle_mood()
- handle_speech()
+ . = ..()
+ if(!.)
+ return
+
+ if(buckled)
+ handle_feeding(delta_time, times_fired)
+ if(stat) // Slimes in stasis don't lose nutrition, don't change mood and don't respond to speech
+ return
+ handle_nutrition(delta_time, times_fired)
+ if(QDELETED(src)) // Stop if the slime split during handle_nutrition()
+ return
+ reagents.remove_all(0.5 * REAGENTS_METABOLISM * reagents.reagent_list.len * delta_time) //Slimes are such snowflakes
+ handle_targets(delta_time, times_fired)
+ if(ckey)
+ return
+ handle_mood(delta_time, times_fired)
+ handle_speech(delta_time, times_fired)
// Unlike most of the simple animals, slimes support UNCONSCIOUS. This is an ugly hack.
@@ -109,18 +114,19 @@
AIproc = 0
-/mob/living/simple_animal/slime/handle_environment(datum/gas_mixture/environment)
+/mob/living/simple_animal/slime/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
var/loc_temp = get_temperature(environment)
var/divisor = 10 /// The divisor controls how fast body temperature changes, lower causes faster changes
- if(abs(loc_temp - bodytemperature) > 50) // If the difference is great, reduce the divisor for faster stabilization
+ var/temp_delta = loc_temp - bodytemperature
+ if(abs(temp_delta) > 50) // If the difference is great, reduce the divisor for faster stabilization
divisor = 5
- if(loc_temp < bodytemperature) // It is cold here
+ if(temp_delta < 0) // It is cold here
if(!on_fire) // Do not reduce body temp when on fire
- adjust_bodytemperature((loc_temp - bodytemperature) / divisor)
+ adjust_bodytemperature(clamp((temp_delta / divisor) * delta_time, temp_delta, 0))
else // This is a hot place
- adjust_bodytemperature((loc_temp - bodytemperature) / divisor)
+ adjust_bodytemperature(clamp((temp_delta / divisor) * delta_time, 0, temp_delta))
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
if(bodytemperature <= (T0C - 40)) // stun temperature
@@ -130,9 +136,9 @@
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
- adjustBruteLoss(200)
+ adjustBruteLoss(100 * delta_time)
else
- adjustBruteLoss(round(sqrt(bodytemperature)) * 2)
+ adjustBruteLoss(round(sqrt(bodytemperature)) * delta_time)
else
REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, SLIME_COLD)
@@ -159,12 +165,12 @@
updatehealth()
-/mob/living/simple_animal/slime/handle_status_effects()
+/mob/living/simple_animal/slime/handle_status_effects(delta_time, times_fired)
..()
- if(prob(30) && !stat)
- adjustBruteLoss(-1)
+ if(!stat && DT_PROB(16, delta_time))
+ adjustBruteLoss(-0.5 * delta_time)
-/mob/living/simple_animal/slime/proc/handle_feeding()
+/mob/living/simple_animal/slime/proc/handle_feeding(delta_time, times_fired)
if(!ismob(buckled))
return
var/mob/M = buckled
@@ -176,7 +182,7 @@
if(!client)
if(!rabid && !attacked)
if(M.LAssailant && M.LAssailant != M)
- if(prob(50))
+ if(DT_PROB(30, delta_time))
if(!(M.LAssailant in Friends))
Friends[M.LAssailant] = 1
else
@@ -185,7 +191,7 @@
to_chat(src, "This subject does not have a strong enough life energy anymore...")
if(M.client && ishuman(M))
- if(prob(85))
+ if(DT_PROB(61, delta_time))
rabid = 1 //we go rabid after finishing to feed on a human with a client.
Feedstop()
@@ -193,10 +199,10 @@
if(iscarbon(M))
var/mob/living/carbon/C = M
- C.adjustCloneLoss(rand(2,4))
- C.adjustToxLoss(rand(1,2))
+ C.adjustCloneLoss(rand(2, 4) * 0.5 * delta_time)
+ C.adjustToxLoss(rand(1, 2) * 0.5 * delta_time)
- if(prob(10) && C.client)
+ if(DT_PROB(5, delta_time) && C.client)
to_chat(C, "[pick("You can feel your body becoming weak!", \
"You feel like you're about to die!", \
"You feel every part of your body screaming in agony!", \
@@ -209,8 +215,8 @@
var/mob/living/simple_animal/SA = M
var/totaldamage = 0 //total damage done to this unfortunate animal
- totaldamage += SA.adjustCloneLoss(rand(2,4))
- totaldamage += SA.adjustToxLoss(rand(1,2))
+ totaldamage += SA.adjustCloneLoss(rand(2, 4) * 0.5 * delta_time)
+ totaldamage += SA.adjustToxLoss(rand(1, 2) * 0.5 * delta_time)
if(totaldamage <= 0) //if we did no(or negative!) damage to it, stop
Feedstop(0, 0)
@@ -220,27 +226,27 @@
Feedstop(0, 0)
return
- add_nutrition((rand(7, 15) * CONFIG_GET(number/damage_multiplier)))
+ add_nutrition((rand(7, 15) * 0.5 * delta_time * CONFIG_GET(number/damage_multiplier)))
//Heal yourself.
- adjustBruteLoss(-3)
+ adjustBruteLoss(-1.5 * delta_time)
-/mob/living/simple_animal/slime/proc/handle_nutrition()
+/mob/living/simple_animal/slime/proc/handle_nutrition(delta_time, times_fired)
if(docile) //God as my witness, I will never go hungry again
set_nutrition(700) //fuck you for using the base nutrition var
return
- if(prob(15))
- adjust_nutrition(-(1 + is_adult))
+ if(DT_PROB(7.5, delta_time))
+ adjust_nutrition(-0.5 * (1 + is_adult) * delta_time)
if(nutrition <= 0)
set_nutrition(0)
- if(prob(75))
+ if(DT_PROB(50, delta_time))
adjustBruteLoss(rand(0,5))
else if (nutrition >= get_grow_nutrition() && amount_grown < SLIME_EVOLUTION_THRESHOLD)
- adjust_nutrition(-20)
+ adjust_nutrition(-10 * delta_time)
amount_grown++
update_action_buttons_icon()
@@ -264,7 +270,7 @@
-/mob/living/simple_animal/slime/proc/handle_targets()
+/mob/living/simple_animal/slime/proc/handle_targets(delta_time, times_fired)
if(attacked > 50)
attacked = 50
@@ -274,10 +280,10 @@
if(Discipline > 0)
if(Discipline >= 5 && rabid)
- if(prob(60))
+ if(DT_PROB(37, delta_time))
rabid = 0
- if(prob(10))
+ if(DT_PROB(5, delta_time))
Discipline--
if(!client)
@@ -300,11 +306,11 @@
if (nutrition < get_starve_nutrition())
hungry = 2
- else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
+ else if (nutrition < get_grow_nutrition() && DT_PROB(13, delta_time) || nutrition < get_hunger_nutrition())
hungry = 1
if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
- if(Friends.len > 0 && prob(1))
+ if(Friends.len > 0 && DT_PROB(0.5, delta_time))
var/mob/nofriend = pick(Friends)
--Friends[nofriend]
@@ -343,7 +349,7 @@
Target = targets[1] // I am attacked and am fighting back or so hungry I don't even care
else
for(var/mob/living/carbon/C in targets)
- if(!Discipline && prob(5))
+ if(!Discipline && DT_PROB(2.5, delta_time))
if(ishuman(C) || isalienadult(C))
Target = C
break
@@ -353,26 +359,26 @@
break
if (Target)
- target_patience = rand(5,7)
+ target_patience = rand(5, 7)
if (is_adult)
target_patience += 3
if(!Target) // If we have no target, we are wandering or following orders
if (Leader)
if(holding_still)
- holding_still = max(holding_still - 1, 0)
+ holding_still = max(holding_still - (0.5 * delta_time), 0)
else if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && isturf(loc))
step_to(src, Leader)
else if(hungry)
if (holding_still)
- holding_still = max(holding_still - hungry, 0)
+ holding_still = max(holding_still - (0.5 * hungry * delta_time), 0)
else if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && isturf(loc) && prob(50))
step(src, pick(GLOB.cardinals))
else
if(holding_still)
- holding_still = max(holding_still - 1, 0)
+ holding_still = max(holding_still - (0.5 * delta_time), 0)
else if (docile && pulledby)
holding_still = 10
else if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && isturf(loc) && prob(33))
@@ -386,7 +392,7 @@
/mob/living/simple_animal/slime/handle_automated_speech()
return //slime random speech is currently handled in handle_speech()
-/mob/living/simple_animal/slime/proc/handle_mood()
+/mob/living/simple_animal/slime/proc/handle_mood(delta_time, times_fired)
var/newmood = ""
if (rabid || attacked)
newmood = "angry"
@@ -396,20 +402,20 @@
newmood = "mischievous"
if (!newmood)
- if (Discipline && prob(25))
+ if (Discipline && DT_PROB(13, delta_time))
newmood = "pout"
- else if (prob(1))
+ else if (DT_PROB(0.5, delta_time))
newmood = pick("sad", ":3", "pout")
if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
- if(prob(75))
+ if(DT_PROB(50, delta_time))
newmood = mood
if (newmood != mood) // This is so we don't redraw them every time
mood = newmood
regenerate_icons()
-/mob/living/simple_animal/slime/proc/handle_speech()
+/mob/living/simple_animal/slime/proc/handle_speech(delta_time, times_fired)
//Speech understanding starts here
var/to_say
if (speech_buffer.len > 0)
@@ -504,7 +510,7 @@
//Speech starts here
if (to_say)
say (to_say)
- else if(prob(1))
+ else if(DT_PROB(0.5, delta_time))
emote(pick("bounce","sway","light","vibrate","jiggle"))
else
var/t = 10
@@ -523,7 +529,7 @@
t += 10
if (nutrition < get_starve_nutrition())
t += 10
- if (prob(2) && prob(t))
+ if (DT_PROB(1, delta_time) && prob(t))
var/phrases = list()
if (Target)
phrases += "[Target]... look yummy..."
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 5ce06f4bc94..757543d0ac3 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -281,8 +281,8 @@
return FALSE
-/mob/proc/reagent_check(datum/reagent/R) // utilized in the species code
- return 1
+/mob/proc/reagent_check(datum/reagent/R, delta_time, times_fired) // utilized in the species code
+ return TRUE
/**
diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm
index de63423a47e..260baae15bf 100644
--- a/code/modules/reagents/chemistry/holder.dm
+++ b/code/modules/reagents/chemistry/holder.dm
@@ -591,7 +591,7 @@
* * can_overdose - Allows overdosing
* * liverless - Stops reagents that aren't set as [/datum/reagent/var/self_consuming] from metabolizing
*/
-/datum/reagents/proc/metabolize(mob/living/carbon/owner, can_overdose = FALSE, liverless = FALSE)
+/datum/reagents/proc/metabolize(mob/living/carbon/owner, delta_time, times_fired, can_overdose = FALSE, liverless = FALSE)
var/list/cached_reagents = reagent_list
if(owner)
expose_temperature(owner.bodytemperature, 0.25)
@@ -602,6 +602,7 @@
if(!owner)
owner = reagent.holder.my_atom
+
//SKYRAT EDIT ADDITION BEGIN - CUSTOMIZATION
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
@@ -625,11 +626,9 @@
reagent.holder.remove_reagent(reagent.type, reagent.metabolization_rate)
continue
//SKYRAT EDIT ADDITION END
- if(!owner)
- owner = reagent.holder.my_atom
if(owner && reagent)
- if(owner.reagent_check(reagent) != TRUE)
+ if(owner.reagent_check(reagent, delta_time, times_fired) != TRUE)
if(liverless && !reagent.self_consuming) //need to be metabolized
continue
if(!reagent.metabolizing)
@@ -645,9 +644,9 @@
owner.mind?.add_addiction_points(addiction, reagent.addiction_types[addiction] * REAGENTS_METABOLISM)
if(reagent.overdosed)
- need_mob_update += reagent.overdose_process(owner)
+ need_mob_update += reagent.overdose_process(owner, delta_time, times_fired)
- need_mob_update += reagent.on_mob_life(owner)
+ need_mob_update += reagent.on_mob_life(owner, delta_time, times_fired)
if(owner && need_mob_update) //some of the metabolized reagents had effects on the mob that requires some updates.
owner.updatehealth()
owner.update_stamina()
diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm
index be68ab98d2f..a2986c8042b 100644
--- a/code/modules/reagents/chemistry/reagents.dm
+++ b/code/modules/reagents/chemistry/reagents.dm
@@ -130,11 +130,11 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
return SEND_SIGNAL(src, COMSIG_REAGENT_EXPOSE_TURF, exposed_turf, reac_volume)
/// Called from [/datum/reagents/proc/metabolize]
-/datum/reagent/proc/on_mob_life(mob/living/carbon/M)
+/datum/reagent/proc/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
current_cycle++
if(length(reagent_removal_skip_list))
return
- holder.remove_reagent(type, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
+ holder.remove_reagent(type, metabolization_rate * M.metabolism_efficiency * delta_time) //By default it slowly disappears.
/*
Used to run functions before a reagent is transfered. Returning TRUE will block the transfer attempt.
@@ -194,7 +194,7 @@ Primarily used in reagents/reaction_agents
return
/// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects
-/datum/reagent/proc/overdose_process(mob/living/M)
+/datum/reagent/proc/overdose_process(mob/living/M, delta_time, times_fired)
return
/// Called when an overdose starts
diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
index 820482f6e36..fcc6566bb32 100644
--- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm
@@ -40,18 +40,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
addiction_types = list(/datum/addiction/alcohol = 0.05 * boozepwr)
return ..()
-/datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C)
+/datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER || boozepwr < 0)
var/booze_power = boozepwr
if(HAS_TRAIT(C, TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker
booze_power *= 0.7
if(HAS_TRAIT(C, TRAIT_LIGHT_DRINKER))
booze_power *= 2
- C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
+ C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE * REM * delta_time)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
if(boozepwr > 0)
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
if (istype(L))
- L.applyOrganDamage(((max(sqrt(volume) * (boozepwr ** ALCOHOL_EXPONENT) * L.alcohol_tolerance, 0))/150))
+ L.applyOrganDamage(((max(sqrt(volume) * (boozepwr ** ALCOHOL_EXPONENT) * L.alcohol_tolerance * delta_time, 0))/150))
return ..()
/datum/reagent/consumable/ethanol/expose_obj(obj/exposed_obj, reac_volume)
@@ -137,7 +137,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/beer/green/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/beer/green/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.color != color)
M.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
return ..()
@@ -157,14 +157,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
ph = 6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/carbon/M)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
- M.AdjustSleeping(-40)
+/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 * REM * delta_time), 0)
+ M.AdjustSleeping(-40 * REM * delta_time)
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
M.Jitter(5)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/ethanol/whiskey
name = "Whiskey"
@@ -199,8 +199,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/hal_amt = 4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/whiskey/candycorn/on_mob_life(mob/living/carbon/M)
- if(prob(10))
+/datum/reagent/consumable/ethanol/whiskey/candycorn/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(5, delta_time))
M.hallucination += hal_amt //conscious dreamers can be treasurers to their own currency
..()
@@ -218,10 +218,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/carbon/M)
- M.drowsyness = max(0,M.drowsyness-7)
- M.AdjustSleeping(-40)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness = max(M.drowsyness - (7 * REM * delta_time))
+ M.AdjustSleeping(-40 * REM * delta_time)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
M.Jitter(5)
return ..()
@@ -231,18 +231,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
M.Jitter(20)
M.Stun(15)
-/datum/reagent/consumable/ethanol/thirteenloko/overdose_process(mob/living/M)
- if(prob(7) && iscarbon(M))
+/datum/reagent/consumable/ethanol/thirteenloko/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(3.5, delta_time) && iscarbon(M))
var/obj/item/I = M.get_active_held_item()
if(I)
M.dropItemToGround(I)
to_chat(M, "Your hands jitter and you drop what you were holding!")
M.Jitter(10)
- if(prob(7))
+ if(DT_PROB(3.5, delta_time))
to_chat(M, "[pick("You have a really bad headache.", "Your eyes hurt.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]")
- if(prob(5) && iscarbon(M))
+ if(DT_PROB(2.5, delta_time) && iscarbon(M))
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if(M.is_blind())
if(istype(eyes))
@@ -256,12 +256,12 @@ All effects don't start immediately, but rather get worse over time; the rate is
eyes.applyOrganDamage(eyes.maxHealth)
M.emote("scream")
- if(prob(3) && iscarbon(M))
+ if(DT_PROB(1.5, delta_time) && iscarbon(M))
M.visible_message("[M] starts having a seizure!", "You have a seizure!")
M.Unconscious(100)
M.Jitter(350)
- if(prob(1) && iscarbon(M))
+ if(DT_PROB(0.5, delta_time) && iscarbon(M))
var/datum/disease/D = new /datum/disease/heart_failure
M.ForceContractDisease(D)
to_chat(M, "You're pretty sure you just felt your heart stop for a second there..")
@@ -280,8 +280,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
ph = 8.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/vodka/on_mob_life(mob/living/carbon/M)
- M.radiation = max(M.radiation-2,0)
+/datum/reagent/consumable/ethanol/vodka/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.radiation = max(M.radiation - (2 * REM * delta_time),0)
return ..()
/datum/reagent/consumable/ethanol/bilk
@@ -296,10 +296,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/bilk/on_mob_life(mob/living/carbon/M)
- if(M.getBruteLoss() && prob(10))
+/datum/reagent/consumable/ethanol/bilk/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(M.getBruteLoss() && DT_PROB(5, delta_time))
M.heal_bodypart_damage(brute = 1)
- . = 1
+ . = TRUE
return ..() || .
/datum/reagent/consumable/ethanol/threemileisland
@@ -315,8 +315,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
ph = 3.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/threemileisland/on_mob_life(mob/living/carbon/M)
- M.set_drugginess(50)
+/datum/reagent/consumable/ethanol/threemileisland/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.set_drugginess(50 * REM * delta_time)
return ..()
/datum/reagent/consumable/ethanol/gin
@@ -454,8 +454,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
shot_glass_icon_state = "shotglassgreen"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/absinthe/on_mob_life(mob/living/carbon/M)
- if(prob(10) && !HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
+/datum/reagent/consumable/ethanol/absinthe/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(5, delta_time) && !HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
M.hallucination += 4 //Reference to the urban myth
..()
@@ -471,10 +471,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
addiction_types = list(/datum/addiction/alcohol = 5, /datum/addiction/maintenance_drugs = 2)
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/hooch/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/hooch/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_GREYTIDE_METABOLISM))
- M.heal_bodypart_damage(brute = 1, burn = 1)
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
. = TRUE
return ..() || .
@@ -592,13 +592,13 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A classic mix of rum, cola, and lime. A favorite of revolutionaries everywhere!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev)) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries.
- M.adjustBruteLoss(-1, 0)
- M.adjustFireLoss(-1, 0)
- M.adjustToxLoss(-1, 0)
- M.adjustOxyLoss(-5, 0)
- . = 1
+ M.adjustBruteLoss(-1 * REM * delta_time, 0)
+ M.adjustFireLoss(-1 * REM * delta_time, 0)
+ M.adjustToxLoss(-1 * REM * delta_time, 0)
+ M.adjustOxyLoss(-5 * REM * delta_time, 0)
+ . = TRUE
return ..() || .
/datum/reagent/consumable/ethanol/whiskey_cola
@@ -662,11 +662,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/screwdrivercocktail/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/screwdrivercocktail/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(HAS_TRAIT(liver, TRAIT_ENGINEER_METABOLISM))
// Engineers lose radiation poisoning at a massive rate.
- M.radiation = max(M.radiation - 25, 0)
+ M.radiation = max(M.radiation - (25 * REM * delta_time), 0)
return ..()
/datum/reagent/consumable/ethanol/booger
@@ -692,9 +692,9 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Tomato juice, mixed with Vodka and a li'l bit of lime. Tastes like liquid murder."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C)
+/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
if(C.blood_volume < BLOOD_VOLUME_NORMAL)
- C.blood_volume = min(BLOOD_VOLUME_NORMAL, C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
+ C.blood_volume = min(C.blood_volume + (3 * REM * delta_time), BLOOD_VOLUME_NORMAL) //Bloody Mary quickly restores blood loss.
..()
/datum/reagent/consumable/ethanol/brave_bull
@@ -739,7 +739,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
light_holder = new(M)
light_holder.set_light(3, 0.7, "#FFCC00") //Tequila Sunrise makes you radiate dim light, like a sunrise!
-/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/tequila_sunrise/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(QDELETED(light_holder))
holder.del_reagent(type) //If we lost our light object somehow, remove the reagent
else if(light_holder.loc != M)
@@ -763,8 +763,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
shot_glass_icon_state = "toxinsspecialglass"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/toxins_special/on_mob_life(mob/living/M)
- M.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal() + 20) //310.15 is the normal bodytemp.
+/datum/reagent/consumable/ethanol/toxins_special/on_mob_life(mob/living/M, delta_time, times_fired)
+ M.adjust_bodytemperature(15 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal() + 20) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/beepsky_smash
@@ -773,7 +773,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
color = "#664300" // rgb: 102, 67, 0
boozepwr = 60 //THE FIST OF THE LAW IS STRONG AND HARD
quality = DRINK_GOOD
- metabolization_rate = 0.5
+ metabolization_rate = 1.25 * REAGENTS_METABOLISM
taste_description = "JUSTICE"
glass_icon_state = "beepskysmashglass"
glass_name = "Beepsky Smash"
@@ -793,18 +793,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
M.gain_trauma(B, TRAUMA_RESILIENCE_ABSOLUTE)
..()
-/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.Jitter(2)
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
// if you don't have a liver, or your liver isn't an officer's liver
if(!liver || !HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
- M.adjustStaminaLoss(-10, 0)
- if(prob(20))
+ M.adjustStaminaLoss(-10 * REM * delta_time, 0)
+ if(DT_PROB(10, delta_time))
new /datum/hallucination/items_other(M)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
new /datum/hallucination/stray_bullet(M)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_end_metabolize(mob/living/carbon/M)
if(B)
@@ -850,10 +850,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
boozepwr = 50 // will still smash but not as much.
dorf_mode = TRUE
-/datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(dorf_mode)
- M.adjustBruteLoss(-2)
- M.adjustFireLoss(-2)
+ M.adjustBruteLoss(-2 * REM * delta_time)
+ M.adjustFireLoss(-2 * REM * delta_time)
return ..()
/datum/reagent/consumable/ethanol/longislandicedtea
@@ -959,8 +959,8 @@ 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/manhattan_proj/on_mob_life(mob/living/carbon/M)
- M.set_drugginess(30)
+/datum/reagent/consumable/ethanol/manhattan_proj/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.set_drugginess(30 * REM * delta_time)
return ..()
/datum/reagent/consumable/ethanol/whiskeysoda
@@ -987,8 +987,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "The ultimate refreshment."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/antifreeze/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(20 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal() + 20) //310.15 is the normal bodytemp.
+/datum/reagent/consumable/ethanol/antifreeze/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_bodytemperature(20 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal() + 20) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/barefoot
@@ -1003,12 +1003,12 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Barefoot and pregnant."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/barefoot/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/barefoot/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(ishuman(M)) //Barefoot causes the imbiber to quickly regenerate brute trauma if they're not wearing shoes.
var/mob/living/carbon/human/H = M
if(!H.shoes)
- H.adjustBruteLoss(-3, 0)
- . = 1
+ H.adjustBruteLoss(-3 * REM * delta_time, 0)
+ . = TRUE
return ..() || .
/datum/reagent/consumable/ethanol/snowwhite
@@ -1109,8 +1109,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A spicy mix of Vodka and Spice. Very hot."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/sbiten/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(50 * TEMPERATURE_DAMAGE_COEFFICIENT, 0 ,BODYTEMP_HEAT_DAMAGE_LIMIT) //310.15 is the normal bodytemp.
+/datum/reagent/consumable/ethanol/sbiten/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_bodytemperature(50 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, BODYTEMP_HEAT_DAMAGE_LIMIT) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/red_mead
@@ -1149,8 +1149,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A beer so frosty, the air around it freezes."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/iced_beer/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(-20 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C) //310.15 is the normal bodytemp.
+/datum/reagent/consumable/ethanol/iced_beer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_bodytemperature(-20 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, T0C) //310.15 is the normal bodytemp.
return ..()
/datum/reagent/consumable/ethanol/grog
@@ -1237,11 +1237,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A stingy drink."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/changelingsting/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/changelingsting/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.mind) //Changeling Sting assists in the recharging of changeling chemicals.
var/datum/antagonist/changeling/changeling = M.mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
- changeling.chem_charges += metabolization_rate
+ changeling.chem_charges += metabolization_rate * REM * delta_time
changeling.chem_charges = clamp(changeling.chem_charges, 0, changeling.chem_storage)
return ..()
@@ -1269,8 +1269,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A syndicate bomb."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/syndicatebomb/on_mob_life(mob/living/carbon/M)
- if(prob(5))
+/datum/reagent/consumable/ethanol/syndicatebomb/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(2.5, delta_time))
playsound(get_turf(M), 'sound/effects/explosionfar.ogg', 100, TRUE)
return ..()
@@ -1324,17 +1324,17 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A drink from Clown Heaven."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/bananahonk/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/bananahonk/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if((liver && HAS_TRAIT(liver, TRAIT_COMEDY_METABOLISM)) || ismonkey(M))
- M.heal_bodypart_damage(brute = 1, burn = 1)
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
. = TRUE
return ..() || .
/datum/reagent/consumable/ethanol/silencer
name = "Silencer"
description = "A drink from Mime Heaven."
- nutriment_factor = 1 * REAGENTS_METABOLISM
+ nutriment_factor = 2 * REAGENTS_METABOLISM
color = "#664300" // rgb: 102, 67, 0
boozepwr = 59 //Proof that clowns are better than mimes right here
quality = DRINK_GOOD
@@ -1344,11 +1344,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A drink from Mime Heaven."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/silencer/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/silencer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(ishuman(M) && M.mind?.miming)
M.silent = max(M.silent, MIMEDRINK_SILENCE_DURATION)
- M.heal_bodypart_damage(1,1)
- . = 1
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
+ . = TRUE
return ..() || .
/datum/reagent/consumable/ethanol/drunkenblumpkin
@@ -1402,7 +1402,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/fetching_fizz/on_mob_life(mob/living/carbon/M)
+/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))
return ..()
@@ -1421,14 +1421,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Aromatic beverage served piping hot. According to folk tales it can almost wake the dead."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/hearty_punch/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/hearty_punch/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.health <= 0)
- M.adjustBruteLoss(-3, 0)
- M.adjustFireLoss(-3, 0)
- M.adjustCloneLoss(-5, 0)
- M.adjustOxyLoss(-4, 0)
- M.adjustToxLoss(-3, 0)
- . = 1
+ M.adjustBruteLoss(-3 * REM * delta_time, 0)
+ M.adjustFireLoss(-3 * REM * delta_time, 0)
+ M.adjustCloneLoss(-5 * REM * delta_time, 0)
+ M.adjustOxyLoss(-4 * REM * delta_time, 0)
+ M.adjustToxLoss(-3 * REM * delta_time, 0)
+ . = TRUE
return ..() || .
/datum/reagent/consumable/ethanol/bacchus_blessing //An EXTREMELY powerful drink. Smashed in seconds, dead in minutes.
@@ -1456,22 +1456,22 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/atomicbomb/on_mob_life(mob/living/carbon/M)
- M.set_drugginess(50)
+/datum/reagent/consumable/ethanol/atomicbomb/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.set_drugginess(50 * REM * delta_time)
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
- M.set_confusion(max(M.get_confusion()+2,0))
- M.Dizzy(10)
+ M.set_confusion(max(M.get_confusion() + (2 * REM * delta_time),0))
+ M.Dizzy(10 * REM * delta_time)
if (!M.slurring)
- M.slurring = 1
- M.slurring += 3
+ M.slurring = 1 * REM * delta_time
+ M.slurring += 3 * REM * delta_time
switch(current_cycle)
if(51 to 200)
- M.Sleeping(100)
- . = 1
+ M.Sleeping(100 * REM * delta_time)
+ . = TRUE
if(201 to INFINITY)
- M.AdjustSleeping(40)
- M.adjustToxLoss(2, 0)
- . = 1
+ M.AdjustSleeping(40 * REM * delta_time)
+ M.adjustToxLoss(2 * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/consumable/ethanol/gargle_blaster
@@ -1486,21 +1486,21 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Like having your brain smashed out by a slice of lemon wrapped around a large gold brick."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/gargle_blaster/on_mob_life(mob/living/carbon/M)
- M.dizziness +=1.5
+/datum/reagent/consumable/ethanol/gargle_blaster/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness += 1.5 * REM * delta_time
switch(current_cycle)
if(15 to 45)
if(!M.slurring)
- M.slurring = 1
- M.slurring += 3
+ M.slurring = 1 * REM * delta_time
+ M.slurring += 3 * REM * delta_time
if(45 to 55)
- if(prob(50))
- M.set_confusion(max(M.get_confusion()+3,0))
+ if(DT_PROB(30, delta_time))
+ M.set_confusion(max(M.get_confusion() + 3, 0))
if(55 to 200)
- M.set_drugginess(55)
+ M.set_drugginess(55 * REM * delta_time)
if(200 to INFINITY)
- M.adjustToxLoss(2, 0)
- . = 1
+ M.adjustToxLoss(2 * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/consumable/ethanol/neurotoxin
@@ -1519,27 +1519,27 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/neurotoxin/proc/pickt()
return (pick(TRAIT_PARALYSIS_L_ARM,TRAIT_PARALYSIS_R_ARM,TRAIT_PARALYSIS_R_LEG,TRAIT_PARALYSIS_L_LEG))
-/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/M)
- M.set_drugginess(50)
- M.dizziness +=2
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1*REM, 150)
- if(prob(20))
+/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.set_drugginess(50 * REM * delta_time)
+ M.dizziness += 2 * REM * delta_time
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM * delta_time, 150)
+ if(DT_PROB(10, delta_time))
M.adjustStaminaLoss(10)
M.drop_all_held_items()
to_chat(M, "You cant feel your hands!")
if(current_cycle > 5)
- if(prob(20))
+ if(DT_PROB(10, delta_time))
var/t = pickt()
ADD_TRAIT(M, t, type)
M.adjustStaminaLoss(10)
if(current_cycle > 30)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM)
- if(current_cycle > 50 && prob(15))
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time)
+ if(current_cycle > 50 && DT_PROB(7.5, delta_time))
if(!M.undergoing_cardiac_arrest() && M.can_heartattack())
M.set_heartattack(TRUE)
if(M.stat == CONSCIOUS)
M.visible_message("[M] clutches at [M.p_their()] chest as if [M.p_their()] heart stopped!")
- . = 1
+ . = TRUE
..()
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_end_metabolize(mob/living/carbon/M)
@@ -1564,36 +1564,36 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A drink enjoyed by people during the 1960's."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/hippies_delight/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/hippies_delight/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if (!M.slurring)
- M.slurring = 1
+ M.slurring = 1 * REM * delta_time
switch(current_cycle)
if(1 to 5)
- M.Dizzy(10)
- M.set_drugginess(30)
- if(prob(10))
+ M.Dizzy(10 * REM * delta_time)
+ M.set_drugginess(30 * REM * delta_time)
+ if(DT_PROB(5, delta_time))
M.emote(pick("twitch","giggle"))
if(5 to 10)
- M.Jitter(20)
- M.Dizzy(20)
- M.set_drugginess(45)
- if(prob(20))
+ M.Jitter(20 * REM * delta_time)
+ M.Dizzy(20 * REM * delta_time)
+ M.set_drugginess(45 * REM * delta_time)
+ if(DT_PROB(10, delta_time))
M.emote(pick("twitch","giggle"))
if (10 to 200)
- M.Jitter(40)
- M.Dizzy(40)
- M.set_drugginess(60)
- if(prob(30))
+ M.Jitter(40 * REM * delta_time)
+ M.Dizzy(40 * REM * delta_time)
+ M.set_drugginess(60 * REM * delta_time)
+ if(DT_PROB(16, delta_time))
M.emote(pick("twitch","giggle"))
if(200 to INFINITY)
- M.Jitter(60)
- M.Dizzy(60)
- M.set_drugginess(75)
- if(prob(40))
+ M.Jitter(60 * REM * delta_time)
+ M.Dizzy(60 * REM * delta_time)
+ M.set_drugginess(75 * REM * delta_time)
+ if(DT_PROB(23, delta_time))
M.emote(pick("twitch","giggle"))
- if(prob(30))
+ if(DT_PROB(16, delta_time))
M.adjustToxLoss(2, 0)
- . = 1
+ . = TRUE
..()
/datum/reagent/consumable/ethanol/eggnog
@@ -1622,9 +1622,9 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A new hit cocktail inspired by THE ARM Breweries will have you shouting Fuu ma'jin in no time!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/narsour/on_mob_life(mob/living/carbon/M)
- M.cultslurring = min(M.cultslurring + 3, 3)
- M.stuttering = min(M.stuttering + 3, 3)
+/datum/reagent/consumable/ethanol/narsour/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.cultslurring = min(M.cultslurring + (3 * REM * delta_time), 3)
+ M.stuttering = min(M.stuttering + (3 * REM * delta_time), 3)
..()
/datum/reagent/consumable/ethanol/triple_sec
@@ -1683,15 +1683,13 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "An intimidating and lawful beverage dares you to violate the law and make its day. Still can't drink it on duty, though."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/quadruple_sec/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/quadruple_sec/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
//Securidrink in line with the Screwdriver for engineers or Nothing for mimes
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
- if(istype(get_area(M), /area/security)) // Skyrat edit , it checks for area now - Start
- M.heal_bodypart_damage(brute = 1, burn = 1)
- M.adjustBruteLoss(-2,0)
- . = 1
- return ..() // SKYRAT EDIT: End - This line and the above few have only indentation changes.
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
+ M.adjustBruteLoss(-2 * REM * delta_time, 0)
+ . = TRUE
return ..()
/datum/reagent/consumable/ethanol/quintuple_sec
@@ -1706,16 +1704,16 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Now you are become law, destroyer of clowns."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/quintuple_sec/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/quintuple_sec/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
//Securidrink in line with the Screwdriver for engineers or Nothing for mimes but STRONG..
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
- M.heal_bodypart_damage(brute = 2, burn = 2, stamina = 2)
- M.adjustBruteLoss(-5,0)
- M.adjustOxyLoss(-5,0)
- M.adjustFireLoss(-5,0)
- M.adjustToxLoss(-5,0)
- . = 1
+ M.heal_bodypart_damage(2 * REM * delta_time, 2 * REM * delta_time, 2 * REM * delta_time)
+ M.adjustBruteLoss(-5 * REM * delta_time, 0)
+ M.adjustOxyLoss(-5 * REM * delta_time, 0)
+ M.adjustFireLoss(-5 * REM * delta_time, 0)
+ M.adjustToxLoss(-5 * REM * delta_time, 0)
+ . = TRUE
return ..()
/datum/reagent/consumable/ethanol/grasshopper
@@ -1749,7 +1747,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
boozepwr = 30
quality = DRINK_FANTASTIC
taste_description = "hot herbal brew with a hint of fruit"
- metabolization_rate = 2 * REAGENTS_METABOLISM //0.8u per tick
+ metabolization_rate = 2 * REAGENTS_METABOLISM //0.4u per second
glass_icon_state = "bastion_bourbon"
glass_name = "Bastion Bourbon"
glass_desc = "If you're feeling low, count on the buttery flavor of our own bastion bourbon."
@@ -1771,13 +1769,13 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(!L.stat && heal_points == 20) //brought us out of softcrit
L.visible_message("[L] lurches to [L.p_their()] feet!", "Up and at 'em, kid.")
-/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_life(mob/living/L)
+/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_life(mob/living/L, delta_time, times_fired)
if(L.health > 0)
- L.adjustBruteLoss(-1)
- L.adjustFireLoss(-1)
- L.adjustToxLoss(-0.5)
- L.adjustOxyLoss(-3)
- L.adjustStaminaLoss(-5)
+ L.adjustBruteLoss(-1 * REM * delta_time)
+ L.adjustFireLoss(-1 * REM * delta_time)
+ L.adjustToxLoss(-0.5 * REM * delta_time)
+ L.adjustOxyLoss(-3 * REM * delta_time)
+ L.adjustStaminaLoss(-5 * REM * delta_time)
. = TRUE
..()
@@ -1794,8 +1792,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
shot_glass_icon_state = "shotglassgreen"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/squirt_cider/on_mob_life(mob/living/carbon/M)
- M.satiety += 5 //for context, vitamins give 30 satiety per tick
+/datum/reagent/consumable/ethanol/squirt_cider/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.satiety += 5 * REM * delta_time //for context, vitamins give 15 satiety per second
..()
. = TRUE
@@ -1824,8 +1822,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "If you can't mix a Sugar Rush, you can't tend bar."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/sugar_rush/on_mob_life(mob/living/carbon/M)
- M.satiety -= 10 //junky as hell! a whole glass will keep you from being able to eat junk food
+/datum/reagent/consumable/ethanol/sugar_rush/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.satiety -= 10 * REM * delta_time //junky as hell! a whole glass will keep you from being able to eat junk food
..()
. = TRUE
@@ -1867,9 +1865,9 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A boozy minty hot cocoa that warms your belly on a cold night."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/peppermint_patty/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/peppermint_patty/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.apply_status_effect(/datum/status_effect/throat_soothed)
- M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
+ M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
..()
/datum/reagent/consumable/ethanol/alexander
@@ -1894,7 +1892,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
to_chat(thehuman, "[theshield] appears polished, although you don't recall polishing it.")
return TRUE
-/datum/reagent/consumable/ethanol/alexander/on_mob_life(mob/living/L)
+/datum/reagent/consumable/ethanol/alexander/on_mob_life(mob/living/L, delta_time, times_fired)
..()
if(mighty_shield && !(mighty_shield in L.contents)) //If you had a shield and lose it, you lose the reagent as well. Otherwise this is just a normal drink.
holder.remove_reagent(type)
@@ -1941,18 +1939,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "The only drink that comes with a label reminding you of Nanotrasen's zero-tolerance promiscuity policy."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/between_the_sheets/on_mob_life(mob/living/L)
+/datum/reagent/consumable/ethanol/between_the_sheets/on_mob_life(mob/living/L, delta_time, times_fired)
..()
if(L.IsSleeping())
if(L.getBruteLoss() && L.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))
- L.adjustBruteLoss(-0.25)
+ L.adjustBruteLoss(-0.25 * REM * delta_time)
else
- L.adjustFireLoss(-0.25)
+ L.adjustFireLoss(-0.25 * REM * delta_time)
else if(L.getBruteLoss()) //If you have only one, it still heals but not as well.
- L.adjustBruteLoss(-0.2)
+ L.adjustBruteLoss(-0.2 * REM * delta_time)
else if(L.getFireLoss())
- L.adjustFireLoss(-0.2)
+ L.adjustFireLoss(-0.2 * REM * delta_time)
/datum/reagent/consumable/ethanol/kamikaze
name = "Kamikaze"
@@ -2000,10 +1998,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A glass of pure Fernet. Only an absolute madman would drink this alone." //Hi Kevum
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/fernet/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/fernet/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.nutrition <= NUTRITION_LEVEL_STARVING)
- M.adjustToxLoss(1*REM, 0)
- M.adjust_nutrition(-5)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ M.adjust_nutrition(-5 * REM * delta_time)
M.overeatduration = 0
return ..()
@@ -2019,10 +2017,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A sawed-off cola bottle filled with Fernet Cola. Nothing better after eating like a lardass."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/fernet_cola/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/fernet_cola/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.nutrition <= NUTRITION_LEVEL_STARVING)
- M.adjustToxLoss(0.5*REM, 0)
- M.adjust_nutrition(- 3)
+ M.adjustToxLoss(0.5 * REM * delta_time, 0)
+ M.adjust_nutrition(-3 * REM * delta_time)
M.overeatduration = 0
return ..()
@@ -2039,8 +2037,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A glass of Fanciulli. It's just Manhattan with Fernet."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/fanciulli/on_mob_life(mob/living/carbon/M)
- M.adjust_nutrition(-5)
+/datum/reagent/consumable/ethanol/fanciulli/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_nutrition(-5 * REM * delta_time)
M.overeatduration = 0
return ..()
@@ -2064,8 +2062,8 @@ 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/branca_menta/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(-20 * TEMPERATURE_DAMAGE_COEFFICIENT, T0C)
+/datum/reagent/consumable/ethanol/branca_menta/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_bodytemperature(-20 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, T0C)
return ..()
/datum/reagent/consumable/ethanol/branca_menta/on_mob_metabolize(mob/living/M)
@@ -2087,11 +2085,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A fizzy cocktail for those looking to start fresh."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/blank_paper/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/blank_paper/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(ishuman(M) && M.mind?.miming)
M.silent = max(M.silent, MIMEDRINK_SILENCE_DURATION)
- M.heal_bodypart_damage(1,1)
- . = 1
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
+ . = TRUE
return ..()
/datum/reagent/consumable/ethanol/fruit_wine
@@ -2221,12 +2219,12 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "The glass bubbles and froths with an almost magical intensity."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/wizz_fizz/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/wizz_fizz/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
//A healing drink similar to Quadruple Sec, Ling Stings, and Screwdrivers for the Wizznerds; the check is consistent with the changeling sting
if(M?.mind?.has_antag_datum(/datum/antagonist/wizard))
- M.heal_bodypart_damage(brute = 1, burn = 1, stamina = 1)
- M.adjustOxyLoss(-1,0)
- M.adjustToxLoss(-1,0)
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time, 1 * REM * delta_time)
+ M.adjustOxyLoss(-1 * REM * delta_time, 0)
+ M.adjustToxLoss(-1 * REM * delta_time, 0)
return ..()
/datum/reagent/consumable/ethanol/bug_spray
@@ -2241,11 +2239,12 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Your eyes begin to water as the sting of alcohol reaches them."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/bug_spray/on_mob_life(mob/living/carbon/M)
-//Bugs should not drink Bug spray.
+/datum/reagent/consumable/ethanol/bug_spray/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ //Bugs should not drink Bug spray.
if(ismoth(M) || isflyperson(M))
- M.adjustToxLoss(1,0)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
return ..()
+
/datum/reagent/consumable/ethanol/bug_spray/on_mob_metabolize(mob/living/carbon/M)
if(ismoth(M) || isflyperson(M))
@@ -2288,10 +2287,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "A turbulent cocktail for outlaw hoverbikers."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/turbo/on_mob_life(mob/living/carbon/M)
- if(prob(4))
+/datum/reagent/consumable/ethanol/turbo/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(2, delta_time))
to_chat(M, "[pick("You feel disregard for the rule of law.", "You feel pumped!", "Your head is pounding.", "Your thoughts are racing..")]")
- M.adjustStaminaLoss(-M.drunkenness * 0.25)
+ M.adjustStaminaLoss(-0.25 * M.drunkenness * REM * delta_time)
return ..()
/datum/reagent/consumable/ethanol/old_timer
@@ -2306,24 +2305,22 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "WARNING! May cause premature aging!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/old_timer/on_mob_life(mob/living/carbon/M)
- if(prob(20))
- if(ishuman(M))
- var/mob/living/carbon/human/N = M
- N.age += 1
- if(N.age > 70)
- N.facial_hair_color = "ccc"
- N.hair_color = "ccc"
- N.update_hair()
- if(N.age > 100)
- N.become_nearsighted(type)
- if(N.gender == MALE)
- N.facial_hairstyle = "Beard (Very Long)"
- N.update_hair()
+/datum/reagent/consumable/ethanol/old_timer/on_mob_life(mob/living/carbon/human/metabolizer, delta_time, times_fired)
+ if(DT_PROB(10, delta_time) && istype(metabolizer))
+ metabolizer.age += 1
+ if(metabolizer.age > 70)
+ metabolizer.facial_hair_color = "ccc"
+ metabolizer.hair_color = "ccc"
+ metabolizer.update_hair()
+ if(metabolizer.age > 100)
+ metabolizer.become_nearsighted(type)
+ if(metabolizer.gender == MALE)
+ metabolizer.facial_hairstyle = "Beard (Very Long)"
+ metabolizer.update_hair()
- if(N.age > 969) //Best not let people get older than this or i might incur G-ds wrath
- M.visible_message("[M] becomes older than any man should be.. and crumbles into dust!")
- M.dust(just_ash = FALSE, drop_items = TRUE, force = FALSE)
+ if(metabolizer.age > 969) //Best not let people get older than this or i might incur G-ds wrath
+ metabolizer.visible_message("[metabolizer] becomes older than any man should be.. and crumbles into dust!")
+ metabolizer.dust(just_ash = FALSE, drop_items = TRUE, force = FALSE)
return ..()
@@ -2371,11 +2368,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "boozy Catholicism in a glass."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/trappist/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/trappist/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.mind?.holy_role)
- M.adjustFireLoss(-2.5, 0)
- M.jitteriness = max(0, M.jitteriness-1)
- M.stuttering = max(0, M.stuttering-1)
+ M.adjustFireLoss(-2.5 * REM * delta_time, 0)
+ M.jitteriness = max(M.jitteriness - (1 * REM * delta_time), 0)
+ M.stuttering = max(M.stuttering - (1 * REM * delta_time), 0)
return ..()
/datum/reagent/consumable/ethanol/blazaam
@@ -2389,13 +2386,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "The glass seems to be sliding between realities. Doubles as a Berenstain remover."
var/stored_teleports = 0
-/datum/reagent/consumable/ethanol/blazaam/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/blazaam/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.drunkenness > 40)
if(stored_teleports)
do_teleport(M, get_turf(M), rand(1,3), channel = TELEPORT_CHANNEL_WORMHOLE)
stored_teleports--
- if(prob(10))
- stored_teleports += rand(2,6)
+
+ if(DT_PROB(5, delta_time))
+ stored_teleports += rand(2, 6)
if(prob(70))
M.vomit(vomit_type = VOMIT_PURPLE)
return ..()
@@ -2423,10 +2421,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Lavaland in a drink... mug... volcano... thing."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/mauna_loa/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/ethanol/mauna_loa/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
// Heats the user up while the reagent is in the body. Occasionally makes you burst into flames.
- M.adjust_bodytemperature(25 * TEMPERATURE_DAMAGE_COEFFICIENT)
- if (prob(5))
+ M.adjust_bodytemperature(25 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time)
+ if (DT_PROB(2.5, delta_time))
M.adjust_fire_stacks(1)
M.IgniteMob()
..()
@@ -2466,8 +2464,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Fermented prison wine made from fruit, sugar, and despair. Security loves to confiscate this, which is the only kind thing Security has ever done."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/ethanol/pruno/on_mob_life(mob/living/carbon/M)
- M.adjust_disgust(5)
+/datum/reagent/consumable/ethanol/pruno/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_disgust(5 * REM * delta_time)
..()
/datum/reagent/consumable/ethanol/ginger_amaretto
diff --git a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
index 3950126a33b..81d00ef20c7 100644
--- a/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
@@ -1,7 +1,7 @@
// Category 2 medicines are medicines that have an ill effect regardless of volume/OD to dissuade doping. Mostly used as emergency chemicals OR to convert damage (and heal a bit in the process). The type is used to prompt borgs that the medicine is harmful.
/datum/reagent/medicine/c2
harmful = TRUE
- metabolization_rate = 0.2
+ metabolization_rate = 0.5 * REAGENTS_METABOLISM
/******BRUTE******/
/*Suffix: -bital*/
@@ -17,7 +17,7 @@
var/reaping = FALSE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/helbital/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/c2/helbital/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = TRUE
var/death_is_coming = (M.getToxLoss() + M.getOxyLoss() + M.getFireLoss() + M.getBruteLoss())
var/thou_shall_heal = 0
@@ -25,16 +25,16 @@
switch(M.stat)
if(CONSCIOUS) //bad
thou_shall_heal = death_is_coming/50
- M.adjustOxyLoss(2, TRUE)
+ M.adjustOxyLoss(2 * REM * delta_time, TRUE)
if(SOFT_CRIT) //meh convert
thou_shall_heal = round(death_is_coming/47,0.1)
- M.adjustOxyLoss(1, TRUE)
+ M.adjustOxyLoss(1 * REM * delta_time, TRUE)
else //no convert
- thou_shall_heal = round(death_is_coming/45,0.1)
+ thou_shall_heal = round(death_is_coming/45, 0.1)
good_kind_of_healing = TRUE
- M.adjustBruteLoss(-thou_shall_heal, FALSE)
+ M.adjustBruteLoss(-thou_shall_heal * REM * delta_time, FALSE)
- if(good_kind_of_healing && !reaping && prob(0.0001)) //janken with the grim reaper!
+ 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))
@@ -67,7 +67,7 @@
..()
return
-/datum/reagent/medicine/c2/helbital/overdose_process(mob/living/carbon/M)
+/datum/reagent/medicine/c2/helbital/overdose_process(mob/living/carbon/M, delta_time, times_fired)
if(!helbent)
M.apply_necropolis_curse(CURSE_WASTING | CURSE_BLINDING)
helbent = TRUE
@@ -87,9 +87,9 @@
reagent_state = SOLID
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/libital/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.3*REM)
- M.adjustBruteLoss(-3*REM)
+/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 * delta_time)
..()
return TRUE
@@ -101,8 +101,8 @@
overdose_threshold = 20
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/probital/on_mob_life(mob/living/carbon/M)
- M.adjustBruteLoss(-2.25*REM, FALSE)
+/datum/reagent/medicine/c2/probital/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustBruteLoss(-2.25 * REM * delta_time, FALSE)
var/ooo_youaregettingsleepy = 3.5
switch(round(M.getStaminaLoss()))
if(10 to 40)
@@ -111,14 +111,14 @@
ooo_youaregettingsleepy = 2.5
if(61 to 200) //you really can only go to 120
ooo_youaregettingsleepy = 2
- M.adjustStaminaLoss(ooo_youaregettingsleepy*REM, FALSE)
+ M.adjustStaminaLoss(ooo_youaregettingsleepy * REM * delta_time, FALSE)
..()
. = TRUE
-/datum/reagent/medicine/c2/probital/overdose_process(mob/living/M)
- M.adjustStaminaLoss(3*REM, 0)
+/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.drowsyness++
+ M.drowsyness += 1 * REM * delta_time
if(M.getStaminaLoss() >= 100)
to_chat(M,"You feel more tired than you usually do, perhaps if you rest your eyes for a bit...")
M.adjustStaminaLoss(-100, TRUE)
@@ -146,9 +146,9 @@
var/spammer = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/lenturi/on_mob_life(mob/living/carbon/M)
- M.adjustFireLoss(-3 * REM)
- M.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.4 * REM)
+/datum/reagent/medicine/c2/lenturi/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustFireLoss(-3 * REM * delta_time)
+ M.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.4 * REM * delta_time)
..()
return TRUE
@@ -169,9 +169,9 @@
var/message_cd = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/aiuri/on_mob_life(mob/living/carbon/M)
- M.adjustFireLoss(-2*REM)
- M.adjustOrganLoss(ORGAN_SLOT_EYES,0.25*REM)
+/datum/reagent/medicine/c2/aiuri/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustFireLoss(-2 * REM * delta_time)
+ M.adjustOrganLoss(ORGAN_SLOT_EYES, 0.25 * REM * delta_time)
..()
return TRUE
@@ -184,17 +184,17 @@
reagent_weight = 0.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/hercuri/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/c2/hercuri/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.getFireLoss() > 50)
- M.adjustFireLoss(-2*REM, FALSE)
+ M.adjustFireLoss(-2 * REM * delta_time, FALSE)
else
- M.adjustFireLoss(-1.25*REM, FALSE)
- M.adjust_bodytemperature(rand(-25,-5) * (TEMPERATURE_DAMAGE_COEFFICIENT*REM), 50)
+ M.adjustFireLoss(-1.25 * REM * delta_time, FALSE)
+ M.adjust_bodytemperature(rand(-25,-5) * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
if(ishuman(M))
var/mob/living/carbon/human/humi = M
- humi.adjust_coretemperature(rand(-25,-5) * (TEMPERATURE_DAMAGE_COEFFICIENT*REM), 50)
- M.reagents?.chem_temp +=(-10*REM)
- M.adjust_fire_stacks(-1)
+ 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)
..()
. = TRUE
@@ -208,11 +208,11 @@
if(reac_volume >= metabolization_rate)
exposed_mob.extinguish_mob()
-/datum/reagent/medicine/c2/hercuri/overdose_process(mob/living/carbon/M)
- M.adjust_bodytemperature(-10 * TEMPERATURE_DAMAGE_COEFFICIENT*REM,50) //chilly chilly
+/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
- humi.adjust_coretemperature(-10 * TEMPERATURE_DAMAGE_COEFFICIENT*REM,50)
+ humi.adjust_coretemperature(-10 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
..()
@@ -228,19 +228,19 @@
overdose_threshold = 35 // at least 2 full syringes +some, this stuff is nasty if left in for long
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/convermol/on_mob_life(mob/living/carbon/human/M)
- var/oxycalc = 2.5*REM*current_cycle
+/datum/reagent/medicine/c2/convermol/on_mob_life(mob/living/carbon/human/M, 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, 0)
- M.adjustToxLoss(oxycalc/CONVERMOL_RATIO, 0)
- if(prob(current_cycle) && M.losebreath)
+ 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, 0)
+ M.adjustToxLoss(oxycalc * delta_time / CONVERMOL_RATIO, 0)
+ if(DT_PROB(current_cycle / 2, delta_time) && M.losebreath)
M.losebreath--
..()
return TRUE
-/datum/reagent/medicine/c2/convermol/overdose_process(mob/living/carbon/human/M)
- metabolization_rate += 1
+/datum/reagent/medicine/c2/convermol/overdose_process(mob/living/carbon/human/M, delta_time, times_fired)
+ metabolization_rate += 2.5 * REAGENTS_METABOLISM
..()
return TRUE
@@ -250,17 +250,18 @@
name = "Tirimol"
description = "An oxygen deprivation medication that causes fatigue. Prolonged exposure causes the patient to fall asleep once the medicine metabolizes."
color = "#FF6464"
- var/drowsycd = 0
+ /// A cooldown for spacing bursts of stamina damage
+ COOLDOWN_DECLARE(drowsycd)
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/tirimol/on_mob_life(mob/living/carbon/human/M)
- M.adjustOxyLoss(-3)
- M.adjustStaminaLoss(2)
- if(drowsycd && (world.time > drowsycd))
+/datum/reagent/medicine/c2/tirimol/on_mob_life(mob/living/carbon/human/M, delta_time, times_fired)
+ M.adjustOxyLoss(-3 * REM * delta_time)
+ M.adjustStaminaLoss(2 * REM * delta_time)
+ if(drowsycd && COOLDOWN_FINISHED(src, drowsycd))
M.drowsyness += 10
- drowsycd = world.time + (45 SECONDS)
+ COOLDOWN_START(src, drowsycd, 45 SECONDS)
else if(!drowsycd)
- drowsycd = world.time + (15 SECONDS)
+ COOLDOWN_START(src, drowsycd, 15 SECONDS)
..()
return TRUE
@@ -282,32 +283,31 @@
. = ..()
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)
+/datum/reagent/medicine/c2/seiver/on_mob_life(mob/living/carbon/human/M, 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
//you're hot
- var/toxcalc = min(round((chemtemp-1000)/175+5,0.1),5) //max 5 tox healing a tick
+ var/toxcalc = min(round(5 + ((chemtemp-1000)/175), 0.1), 5) * REM * delta_time //max 2.5 tox healing per second
if(toxcalc > 0)
- M.adjustToxLoss(toxcalc*-1)
+ M.adjustToxLoss(-toxcalc)
healypoints += toxcalc
//and you're cold
- var/radcalc = round((T0C-chemtemp)/6,0.1) //max ~45 rad loss unless you've hit below 0K. if so, wow.
+ 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)
//no cost percent healing if you are SUPER cold (on top of cost healing)
if(chemtemp < radbonustemp*0.1) //if you're super chilly, it takes off 25% of your current rads
- M.radiation = round(M.radiation * 0.75)
+ M.radiation = round(M.radiation * (0.75**(REM * delta_time)))
else if(chemtemp < radbonustemp)//else if you're under the chill-zone, it takes off 10% of your current rads
- M.radiation = round(M.radiation * 0.9)
+ M.radiation = round(M.radiation * (0.90**(REM * delta_time)))
M.radiation -= radcalc
- healypoints += (radcalc/5)
-
+ healypoints += (radcalc / 5)
//you're yes and... oh no!
- healypoints = round(healypoints,0.1)
- M.adjustOrganLoss(ORGAN_SLOT_HEART, healypoints/5)
+ healypoints = round(healypoints, 0.1)
+ M.adjustOrganLoss(ORGAN_SLOT_HEART, healypoints / 5)
..()
return TRUE
@@ -316,14 +316,15 @@
description = "A chem-purger that becomes more effective the more unique medicines present. Slightly heals toxicity but causes lung damage (mitigatable by unique medicines)."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/multiver/on_mob_life(mob/living/carbon/human/M)
+/datum/reagent/medicine/c2/multiver/on_mob_life(mob/living/carbon/human/M, 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)
var/datum/reagent/the_reagent = r
if(istype(the_reagent, /datum/reagent/medicine))
medibonus += 1
- M.adjustToxLoss(-0.5 * min(medibonus, 3)) //not great at healing but if you have nothing else it will work
- M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5) //kills at 40u
+
+ M.adjustToxLoss(-0.5 * min(medibonus, 3) * 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)
var/datum/reagent/the_reagent2 = r2
if(the_reagent2 == src)
@@ -331,7 +332,7 @@
var/amount2purge = 3
if(medibonus >= 3 && istype(the_reagent2, /datum/reagent/medicine)) //3 unique meds (2+multiver) will make it not purge medicines
continue
- M.reagents.remove_reagent(the_reagent2.type, amount2purge)
+ M.reagents.remove_reagent(the_reagent2.type, amount2purge * REM * delta_time)
..()
return TRUE
@@ -366,23 +367,23 @@
C.reagents.add_reagent(/datum/reagent/medicine/c2/musiver, conversion_amount)
..()
-/datum/reagent/medicine/c2/syriniver/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.8)
- M.adjustToxLoss(-1*REM, 0)
+/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)
if(issyrinormusc(R))
continue
- M.reagents.remove_reagent(R.type,0.4)
+ M.reagents.remove_reagent(R.type, 0.4 * REM * delta_time)
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/c2/syriniver/overdose_process(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5)
- M.adjust_disgust(3)
- M.reagents.add_reagent(/datum/reagent/medicine/c2/musiver, 0.225 * REM)
+/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)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/c2/musiver //MUScles
name = "Musiver"
@@ -394,15 +395,15 @@
var/datum/brain_trauma/mild/muscle_weakness/U
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/c2/musiver/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.1)
- M.adjustToxLoss(-1*REM, 0)
+/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, 0)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(issyrinormusc(R))
continue
- M.reagents.remove_reagent(R.type,0.2)
+ M.reagents.remove_reagent(R.type, 0.2 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/c2/musiver/overdose_start(mob/living/carbon/M)
U = new()
@@ -414,11 +415,11 @@
QDEL_NULL(U)
return ..()
-/datum/reagent/medicine/c2/musiver/overdose_process(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 1.5)
- M.adjust_disgust(3)
+/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)
..()
- . = 1
+ . = TRUE
#undef issyrinormusc
/******COMBOS******/
@@ -479,25 +480,24 @@
ADD_TRAIT(M, TRAIT_NOSOFTCRIT,type)
ADD_TRAIT(M, TRAIT_NOCRITDAMAGE,type)
-/datum/reagent/medicine/c2/penthrite/on_mob_life(mob/living/carbon/human/H)
+/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)
+ H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 0.25 * REM * delta_time)
if(H.health <= HEALTH_THRESHOLD_CRIT && H.health > (H.crit_threshold + HEALTH_THRESHOLD_FULLCRIT*2)) //we cannot save someone below our lowered crit threshold.
- H.adjustToxLoss(-2 * REM, 0)
- H.adjustBruteLoss(-2 * REM, 0)
- H.adjustFireLoss(-2 * REM, 0)
- H.adjustOxyLoss(-6 * REM, 0)
+ 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.losebreath = 0
- H.adjustOrganLoss(ORGAN_SLOT_HEART,max(1,volume/10)) // your heart is barely keeping up!
+ H.adjustOrganLoss(ORGAN_SLOT_HEART, max(volume/10, 1) * REM * delta_time) // your heart is barely keeping up!
- H.Jitter(rand(0,2))
- H.Dizzy(rand(0,2))
+ H.Jitter(rand(0, 2) * REM * delta_time)
+ H.Dizzy(rand(0, 2) * REM * delta_time)
-
- if(prob(33))
+ if(DT_PROB(18, delta_time))
to_chat(H,"Your body is trying to give up, but your heart is still beating!")
if(H.health <= (H.crit_threshold + HEALTH_THRESHOLD_FULLCRIT*2)) //certain death below this threshold
@@ -515,10 +515,10 @@
REMOVE_TRAIT(M, TRAIT_NOCRITDAMAGE,type)
. = ..()
-/datum/reagent/medicine/c2/penthrite/overdose_process(mob/living/carbon/human/H)
+/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)
- H.adjustOrganLoss(ORGAN_SLOT_HEART,10)
+ H.adjustStaminaLoss(10 * REM * delta_time)
+ H.adjustOrganLoss(ORGAN_SLOT_HEART, 10 * REM * delta_time)
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 7a52fd392ea..93a20cea5ef 100644
--- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm
@@ -15,10 +15,10 @@
ph = 3.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/orangejuice/on_mob_life(mob/living/carbon/M)
- if(M.getOxyLoss() && prob(30))
+/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)
- . = 1
+ . = TRUE
..()
/datum/reagent/consumable/tomatojuice
@@ -31,10 +31,10 @@
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)
- if(M.getFireLoss() && prob(20))
- M.heal_bodypart_damage(0,1, 0)
- . = 1
+/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, 0)
+ . = TRUE
..()
/datum/reagent/consumable/limejuice
@@ -48,10 +48,10 @@
ph = 2.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/limejuice/on_mob_life(mob/living/carbon/M)
- if(M.getToxLoss() && prob(20))
- M.adjustToxLoss(-1*REM, 0)
- . = 1
+/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)
+ . = TRUE
..()
/datum/reagent/consumable/carrotjuice
@@ -64,15 +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)
- M.adjust_blurriness(-1)
- M.adjust_blindness(-1)
+/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)
switch(current_cycle)
if(1 to 20)
//nothing
- if(21 to INFINITY)
- if(prob(current_cycle-10))
+ if(21 to 110)
+ if(DT_PROB(100 * (1 - (sqrt(110 - current_cycle) / 10)), delta_time))
M.cure_nearsighted(list(EYE_DAMAGE))
+ if(110 to INFINITY)
+ M.cure_nearsighted(list(EYE_DAMAGE))
..()
return
@@ -103,9 +105,9 @@
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)
- M.adjustToxLoss(1, 0)
- . = 1
+/datum/reagent/consumable/poisonberryjuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/consumable/watermelonjuice
@@ -139,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)
+/datum/reagent/consumable/banana/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if((liver && HAS_TRAIT(liver, TRAIT_COMEDY_METABOLISM)) || ismonkey(M))
- M.heal_bodypart_damage(brute = 1, burn = 1)
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time, 0)
. = TRUE
..()
@@ -156,11 +158,11 @@
shot_glass_icon_state = "shotglass"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/nothing/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/nothing/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(ishuman(M) && M.mind?.miming)
M.silent = max(M.silent, MIMEDRINK_SILENCE_DURATION)
- M.heal_bodypart_damage(1,1)
- . = 1
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time)
+ . = TRUE
..()
/datum/reagent/consumable/laughter
@@ -171,7 +173,7 @@
taste_description = "laughter"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.emote("laugh")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_laughter)
..()
@@ -184,8 +186,8 @@
taste_description = "laughter"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/superlaughter/on_mob_life(mob/living/carbon/M)
- if(prob(30))
+/datum/reagent/consumable/superlaughter/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(16, delta_time))
M.visible_message("[M] bursts out into a fit of uncontrollable laughter!", "You burst out in a fit of uncontrollable laughter!")
M.Stun(5)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_superlaughter)
@@ -228,12 +230,12 @@
if(myseed)
myseed.adjust_potency(-chems.get_reagent_amount(type) * 0.5)
-/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M)
- if(M.getBruteLoss() && prob(20))
+/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, 0)
- . = 1
+ . = TRUE
if(holder.has_reagent(/datum/reagent/consumable/capsaicin))
- holder.remove_reagent(/datum/reagent/consumable/capsaicin, 2)
+ holder.remove_reagent(/datum/reagent/consumable/capsaicin, 1 * delta_time)
..()
/datum/reagent/consumable/soymilk
@@ -246,10 +248,10 @@
glass_desc = "White and nutritious soy goodness!"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/soymilk/on_mob_life(mob/living/carbon/M)
- if(M.getBruteLoss() && prob(20))
- M.heal_bodypart_damage(1,0, 0)
- . = 1
+/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, 0)
+ . = TRUE
..()
/datum/reagent/consumable/cream
@@ -262,10 +264,10 @@
glass_desc = "Ewwww..."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/cream/on_mob_life(mob/living/carbon/M)
- if(M.getBruteLoss() && prob(20))
- M.heal_bodypart_damage(1,0, 0)
- . = 1
+/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, 0)
+ . = TRUE
..()
/datum/reagent/consumable/coffee
@@ -280,20 +282,20 @@
glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/coffee/overdose_process(mob/living/M)
- M.Jitter(5)
+/datum/reagent/consumable/coffee/overdose_process(mob/living/M, delta_time, times_fired)
+ M.Jitter(5 * REM * delta_time)
..()
-/datum/reagent/consumable/coffee/on_mob_life(mob/living/carbon/M)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
- M.AdjustSleeping(-40)
+/datum/reagent/consumable/coffee/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 * REM * delta_time), 0)
+ M.AdjustSleeping(-40 * REM * delta_time)
//310.15 is the normal bodytemp.
- M.adjust_bodytemperature(25 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
+ M.adjust_bodytemperature(25 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
if(holder.has_reagent(/datum/reagent/consumable/frostoil))
- holder.remove_reagent(/datum/reagent/consumable/frostoil, 5)
+ holder.remove_reagent(/datum/reagent/consumable/frostoil, 5 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/tea
name = "Tea"
@@ -306,16 +308,16 @@
glass_desc = "Drinking it from here would not seem right."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/tea/on_mob_life(mob/living/carbon/M)
- M.dizziness = max(0,M.dizziness-2)
- M.drowsyness = max(0,M.drowsyness-1)
- M.jitteriness = max(0,M.jitteriness-3)
- M.AdjustSleeping(-20)
- if(M.getToxLoss() && prob(20))
+/datum/reagent/consumable/tea/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (2 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (1 * REM * delta_time), 0)
+ M.jitteriness = max(M.jitteriness - (3 * REM * delta_time), 0)
+ M.AdjustSleeping(-20 * REM * delta_time)
+ if(M.getToxLoss() && DT_PROB(10, delta_time))
M.adjustToxLoss(-1, 0)
- M.adjust_bodytemperature(20 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
+ M.adjust_bodytemperature(20 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/lemonade
name = "Lemonade"
@@ -333,18 +335,18 @@
description = "Encourages the patient to go golfing."
color = "#FFB766"
quality = DRINK_NICE
- nutriment_factor = 2
+ nutriment_factor = 10 * REAGENTS_METABOLISM
taste_description = "bitter tea"
glass_icon_state = "arnold_palmer"
glass_name = "Arnold Palmer"
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)
- if(prob(5))
+/datum/reagent/consumable/tea/arnold_palmer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(2.5, delta_time))
to_chat(M, "[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.")]")
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/icecoffee
name = "Iced Coffee"
@@ -357,14 +359,14 @@
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)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
- M.AdjustSleeping(-40)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
- M.Jitter(5)
+/datum/reagent/consumable/icecoffee/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 * REM * delta_time), 0)
+ M.AdjustSleeping(-40 * REM * delta_time)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+ M.Jitter(5 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/hot_ice_coffee
name = "Hot Ice Coffee"
@@ -377,13 +379,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)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
- M.AdjustSleeping(-60)
- M.adjust_bodytemperature(-7 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
- M.Jitter(5)
- M.adjustToxLoss(1*REM, 0)
+/datum/reagent/consumable/hot_ice_coffee/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 * REM * delta_time), 0)
+ M.AdjustSleeping(-60 * REM * delta_time)
+ M.adjust_bodytemperature(-7 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+ M.Jitter(5 * REM * delta_time)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
..()
. = TRUE
@@ -398,15 +400,15 @@
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)
- M.dizziness = max(0,M.dizziness-2)
- M.drowsyness = max(0,M.drowsyness-1)
- M.AdjustSleeping(-40)
- if(M.getToxLoss() && prob(20))
+/datum/reagent/consumable/icetea/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (2 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (1 * REM * delta_time), 0)
+ M.AdjustSleeping(-40 * REM * delta_time)
+ if(M.getToxLoss() && DT_PROB(10, delta_time))
M.adjustToxLoss(-1, 0)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/space_cola
name = "Cola"
@@ -418,9 +420,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)
- M.drowsyness = max(0,M.drowsyness-5)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/datum/reagent/consumable/space_cola/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness = max(M.drowsyness - (5 * REM * delta_time), 0)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
/datum/reagent/consumable/nuka_cola
@@ -442,15 +444,15 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/nuka_cola)
..()
-/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M)
- M.Jitter(20)
- M.set_drugginess(30)
- M.dizziness +=1.5
+/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.Jitter(20 * REM * delta_time)
+ M.set_drugginess(30 * REM * delta_time)
+ M.dizziness += 1.5 * REM * delta_time
M.drowsyness = 0
- M.AdjustSleeping(-40)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ M.AdjustSleeping(-40 * REM * delta_time)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/grey_bull
name = "Grey Bull"
@@ -471,12 +473,12 @@
REMOVE_TRAIT(L, TRAIT_SHOCKIMMUNE, type)
..()
-/datum/reagent/consumable/grey_bull/on_mob_life(mob/living/carbon/M)
- M.Jitter(20)
- M.dizziness +=1
+/datum/reagent/consumable/grey_bull/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.Jitter(20 * REM * delta_time)
+ M.dizziness += 1 * REM * delta_time
M.drowsyness = 0
- M.AdjustSleeping(-40)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ M.AdjustSleeping(-40 * REM * delta_time)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
/datum/reagent/consumable/spacemountainwind
@@ -489,13 +491,13 @@
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)
- M.drowsyness = max(0,M.drowsyness-7)
- M.AdjustSleeping(-20)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
- M.Jitter(5)
+/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness = max(M.drowsyness - (7 * REM * delta_time), 0)
+ M.AdjustSleeping(-20 * REM * delta_time)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
+ M.Jitter(5 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/dr_gibb
name = "Dr. Gibb"
@@ -507,9 +509,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)
- M.drowsyness = max(0,M.drowsyness-6)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/datum/reagent/consumable/dr_gibb/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness = max(M.drowsyness - (6 * REM * delta_time), 0)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
/datum/reagent/consumable/space_up
@@ -523,8 +525,8 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/space_up/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/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/lemon_lime
@@ -538,8 +540,8 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/lemon_lime/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/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())
..()
@@ -560,9 +562,9 @@
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)
- M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
- if(prob(10))
+/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())
+ if(DT_PROB(5, delta_time))
M.mind?.adjust_experience(/datum/skill/gaming, 5)
..()
@@ -576,9 +578,10 @@
glass_desc = "Mmm mm, shambly."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/shamblers/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/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/sodawater
name = "Soda Water"
description = "A can of club soda. Why not make a scotch and soda?"
@@ -598,10 +601,10 @@
mytray.adjustWater(round(chems.get_reagent_amount(type) * 1))
mytray.adjustHealth(round(chems.get_reagent_amount(type) * 0.1))
-/datum/reagent/consumable/sodawater/on_mob_life(mob/living/carbon/M)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/datum/reagent/consumable/sodawater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 * REM * delta_time), 0)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
/datum/reagent/consumable/tonic
@@ -614,13 +617,13 @@
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)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
- M.AdjustSleeping(-40)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/datum/reagent/consumable/tonic/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 * REM * delta_time), 0)
+ M.AdjustSleeping(-40 * REM * delta_time)
+ M.adjust_bodytemperature(-5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/monkey_energy
name = "Monkey Energy"
@@ -633,12 +636,12 @@
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)
- M.Jitter(20)
- M.dizziness +=1
+/datum/reagent/consumable/monkey_energy/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.Jitter(40 * REM * delta_time)
+ M.dizziness += 1 * REM * delta_time
M.drowsyness = 0
- M.AdjustSleeping(-40)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ 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_metabolize(mob/living/L)
@@ -650,8 +653,8 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/monkey_energy)
..()
-/datum/reagent/consumable/monkey_energy/overdose_process(mob/living/M)
- if(prob(15))
+/datum/reagent/consumable/monkey_energy/overdose_process(mob/living/M, 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)
..()
@@ -666,8 +669,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)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/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/soy_latte
@@ -681,16 +684,16 @@
glass_desc = "A nice and refreshing beverage while you're reading."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/M)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
+/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (3 *REM * delta_time), 0)
M.SetSleeping(0)
- M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
- M.Jitter(5)
- if(M.getBruteLoss() && prob(20))
+ M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
+ M.Jitter(5 * REM * delta_time)
+ if(M.getBruteLoss() && DT_PROB(10, delta_time))
M.heal_bodypart_damage(1,0, 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/cafe_latte
name = "Cafe Latte"
@@ -703,16 +706,16 @@
glass_desc = "A nice, strong and refreshing beverage while you're reading."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/M)
- M.dizziness = max(0,M.dizziness-5)
- M.drowsyness = max(0,M.drowsyness-3)
+/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.dizziness = max(M.dizziness - (5 * REM * delta_time), 0)
+ M.drowsyness = max(M.drowsyness - (6 * REM * delta_time), 0)
M.SetSleeping(0)
- M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
- M.Jitter(5)
- if(M.getBruteLoss() && prob(20))
- M.heal_bodypart_damage(1,0, 0)
+ M.adjust_bodytemperature(5 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, 0, M.get_body_temp_normal())
+ M.Jitter(5 * REM * delta_time)
+ if(M.getBruteLoss() && DT_PROB(10, delta_time))
+ M.heal_bodypart_damage(1, 0, 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/doctor_delight
name = "The Doctor's Delight"
@@ -725,18 +728,18 @@
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)
- M.adjustBruteLoss(-0.5, 0)
- M.adjustFireLoss(-0.5, 0)
- M.adjustToxLoss(-0.5, 0)
- M.adjustOxyLoss(-0.5, 0)
+/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/liver/liver = M.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)
+ M.adjust_nutrition(-2 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/cherryshake
name = "Cherry Shake"
@@ -820,8 +823,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)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/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/milk/chocolate_milk
@@ -843,16 +846,13 @@
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)
- M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
- ..()
-
-/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/carbon/M)
- if(M.getBruteLoss() && prob(20))
- M.heal_bodypart_damage(1,0, 0)
- . = 1
+/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, 0)
+ . = TRUE
if(holder.has_reagent(/datum/reagent/consumable/capsaicin))
- holder.remove_reagent(/datum/reagent/consumable/capsaicin, 2)
+ holder.remove_reagent(/datum/reagent/consumable/capsaicin, 2 * REM * delta_time)
..()
/datum/reagent/consumable/menthol
@@ -865,7 +865,7 @@
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)
+/datum/reagent/consumable/menthol/on_mob_life(mob/living/L, delta_time, times_fired)
L.apply_status_effect(/datum/status_effect/throat_soothed)
..()
@@ -914,8 +914,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)
- M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+/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/sol_dry
@@ -928,8 +928,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)
- M.adjust_disgust(-5)
+/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/red_queen
@@ -944,15 +944,16 @@
var/current_size = RESIZE_DEFAULT_SIZE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/H)
- if(prob(75))
+/datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/H, 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
current_size = newsize
H.update_transform()
- if(prob(40))
+ if(DT_PROB(23, delta_time))
H.emote("sneeze")
..()
@@ -992,8 +993,8 @@
glass_desc = "A healthy and refreshing juice."
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/aloejuice/on_mob_life(mob/living/M)
- if(M.getToxLoss() && prob(30))
+/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)
..()
. = TRUE
@@ -1010,12 +1011,12 @@
addiction_types = list(/datum/addiction/opiods = 6)
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/lean/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/lean/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.slurring < 3)
- M.slurring+= 2
+ M.slurring += 2 * REM * delta_time
if(M.druggy < 3)
- M.adjust_drugginess(1)
+ M.adjust_drugginess(1 * REM * delta_time)
if(M.drowsyness < 3)
- M.drowsyness++
+ M.drowsyness += 1 * REM * delta_time
return ..()
diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
index 33e3951db05..e2a6af60601 100644
--- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm
@@ -17,13 +17,11 @@
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)
- M.set_drugginess(15)
- if(isturf(M.loc) && !isspaceturf(M.loc))
- if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED))
- if(prob(10))
- step(M, pick(GLOB.cardinals))
- if(prob(7))
+/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.set_drugginess(15 * 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))
+ if(DT_PROB(3.5, delta_time))
M.emote(pick("twitch","drool","moan","giggle"))
..()
@@ -31,8 +29,8 @@
to_chat(M, "You start tripping hard!")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/overdose, name)
-/datum/reagent/drug/space_drugs/overdose_process(mob/living/M)
- if(M.hallucination < volume && prob(20))
+/datum/reagent/drug/space_drugs/overdose_process(mob/living/M, delta_time, times_fired)
+ if(M.hallucination < volume && DT_PROB(10, delta_time))
M.hallucination += 5
..()
@@ -55,24 +53,24 @@
mytray.adjustToxic(round(chems.get_reagent_amount(type)))
mytray.adjustPests(-rand(1,2))
-/datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/M)
- if(prob(1))
+/datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/M, 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, "[smoke_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "smoked", /datum/mood_event/smoked, name)
- M.AdjustStun(-5)
- M.AdjustKnockdown(-5)
- M.AdjustUnconscious(-5)
- M.AdjustParalyzed(-5)
- M.AdjustImmobilized(-5)
+ 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)
..()
- . = 1
+ . = TRUE
-/datum/reagent/drug/nicotine/overdose_process(mob/living/M)
- M.adjustToxLoss(0.1*REM, 0)
- M.adjustOxyLoss(1.1*REM, 0)
+/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)
..()
- . = 1
+ . = TRUE
/datum/reagent/drug/crank
name = "Crank"
@@ -84,18 +82,26 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 14) //5.6 per 2 seconds
-/datum/reagent/drug/crank/on_mob_life(mob/living/carbon/M)
- if(prob(5))
+/datum/reagent/drug/crank/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(2.5, delta_time))
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
to_chat(M, "[high_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "tweaking", /datum/mood_event/stimulant_medium, name)
- M.AdjustStun(-20)
- M.AdjustKnockdown(-20)
- M.AdjustUnconscious(-20)
- M.AdjustImmobilized(-20)
- M.AdjustParalyzed(-20)
+ 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)
..()
- . = 1
+ . = TRUE
+
+/datum/reagent/drug/crank/overdose_process(mob/living/M, delta_time, times_fired)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time)
+ M.adjustToxLoss(2 * REM * delta_time, 0)
+ M.adjustBruteLoss(2 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC)
+ ..()
+ . = TRUE
+
/datum/reagent/drug/krokodil
name = "Krokodil"
description = "Cools and calms you down. If overdosed it will deal significant Brain and Toxin damage."
@@ -107,9 +113,9 @@
addiction_types = list(/datum/addiction/opiods = 18) //7.2 per 2 seconds
-/datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.")
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(M, "[high_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "smacked out", /datum/mood_event/narcotic_heavy, name)
if(current_cycle == 35 && creation_purity <= 0.6)
@@ -119,11 +125,11 @@
M.set_species(/datum/species/krokodil_addict)
..()
-/datum/reagent/drug/krokodil/overdose_process(mob/living/M)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.25*REM)
- M.adjustToxLoss(0.25*REM, 0)
+/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)
..()
- . = 1
+ . = TRUE
@@ -146,37 +152,38 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine)
..()
-/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M, 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(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(M, "[high_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "tweaking", /datum/mood_event/stimulant_medium, name)
- M.AdjustStun(-40)
- M.AdjustKnockdown(-40)
- M.AdjustUnconscious(-40)
- M.AdjustParalyzed(-40)
- M.AdjustImmobilized(-40)
- M.adjustStaminaLoss(-2, 0)
- M.Jitter(2)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1,4))
- if(prob(5))
+ 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.Jitter(2 * REM * delta_time)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1, 4) * REM * delta_time)
+ if(DT_PROB(2.5, delta_time))
M.emote(pick("twitch", "shiver"))
..()
- . = 1
+ . = TRUE
-/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
+/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M, delta_time, times_fired)
if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !ismovable(M.loc))
- for(var/i in 1 to 4)
+ for(var/i in 1 to round(4 * REM * delta_time, 1))
step(M, pick(GLOB.cardinals))
- if(prob(20))
+ if(DT_PROB(10, delta_time))
M.emote("laugh")
- if(prob(33))
+ if(DT_PROB(18, delta_time))
M.visible_message("[M]'s hands flip out and flail everywhere!")
M.drop_all_held_items()
..()
- M.adjustToxLoss(1, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, pick(0.5, 0.6, 0.7, 0.8, 0.9, 1))
- . = 1
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, (rand(5, 10) / 10) * REM * delta_time)
+ . = TRUE
+
/datum/reagent/drug/bath_salts
name = "Bath Salts"
description = "Makes you impervious to stuns and grants a stamina regeneration buff, but you will be a nearly uncontrollable tramp-bearded raving lunatic."
@@ -205,28 +212,28 @@
QDEL_NULL(rage)
..()
-/datum/reagent/drug/bath_salts/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/bath_salts/on_mob_life(mob/living/carbon/M, 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(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(M, "[high_message]")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "salted", /datum/mood_event/stimulant_heavy, name)
- M.adjustStaminaLoss(-5, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4)
- M.hallucination += 5
+ M.adjustStaminaLoss(-5 * REM * delta_time, 0)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4 * REM * delta_time)
+ M.hallucination += 5 * REM * delta_time
if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !ismovable(M.loc))
step(M, pick(GLOB.cardinals))
step(M, pick(GLOB.cardinals))
..()
- . = 1
+ . = TRUE
-/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
- M.hallucination += 5
+/datum/reagent/drug/bath_salts/overdose_process(mob/living/M, delta_time, times_fired)
+ M.hallucination += 5 * REM * delta_time
if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !ismovable(M.loc))
- for(var/i in 1 to 8)
+ for(var/i in 1 to round(8 * REM * delta_time, 1))
step(M, pick(GLOB.cardinals))
- if(prob(20))
+ if(DT_PROB(10, delta_time))
M.emote(pick("twitch","drool","moan"))
- if(prob(33))
+ if(DT_PROB(28, delta_time))
M.drop_all_held_items()
..()
@@ -238,17 +245,17 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/stimulants = 8)
-/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/M, 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(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(M, "[high_message]")
- M.adjustStaminaLoss(-18, 0)
- M.adjustToxLoss(0.5, 0)
- if(prob(50))
+ M.adjustStaminaLoss(-18 * REM * delta_time, 0)
+ M.adjustToxLoss(0.5 * REM * delta_time, 0)
+ if(DT_PROB(30, delta_time))
M.losebreath++
M.adjustOxyLoss(1, 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/drug/happiness
name = "Happiness"
@@ -270,16 +277,16 @@
SEND_SIGNAL(L, COMSIG_CLEAR_MOOD_EVENT, "happiness_drug")
..()
-/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.jitteriness = 0
M.set_confusion(0)
M.disgust = 0
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * REM * delta_time)
..()
- . = 1
+ . = TRUE
-/datum/reagent/drug/happiness/overdose_process(mob/living/M)
- if(prob(30))
+/datum/reagent/drug/happiness/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(16, delta_time))
var/reaction = rand(1,3)
switch(reaction)
if(1)
@@ -291,9 +298,9 @@
if(3)
M.emote("frown")
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_bad_od)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/drug/pumpup
name = "Pump-Up"
@@ -313,30 +320,30 @@
REMOVE_TRAIT(L, TRAIT_STUNRESISTANCE, type)
..()
-/datum/reagent/drug/pumpup/on_mob_life(mob/living/carbon/M)
- M.Jitter(5)
+/datum/reagent/drug/pumpup/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.Jitter(5 * REM * delta_time)
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
to_chat(M, "[pick("Go! Go! GO!", "You feel ready...", "You feel invincible...")]")
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
M.losebreath++
M.adjustToxLoss(2, 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/drug/pumpup/overdose_start(mob/living/M)
to_chat(M, "You can't stop shaking, your heart beats faster and faster...")
-/datum/reagent/drug/pumpup/overdose_process(mob/living/M)
- M.Jitter(5)
- if(prob(5))
+/datum/reagent/drug/pumpup/overdose_process(mob/living/M, delta_time, times_fired)
+ M.Jitter(5 * REM * delta_time)
+ if(DT_PROB(2.5, delta_time))
M.drop_all_held_items()
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
M.emote(pick("twitch","drool"))
- if(prob(20))
+ if(DT_PROB(10, delta_time))
M.losebreath++
M.adjustStaminaLoss(4, 0)
- if(prob(15))
+ if(DT_PROB(7.5, delta_time))
M.adjustToxLoss(2, 0)
..()
@@ -355,22 +362,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)
+/datum/reagent/drug/maint/powder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN,0.1)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.1 * REM * delta_time)
// 5x if you want to OD, you can potentially go higher, but good luck managing the brain damage.
- var/amt = max(1,round(volume/3,0.1))
+ var/amt = max(round(volume/3, 0.1), 1)
M?.mind?.experience_multiplier_reasons |= type
- M?.mind?.experience_multiplier_reasons[type] = amt
+ M?.mind?.experience_multiplier_reasons[type] = amt * REM * delta_time
/datum/reagent/drug/maint/powder/on_mob_end_metabolize(mob/living/M)
. = ..()
M?.mind?.experience_multiplier_reasons[type] = null
M?.mind?.experience_multiplier_reasons -= type
-/datum/reagent/drug/maint/powder/overdose_process(mob/living/M)
+/datum/reagent/drug/maint/powder/overdose_process(mob/living/M, delta_time, times_fired)
. = ..()
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN,3)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 6 * REM * delta_time)
/datum/reagent/drug/maint/sludge
name = "Maintenance Sludge"
@@ -387,22 +394,22 @@
. = ..()
ADD_TRAIT(L,TRAIT_HARDLY_WOUNDED,type)
-/datum/reagent/drug/maint/sludge/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/maint/sludge/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
- M.adjustToxLoss(0.5)
+ M.adjustToxLoss(0.5 * REM * delta_time)
/datum/reagent/drug/maint/sludge/on_mob_end_metabolize(mob/living/M)
. = ..()
REMOVE_TRAIT(M,TRAIT_HARDLY_WOUNDED,type)
-/datum/reagent/drug/maint/sludge/overdose_process(mob/living/M)
+/datum/reagent/drug/maint/sludge/overdose_process(mob/living/M, delta_time, times_fired)
. = ..()
if(!iscarbon(M))
return
var/mob/living/carbon/carbie = M
//You will be vomiting so the damage is really for a few ticks before you flush it out of your system
- carbie.adjustToxLoss(1)
- if(prob(10))
+ carbie.adjustToxLoss(1 * REM * delta_time)
+ if(DT_PROB(5, delta_time))
carbie.adjustToxLoss(5)
carbie.vomit()
@@ -415,18 +422,18 @@
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)
+/datum/reagent/drug/maint/tar/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
- M.AdjustStun(-10)
- M.AdjustKnockdown(-10)
- M.AdjustUnconscious(-10)
- M.AdjustParalyzed(-10)
- M.AdjustImmobilized(-10)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER,1.5)
+ 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)
-/datum/reagent/drug/maint/tar/overdose_process(mob/living/M)
+/datum/reagent/drug/maint/tar/overdose_process(mob/living/M, delta_time, times_fired)
. = ..()
- M.adjustToxLoss(5)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER,3)
+ M.adjustToxLoss(5 * REM * delta_time)
+ M.adjustOrganLoss(ORGAN_SLOT_LIVER, 3 * REM * delta_time)
diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm
index 288ad6ce7a8..b3e08a0ee6d 100755
--- a/code/modules/reagents/chemistry/reagents/food_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm
@@ -11,6 +11,7 @@
name = "Consumable"
taste_description = "generic food"
taste_mult = 4
+ /// How much nutrition this reagent supplies
var/nutriment_factor = 1 * REAGENTS_METABOLISM
var/quality = 0 //affects mood, typically higher for mixed drinks with more complex recipes
impure_chem = /datum/reagent/water
@@ -18,15 +19,15 @@
inverse_chem = /datum/reagent/water
failed_chem = /datum/reagent/consumable/nutriment
-/datum/reagent/consumable/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
current_cycle++
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!HAS_TRAIT(H, TRAIT_NOHUNGER))
- H.adjust_nutrition(nutriment_factor)
+ H.adjust_nutrition(nutriment_factor * REM * delta_time)
if(length(reagent_removal_skip_list))
return
- holder.remove_reagent(type, metabolization_rate)
+ holder.remove_reagent(type, metabolization_rate * delta_time)
/datum/reagent/consumable/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
. = ..()
@@ -64,10 +65,10 @@
if(chems.has_reagent(type, 1))
mytray.adjustHealth(round(chems.get_reagent_amount(type) * 0.2))
-/datum/reagent/consumable/nutriment/on_mob_life(mob/living/carbon/M)
- if(prob(50))
+/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)
- . = 1
+ . = TRUE
..()
/datum/reagent/consumable/nutriment/on_new(list/supplied_data)
@@ -116,9 +117,9 @@
brute_heal = 1
burn_heal = 1
-/datum/reagent/consumable/nutriment/vitamin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/nutriment/vitamin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.satiety < 600)
- M.satiety += 30
+ M.satiety += 30 * REM * delta_time
. = ..()
/// The basic resource of vat growing.
@@ -212,12 +213,12 @@
/datum/reagent/consumable/sugar/overdose_start(mob/living/M)
to_chat(M, "You go into hyperglycaemic shock! Lay off the twinkies!")
M.AdjustSleeping(600)
- . = 1
+ . = TRUE
-/datum/reagent/consumable/sugar/overdose_process(mob/living/M)
- M.AdjustSleeping(40)
+/datum/reagent/consumable/sugar/overdose_process(mob/living/M, delta_time, times_fired)
+ M.AdjustSleeping(40 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/virus_food
name = "Virus Food"
@@ -258,28 +259,28 @@
taste_mult = 1.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/capsaicin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/capsaicin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/heating = 0
switch(current_cycle)
if(1 to 15)
- heating = 5 * TEMPERATURE_DAMAGE_COEFFICIENT
+ heating = 5
if(holder.has_reagent(/datum/reagent/cryostylane))
- holder.remove_reagent(/datum/reagent/cryostylane, 5)
+ holder.remove_reagent(/datum/reagent/cryostylane, 5 * REM * delta_time)
if(isslime(M))
- heating = rand(5,20)
+ heating = rand(5, 20)
if(15 to 25)
- heating = 10 * TEMPERATURE_DAMAGE_COEFFICIENT
+ heating = 10
if(isslime(M))
- heating = rand(10,20)
+ heating = rand(10, 20)
if(25 to 35)
- heating = 15 * TEMPERATURE_DAMAGE_COEFFICIENT
+ heating = 15
if(isslime(M))
- heating = rand(15,20)
+ heating = rand(15, 20)
if(35 to INFINITY)
- heating = 20 * TEMPERATURE_DAMAGE_COEFFICIENT
+ heating = 20
if(isslime(M))
- heating = rand(20,25)
- M.adjust_bodytemperature(heating)
+ heating = rand(20, 25)
+ M.adjust_bodytemperature(heating * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time)
..()
/datum/reagent/consumable/frostoil
@@ -290,32 +291,32 @@
ph = 13 //HMM! I wonder
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/frostoil/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/frostoil/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/cooling = 0
switch(current_cycle)
if(1 to 15)
- cooling = -10 * TEMPERATURE_DAMAGE_COEFFICIENT
+ cooling = -10
if(holder.has_reagent(/datum/reagent/consumable/capsaicin))
- holder.remove_reagent(/datum/reagent/consumable/capsaicin, 5)
+ holder.remove_reagent(/datum/reagent/consumable/capsaicin, 5 * REM * delta_time)
if(isslime(M))
- cooling = -rand(5,20)
+ cooling = -rand(5, 20)
if(15 to 25)
- cooling = -20 * TEMPERATURE_DAMAGE_COEFFICIENT
+ cooling = -20
if(isslime(M))
- cooling = -rand(10,20)
+ cooling = -rand(10, 20)
if(25 to 35)
- cooling = -30 * TEMPERATURE_DAMAGE_COEFFICIENT
+ cooling = -30
if(prob(1))
M.emote("shiver")
if(isslime(M))
- cooling = -rand(15,20)
+ cooling = -rand(15, 20)
if(35 to INFINITY)
- cooling = -40 * TEMPERATURE_DAMAGE_COEFFICIENT
+ cooling = -40
if(prob(5))
M.emote("shiver")
if(isslime(M))
- cooling = -rand(20,25)
- M.adjust_bodytemperature(cooling, 50)
+ cooling = -rand(20, 25)
+ M.adjust_bodytemperature(cooling * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 50)
..()
/datum/reagent/consumable/frostoil/expose_turf(turf/exposed_turf, reac_volume)
@@ -372,9 +373,9 @@
if(prob(5))
victim.vomit()
-/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(!holder.has_reagent(/datum/reagent/consumable/milk))
- if(prob(10))
+ if(DT_PROB(5, delta_time))
M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]")
..()
@@ -421,26 +422,26 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 12)
-/datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M)
+/datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(!M.slurring)
- M.slurring = 1
+ M.slurring = 1 * REM * delta_time
switch(current_cycle)
if(1 to 5)
- M.Dizzy(5)
- M.set_drugginess(30)
- if(prob(10))
+ M.Dizzy(5 * REM * delta_time)
+ M.set_drugginess(30 * REM * delta_time)
+ if(DT_PROB(5, delta_time))
M.emote(pick("twitch","giggle"))
if(5 to 10)
- M.Jitter(10)
- M.Dizzy(10)
- M.set_drugginess(35)
- if(prob(20))
+ M.Jitter(10 * REM * delta_time)
+ M.Dizzy(10 * REM * delta_time)
+ M.set_drugginess(35 * REM * delta_time)
+ if(DT_PROB(10, delta_time))
M.emote(pick("twitch","giggle"))
if (10 to INFINITY)
- M.Jitter(20)
- M.Dizzy(20)
- M.set_drugginess(40)
- if(prob(30))
+ M.Jitter(20 * REM * delta_time)
+ M.Dizzy(20 * REM * delta_time)
+ M.set_drugginess(40 * REM * delta_time)
+ if(DT_PROB(16, delta_time))
M.emote(pick("twitch","giggle"))
..()
@@ -452,18 +453,18 @@
metabolization_rate = 0.15 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/garlic/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/garlic/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(isvampire(M)) //incapacitating but not lethal. Unfortunately, vampires cannot vomit.
- if(prob(min(25,current_cycle)))
+ if(DT_PROB(min(current_cycle/2, 12.5), delta_time))
to_chat(M, "You can't get the scent of garlic out of your nose! You can barely think...")
M.Paralyze(10)
M.Jitter(10)
else
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_CULINARY_METABOLISM))
- if(prob(20)) //stays in the system much longer than sprinkles/banana juice, so heals slower to partially compensate
+ if(DT_PROB(10, delta_time)) //stays in the system much longer than sprinkles/banana juice, so heals slower to partially compensate
M.heal_bodypart_damage(brute = 1, burn = 1)
- . = 1
+ . = TRUE
..()
/datum/reagent/consumable/sprinkles
@@ -473,11 +474,11 @@
taste_description = "childhood whimsy"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(liver && HAS_TRAIT(liver, TRAIT_LAW_ENFORCEMENT_METABOLISM))
- M.heal_bodypart_damage(brute = 1, burn = 1)
- . = 1
+ M.heal_bodypart_damage(1 * REM * delta_time, 1 * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/consumable/cornoil
@@ -532,8 +533,8 @@
taste_description = "your imprisonment"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/carbon/M)
- M.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal())
+/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time, 0, M.get_body_temp_normal())
..()
/datum/reagent/consumable/hell_ramen
@@ -544,8 +545,8 @@
taste_description = "wet and cheap noodles on fire"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/hell_ramen/on_mob_life(mob/living/carbon/target_mob)
- target_mob.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT)
+/datum/reagent/consumable/hell_ramen/on_mob_life(mob/living/carbon/target_mob, delta_time, times_fired)
+ target_mob.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT * REM * delta_time)
..()
/datum/reagent/consumable/flour
@@ -619,8 +620,8 @@
taste_description = "sweet slime"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/corn_syrup/on_mob_life(mob/living/carbon/M)
- holder.add_reagent(/datum/reagent/consumable/sugar, 3)
+/datum/reagent/consumable/corn_syrup/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ holder.add_reagent(/datum/reagent/consumable/sugar, 3 * REM * delta_time)
..()
/datum/reagent/consumable/honey
@@ -642,13 +643,13 @@
mytray.adjustWeeds(rand(1,2))
mytray.adjustPests(rand(1,2))
-/datum/reagent/consumable/honey/on_mob_life(mob/living/carbon/M)
- holder.add_reagent(/datum/reagent/consumable/sugar,3)
- if(prob(55))
- M.adjustBruteLoss(-1*REM, 0)
- M.adjustFireLoss(-1*REM, 0)
- M.adjustOxyLoss(-1*REM, 0)
- M.adjustToxLoss(-1*REM, 0)
+/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)
..()
/datum/reagent/consumable/honey/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -696,11 +697,11 @@
exposed_mob.blind_eyes(2)
exposed_mob.blur_eyes(5)
-/datum/reagent/consumable/tearjuice/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/tearjuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
..()
if(M.eye_blurry) //Don't worsen vision if it was otherwise fine
- M.blur_eyes(4)
- if(prob(10))
+ M.blur_eyes(4 * REM * delta_time)
+ if(DT_PROB(5, delta_time))
to_chat(M, "Your eyes sting!")
M.blind_eyes(2)
@@ -713,9 +714,9 @@
color = "#664330" // rgb: 102, 67, 48
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/nutriment/stabilized/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/nutriment/stabilized/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.nutrition > NUTRITION_LEVEL_FULL - 25)
- M.adjust_nutrition(-3*nutriment_factor)
+ M.adjust_nutrition(-3 * REM * nutriment_factor * delta_time)
..()
////Lavaland Flora Reagents////
@@ -729,11 +730,11 @@
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/entpoly/on_mob_life(mob/living/carbon/M)
+/datum/reagent/consumable/entpoly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 10)
- M.Unconscious(40, 0)
- . = 1
- if(prob(20))
+ M.Unconscious(40 * REM * delta_time, FALSE)
+ . = TRUE
+ if(DT_PROB(10, delta_time))
M.losebreath += 4
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM, 150)
M.adjustToxLoss(3*REM,0)
@@ -786,10 +787,10 @@
ph = 10.4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/vitfro/on_mob_life(mob/living/carbon/M)
- if(prob(80))
- M.adjustBruteLoss(-1*REM, 0)
- M.adjustFireLoss(-1*REM, 0)
+/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)
. = TRUE
..()
@@ -821,8 +822,8 @@
if(istype(stomach))
stomach.adjust_charge(reac_volume * REM * 20)
-/datum/reagent/consumable/liquidelectricity/on_mob_life(mob/living/carbon/M)
- if(prob(25) && !isethereal(M)) //lmao at the newbs who eat energy bars
+/datum/reagent/consumable/liquidelectricity/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(13, delta_time) && !isethereal(M)) //lmao at the newbs who eat energy bars
M.electrocute_act(rand(10,15), "Liquid Electricity in their body", 1, SHOCK_NOGLOVES) //the shock is coming from inside the house
playsound(M, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
return ..()
@@ -839,11 +840,11 @@
overdose_threshold = 17
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/astrotame/overdose_process(mob/living/carbon/M)
+/datum/reagent/consumable/astrotame/overdose_process(mob/living/carbon/M, delta_time, times_fired)
if(M.disgust < 80)
- M.adjust_disgust(10)
+ M.adjust_disgust(10 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/consumable/secretsauce
name = "Secret Sauce"
@@ -886,8 +887,8 @@
overdose_threshold = 15
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/consumable/char/overdose_process(mob/living/M)
- if(prob(25))
+/datum/reagent/consumable/char/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(13, delta_time))
M.say(pick_list_replacements(BOOMER_FILE, "boomer"), forced = /datum/reagent/consumable/char)
..()
return
diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
index 00214f8bda5..bb526cd1ea8 100644
--- a/code/modules/reagents/chemistry/reagents/impure_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/impure_reagents.dm
@@ -11,12 +11,12 @@
ph = 3
overdose_threshold = 0 //So that they're shown as a problem (?)
-/datum/reagent/impurity/on_mob_life(mob/living/carbon/C)
+/datum/reagent/impurity/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
if(!L)//Though, lets be safe
- C.adjustToxLoss(1, FALSE)//Incase of no liver!
+ C.adjustToxLoss(1 * REM * delta_time, FALSE)//Incase of no liver!
return ..()
- C.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.5*REM)
+ C.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.5 * REM * delta_time)
return ..()
/datum/reagent/impurity/toxic
@@ -24,8 +24,8 @@
description = "Toxic chemical isomers made from impure reactions. Causes toxin damage"
ph = 2
-/datum/reagent/impurity/toxic/on_mob_life(mob/living/carbon/C)
- C.adjustToxLoss(1, FALSE)
+/datum/reagent/impurity/toxic/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+ C.adjustToxLoss(1 * REM * delta_time, FALSE)
return ..()
//technically not a impure chem, but it's here because it can only be made with a failed impure reaction
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 4bf1938fd0e..078b7778ea9 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -10,11 +10,11 @@
name = "Medicine"
taste_description = "bitterness"
-/datum/reagent/medicine/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
current_cycle++
if(length(reagent_removal_skip_list))
return
- holder.remove_reagent(type, metabolization_rate / M.metabolism_efficiency) //medicine reagents stay longer if you have a better metabolism
+ holder.remove_reagent(type, metabolization_rate * delta_time / M.metabolism_efficiency) //medicine reagents stay longer if you have a better metabolism
/datum/reagent/medicine/leporazine
name = "Leporazine"
@@ -23,17 +23,18 @@
color = "#DB90C6"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/leporazine/on_mob_life(mob/living/carbon/M)
- if(M.bodytemperature > M.get_body_temp_normal(apply_change=FALSE))
- M.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal(apply_change=FALSE))
- else if(M.bodytemperature < (M.get_body_temp_normal(apply_change=FALSE) + 1))
- M.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, M.get_body_temp_normal(apply_change=FALSE))
+/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 > humi.get_body_temp_normal(apply_change=FALSE))
- humi.adjust_coretemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT, humi.get_body_temp_normal(apply_change=FALSE))
- else if(humi.coretemperature < (humi.get_body_temp_normal(apply_change=FALSE) + 1))
- humi.adjust_coretemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, humi.get_body_temp_normal(apply_change=FALSE))
+ 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/adminordrazine //An OP chemical for admins
@@ -61,15 +62,12 @@
else if(prob(20))
mytray.visible_message("Nothing happens...")
-/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M)
- M.reagents.remove_all_type(/datum/reagent/toxin, 5*REM, 0, 1)
- M.setCloneLoss(0, 0)
+/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)
+ M.adjustToxLoss(-5 * REM * delta_time, FALSE, TRUE)
M.setOxyLoss(0, 0)
- M.radiation = 0
- M.heal_bodypart_damage(5,5)
- M.adjustToxLoss(-5, 0, TRUE)
- M.hallucination = 0
- REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT))
+ M.setCloneLoss(0, 0)
+
M.set_blurriness(0)
M.set_blindness(0)
M.SetKnockdown(0)
@@ -77,15 +75,20 @@
M.SetUnconscious(0)
M.SetParalyzed(0)
M.SetImmobilized(0)
+ M.set_confusion(0)
+ M.SetSleeping(0)
+
M.silent = FALSE
M.dizziness = 0
M.disgust = 0
M.drowsyness = 0
M.stuttering = 0
M.slurring = 0
- M.set_confusion(0)
- M.SetSleeping(0)
M.jitteriness = 0
+ M.hallucination = 0
+ M.radiation = 0
+ REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT))
+ M.reagents.remove_all_type(/datum/reagent/toxin, 5 * REM * delta_time, FALSE, TRUE)
if(M.blood_volume < BLOOD_VOLUME_NORMAL)
M.blood_volume = BLOOD_VOLUME_NORMAL
@@ -99,7 +102,7 @@
continue
D.cure()
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/adminordrazine/quantum_heal
name = "Quantum Medicine"
@@ -113,19 +116,19 @@
ph = 4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M)
- M.drowsyness = max(M.drowsyness-5, 0)
- M.AdjustStun(-20)
- M.AdjustKnockdown(-20)
- M.AdjustUnconscious(-20)
- M.AdjustImmobilized(-20)
- M.AdjustParalyzed(-20)
+/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness = max(M.drowsyness - (5 * REM * delta_time), 0)
+ 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)
if(holder.has_reagent(/datum/reagent/toxin/mindbreaker))
- holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5)
- M.hallucination = max(0, M.hallucination - 10)
- if(prob(30))
+ holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5 * REM * delta_time)
+ M.hallucination = max(M.hallucination - (10 * REM * delta_time), 0)
+ if(DT_PROB(16, delta_time))
M.adjustToxLoss(1, 0)
- . = 1
+ . = TRUE
..()
/datum/reagent/medicine/synaphydramine
@@ -135,16 +138,16 @@
ph = 5.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/M)
- M.drowsyness = max(M.drowsyness-5, 0)
+/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness = max(M.drowsyness - (5 * REM * delta_time), 0)
if(holder.has_reagent(/datum/reagent/toxin/mindbreaker))
- holder.remove_reagent(/datum/reagent/toxin/mindbreaker, 5)
+ 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)
- M.hallucination = max(0, M.hallucination - 10)
- if(prob(30))
+ holder.remove_reagent(/datum/reagent/toxin/histamine, 5 * REM * delta_time)
+ M.hallucination = max(M.hallucination - (10 * REM * delta_time), 0)
+ if(DT_PROB(16, delta_time))
M.adjustToxLoss(1, 0)
- . = 1
+ . = TRUE
..()
/datum/reagent/medicine/cryoxadone
@@ -155,19 +158,19 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/power = -0.00003 * (M.bodytemperature ** 2) + 3
if(M.bodytemperature < T0C)
- M.adjustOxyLoss(-3 * power, 0)
- M.adjustBruteLoss(-power, 0)
- M.adjustFireLoss(-power, 0)
- M.adjustToxLoss(-power, 0, TRUE) //heals TOXINLOVERs
- M.adjustCloneLoss(-power, 0)
+ 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/datum/wound/iter_wound = i
- iter_wound.on_xadone(power)
+ iter_wound.on_xadone(power * REAGENTS_EFFECT_MULTIPLIER * delta_time)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
- . = 1
+ . = TRUE
metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (M.bodytemperature ** 2) + 0.5)
..()
@@ -185,11 +188,11 @@
ph = 13
metabolization_rate = 1.5 * REAGENTS_METABOLISM
-/datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M)
+/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, 0)
+ M.adjustCloneLoss((0.00006 * (M.bodytemperature ** 2) - 6) * REM * delta_time, 0)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
- . = 1
+ . = TRUE
metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (M.bodytemperature ** 2) + 0.75)
..()
@@ -201,7 +204,7 @@
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
var/power = 0
switch(M.bodytemperature)
@@ -214,16 +217,16 @@
if(M.on_fire)
power *= 2
- M.adjustOxyLoss(-2 * power, 0)
- M.adjustBruteLoss(-power, 0)
- M.adjustFireLoss(-1.5 * power, 0)
- M.adjustToxLoss(-power, 0, TRUE)
- M.adjustCloneLoss(-power, 0)
+ 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)
var/datum/wound/iter_wound = i
- iter_wound.on_xadone(power)
+ iter_wound.on_xadone(power * REAGENTS_EFFECT_MULTIPLIER * delta_time)
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
- . = 1
+ . = TRUE
..()
/datum/reagent/medicine/rezadone
@@ -236,19 +239,19 @@
taste_description = "fish"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/M)
- M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that.
- M.heal_bodypart_damage(1,1)
+/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)
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/rezadone/overdose_process(mob/living/M)
- M.adjustToxLoss(1, 0)
- M.Dizzy(5)
- M.Jitter(5)
+/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, delta_time, times_fired)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ M.Dizzy(5 * REM * delta_time)
+ M.Jitter(5 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/rezadone/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
. = ..()
@@ -280,18 +283,18 @@
ph = 10.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.getFireLoss() > 25)
- M.adjustFireLoss(-4*REM, 0) //Twice as effective as AIURI for severe burns
+ M.adjustFireLoss(-4 * REM * delta_time, 0) //Twice as effective as AIURI for severe burns
else
- M.adjustFireLoss(-0.5*REM, 0) //But only a quarter as effective for more minor ones
+ M.adjustFireLoss(-0.5 * REM * delta_time, 0) //But only a quarter as effective for more minor ones
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/oxandrolone/overdose_process(mob/living/M)
+/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, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
- . = 1
+ M.adjustFireLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
+ . = TRUE
..()
/datum/reagent/medicine/salglu_solution
@@ -304,37 +307,37 @@
taste_description = "sweetness and salt"
var/last_added = 0
var/maximum_reachable = BLOOD_VOLUME_NORMAL - 10 //So that normal blood regeneration can continue with salglu active
- var/extra_regen = 0.25 // in addition to acting as temporary blood, also add this much to their actual blood per tick
+ var/extra_regen = 0.25 // in addition to acting as temporary blood, also add about half this much to their actual blood per second
ph = 5.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(last_added)
M.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, volume*5)
+ 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
- if(prob(33))
- M.adjustBruteLoss(-0.5*REM, 0)
- M.adjustFireLoss(-0.5*REM, 0)
+ M.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)
. = TRUE
..()
-/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/M)
- if(prob(3))
+/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(1.5, delta_time))
to_chat(M, "You feel salty.")
holder.add_reagent(/datum/reagent/consumable/salt, 1)
holder.remove_reagent(/datum/reagent/medicine/salglu_solution, 0.5)
- else if(prob(3))
+ else if(DT_PROB(1.5, delta_time))
to_chat(M, "You feel sweet.")
holder.add_reagent(/datum/reagent/consumable/sugar, 1)
holder.remove_reagent(/datum/reagent/medicine/salglu_solution, 0.5)
- if(prob(33))
- M.adjustBruteLoss(0.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
- M.adjustFireLoss(0.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
+ if(DT_PROB(18, delta_time))
+ M.adjustBruteLoss(0.5, FALSE, FALSE, BODYPART_ORGANIC)
+ M.adjustFireLoss(0.5, FALSE, FALSE, BODYPART_ORGANIC)
. = TRUE
..()
@@ -347,10 +350,10 @@
ph = 2.6
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C)
+/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
C.hal_screwyhud = SCREWYHUD_HEALTHY
- C.adjustBruteLoss(-0.25*REM, 0)
- C.adjustFireLoss(-0.25*REM, 0)
+ C.adjustBruteLoss(-0.25 * REM * delta_time, 0)
+ C.adjustFireLoss(-0.25 * REM * delta_time, 0)
..()
return TRUE
@@ -390,21 +393,21 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/M)
- M.adjustToxLoss(-healing*REM, 0)
- M.adjustOxyLoss(-healing*REM, 0)
- M.adjustBruteLoss(-healing*REM, 0)
- M.adjustFireLoss(-healing*REM, 0)
+/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)
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/omnizine/overdose_process(mob/living/M)
- M.adjustToxLoss(1.5*REM, 0)
- M.adjustOxyLoss(1.5*REM, 0)
- M.adjustBruteLoss(1.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
- M.adjustFireLoss(1.5*REM, FALSE, FALSE, BODYPART_ORGANIC)
+/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, BODYPART_ORGANIC)
+ M.adjustFireLoss(1.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/omnizine/protozine
name = "Protozine"
@@ -423,12 +426,12 @@
ph = 1.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/calomel/on_mob_life(mob/living/carbon/M)
+/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)
+ M.reagents.remove_reagent(R.type, 3 * REM * delta_time)
if(M.health > 20)
- M.adjustToxLoss(1*REM, 0)
- . = 1
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/medicine/potass_iodide
@@ -440,9 +443,9 @@
ph = 12 //It's a reducing agent
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.radiation > 0)
- M.radiation -= min(M.radiation, 8)
+ M.radiation -= min(8 * REM * delta_time, M.radiation)
..()
/datum/reagent/medicine/pen_acid
@@ -454,14 +457,14 @@
ph = 1 //One of the best buffers, NEVERMIND!
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M)
- M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/50
- M.adjustToxLoss(-2*REM, 0)
+/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.radiation -= (max(M.radiation - RAD_MOB_SAFE, 0) / 50) * REM * delta_time
+ M.adjustToxLoss(-2 * REM * delta_time, 0)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)
- M.reagents.remove_reagent(R.type,2)
+ M.reagents.remove_reagent(R.type, 2 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/sal_acid
name = "Salicylic Acid"
@@ -473,18 +476,18 @@
ph = 2.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.getBruteLoss() > 25)
- M.adjustBruteLoss(-4*REM, 0)
+ M.adjustBruteLoss(-4 * REM * delta_time, 0)
else
- M.adjustBruteLoss(-0.5*REM, 0)
+ M.adjustBruteLoss(-0.5 * REM * delta_time, 0)
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/sal_acid/overdose_process(mob/living/M)
+/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, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
- . = 1
+ M.adjustBruteLoss(4.5 * REM * delta_time, FALSE, FALSE, BODYPART_ORGANIC) // it's going to be healing either 4 or 0.5
+ . = TRUE
..()
/datum/reagent/medicine/salbutamol
@@ -496,12 +499,12 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/M)
- M.adjustOxyLoss(-3*REM, 0)
+/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
+ M.losebreath -= 2 * REM * delta_time
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/ephedrine
name = "Ephedrine"
@@ -524,32 +527,32 @@
REMOVE_TRAIT(L, TRAIT_STUNRESISTANCE, type)
..()
-/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M)
- if(prob(20) && iscarbon(M))
+/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(10, delta_time) && iscarbon(M))
var/obj/item/I = M.get_active_held_item()
if(I && M.dropItemToGround(I))
to_chat(M, "Your hands spaz out and you drop what you were holding!")
M.Jitter(10)
- M.AdjustAllImmobility(-20)
- M.adjustStaminaLoss(-1*REM, FALSE)
+ M.AdjustAllImmobility(-20 * REM * delta_time)
+ M.adjustStaminaLoss(-1 * REM * delta_time, FALSE)
..()
return TRUE
-/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M)
- if(prob(2) && iscarbon(M))
+/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(1, delta_time) && iscarbon(M))
var/datum/disease/D = new /datum/disease/heart_failure
M.ForceContractDisease(D)
to_chat(M, "You're pretty sure you just felt your heart stop for a second there..")
M.playsound_local(M, 'sound/effects/singlebeat.ogg', 100, 0)
- if(prob(7))
+ if(DT_PROB(3.5, delta_time))
to_chat(M, "[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(prob(33))
- M.adjustToxLoss(1*REM, 0)
+ if(DT_PROB(18, delta_time))
+ M.adjustToxLoss(1, 0)
M.losebreath++
- . = 1
+ . = TRUE
return TRUE
@@ -563,11 +566,11 @@
ph = 11.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/M)
- if(prob(10))
- M.drowsyness += 1
- M.jitteriness -= 1
- holder.remove_reagent(/datum/reagent/toxin/histamine,3)
+/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(5, delta_time))
+ M.drowsyness++
+ M.jitteriness -= 1 * REM * delta_time
+ holder.remove_reagent(/datum/reagent/toxin/histamine, 3 * REM * delta_time)
..()
/datum/reagent/medicine/morphine
@@ -589,21 +592,21 @@
L.remove_movespeed_mod_immunities(type, /datum/movespeed_modifier/damage_slowdown)
..()
-/datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 5)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "numb", /datum/mood_event/narcotic_medium, name)
switch(current_cycle)
if(11)
to_chat(M, "You start to feel tired..." )
if(12 to 24)
- M.drowsyness += 1
+ M.drowsyness += 1 * REM * delta_time
if(24 to INFINITY)
- M.Sleeping(40)
- . = 1
+ M.Sleeping(40 * REM * delta_time)
+ . = TRUE
..()
-/datum/reagent/medicine/morphine/overdose_process(mob/living/M)
- if(prob(33))
+/datum/reagent/medicine/morphine/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(18, delta_time))
M.drop_all_held_items()
M.Dizzy(2)
M.Jitter(2)
@@ -620,15 +623,15 @@
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
- M.adjust_blindness(-2)
- M.adjust_blurriness(-2)
+ M.adjust_blindness(-2 * REM * delta_time)
+ M.adjust_blurriness(-2 * REM * delta_time)
if (!eyes)
return
- eyes.applyOrganDamage(-2)
+ eyes.applyOrganDamage(-2 * REM * delta_time)
if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE))
- if(prob(20))
+ if(DT_PROB(10, delta_time))
to_chat(M, "Your vision slowly returns...")
M.cure_blind(EYE_DAMAGE)
M.cure_nearsighted(EYE_DAMAGE)
@@ -646,9 +649,9 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
var/obj/item/organ/ears/ears = M.getorganslot(ORGAN_SLOT_EARS)
- ears.adjustEarDamage(-4, -4)
+ ears.adjustEarDamage(-4 * REM * delta_time, -4 * REM * delta_time)
..()
/datum/reagent/medicine/atropine
@@ -661,24 +664,24 @@
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/M)
+/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, 0)
- M.adjustBruteLoss(-2*REM, 0)
- M.adjustFireLoss(-2*REM, 0)
- M.adjustOxyLoss(-5*REM, 0)
- . = 1
+ 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)
+ . = TRUE
M.losebreath = 0
- if(prob(20))
+ if(DT_PROB(10, delta_time))
M.Dizzy(5)
M.Jitter(5)
..()
-/datum/reagent/medicine/atropine/overdose_process(mob/living/M)
- M.adjustToxLoss(0.5*REM, 0)
- . = 1
- M.Dizzy(1)
- M.Jitter(1)
+/datum/reagent/medicine/atropine/overdose_process(mob/living/M, delta_time, times_fired)
+ M.adjustToxLoss(0.5 * REM * delta_time, 0)
+ . = TRUE
+ M.Dizzy(1 * REM * delta_time)
+ M.Jitter(1 * REM * delta_time)
..()
/datum/reagent/medicine/epinephrine
@@ -699,35 +702,35 @@
REMOVE_TRAIT(M, TRAIT_NOCRITDAMAGE, type)
..()
-/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = TRUE
if(holder.has_reagent(/datum/reagent/toxin/lexorin))
- holder.remove_reagent(/datum/reagent/toxin/lexorin, 2)
- holder.remove_reagent(/datum/reagent/medicine/epinephrine, 1)
- if(prob(20))
+ holder.remove_reagent(/datum/reagent/toxin/lexorin, 2 * REM * delta_time)
+ holder.remove_reagent(/datum/reagent/medicine/epinephrine, 1 * REM * delta_time)
+ if(DT_PROB(10, delta_time))
holder.add_reagent(/datum/reagent/toxin/histamine, 4)
..()
return
if(M.health <= M.crit_threshold)
- M.adjustToxLoss(-0.5*REM, 0)
- M.adjustBruteLoss(-0.5*REM, 0)
- M.adjustFireLoss(-0.5*REM, 0)
- M.adjustOxyLoss(-0.5*REM, 0)
+ 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
+ M.losebreath -= 2 * REM * delta_time
if(M.losebreath < 0)
M.losebreath = 0
- M.adjustStaminaLoss(-0.5*REM, 0)
- if(prob(20))
+ M.adjustStaminaLoss(-0.5 * REM * delta_time, 0)
+ if(DT_PROB(10, delta_time))
M.AdjustAllImmobility(-20)
..()
-/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M)
- if(prob(33))
- M.adjustStaminaLoss(2.5*REM, 0)
- M.adjustToxLoss(1*REM, 0)
+/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(18, REM * delta_time))
+ M.adjustStaminaLoss(2.5, 0)
+ M.adjustToxLoss(1, 0)
M.losebreath++
- . = 1
+ . = TRUE
..()
/datum/reagent/medicine/strange_reagent
@@ -770,10 +773,10 @@
addtimer(CALLBACK(exposed_mob, /mob/living.proc/revive, FALSE, FALSE, excess_healing), 79)
..()
-/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/carbon/M)
- var/damage_at_random = rand(0,250)/100 //0 to 2.5
- M.adjustBruteLoss(damage_at_random*REM, FALSE)
- M.adjustFireLoss(damage_at_random*REM, FALSE)
+/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/carbon/M, 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)
..()
. = TRUE
@@ -784,8 +787,8 @@
ph = 10.4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/C)
- C.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2*REM)
+/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+ C.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2 * REM * delta_time)
..()
//Having mannitol in you will pause the brain damage from brain tumor (so it heals an even 2 brain damage instead of 1.8)
@@ -812,10 +815,10 @@
. = ..()
REMOVE_TRAIT(L, TRAIT_ANTICONVULSANT, name)
-/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C)
+/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/consumable/ethanol/neurotoxin))
- holder.remove_reagent(/datum/reagent/consumable/ethanol/neurotoxin, 5)
- if(prob(15))
+ holder.remove_reagent(/datum/reagent/consumable/ethanol/neurotoxin, 5 * REM * delta_time)
+ if(DT_PROB(8, delta_time))
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
..()
@@ -827,7 +830,7 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.jitteriness = 0
if(M.has_dna())
M.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA), TRUE)
@@ -842,18 +845,18 @@
ph = 4
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.dizziness = 0
M.drowsyness = 0
M.slurring = 0
M.set_confusion(0)
- M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3*REM, 0, 1)
- M.adjustToxLoss(-0.2*REM, 0)
+ M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3 * REM * delta_time, FALSE, TRUE)
+ M.adjustToxLoss(-0.2 * REM * delta_time, 0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
- H.drunkenness = max(H.drunkenness - 10, 0)
+ H.drunkenness = max(H.drunkenness - (10 * REM * delta_time), 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/stimulants
name = "Stimulants"
@@ -876,23 +879,23 @@
REMOVE_TRAIT(L, TRAIT_STUNRESISTANCE, type)
..()
-/datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M)
+/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, 0)
- M.adjustToxLoss(-1*REM, 0)
- M.adjustBruteLoss(-1*REM, 0)
- M.adjustFireLoss(-1*REM, 0)
- M.AdjustAllImmobility(-60)
- M.adjustStaminaLoss(-5*REM, 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)
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/stimulants/overdose_process(mob/living/M)
- if(prob(33))
- M.adjustStaminaLoss(2.5*REM, 0)
- M.adjustToxLoss(1*REM, 0)
+/datum/reagent/medicine/stimulants/overdose_process(mob/living/M, delta_time, times_fired)
+ if(DT_PROB(18, delta_time))
+ M.adjustStaminaLoss(2.5, 0)
+ M.adjustToxLoss(1, 0)
M.losebreath++
- . = 1
+ . = TRUE
..()
/datum/reagent/medicine/insulin
@@ -904,10 +907,10 @@
ph = 6.7
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/insulin/on_mob_life(mob/living/carbon/M)
- if(M.AdjustSleeping(-20))
- . = 1
- holder.remove_reagent(/datum/reagent/consumable/sugar, 3)
+/datum/reagent/medicine/insulin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(M.AdjustSleeping(-20 * REM * delta_time))
+ . = TRUE
+ holder.remove_reagent(/datum/reagent/consumable/sugar, 3 * REM * delta_time)
..()
//Trek Chems, used primarily by medibots. Only heals a specific damage type, but is very efficient.
@@ -920,9 +923,9 @@
ph = 8.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/inaprovaline/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/inaprovaline/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.losebreath >= 5)
- M.losebreath -= 5
+ M.losebreath -= 5 * REM * delta_time
..()
/datum/reagent/medicine/regen_jelly
@@ -943,13 +946,13 @@
exposed_human.facial_hair_color = "C2F"
exposed_human.update_hair()
-/datum/reagent/medicine/regen_jelly/on_mob_life(mob/living/carbon/M)
- M.adjustBruteLoss(-1.5*REM, 0)
- M.adjustFireLoss(-1.5*REM, 0)
- M.adjustOxyLoss(-1.5*REM, 0)
- M.adjustToxLoss(-1.5*REM, 0, TRUE) //heals TOXINLOVERs
+/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
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/syndicate_nanites //Used exclusively by Syndicate medical cyborgs
name = "Restorative Nanites"
@@ -960,56 +963,56 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/carbon/M)
- M.adjustBruteLoss(-5*REM, 0) //A ton of healing - this is a 50 telecrystal investment.
- M.adjustFireLoss(-5*REM, 0)
- M.adjustOxyLoss(-15, 0)
- M.adjustToxLoss(-5*REM, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -15*REM)
- M.adjustCloneLoss(-3*REM, 0)
+/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)
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/syndicate_nanites/overdose_process(mob/living/carbon/M) //wtb flavortext messages that hint that you're vomitting up robots
- if(prob(25))
+/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
+ 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
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/earthsblood //Created by ambrosia gaia plants
name = "Earthsblood"
description = "Ichor from an extremely powerful plant. Great for restoring wounds, but it's a little heavy on the brain. For some strange reason, it also induces temporary pacifism in those who imbibe it and semi-permanent pacifism in those who overdose on it."
color = "#FFAF00"
- metabolization_rate = 0.4 //Math is based on specific metab rate so we want this to be static AKA if define or medicine metab rate changes, we want this to stay until we can rework calculations.
+ metabolization_rate = REAGENTS_METABOLISM //Math is based on specific metab rate so we want this to be static AKA if define or medicine metab rate changes, we want this to stay until we can rework calculations.
overdose_threshold = 25
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 14)
-/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle <= 25) //10u has to be processed before u get into THE FUN ZONE
- M.adjustBruteLoss(-1 * REM, 0)
- M.adjustFireLoss(-1 * REM, 0)
- M.adjustOxyLoss(-0.5 * REM, 0)
- M.adjustToxLoss(-0.5 * REM, 0)
- M.adjustCloneLoss(-0.1 * REM, 0)
- M.adjustStaminaLoss(-0.5 * REM, 0)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that!
+ 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!
else
- M.adjustBruteLoss(-5 * REM, 0) //slow to start, but very quick healing once it gets going
- M.adjustFireLoss(-5 * REM, 0)
- M.adjustOxyLoss(-3 * REM, 0)
- M.adjustToxLoss(-3 * REM, 0)
- M.adjustCloneLoss(-1 * REM, 0)
- M.adjustStaminaLoss(-3 * REM, 0)
- M.jitteriness = min(max(0, M.jitteriness + 3), 30)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM, 150)
- if(prob(10))
+ 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.jitteriness = clamp(M.jitteriness + (3 * REM * delta_time), 0, 30)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM * delta_time, 150)
+ 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.druggy = min(max(0, M.druggy + 10), 15) //See above
+ M.druggy = clamp(M.druggy + (10 * REM * delta_time), 0, 15 * REM * delta_time) //See above
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/earthsblood/on_mob_metabolize(mob/living/L)
..()
@@ -1019,17 +1022,17 @@
REMOVE_TRAIT(L, TRAIT_PACIFISM, type)
..()
-/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M)
- M.hallucination = min(max(0, M.hallucination + 5), 60)
+/datum/reagent/medicine/earthsblood/overdose_process(mob/living/M, delta_time, times_fired)
+ M.hallucination = clamp(M.hallucination + (5 * REM * delta_time), 0, 60)
if(current_cycle > 25)
- M.adjustToxLoss(4 * REM, 0)
+ M.adjustToxLoss(4 * REM * delta_time, 0)
if(current_cycle > 100) //podpeople get out reeeeeeeeeeeeeeeeeeeee
- M.adjustToxLoss(6 * REM, 0)
+ M.adjustToxLoss(6 * REM * delta_time, 0)
if(iscarbon(M))
var/mob/living/carbon/hippie = M
hippie.gain_trauma(/datum/brain_trauma/severe/pacifism)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/haloperidol
name = "Haloperidol"
@@ -1040,17 +1043,17 @@
ph = 4.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/haloperidol/on_mob_life(mob/living/carbon/M)
+/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)
- M.drowsyness += 2
+ M.reagents.remove_reagent(R.type, 5 * REM * delta_time)
+ M.drowsyness += 2 * REM * delta_time
if(M.jitteriness >= 3)
- M.jitteriness -= 3
+ M.jitteriness -= 3 * REM * delta_time
if (M.hallucination >= 5)
- M.hallucination -= 5
- if(prob(20))
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1*REM, 50)
- M.adjustStaminaLoss(2.5*REM, 0)
+ M.hallucination -= 5 * REM * delta_time
+ if(DT_PROB(10, delta_time))
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 50)
+ M.adjustStaminaLoss(2.5 * REM * delta_time, 0)
..()
return TRUE
@@ -1062,12 +1065,12 @@
overdose_threshold = 30
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/M as mob)
+/datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
..()
- M.AdjustAllImmobility(-20)
- M.adjustStaminaLoss(-10, 0)
- M.Jitter(10)
- M.Dizzy(10)
+ metabolizer.AdjustAllImmobility(-20 * REM * delta_time)
+ metabolizer.adjustStaminaLoss(-10 * REM * delta_time, 0)
+ metabolizer.Jitter(10 * REM * delta_time)
+ metabolizer.Dizzy(10 * REM * delta_time)
return TRUE
/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/L)
@@ -1084,8 +1087,8 @@
L.Dizzy(0)
L.Jitter(0)
-/datum/reagent/medicine/changelingadrenaline/overdose_process(mob/living/M as mob)
- M.adjustToxLoss(1, 0)
+/datum/reagent/medicine/changelingadrenaline/overdose_process(mob/living/metabolizer, delta_time, times_fired)
+ metabolizer.adjustToxLoss(1 * REM * delta_time, 0)
..()
return TRUE
@@ -1093,7 +1096,7 @@
name = "Changeling Haste"
description = "Drastically increases movement speed, but deals toxin damage."
color = "#AE151D"
- metabolization_rate = 1
+ metabolization_rate = 2.5 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/medicine/changelinghaste/on_mob_metabolize(mob/living/L)
@@ -1104,8 +1107,8 @@
L.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/changelinghaste)
..()
-/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/M)
- M.adjustToxLoss(2, 0)
+/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
+ metabolizer.adjustToxLoss(2 * REM * delta_time, 0)
..()
return TRUE
@@ -1174,49 +1177,49 @@
REMOVE_TRAIT(M, TRAIT_SLEEPIMMUNE, type)
..()
-/datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/M)
+/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 // for extra fun
- M.AdjustAllImmobility(-5)
- M.adjustStaminaLoss(-0.5*REM, 0)
- M.Jitter(1)
- metabolization_rate = 0.01 * REAGENTS_METABOLISM * rand(5,20) // randomizes metabolism between 0.02 and 0.08 per tick
+ 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.Jitter(1)
+ 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, "You feel awfully out of breath and jittery!")
- metabolization_rate = 0.025 * REAGENTS_METABOLISM // sets metabolism to 0.01 per tick on overdose
+ metabolization_rate = 0.025 * REAGENTS_METABOLISM // sets metabolism to 0.005 per second on overdose
-/datum/reagent/medicine/modafinil/overdose_process(mob/living/M)
+/datum/reagent/medicine/modafinil/overdose_process(mob/living/M, delta_time, times_fired)
overdose_progress++
switch(overdose_progress)
if(1 to 40)
- M.jitteriness = min(M.jitteriness+1, 10)
- M.stuttering = min(M.stuttering+1, 10)
- M.Dizzy(5)
- if(prob(50))
+ M.jitteriness = min(M.jitteriness + (1 * REM * delta_time), 10)
+ M.stuttering = min(M.stuttering + (1 * REM * delta_time), 10)
+ M.Dizzy(5 * REM * delta_time)
+ if(DT_PROB(30, delta_time))
M.losebreath++
if(41 to 80)
- M.adjustOxyLoss(0.1*REM, 0)
- M.adjustStaminaLoss(0.1*REM, 0)
- M.jitteriness = min(M.jitteriness+1, 20)
- M.stuttering = min(M.stuttering+1, 20)
- M.Dizzy(10)
- if(prob(50))
+ M.adjustOxyLoss(0.1 * REM * delta_time, 0)
+ M.adjustStaminaLoss(0.1 * REM * delta_time, 0)
+ M.jitteriness = min(M.jitteriness + (1 * REM * delta_time), 20)
+ M.stuttering = min(M.stuttering + (1 * REM * delta_time), 20)
+ M.Dizzy(10 * REM * delta_time)
+ if(DT_PROB(30, delta_time))
M.losebreath++
- if(prob(20))
+ if(DT_PROB(10, delta_time))
to_chat(M, "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
if(81)
to_chat(M, "You feel too exhausted to continue!") // at this point you will eventually die unless you get charcoal
- M.adjustOxyLoss(0.1*REM, 0)
- M.adjustStaminaLoss(0.1*REM, 0)
+ M.adjustOxyLoss(0.1 * REM * delta_time, 0)
+ M.adjustStaminaLoss(0.1 * REM * delta_time, 0)
if(82 to INFINITY)
- M.Sleeping(100)
- M.adjustOxyLoss(1.5*REM, 0)
- M.adjustStaminaLoss(1.5*REM, 0)
+ M.Sleeping(100 * REM * delta_time)
+ M.adjustOxyLoss(1.5 * REM * delta_time, 0)
+ M.adjustStaminaLoss(1.5 * REM * delta_time, 0)
..()
return TRUE
@@ -1238,22 +1241,22 @@
REMOVE_TRAIT(L, TRAIT_FEARLESS, type)
..()
-/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/M)
- M.jitteriness = max(0, M.jitteriness-6)
- M.dizziness = max(0, M.dizziness-6)
- M.set_confusion(max(0, M.get_confusion()-6))
- M.disgust = max(0, M.disgust-6)
+/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.jitteriness = max(M.jitteriness - (6 * REM * delta_time), 0)
+ M.dizziness = max(M.dizziness - (6 * REM * delta_time), 0)
+ M.set_confusion(max(M.get_confusion() - (6 * REM * delta_time), 0))
+ M.disgust = max(M.disgust - (6 * REM * delta_time), 0)
var/datum/component/mood/mood = M.GetComponent(/datum/component/mood)
if(mood != null && mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then...
- mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
+ mood.setSanity(min(mood.sanity + (5 * REM * delta_time), SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
..()
- . = 1
+ . = TRUE
-/datum/reagent/medicine/psicodine/overdose_process(mob/living/M)
- M.hallucination = min(max(0, M.hallucination + 5), 60)
- M.adjustToxLoss(1, 0)
+/datum/reagent/medicine/psicodine/overdose_process(mob/living/M, delta_time, times_fired)
+ M.hallucination = clamp(M.hallucination + (5 * REM * delta_time), 0, 60)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/metafactor
name = "Mitogen Metabolism Factor"
@@ -1267,8 +1270,8 @@
/datum/reagent/medicine/metafactor/overdose_start(mob/living/carbon/M)
metabolization_rate = 2 * REAGENTS_METABOLISM
-/datum/reagent/medicine/metafactor/overdose_process(mob/living/carbon/M)
- if(prob(25))
+/datum/reagent/medicine/metafactor/overdose_process(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(13, delta_time))
M.vomit()
..()
@@ -1280,10 +1283,10 @@
metabolization_rate = 1.5 * REAGENTS_METABOLISM
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/silibinin/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, -2)//Add a chance to cure liver trauma once implemented.
+/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.
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/polypyr //This is intended to be an ingredient in advanced chems.
name = "Polypyrylium Oligomers"
@@ -1295,10 +1298,10 @@
taste_description = "numbing bitterness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M) //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/M, 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)
- M.adjustBruteLoss(-0.35, 0)
+ M.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25 * REM * delta_time)
+ M.adjustBruteLoss(-0.35 * REM * delta_time, 0)
return TRUE
/datum/reagent/medicine/polypyr/expose_mob(mob/living/carbon/human/exposed_human, methods=TOUCH, reac_volume)
@@ -1309,10 +1312,10 @@
exposed_human.facial_hair_color = "92f"
exposed_human.update_hair()
-/datum/reagent/medicine/polypyr/overdose_process(mob/living/M)
- M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5)
+/datum/reagent/medicine/polypyr/overdose_process(mob/living/M, delta_time, times_fired)
+ M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5 * REM * delta_time)
..()
- . = 1
+ . = TRUE
/datum/reagent/medicine/granibitaluri
name = "Granibitaluri" //achieve "GRANular" amounts of C2
@@ -1320,20 +1323,20 @@
color = "#E0E0E0"
reagent_state = LIQUID
overdose_threshold = 50
- metabolization_rate = 0.2 //same as C2s
+ 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)
- var/healamount = min(-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, 0)
- M.adjustFireLoss(healamount * REM, 0)
+/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)
..()
. = TRUE
-/datum/reagent/medicine/granibitaluri/overdose_process(mob/living/M)
+/datum/reagent/medicine/granibitaluri/overdose_process(mob/living/M, delta_time, times_fired)
. = TRUE
- M.adjustOrganLoss(ORGAN_SLOT_LIVER, 0.2 * REM)
- M.adjustToxLoss(0.2 * REM, 0) //Only really deadly if you eat over 100u
+ 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
..()
// helps bleeding wounds clot faster
@@ -1344,7 +1347,7 @@
color = "#bb2424"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
overdose_threshold = 20
- /// The bloodiest wound that the patient has will have its blood_flow reduced by this much each tick
+ /// The bloodiest wound that the patient has will have its blood_flow reduced by about half this much each second
var/clot_rate = 0.3
/// While this reagent is in our bloodstream, we reduce all bleeding by this factor
var/passive_bleed_modifier = 0.7
@@ -1360,7 +1363,7 @@
REMOVE_TRAIT(M, TRAIT_COAGULATING, /datum/reagent/medicine/coagulant)
return ..()
-/datum/reagent/medicine/coagulant/on_mob_life(mob/living/carbon/M)
+/datum/reagent/medicine/coagulant/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
if(!M.blood_volume || !M.all_wounds)
return
@@ -1377,23 +1380,23 @@
if(!was_working)
to_chat(M, "You can feel your flowing blood start thickening!")
was_working = TRUE
- bloodiest_wound.blood_flow = max(0, bloodiest_wound.blood_flow - clot_rate)
+ bloodiest_wound.blood_flow = max(0, bloodiest_wound.blood_flow - (clot_rate * REM * delta_time))
else if(was_working)
was_working = FALSE
-/datum/reagent/medicine/coagulant/overdose_process(mob/living/M)
+/datum/reagent/medicine/coagulant/overdose_process(mob/living/M, delta_time, times_fired)
. = ..()
if(!M.blood_volume)
return
- if(prob(15))
- M.losebreath += rand(2,4)
- M.adjustOxyLoss(rand(1,3))
+ if(DT_PROB(7.5, delta_time))
+ M.losebreath += rand(2, 4)
+ M.adjustOxyLoss(rand(1, 3))
if(prob(30))
to_chat(M, "You can feel your blood clotting up in your veins!")
else if(prob(10))
to_chat(M, "You feel like your blood has stopped moving!")
- M.adjustOxyLoss(rand(3,4))
+ M.adjustOxyLoss(rand(3, 4))
if(prob(50))
var/obj/item/organ/lungs/our_lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm
index 871a0c48eff..5687c295610 100644
--- a/code/modules/reagents/chemistry/reagents/other_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm
@@ -2,7 +2,7 @@
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null,"quirks"=null)
name = "Blood"
color = "#C80000" // rgb: 200, 0, 0
- metabolization_rate = 5 //fast rate so it disappears fast.
+ metabolization_rate = 12.5 * REAGENTS_METABOLISM //fast rate so it disappears fast.
taste_description = "iron"
taste_mult = 1.3
glass_icon_state = "glass_red"
@@ -201,10 +201,10 @@
if(methods & TOUCH)
exposed_mob.extinguish_mob() // extinguish removes all fire stacks
-/datum/reagent/water/on_mob_life(mob/living/carbon/M)
+/datum/reagent/water/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
if(M.blood_volume)
- M.blood_volume += 0.1 // water is good for you!
+ M.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)
@@ -237,38 +237,39 @@
if(iscultist(exposed_mob))
to_chat(exposed_mob, "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)
+/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.blood_volume)
- M.blood_volume += 0.1 // water is good for you!
+ M.blood_volume += 0.1 * REM * delta_time // water is good for you!
if(!data)
- data = list("misc" = 1)
- data["misc"]++
- M.jitteriness = min(M.jitteriness+4,10)
+ data = list("misc" = 0)
+
+ data["misc"] += delta_time SECONDS * REM
+ M.jitteriness = min(M.jitteriness + (2 * delta_time), 10)
if(iscultist(M))
for(var/datum/action/innate/cult/blood_magic/BM in M.actions)
to_chat(M, "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) // 10 units, 45 seconds @ metabolism 0.4 units & tick rate 1.8 sec
+ if(data["misc"] >= (25 SECONDS)) // 10 units
if(!M.stuttering)
M.stuttering = 1
- M.stuttering = min(M.stuttering+4, 10)
+ M.stuttering = min(M.stuttering + (2 * delta_time), 10)
M.Dizzy(5)
- if(iscultist(M) && prob(20))
+ if(iscultist(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")
if(prob(10))
M.visible_message("[M] starts having a seizure!", "You have a seizure!")
- M.Unconscious(120)
+ M.Unconscious(12 SECONDS)
to_chat(M, "[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"] >= 60) // 30 units, 135 seconds
+ if(data["misc"] >= (1 MINUTES)) // 24 units
if(iscultist(M))
SSticker.mode.remove_cultist(M.mind, FALSE, TRUE)
M.jitteriness = 0
M.stuttering = 0
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, 0.4) //fixed consumption to prevent balancing going out of whack
+ holder.remove_reagent(type, 1 * REAGENTS_METABOLISM * delta_time) //fixed consumption to prevent balancing going out of whack
/datum/reagent/water/holywater/expose_turf(turf/exposed_turf, reac_volume)
. = ..()
@@ -330,28 +331,28 @@
name = "Unholy Water"
description = "Something that shouldn't exist on this plane of existence."
taste_description = "suffering"
- metabolization_rate = 2.5 * REAGENTS_METABOLISM //1u/tick
+ metabolization_rate = 2.5 * REAGENTS_METABOLISM //0.5u/second
penetrates_skin = TOUCH|VAPOR
ph = 6.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/M)
+/datum/reagent/fuel/unholywater/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(iscultist(M))
- M.drowsyness = max(M.drowsyness-5, 0)
- M.AdjustAllImmobility(-40)
- M.adjustStaminaLoss(-10, 0)
- M.adjustToxLoss(-2, 0)
- M.adjustOxyLoss(-2, 0)
- M.adjustBruteLoss(-2, 0)
- M.adjustFireLoss(-2, 0)
+ M.drowsyness = max(M.drowsyness - (5* REM * delta_time), 0)
+ 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
+ M.blood_volume += 3 * REM * delta_time
else // Will deal about 90 damage when 50 units are thrown
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150)
- M.adjustToxLoss(2, 0)
- M.adjustFireLoss(2, 0)
- M.adjustOxyLoss(2, 0)
- M.adjustBruteLoss(2, 0)
+ 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)
..()
/datum/reagent/hellwater //if someone has this in their system they've really pissed off an eldrich god
@@ -361,13 +362,13 @@
ph = 0.1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/hellwater/on_mob_life(mob/living/carbon/M)
- M.set_fire_stacks(min(5, M.fire_stacks + 3))
+/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.IgniteMob() //Only problem with igniting people is currently the commonly available fire suits make you immune to being on fire
- M.adjustToxLoss(1, 0)
- M.adjustFireLoss(1, 0) //Hence the other damages... ain't I a bastard?
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5, 150)
- holder.remove_reagent(type, 1)
+ 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)
+ holder.remove_reagent(type, 0.5*delta_time)
/datum/reagent/medicine/omnizine/godblood
name = "Godblood"
@@ -470,7 +471,7 @@
to_chat(exposed_mob, "That tasted horrible.")
-/datum/reagent/spraytan/overdose_process(mob/living/M)
+/datum/reagent/spraytan/overdose_process(mob/living/M, delta_time, times_fired)
metabolization_rate = 1 * REAGENTS_METABOLISM
if(ishuman(M))
@@ -487,12 +488,12 @@
else if(MUTCOLORS in N.dna.species.species_traits) //Aliens with custom colors simply get turned orange
N.dna.features["mcolor"] = "f80"
N.regenerate_icons()
- if(prob(7))
+ 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."))
else
M.visible_message("[M] flexes [M.p_their()] arms.")
- if(prob(10))
+ 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)
..()
return
@@ -505,7 +506,7 @@
name = "Stable Mutation Toxin"
description = "A humanizing toxin."
color = "#5EFF3B" //RGB: 94, 255, 59
- metabolization_rate = 0.2 //metabolizes to prevent micro-dosage
+ metabolization_rate = 0.5 * REAGENTS_METABOLISM //metabolizes to prevent micro-dosage
taste_description = "slime"
var/race = /datum/species/human
var/list/mutationtexts = list( "You don't feel very well." = MUT_MSG_IMMEDIATE,
@@ -515,14 +516,14 @@
"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)
+/datum/reagent/mutationtoxin/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
. = TRUE
if(!istype(H))
return
if(!(H.dna?.species) || !(H.mob_biotypes & MOB_ORGANIC))
return
- if(prob(10))
+ if(DT_PROB(5, delta_time))
var/list/pick_ur_fav = list()
var/filter = NONE
if(current_cycle <= (cycles_to_turn*0.3))
@@ -600,7 +601,7 @@
taste_description = "grandma's gelatin"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/mutationtoxin/jelly/on_mob_life(mob/living/carbon/human/H)
+/datum/reagent/mutationtoxin/jelly/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
if(isjellyperson(H))
to_chat(H, "Your jelly shifts and morphs, turning you into another subspecies!")
var/species_type = pick(subtypesof(/datum/species/jelly))
@@ -695,7 +696,7 @@
taste_description = "slime"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/mulligan/on_mob_life(mob/living/carbon/human/H)
+/datum/reagent/mulligan/on_mob_life(mob/living/carbon/human/H, delta_time, times_fired)
..()
if (!istype(H))
return
@@ -736,9 +737,9 @@
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/serotrotium/on_mob_life(mob/living/carbon/M)
+/datum/reagent/serotrotium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(ishuman(M))
- if(prob(7))
+ if(DT_PROB(3.5, delta_time))
M.emote(pick("twitch","drool","moan","gasp"))
..()
@@ -816,12 +817,12 @@
taste_mult = 0 // apparently tasteless.
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/mercury/on_mob_life(mob/living/carbon/M)
+/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))
- if(prob(5))
+ if(DT_PROB(3.5, delta_time))
M.emote(pick("twitch","drool","moan"))
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5*delta_time)
..()
/datum/reagent/sulfur
@@ -872,9 +873,9 @@
// White Phosphorous + water -> phosphoric acid. That's not a good thing really.
-/datum/reagent/chlorine/on_mob_life(mob/living/carbon/M)
- M.take_bodypart_damage(1*REM, 0, 0, 0)
- . = 1
+/datum/reagent/chlorine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.take_bodypart_damage(0.5*REM*delta_time, 0, 0, 0)
+ . = TRUE
..()
/datum/reagent/fluorine
@@ -895,9 +896,9 @@
mytray.adjustWater(-round(chems.get_reagent_amount(src.type) * 0.5))
mytray.adjustWeeds(-rand(1,4))
-/datum/reagent/fluorine/on_mob_life(mob/living/carbon/M)
- M.adjustToxLoss(1*REM, 0)
- . = 1
+/datum/reagent/fluorine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustToxLoss(0.5*REM*delta_time, 0)
+ . = TRUE
..()
/datum/reagent/sodium
@@ -935,10 +936,10 @@
ph = 11.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/lithium/on_mob_life(mob/living/carbon/M)
+/datum/reagent/lithium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(!HAS_TRAIT(M, TRAIT_IMMOBILIZED) && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinals))
- if(prob(5))
+ if(DT_PROB(2.5, delta_time))
M.emote(pick("twitch","drool","moan"))
..()
@@ -977,9 +978,9 @@
color = "#606060" //pure iron? let's make it violet of course
ph = 6
-/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
+/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.5
+ C.blood_volume += 0.25 * delta_time
..()
/datum/reagent/gold
@@ -1006,13 +1007,13 @@
reagent_state = SOLID
color = "#5E9964" //this used to be silver, but liquid uranium can still be green and it's more easily noticeable as uranium like this so why bother?
taste_description = "the inside of a reactor"
- var/irradiation_level = 1
+ var/irradiation_level = 0.5*REM
ph = 4
material = /datum/material/uranium
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/uranium/on_mob_life(mob/living/carbon/M)
- M.apply_effect(irradiation_level/M.metabolism_efficiency,EFFECT_IRRADIATE,0)
+/datum/reagent/uranium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.apply_effect(irradiation_level*delta_time/M.metabolism_efficiency, EFFECT_IRRADIATE,0)
..()
/datum/reagent/uranium/expose_turf(turf/exposed_turf, reac_volume)
@@ -1040,7 +1041,7 @@
reagent_state = SOLID
color = "#00CC00" // ditto
taste_description = "the colour blue and regret"
- irradiation_level = 2*REM
+ irradiation_level = 1*REM
material = null
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
@@ -1066,8 +1067,8 @@
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)
- if(current_cycle > 10 && prob(15))
+/datum/reagent/bluespace/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(current_cycle > 10 && DT_PROB(7.5, delta_time))
to_chat(M, "You feel unstable...")
M.Jitter(2)
current_cycle = 1
@@ -1113,8 +1114,8 @@
if(methods & (TOUCH|VAPOR))
exposed_mob.adjust_fire_stacks(reac_volume / 10)
-/datum/reagent/fuel/on_mob_life(mob/living/carbon/M)
- M.adjustToxLoss(1, 0)
+/datum/reagent/fuel/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustToxLoss(0.5*delta_time, 0)
..()
return TRUE
@@ -1162,10 +1163,10 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/space_cleaner/ez_clean/on_mob_life(mob/living/carbon/M)
- M.adjustBruteLoss(3.33)
- M.adjustFireLoss(3.33)
- M.adjustToxLoss(3.33)
+/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/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -1183,7 +1184,7 @@
ph = 11.9
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/cryptobiolin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/cryptobiolin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
M.Dizzy(1)
M.set_confusion(clamp(M.get_confusion(), 1, 20))
..()
@@ -1197,13 +1198,13 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opiods = 10)
-/datum/reagent/impedrezene/on_mob_life(mob/living/carbon/M)
- M.jitteriness = max(M.jitteriness-5,0)
- if(prob(80))
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM)
- if(prob(50))
+/datum/reagent/impedrezene/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.jitteriness = max(M.jitteriness - (2.5*delta_time),0)
+ if(DT_PROB(55, delta_time))
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2)
+ if(DT_PROB(30, delta_time))
M.drowsyness = max(M.drowsyness, 3)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
M.emote("drool")
..()
@@ -1355,12 +1356,12 @@
if(methods & VAPOR)
exposed_mob.drowsyness += max(round(reac_volume, 1), 2)
-/datum/reagent/nitrous_oxide/on_mob_life(mob/living/carbon/M)
- M.drowsyness += 2
+/datum/reagent/nitrous_oxide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.drowsyness += 2 * REM * delta_time
if(ishuman(M))
var/mob/living/carbon/human/H = M
- H.blood_volume = max(H.blood_volume - 10, 0)
- if(prob(20))
+ H.blood_volume = max(H.blood_volume - (10 * REM * delta_time), 0)
+ if(DT_PROB(10, delta_time))
M.losebreath += 2
M.set_confusion(min(M.get_confusion() + 2, 5))
..()
@@ -1386,9 +1387,9 @@
REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, type)
..()
-/datum/reagent/stimulum/on_mob_life(mob/living/carbon/M)
- M.adjustStaminaLoss(-2*REM, 0)
- M.adjustToxLoss(current_cycle*0.1*REM, 0) // 1 toxin damage per cycle at cycle 10
+/datum/reagent/stimulum/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustStaminaLoss(-2 * REM * delta_time, 0)
+ M.adjustToxLoss(0.1 * current_cycle * REM * delta_time, 0) // 1 toxin damage per cycle at cycle 10
..()
/datum/reagent/nitryl
@@ -1462,11 +1463,11 @@
L.SetSleeping(10)
return ..()
-/datum/reagent/healium/on_mob_life(mob/living/L)
+/datum/reagent/healium/on_mob_life(mob/living/L, delta_time, times_fired)
. = ..()
- L.adjustFireLoss(-2, FALSE)
- L.adjustToxLoss(-5, FALSE)
- L.adjustBruteLoss(-2, FALSE)
+ L.adjustFireLoss(-2 * REM * delta_time, FALSE)
+ L.adjustToxLoss(-5 * REM * delta_time, FALSE)
+ L.adjustBruteLoss(-2 * REM * delta_time, FALSE)
/datum/reagent/halon
name = "Halon"
@@ -1628,17 +1629,17 @@
taste_description = "plant food"
ph = 3
-/datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/M)
- if(prob(tox_prob))
- M.adjustToxLoss(1*REM, 0)
- . = 1
+/datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(tox_prob, delta_time))
+ M.adjustToxLoss(1, 0)
+ . = TRUE
..()
/datum/reagent/plantnutriment/eznutriment
name = "E-Z-Nutrient"
description = "Contains electrolytes. It's what plants crave."
color = "#376400" // RBG: 50, 100, 0
- tox_prob = 10
+ tox_prob = 5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/plantnutriment/eznutriment/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
@@ -1652,7 +1653,7 @@
name = "Left 4 Zed"
description = "Unstable nutriment that makes plants mutate more often than usual."
color = "#1A1E4D" // RBG: 26, 30, 77
- tox_prob = 25
+ tox_prob = 13
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/plantnutriment/left4zednutriment/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
@@ -1665,7 +1666,7 @@
name = "Robust Harvest"
description = "Very potent nutriment that slows plants from mutating."
color = "#9D9D00" // RBG: 157, 157, 0
- tox_prob = 15
+ tox_prob = 8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/plantnutriment/robustharvestnutriment/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
@@ -1679,7 +1680,7 @@
name = "Enduro Grow"
description = "A specialized nutriment, which decreases product quantity and potency, but strengthens the plants endurance."
color = "#a06fa7" // RBG: 160, 111, 167
- tox_prob = 15
+ tox_prob = 8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/plantnutriment/endurogrow/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
@@ -1693,7 +1694,7 @@
name = "Liquid Earthquake"
description = "A specialized nutriment, which increases the plant's production speed, as well as it's susceptibility to weeds."
color = "#912e00" // RBG: 145, 46, 0
- tox_prob = 25
+ tox_prob = 13
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/plantnutriment/liquidearthquake/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray)
@@ -1726,8 +1727,8 @@
ph = 1.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/stable_plasma/on_mob_life(mob/living/carbon/C)
- C.adjustPlasma(10)
+/datum/reagent/stable_plasma/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+ C.adjustPlasma(10 * REM * delta_time)
..()
/datum/reagent/iodine
@@ -1814,20 +1815,20 @@
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)
+/datum/reagent/carpet/royal/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
var/obj/item/organ/liver/liver = M.getorganslot(ORGAN_SLOT_LIVER)
if(liver)
// Heads of staff and the captain have a "royal metabolism"
if(HAS_TRAIT(liver, TRAIT_ROYAL_METABOLISM))
- if(prob(10))
+ if(DT_PROB(5, delta_time))
to_chat(M, "You feel like royalty.")
- if(prob(5))
+ 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")
// The quartermaster, as a semi-head, has a "pretender royal" metabolism
else if(HAS_TRAIT(liver, TRAIT_PRETENDER_ROYAL_METABOLISM))
- if(prob(15))
+ if(DT_PROB(8, delta_time))
to_chat(M, "You feel like an impostor...")
/datum/reagent/carpet/royal/black
@@ -1938,7 +1939,7 @@
/datum/reagent/colorful_reagent/proc/UpdateColor()
color = pick(random_color_list)
-/datum/reagent/colorful_reagent/on_mob_life(mob/living/carbon/M)
+/datum/reagent/colorful_reagent/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(can_colour_mobs)
M.add_atom_colour(pick(random_color_list), WASHABLE_COLOUR_PRIORITY)
return ..()
@@ -2151,8 +2152,8 @@
ph = 3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/carbon/M)
- if(prob(2))
+/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(1, delta_time))
M.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz..."), forced = "royal bee jelly")
..()
@@ -2185,7 +2186,7 @@
color = "#00f041"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/magillitis/on_mob_life(mob/living/carbon/M)
+/datum/reagent/magillitis/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
..()
if((ishuman(M)) && current_cycle >= 10)
M.gorillize()
@@ -2198,7 +2199,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)
+/datum/reagent/growthserum/on_mob_life(mob/living/carbon/H, delta_time, times_fired)
var/newsize = current_size
switch(volume)
if(0 to 19)
@@ -2299,11 +2300,11 @@
..()
REMOVE_TRAIT(L, CHANGELING_HIVEMIND_MUTE, type)
-/datum/reagent/bz_metabolites/on_mob_life(mob/living/L)
+/datum/reagent/bz_metabolites/on_mob_life(mob/living/L, delta_time, times_fired)
if(L.mind)
var/datum/antagonist/changeling/changeling = L.mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
- changeling.chem_charges = max(changeling.chem_charges-2, 0)
+ changeling.chem_charges = max(changeling.chem_charges - (2 * REM * delta_time), 0)
return ..()
/datum/reagent/pax/peaceborg
@@ -2319,12 +2320,12 @@
taste_description = "dizziness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/M)
+/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.get_confusion() < 6)
- M.set_confusion(clamp(M.get_confusion() + 3, 0, 5))
+ M.set_confusion(clamp(M.get_confusion() + (3 * REM * delta_time), 0, 5))
if(M.dizziness < 6)
- M.dizziness = clamp(M.dizziness + 3, 0, 5)
- if(prob(20))
+ M.dizziness = clamp(M.dizziness + (3 * REM * delta_time), 0, 5)
+ if(DT_PROB(10, delta_time))
to_chat(M, "You feel confused and disoriented.")
..()
@@ -2335,11 +2336,11 @@
taste_description = "tiredness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/peaceborg/tire/on_mob_life(mob/living/carbon/M)
+/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)
- if(prob(30))
+ M.adjustStaminaLoss(10 * REM * delta_time)
+ if(DT_PROB(16, delta_time))
to_chat(M, "You should sit down and take a rest...")
..()
@@ -2382,9 +2383,9 @@
#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)
+/datum/reagent/yuck/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
if(!yuck_cycle)
- if(prob(8))
+ 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...")
@@ -2518,7 +2519,7 @@
description = "For when you need to push on a little more. Do NOT allow near plants."
reagent_state = LIQUID
color = "#D2FFFA"
- metabolization_rate = 0.75 * REAGENTS_METABOLISM // 5u (WOUND_DETERMINATION_CRITICAL) will last for ~17 ticks
+ metabolization_rate = 0.75 * REAGENTS_METABOLISM // 5u (WOUND_DETERMINATION_CRITICAL) will last for ~34 seconds
self_consuming = TRUE
/// 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
@@ -2533,7 +2534,7 @@
M.remove_status_effect(STATUS_EFFECT_DETERMINED)
..()
-/datum/reagent/determination/on_mob_life(mob/living/carbon/M)
+/datum/reagent/determination/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(!significant && volume >= WOUND_DETERMINATION_SEVERE)
significant = TRUE
M.apply_status_effect(STATUS_EFFECT_DETERMINED) // in addition to the slight healing, limping cooldowns are divided by 4 during the combat high
@@ -2544,8 +2545,8 @@
var/datum/wound/W = thing
var/obj/item/bodypart/wounded_part = W.limb
if(wounded_part)
- wounded_part.heal_damage(0.25, 0.25)
- M.adjustStaminaLoss(-0.25*REM) // the more wounds, the more stamina regen
+ 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
..()
/datum/reagent/eldritch //unholy water, but for eldritch cultists. why couldn't they have both just used the same reagent? who knows. maybe nar'sie is considered to be too "mainstream" of a god to worship in the cultist community.
@@ -2553,25 +2554,25 @@
description = "A strange liquid that defies the laws of physics. It re-energizes and heals those who can see beyond this fragile reality, but is incredibly harmful to the closed-minded. It metabolizes very quickly."
taste_description = "Ag'hsj'saje'sh"
color = "#1f8016"
- metabolization_rate = 2.5 * REAGENTS_METABOLISM //1u/tick
+ metabolization_rate = 2.5 * REAGENTS_METABOLISM //0.5u/second
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/eldritch/on_mob_life(mob/living/carbon/M)
+/datum/reagent/eldritch/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(IS_HERETIC(M))
- M.drowsyness = max(M.drowsyness-5, 0)
- M.AdjustAllImmobility(-40)
- M.adjustStaminaLoss(-10, FALSE)
- M.adjustToxLoss(-2, FALSE)
- M.adjustOxyLoss(-2, FALSE)
- M.adjustBruteLoss(-2, FALSE)
- M.adjustFireLoss(-2, FALSE)
+ M.drowsyness = max(M.drowsyness - (5 * REM * delta_time), 0)
+ M.AdjustAllImmobility(-40 * REM * delta_time)
+ M.adjustStaminaLoss(-10 * REM * delta_time, FALSE)
+ M.adjustToxLoss(-2 * REM * delta_time, FALSE)
+ M.adjustOxyLoss(-2 * REM * delta_time, FALSE)
+ M.adjustBruteLoss(-2 * REM * delta_time, FALSE)
+ M.adjustFireLoss(-2 * REM * delta_time, FALSE)
if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL)
- M.blood_volume += 3
+ M.blood_volume += 3 * REM * delta_time
else
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150)
- M.adjustToxLoss(2, FALSE)
- M.adjustFireLoss(2, FALSE)
- M.adjustOxyLoss(2, FALSE)
- M.adjustBruteLoss(2, FALSE)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * delta_time, 150)
+ M.adjustToxLoss(2 * REM * delta_time, FALSE)
+ M.adjustFireLoss(2 * REM * delta_time, FALSE)
+ M.adjustOxyLoss(2 * REM * delta_time, FALSE)
+ M.adjustBruteLoss(2 * REM * delta_time, FALSE)
..()
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
index 245baa137cd..6ad017e4988 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)
- M.adjustFireLoss(1, 0)
+/datum/reagent/thermite/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustFireLoss(1 * REM * delta_time, 0)
..()
return TRUE
@@ -43,15 +43,14 @@
description = "Makes a temporary 3x3 fireball when it comes into existence, so be careful when mixing. ClF3 applied to a surface burns things that wouldn't otherwise burn, sometimes through the very floors of the station and exposing it to the vacuum of space."
reagent_state = LIQUID
color = "#FFC8C8"
- metabolization_rate = 4
+ metabolization_rate = 10 * REAGENTS_METABOLISM
taste_description = "burning"
penetrates_skin = NONE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/clf3/on_mob_life(mob/living/carbon/M)
- M.adjust_fire_stacks(2)
- var/burndmg = max(0.3*M.fire_stacks, 0.3)
- M.adjustFireLoss(burndmg, 0)
+/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)
..()
return TRUE
@@ -100,18 +99,18 @@
description = "Explodes. Violently."
reagent_state = LIQUID
color = "#000000"
- metabolization_rate = 0.05
+ metabolization_rate = 0.125 * REAGENTS_METABOLISM
taste_description = "salt"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/gunpowder/on_mob_life(mob/living/carbon/M)
+/datum/reagent/gunpowder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = TRUE
..()
if(!isplasmaman(M))
return
- M.set_drugginess(15)
+ M.set_drugginess(15 * REM * delta_time)
if(M.hallucination < volume)
- M.hallucination += 5
+ M.hallucination += 5 * REM * delta_time
/datum/reagent/gunpowder/on_ex_act()
var/location = get_turf(holder.my_atom)
@@ -176,10 +175,9 @@
exposed_mob.adjustFireLoss(burndmg, 0)
exposed_mob.IgniteMob()
-/datum/reagent/phlogiston/on_mob_life(mob/living/carbon/exposed_mob)
- exposed_mob.adjust_fire_stacks(1)
- var/burndmg = max(0.3*exposed_mob.fire_stacks, 0.3)
- exposed_mob.adjustFireLoss(burndmg, 0)
+/datum/reagent/phlogiston/on_mob_life(mob/living/carbon/metabolizer, delta_time, times_fired)
+ metabolizer.adjust_fire_stacks(1 * REM * delta_time)
+ metabolizer.adjustFireLoss(0.3 * max(metabolizer.fire_stacks, 0.15) * REM * delta_time, 0)
..()
return TRUE
@@ -202,8 +200,8 @@
mytray.adjustToxic(round(chems.get_reagent_amount(type) * 7))
mytray.adjustWeeds(-rand(5,9)) //At least give them a small reward if they bother.
-/datum/reagent/napalm/on_mob_life(mob/living/carbon/M)
- M.adjust_fire_stacks(1)
+/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/expose_mob(mob/living/exposed_mob, methods=TOUCH, reac_volume)
@@ -221,13 +219,13 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/cryostylane/on_mob_life(mob/living/carbon/M) //TODO: code freezing into an ice cube
+/datum/reagent/cryostylane/on_mob_life(mob/living/carbon/M, delta_time, times_fired) //TODO: code freezing into an ice cube
if(M.reagents.has_reagent(/datum/reagent/oxygen))
- M.reagents.remove_reagent(/datum/reagent/oxygen, 0.5)
- M.adjust_bodytemperature(-15)
+ M.reagents.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
- humi.adjust_coretemperature(-15)
+ humi.adjust_coretemperature(-15 * REM * delta_time)
..()
/datum/reagent/cryostylane/expose_turf(turf/exposed_turf, reac_volume)
@@ -246,13 +244,13 @@
self_consuming = TRUE
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/pyrosium/on_mob_life(mob/living/carbon/M)
+/datum/reagent/pyrosium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/oxygen))
- holder.remove_reagent(/datum/reagent/oxygen, 0.5)
- M.adjust_bodytemperature(15)
+ 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
- humi.adjust_coretemperature(15)
+ humi.adjust_coretemperature(15 * REM * delta_time)
..()
/datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective.
@@ -266,11 +264,11 @@
var/shock_timer = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/teslium/on_mob_life(mob/living/carbon/M)
+/datum/reagent/teslium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
shock_timer++
- if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
+ 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
+ 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, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
..()
@@ -294,15 +292,15 @@
taste_description = "jelly"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/M)
+/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(isjellyperson(M))
shock_timer = 0 //immune to shocks
- M.AdjustAllImmobility(-40)
- M.adjustStaminaLoss(-2, 0)
+ M.AdjustAllImmobility(-40 *REM * delta_time)
+ M.adjustStaminaLoss(-2 * REM * delta_time, 0)
if(isluminescent(M))
var/mob/living/carbon/human/H = M
var/datum/species/jelly/luminescent/L = H.dna.species
- L.extract_cooldown = max(0, L.extract_cooldown - 20)
+ L.extract_cooldown = max(L.extract_cooldown - (20 * 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 1c2fb8445e7..20a6b9bc7f6 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -18,9 +18,9 @@
if(chems.has_reagent(type, 1))
mytray.adjustToxic(round(chems.get_reagent_amount(type) * 2))
-/datum/reagent/toxin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(toxpwr)
- M.adjustToxLoss(toxpwr*REM, 0)
+ M.adjustToxLoss(toxpwr * REM * delta_time, 0)
. = TRUE
..()
@@ -56,8 +56,8 @@
exposed_mob.updateappearance()
exposed_mob.domutcheck()
-/datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/C)
- C.apply_effect(5,EFFECT_IRRADIATE,0)
+/datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+ C.apply_effect(5 * REM * delta_time, EFFECT_IRRADIATE, 0)
return ..()
/datum/reagent/toxin/mutagen/on_hydroponics_apply(obj/item/seeds/myseed, datum/reagents/chems, obj/machinery/hydroponics/mytray, mob/user)
@@ -88,10 +88,10 @@
UnregisterSignal(holder, COMSIG_REAGENTS_TEMP_CHANGE)
return ..()
-/datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C)
+/datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/medicine/epinephrine))
- holder.remove_reagent(/datum/reagent/medicine/epinephrine, 2*REM)
- C.adjustPlasma(20)
+ holder.remove_reagent(/datum/reagent/medicine/epinephrine, 2 * REM * delta_time)
+ C.adjustPlasma(20 * REM * delta_time)
return ..()
/// Handles plasma boiling.
@@ -131,14 +131,14 @@
material = /datum/material/hot_ice
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/hot_ice/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/hot_ice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(holder.has_reagent(/datum/reagent/medicine/epinephrine))
- holder.remove_reagent(/datum/reagent/medicine/epinephrine, 2*REM)
- M.adjustPlasma(20)
- M.adjust_bodytemperature(-7 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ 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 * TEMPERATURE_DAMAGE_COEFFICIENT, M.get_body_temp_normal())
+ humi.adjust_coretemperature(-7 * REM * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time, M.get_body_temp_normal())
return ..()
/datum/reagent/toxin/lexorin
@@ -150,16 +150,16 @@
ph = 1.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C)
+/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
. = TRUE
if(HAS_TRAIT(C, TRAIT_NOBREATH))
. = FALSE
if(.)
- C.adjustOxyLoss(5, 0)
- C.losebreath += 2
- if(prob(20))
+ C.adjustOxyLoss(5 * REM * delta_time, 0)
+ C.losebreath += 2 * REM * delta_time
+ if(DT_PROB(10, delta_time))
C.emote("gasp")
..()
@@ -173,14 +173,14 @@
ph = 10
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/M)
- if(prob(10))
+/datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(5, delta_time))
to_chat(M, "Your insides are burning!")
- M.adjustToxLoss(rand(20,60)*REM, 0)
- . = 1
- else if(prob(40))
- M.heal_bodypart_damage(5*REM)
- . = 1
+ M.adjustToxLoss(rand(20, 60), 0)
+ . = TRUE
+ else if(DT_PROB(23, delta_time))
+ M.heal_bodypart_damage(5)
+ . = TRUE
..()
/datum/reagent/toxin/minttoxin
@@ -192,7 +192,7 @@
ph = 8
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(HAS_TRAIT(M, TRAIT_FAT))
M.inflate_gib()
return ..()
@@ -202,12 +202,12 @@
description = "A deadly neurotoxin produced by the dreaded spess carp."
silent_toxin = TRUE
color = "#003333" // rgb: 0, 51, 51
- toxpwr = 2
+ toxpwr = 1
taste_description = "fish"
ph = 12
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/carpotoxin/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/carpotoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
. = ..()
for(var/i in M.all_scars)
qdel(i)
@@ -243,17 +243,17 @@
if(istype(zombiepowder))
zombiepowder.fakedeath_active = TRUE
-/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/M)
+/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/M, delta_time, times_fired)
..()
if(fakedeath_active)
return TRUE
switch(current_cycle)
if(1 to 5)
- M.add_confusion(1)
- M.drowsyness += 1
- M.slurring += 3
+ M.add_confusion(1 * REM * delta_time)
+ M.drowsyness += 1 * REM * delta_time
+ M.slurring += 3 * REM * delta_time
if(5 to 8)
- M.adjustStaminaLoss(40, 0)
+ M.adjustStaminaLoss(40 * REM * delta_time, 0)
if(9 to INFINITY)
fakedeath_active = TRUE
M.fakedeath(type)
@@ -276,10 +276,10 @@
REMOVE_TRAIT(L, TRAIT_FAKEDEATH, type)
..()
-/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/M)
- M.adjustOxyLoss(1*REM, 0)
+/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustOxyLoss(1 * REM * delta_time, 0)
..()
- . = 1
+ . = TRUE
/datum/reagent/toxin/mindbreaker
name = "Mindbreaker Toxin"
@@ -291,8 +291,8 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/hallucinogens = 18) //7.2 per 2 seconds
-/datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/M)
- M.hallucination += 5
+/datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.hallucination += 5 * REM * delta_time
return ..()
/datum/reagent/toxin/plantbgone
@@ -392,10 +392,10 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/spore/on_mob_life(mob/living/carbon/C)
+/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)
+ C.blur_eyes(3 * REM * delta_time)
return ..()
/datum/reagent/toxin/spore_burning
@@ -407,8 +407,8 @@
ph = 13
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/spore_burning/on_mob_life(mob/living/carbon/M)
- M.adjust_fire_stacks(2)
+/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.IgniteMob()
return ..()
@@ -423,18 +423,18 @@
ph = 11
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
switch(current_cycle)
if(1 to 10)
- M.add_confusion(2)
- M.drowsyness += 2
+ M.add_confusion(2 * REM * delta_time)
+ M.drowsyness += 2 * REM * delta_time
if(10 to 50)
- M.Sleeping(40)
- . = 1
+ M.Sleeping(40 * REM * delta_time)
+ . = TRUE
if(51 to INFINITY)
- M.Sleeping(40)
- M.adjustToxLoss((current_cycle - 50)*REM, 0)
- . = 1
+ M.Sleeping(40 * REM * delta_time)
+ M.adjustToxLoss(1 * (current_cycle - 50) * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/toxin/fakebeer //disguised as normal beer for use by emagged brobots
@@ -449,13 +449,13 @@
ph = 2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
switch(current_cycle)
if(1 to 50)
- M.Sleeping(40)
+ M.Sleeping(40 * REM * delta_time)
if(51 to INFINITY)
- M.Sleeping(40)
- M.adjustToxLoss((current_cycle - 50)*REM, 0)
+ M.Sleeping(40 * REM * delta_time)
+ M.adjustToxLoss(1 * (current_cycle - 50) * REM * delta_time, 0)
return ..()
/datum/reagent/toxin/coffeepowder
@@ -487,8 +487,8 @@
ph = 12.2
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M)
- M.silent = max(M.silent, 3)
+/datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.silent = max(M.silent, 3 * REM * delta_time)
..()
/datum/reagent/toxin/staminatoxin
@@ -496,15 +496,15 @@
description = "A nonlethal poison that causes extreme fatigue and weakness in its victim."
silent_toxin = TRUE
color = "#6E2828"
- data = 13
+ data = 15
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/M)
- M.adjustStaminaLoss(REM * data, 0)
+/datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustStaminaLoss(data * REM * delta_time, 0)
data = max(data - 1, 3)
..()
- . = 1
+ . = TRUE
/datum/reagent/toxin/polonium
name = "Polonium"
@@ -515,8 +515,8 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/polonium/on_mob_life(mob/living/carbon/M)
- M.radiation += 4
+/datum/reagent/toxin/polonium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.radiation += 4 * REM * delta_time
..()
/datum/reagent/toxin/histamine
@@ -530,8 +530,8 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/M)
- if(prob(50))
+/datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(30, delta_time))
switch(pick(1, 2, 3, 4))
if(1)
to_chat(M, "You can barely see!")
@@ -544,15 +544,15 @@
if(prob(75))
to_chat(M, "You scratch at an itch.")
M.adjustBruteLoss(2*REM, 0)
- . = 1
+ . = TRUE
..()
-/datum/reagent/toxin/histamine/overdose_process(mob/living/M)
- M.adjustOxyLoss(2*REM, 0)
- M.adjustBruteLoss(2*REM, FALSE, FALSE, BODYPART_ORGANIC)
- M.adjustToxLoss(2*REM, 0)
+/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, BODYPART_ORGANIC)
+ M.adjustToxLoss(2 * REM * delta_time, FALSE)
..()
- . = 1
+ . = TRUE
/datum/reagent/toxin/formaldehyde
name = "Formaldehyde"
@@ -564,8 +564,8 @@
toxpwr = 1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/formaldehyde/on_mob_life(mob/living/carbon/M)
- if(prob(5))
+/datum/reagent/toxin/formaldehyde/on_mob_life(mob/living/carbon/M, 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)
else
@@ -580,12 +580,12 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/venom/on_mob_life(mob/living/carbon/M)
- toxpwr = 0.2*volume
- M.adjustBruteLoss((0.3*volume)*REM, 0)
- . = 1
- if(prob(15))
- holder.add_reagent(/datum/reagent/toxin/histamine, pick(5,10))
+/datum/reagent/toxin/venom/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ toxpwr = 0.1 * volume
+ M.adjustBruteLoss((0.3 * volume) * REM * delta_time, 0)
+ . = TRUE
+ if(DT_PROB(8, delta_time))
+ holder.add_reagent(/datum/reagent/toxin/histamine, pick(5, 10))
holder.remove_reagent(/datum/reagent/toxin/venom, 1.1)
else
..()
@@ -600,14 +600,14 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
addiction_types = list(/datum/addiction/opiods = 25)
-/datum/reagent/toxin/fentanyl/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3*REM, 150)
+/datum/reagent/toxin/fentanyl/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * REM * delta_time, 150)
if(M.toxloss <= 60)
- M.adjustToxLoss(1*REM, 0)
+ M.adjustToxLoss(1 * REM * delta_time, 0)
if(current_cycle >= 4)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "smacked out", /datum/mood_event/narcotic_heavy, name)
if(current_cycle >= 18)
- M.Sleeping(40)
+ M.Sleeping(40 * REM * delta_time)
..()
return TRUE
@@ -620,10 +620,10 @@
toxpwr = 1.25
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/cyanide/on_mob_life(mob/living/carbon/M)
- if(prob(5))
+/datum/reagent/toxin/cyanide/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(2.5, delta_time))
M.losebreath += 1
- if(prob(8))
+ if(DT_PROB(4, delta_time))
to_chat(M, "You feel horrendously weak!")
M.Stun(40)
M.adjustToxLoss(2*REM, 0)
@@ -650,20 +650,20 @@
penetrates_skin = TOUCH|VAPOR
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/M)
- if(prob(15))
+/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(8, delta_time))
to_chat(M, "You scratch at your head.")
M.adjustBruteLoss(0.2*REM, 0)
- . = 1
- if(prob(15))
+ . = TRUE
+ if(DT_PROB(8, delta_time))
to_chat(M, "You scratch at your leg.")
M.adjustBruteLoss(0.2*REM, 0)
- . = 1
- if(prob(15))
+ . = TRUE
+ if(DT_PROB(8, delta_time))
to_chat(M, "You scratch at your arm.")
M.adjustBruteLoss(0.2*REM, 0)
- . = 1
- if(prob(3))
+ . = TRUE
+ if(DT_PROB(1.5, delta_time))
holder.add_reagent(/datum/reagent/toxin/histamine,rand(1,3))
holder.remove_reagent(/datum/reagent/toxin/itching_powder,1.2)
return
@@ -679,8 +679,8 @@
toxpwr = 2.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/initropidril/on_mob_life(mob/living/carbon/C)
- if(prob(25))
+/datum/reagent/toxin/initropidril/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
+ if(DT_PROB(13, delta_time))
var/picked_option = rand(1,3)
switch(picked_option)
if(1)
@@ -712,11 +712,11 @@
taste_mult = 0 // undetectable, I guess?
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/pancuronium/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/pancuronium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 10)
- M.Stun(40)
+ M.Stun(40 * REM * delta_time)
. = TRUE
- if(prob(20))
+ if(DT_PROB(10, delta_time))
M.losebreath += 4
..()
@@ -738,10 +738,10 @@
. = ..()
REMOVE_TRAIT(L, TRAIT_ANTICONVULSANT, name)
-/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 10)
- M.Sleeping(40)
- M.adjustStaminaLoss(10*REM, 0)
+ M.Sleeping(40 * REM * delta_time)
+ M.adjustStaminaLoss(10 * REM * delta_time, 0)
..()
return TRUE
@@ -755,9 +755,9 @@
toxpwr = 0.5
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/sulfonal/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/sulfonal/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 22)
- M.Sleeping(40)
+ M.Sleeping(40 * REM * delta_time)
return ..()
/datum/reagent/toxin/amanitin
@@ -787,10 +787,10 @@
toxpwr = 0
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/lipolicide/on_mob_life(mob/living/carbon/M)
+/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, 0)
- M.adjust_nutrition(-3) // making the chef more valuable, one meme trap at a time
+ M.adjustToxLoss(1 * REM * delta_time, 0)
+ M.adjust_nutrition(-3 * REM * delta_time) // making the chef more valuable, one meme trap at a time
M.overeatduration = 0
return ..()
@@ -803,8 +803,8 @@
toxpwr = 1.75
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/coniine/on_mob_life(mob/living/carbon/M)
- M.losebreath += 5
+/datum/reagent/toxin/coniine/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.losebreath += 5 * REM * delta_time
return ..()
/datum/reagent/toxin/spewium
@@ -818,17 +818,17 @@
taste_description = "vomit"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/C)
+/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
.=..()
- if(current_cycle >=11 && prob(min(50,current_cycle)))
+ 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)
if(R != src)
C.reagents.remove_reagent(R.type,1)
-/datum/reagent/toxin/spewium/overdose_process(mob/living/carbon/C)
+/datum/reagent/toxin/spewium/overdose_process(mob/living/carbon/C, delta_time, times_fired)
. = ..()
- if(current_cycle >=33 && prob(15))
+ if(current_cycle >= 33 && DT_PROB(7.5, delta_time))
C.spew_organ()
C.vomit(0, TRUE, TRUE, 4)
to_chat(C, "You feel something lumpy come up as you vomit.")
@@ -842,11 +842,11 @@
toxpwr = 1
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/curare/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/curare/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle >= 11)
- M.Paralyze(60)
- M.adjustOxyLoss(1*REM, 0)
- . = 1
+ M.Paralyze(60 * REM * delta_time)
+ M.adjustOxyLoss(0.5*REM*delta_time, 0)
+ . = TRUE
..()
/datum/reagent/toxin/heparin //Based on a real-life anticoagulant. I'm not a doctor, so this won't be realistic.
@@ -878,9 +878,9 @@
taste_description = "spinning"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/rotatium/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/rotatium/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(M.hud_used)
- if(current_cycle >= 20 && current_cycle%20 == 0)
+ 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/rotation = min(round(current_cycle/20), 89) // By this point the player is probably puking and quitting anyway
@@ -905,12 +905,12 @@
toxpwr = 0.15
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/M, 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)
+ M.reagents.remove_reagent(R.type, remove_amt * REM * delta_time)
return ..()
//ACID
@@ -979,9 +979,9 @@
mytray.adjustToxic(round(chems.get_reagent_amount(type) * 3))
mytray.adjustWeeds(-rand(1,4))
-/datum/reagent/toxin/acid/fluacid/on_mob_life(mob/living/carbon/M)
- M.adjustFireLoss(current_cycle/15, 0)
- . = 1
+/datum/reagent/toxin/acid/fluacid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustFireLoss((current_cycle/15) * REM * delta_time, 0)
+ . = TRUE
..()
/datum/reagent/toxin/acid/nitracid
@@ -993,8 +993,8 @@
ph = 3.3
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/acid/nitracid/on_mob_life(mob/living/carbon/M)
- M.adjustFireLoss(volume/10, FALSE) //here you go nervar
+/datum/reagent/toxin/acid/nitracid/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustFireLoss((volume/10) * REM * delta_time, FALSE) //here you go nervar
. = TRUE
..()
@@ -1009,13 +1009,13 @@
var/delay = 30
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/delayed/on_mob_life(mob/living/carbon/M)
+/datum/reagent/toxin/delayed/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
if(current_cycle > delay)
- holder.remove_reagent(type, actual_metaboliztion_rate * M.metabolism_efficiency)
- M.adjustToxLoss(actual_toxpwr*REM, 0)
- if(prob(10))
+ holder.remove_reagent(type, actual_metaboliztion_rate * M.metabolism_efficiency * delta_time)
+ M.adjustToxLoss(actual_toxpwr * REM * delta_time, 0)
+ if(DT_PROB(5, delta_time))
M.Paralyze(20)
- . = 1
+ . = TRUE
..()
/datum/reagent/toxin/mimesbane
@@ -1047,9 +1047,9 @@
M.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice)
return ..()
-/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M)
- M.adjustStaminaLoss(7.5, 0)
- if(prob(20))
+/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.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)
@@ -1059,8 +1059,8 @@
to_chat(M, "Your bones hurt!")
return ..()
-/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M)
- if(prob(4) && iscarbon(M)) //big oof
+/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M, delta_time, times_fired)
+ if(DT_PROB(2, delta_time) && iscarbon(M)) //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)
@@ -1083,13 +1083,13 @@
taste_description = "tannin"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/bungotoxin/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_HEART, 3)
+/datum/reagent/toxin/bungotoxin/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
+ M.adjustOrganLoss(ORGAN_SLOT_HEART, 3 * REM * delta_time)
M.set_confusion(M.dizziness) //add a tertiary effect here if this is isn't an effective poison.
- if(current_cycle >= 12 && prob(8))
+ 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, "[tox_message]")
- . = 1
+ . = TRUE
..()
/datum/reagent/toxin/leadacetate
@@ -1102,10 +1102,10 @@
taste_description = "sugary sweetness"
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
-/datum/reagent/toxin/leadacetate/on_mob_life(mob/living/carbon/M)
- M.adjustOrganLoss(ORGAN_SLOT_EARS,1)
- M.adjustOrganLoss(ORGAN_SLOT_BRAIN,1)
- if(prob(1))
+/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)
+ if(DT_PROB(0.5, delta_time))
to_chat(M, "Ah, what was that? You thought you heard something...")
M.add_confusion(5)
return ..()
diff --git a/code/modules/reagents/withdrawal/_addiction.dm b/code/modules/reagents/withdrawal/_addiction.dm
index 416fe27ead0..e1a64fb12b3 100644
--- a/code/modules/reagents/withdrawal/_addiction.dm
+++ b/code/modules/reagents/withdrawal/_addiction.dm
@@ -44,7 +44,7 @@
to_chat(victim_mind.current, "You feel like you've gotten over your need for drugs.")
LAZYREMOVE(victim_mind.active_addictions, type)
-/datum/addiction/proc/process_addiction(mob/living/carbon/affected_carbon, delta_time = 2)
+/datum/addiction/proc/process_addiction(mob/living/carbon/affected_carbon, delta_time, times_fired)
var/current_addiction_cycle = LAZYACCESS(affected_carbon.mind.active_addictions, type) //If this is null, we're not addicted
var/on_drug_of_this_addiction = FALSE
for(var/datum/reagent/possible_drug as anything in affected_carbon.reagents.reagent_list) //Go through the drugs in our system
diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm
index 0397d78b0ee..b32ec561d01 100644
--- a/code/modules/research/nanites/nanite_programs/healing.dm
+++ b/code/modules/research/nanites/nanite_programs/healing.dm
@@ -41,10 +41,11 @@
return ..()
/datum/nanite_program/temperature/active_effect()
- if(host_mob.bodytemperature > host_mob.get_body_temp_normal(apply_change=FALSE))
- host_mob.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT, host_mob.get_body_temp_normal(apply_change=FALSE))
- else if(host_mob.bodytemperature < (host_mob.get_body_temp_normal(apply_change=FALSE) + 1))
- host_mob.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, host_mob.get_body_temp_normal(apply_change=FALSE))
+ var/target_temp = host_mob.get_body_temp_normal(apply_change=FALSE)
+ if(host_mob.bodytemperature > target_temp)
+ host_mob.adjust_bodytemperature(-40 * TEMPERATURE_DAMAGE_COEFFICIENT, target_temp)
+ else if(host_mob.bodytemperature < (target_temp + 1))
+ host_mob.adjust_bodytemperature(40 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, target_temp)
/datum/nanite_program/purging
name = "Blood Purification"
diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm
index 5b813625c31..82fb9ae9ca7 100644
--- a/code/modules/surgery/bodyparts/_bodyparts.dm
+++ b/code/modules/surgery/bodyparts/_bodyparts.dm
@@ -222,7 +222,7 @@
/* SKYRAT EDIT REMOVAL
//Return TRUE to get whatever mob this is in to update health.
-/obj/item/bodypart/proc/on_life(stam_regen)
+/obj/item/bodypart/proc/on_life(delta_time, times_fired, stam_regen)
if(stamina_dam > DAMAGE_PRECISION && stam_regen) //DO NOT update health here, it'll be done in the carbon's life.
heal_damage(0, 0, INFINITY, null, FALSE)
. |= BODYPART_LIFE_UPDATE_HEALTH
@@ -972,13 +972,13 @@
var/bleed_rate = 0
if(generic_bleedstacks > 0)
- bleed_rate++
+ bleed_rate += 0.5
//We want an accurate reading of .len
listclearnulls(embedded_objects)
for(var/obj/item/embeddies in embedded_objects)
if(!embeddies.isEmbedHarmless())
- bleed_rate += 0.5
+ bleed_rate += 0.25
for(var/thing in wounds)
var/datum/wound/W = thing
diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm
index 1a8e3e2a0c7..1fcfef03b49 100644
--- a/code/modules/surgery/organs/appendix.dm
+++ b/code/modules/surgery/organs/appendix.dm
@@ -22,13 +22,13 @@
icon_state = "[base_icon_state][inflamed ? "inflamed" : ""]"
return ..()
-/obj/item/organ/appendix/on_life()
+/obj/item/organ/appendix/on_life(delta_time, times_fired)
..()
if(!(organ_flags & ORGAN_FAILING))
return
var/mob/living/carbon/M = owner
if(M)
- M.adjustToxLoss(4, TRUE, TRUE) //forced to ensure people don't use it to gain tox as slime person
+ M.adjustToxLoss(2 * delta_time, TRUE, TRUE) //forced to ensure people don't use it to gain tox as slime person
/obj/item/organ/appendix/get_availability(datum/species/S)
return !(TRAIT_NOHUNGER in S.inherent_traits)
diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm
index 73ba3743302..416c5062639 100644
--- a/code/modules/surgery/organs/augments_chest.dm
+++ b/code/modules/surgery/organs/augments_chest.dm
@@ -15,14 +15,14 @@
var/poison_amount = 5
slot = ORGAN_SLOT_STOMACH_AID
-/obj/item/organ/cyberimp/chest/nutriment/on_life()
+/obj/item/organ/cyberimp/chest/nutriment/on_life(delta_time, times_fired)
if(synthesizing)
return
if(owner.nutrition <= hunger_threshold)
synthesizing = TRUE
to_chat(owner, "You feel less hungry...")
- owner.adjust_nutrition(50)
+ owner.adjust_nutrition(25 * delta_time)
addtimer(CALLBACK(src, .proc/synth_cool), 50)
/obj/item/organ/cyberimp/chest/nutriment/proc/synth_cool()
@@ -55,7 +55,7 @@
COOLDOWN_DECLARE(reviver_cooldown)
-/obj/item/organ/cyberimp/chest/reviver/on_life()
+/obj/item/organ/cyberimp/chest/reviver/on_life(delta_time, times_fired)
if(reviving)
switch(owner.stat)
if(UNCONSCIOUS, HARD_CRIT)
diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm
index 4eee0bb993b..82dcbc9b985 100644
--- a/code/modules/surgery/organs/ears.dm
+++ b/code/modules/surgery/organs/ears.dm
@@ -27,7 +27,7 @@
// Multiplier for both long term and short term ear damage
var/damage_multiplier = 1
-/obj/item/organ/ears/on_life()
+/obj/item/organ/ears/on_life(delta_time, times_fired)
// only inform when things got worse, needs to happen before we heal
if((damage > low_threshold && prev_damage < low_threshold) || (damage > high_threshold && prev_damage < high_threshold))
to_chat(owner, "The ringing in your ears grows louder, blocking out any external noises for a moment.")
@@ -43,8 +43,8 @@
if((organ_flags & ORGAN_FAILING))
deaf = max(deaf, 1) // if we're failing we always have at least 1 deaf stack (and thus deafness)
else // only clear deaf stacks if we're not failing
- deaf = max(deaf - 1, 0)
- if((damage > low_threshold) && prob(damage / 30))
+ deaf = max(deaf - (0.5 * delta_time), 0)
+ if((damage > low_threshold) && DT_PROB(damage / 60, delta_time))
adjustEarDamage(0, 4)
SEND_SOUND(owner, sound('sound/weapons/flash_ring.ogg'))
diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm
index ef4eeb7ee56..97becf94d14 100644
--- a/code/modules/surgery/organs/eyes.dm
+++ b/code/modules/surgery/organs/eyes.dm
@@ -80,7 +80,7 @@
M.update_sight()
-/obj/item/organ/eyes/on_life()
+/obj/item/organ/eyes/on_life(delta_time, times_fired)
..()
var/mob/living/carbon/C = owner
//since we can repair fully damaged eyes, check if healing has occurred
diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm
index 6ff75f081bc..de626148287 100644
--- a/code/modules/surgery/organs/heart.dm
+++ b/code/modules/surgery/organs/heart.dm
@@ -58,7 +58,7 @@
beating = FALSE
update_appearance()
-/obj/item/organ/heart/on_life()
+/obj/item/organ/heart/on_life(delta_time, times_fired)
..()
// If the owner doesn't need a heart, we don't need to do anything with it.
@@ -74,7 +74,7 @@
if(H.health <= H.crit_threshold && beat != BEAT_SLOW)
beat = BEAT_SLOW
- H.playsound_local(get_turf(H), slowbeat,40,0, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
+ H.playsound_local(get_turf(H), slowbeat, 40, 0, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
to_chat(owner, "You feel your heart slow down...")
if(beat == BEAT_SLOW && H.health > H.crit_threshold)
H.stop_sound_channel(CHANNEL_HEARTBEAT)
@@ -82,7 +82,7 @@
if(H.jitteriness)
if(H.health > HEALTH_THRESHOLD_FULLCRIT && (!beat || beat == BEAT_SLOW))
- H.playsound_local(get_turf(H),fastbeat,40,0, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
+ H.playsound_local(get_turf(H), fastbeat, 40, 0, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
beat = BEAT_FAST
else if(beat == BEAT_FAST)
H.stop_sound_channel(CHANNEL_HEARTBEAT)
@@ -124,7 +124,7 @@
else
return ..()
-/obj/item/organ/heart/cursed/on_life()
+/obj/item/organ/heart/cursed/on_life(delta_time, times_fired)
if(world.time > (last_pump + pump_delay))
if(ishuman(owner) && owner.client) //While this entire item exists to make people suffer, they can't control disconnects.
var/mob/living/carbon/human/H = owner
@@ -226,7 +226,7 @@
"You feel a terrible pain in your chest, as if your heart has stopped!")
addtimer(CALLBACK(src, .proc/Restart), 10 SECONDS)
-/obj/item/organ/heart/cybernetic/on_life()
+/obj/item/organ/heart/cybernetic/on_life(delta_time, times_fired)
. = ..()
if(dose_available && owner.health <= owner.crit_threshold && !owner.reagents.has_reagent(rid))
used_dose()
@@ -243,12 +243,13 @@
name = "heart of freedom"
desc = "This heart pumps with the passion to give... something freedom."
organ_flags = ORGAN_SYNTHETIC //the power of freedom prevents heart attacks
- var/min_next_adrenaline = 0
+ /// The cooldown until the next time this heart can give the host an adrenaline boost.
+ COOLDOWN_DECLARE(adrenaline_cooldown)
-/obj/item/organ/heart/freedom/on_life()
+/obj/item/organ/heart/freedom/on_life(delta_time, times_fired)
. = ..()
- if(owner.health < 5 && world.time > min_next_adrenaline)
- min_next_adrenaline = world.time + rand(250, 600) //anywhere from 4.5 to 10 minutes
+ if(owner.health < 5 && COOLDOWN_FINISHED(src, adrenaline_cooldown))
+ COOLDOWN_START(src, adrenaline_cooldown, rand(25 SECONDS, 1 MINUTES))
to_chat(owner, "You feel yourself dying, but you refuse to give up!")
owner.heal_overall_damage(15, 15, 0, BODYPART_ORGANIC)
if(owner.reagents.get_reagent_amount(/datum/reagent/medicine/ephedrine) < 20)
diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm
index 62d71a07986..f0fa25e3196 100755
--- a/code/modules/surgery/organs/liver.dm
+++ b/code/modules/surgery/organs/liver.dm
@@ -1,5 +1,5 @@
#define LIVER_DEFAULT_TOX_TOLERANCE 3 //amount of toxins the liver can filter out
-#define LIVER_DEFAULT_TOX_LETHALITY 0.01 //lower values lower how harmful toxins are to the liver
+#define LIVER_DEFAULT_TOX_LETHALITY 0.005 //lower values lower how harmful toxins are to the liver
/obj/item/organ/liver
name = "liver"
@@ -17,8 +17,10 @@
grind_results = list(/datum/reagent/consumable/nutriment/peptides = 5)
var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol
- var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off
- var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver
+ /// The maximum volume of toxins the liver will quickly purge
+ var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE
+ /// Scaling factor for how much damage toxins deal to the liver
+ var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY
var/filterToxins = TRUE //whether to filter toxins
/obj/item/organ/liver/Initialize()
@@ -72,7 +74,7 @@
#define HAS_NO_TOXIN 1
#define HAS_PAINFUL_TOXIN 2
-/obj/item/organ/liver/on_life()
+/obj/item/organ/liver/on_life(delta_time, times_fired)
var/mob/living/carbon/C = owner
..() //perform general on_life()
if(istype(C))
@@ -87,20 +89,20 @@
if(belly)
thisamount += belly.reagents.get_reagent_amount(T.type)
if (thisamount && thisamount <= toxTolerance * (maxHealth - damage) / maxHealth ) //toxTolerance is effectively multiplied by the % that your liver's health is at
- C.reagents.remove_reagent(T.type, 1)
+ C.reagents.remove_reagent(T.type, 0.5 * delta_time)
else
- damage += (thisamount*toxLethality)
+ damage += (thisamount * toxLethality * delta_time)
if(provide_pain_message != HAS_PAINFUL_TOXIN)
provide_pain_message = T.silent_toxin ? HAS_SILENT_TOXIN : HAS_PAINFUL_TOXIN
//metabolize reagents
- C.reagents.metabolize(C, can_overdose=TRUE)
+ C.reagents.metabolize(C, delta_time, times_fired, can_overdose=TRUE)
- if(provide_pain_message && damage > 10 && prob(damage/3))//the higher the damage the higher the probability
+ if(provide_pain_message && damage > 10 && DT_PROB(damage/6, delta_time)) //the higher the damage the higher the probability
to_chat(C, "You feel a dull pain in your abdomen.")
else //for when our liver's failing
- C.liver_failure()
+ C.liver_failure(delta_time, times_fired)
if(damage > maxHealth)//cap liver damage
damage = maxHealth
@@ -136,7 +138,7 @@
name = "alien liver" // doesnt matter for actual aliens because they dont take toxin damage
icon_state = "liver-x" // Same sprite as fly-person liver.
desc = "A liver that used to belong to a killer alien, who knows what it used to eat."
- toxLethality = LIVER_DEFAULT_TOX_LETHALITY * 2.5 // rejects its owner early after too much punishment
+ toxLethality = 2.5 * LIVER_DEFAULT_TOX_LETHALITY // rejects its owner early after too much punishment
toxTolerance = 15 // complete toxin immunity like xenos have would be too powerful
/obj/item/organ/liver/cybernetic
@@ -145,7 +147,7 @@
desc = "A very basic device designed to mimic the functions of a human liver. Handles toxins slightly worse than an organic liver."
organ_flags = ORGAN_SYNTHETIC
toxTolerance = 2
- toxLethality = 0.011
+ toxLethality = 1.1 * LIVER_DEFAULT_TOX_LETHALITY
maxHealth = STANDARD_ORGAN_THRESHOLD*0.5
var/emp_vulnerability = 80 //Chance of permanent effects if emp-ed.
@@ -156,7 +158,7 @@
desc = "An electronic device designed to mimic the functions of a human liver. Handles toxins slightly better than an organic liver."
maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD
toxTolerance = 5 //can shrug off up to 5u of toxins
- toxLethality = 0.008 //20% less damage than a normal liver
+ toxLethality = 0.8 * LIVER_DEFAULT_TOX_LETHALITY //20% less damage than a normal liver
emp_vulnerability = 40
/obj/item/organ/liver/cybernetic/tier3
@@ -166,7 +168,7 @@
alcohol_tolerance = 0.001
maxHealth = 2 * STANDARD_ORGAN_THRESHOLD
toxTolerance = 10 //can shrug off up to 10u of toxins
- toxLethality = 0.008 //20% less damage than a normal liver
+ toxLethality = 0.8 * LIVER_DEFAULT_TOX_LETHALITY //20% less damage than a normal liver
emp_vulnerability = 20
/obj/item/organ/liver/cybernetic/emp_act(severity)
diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm
index 8833e28091f..41857269998 100644
--- a/code/modules/surgery/organs/lungs.dm
+++ b/code/modules/surgery/organs/lungs.dm
@@ -485,13 +485,13 @@
// The air you breathe out should match your body temperature
breath.temperature = H.bodytemperature
-/obj/item/organ/lungs/on_life()
+/obj/item/organ/lungs/on_life(delta_time, times_fired)
. = ..()
if(failed && !(organ_flags & ORGAN_FAILING))
failed = FALSE
return
if(damage >= low_threshold)
- var/do_i_cough = damage < high_threshold ? prob(5) : prob(10) // between : past high
+ var/do_i_cough = DT_PROB((damage < high_threshold) ? 2.5 : 5, delta_time) // between : past high
if(do_i_cough)
owner.emote("cough")
if(organ_flags & ORGAN_FAILING && owner.stat == CONSCIOUS)
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index a64f53d2e09..b79b0ead529 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -96,25 +96,25 @@
/obj/item/organ/proc/on_find(mob/living/finder)
return
-/obj/item/organ/process(delta_time)
- on_death(delta_time) //Kinda hate doing it like this, but I really don't want to call process directly.
+/obj/item/organ/process(delta_time, times_fired)
+ on_death(delta_time, times_fired) //Kinda hate doing it like this, but I really don't want to call process directly.
-/obj/item/organ/proc/on_death(delta_time = 2) //runs decay when outside of a person
+/obj/item/organ/proc/on_death(delta_time, times_fired) //runs decay when outside of a person
if(organ_flags & (ORGAN_SYNTHETIC | ORGAN_FROZEN))
return
- applyOrganDamage(maxHealth * decay_factor * 0.5 * delta_time)
+ applyOrganDamage(decay_factor * maxHealth * delta_time)
-/obj/item/organ/proc/on_life() //repair organ damage if the organ is not failing
+/obj/item/organ/proc/on_life(delta_time, times_fired) //repair organ damage if the organ is not failing
if(organ_flags & ORGAN_FAILING)
return
if(organ_flags & ORGAN_SYNTHETIC_EMP) //Synthetic organ has been emped, is now failing.
- applyOrganDamage(maxHealth * decay_factor)
+ applyOrganDamage(decay_factor * maxHealth * delta_time)
return
///Damage decrements by a percent of its maxhealth
- var/healing_amount = -(maxHealth * healing_factor)
+ var/healing_amount = healing_factor
///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's health
- healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0
- applyOrganDamage(healing_amount, damage) // pass curent damage incase we are over cap
+ healing_amount += (owner.satiety > 0) ? (4 * healing_factor * owner.satiety / MAX_SATIETY) : 0
+ applyOrganDamage(-healing_amount * maxHealth * delta_time, damage) // pass curent damage incase we are over cap
/obj/item/organ/examine(mob/user)
. = ..()
diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm
index 4812dbe8d03..44e42cc2646 100755
--- a/code/modules/surgery/organs/stomach.dm
+++ b/code/modules/surgery/organs/stomach.dm
@@ -1,5 +1,5 @@
//The contant in the rate of reagent transfer on life ticks
-#define STOMACH_METABOLISM_CONSTANT 0.5
+#define STOMACH_METABOLISM_CONSTANT 0.25
/obj/item/organ/stomach
name = "stomach"
@@ -27,7 +27,7 @@
var/disgust_metabolism = 1
///The rate that the stomach will transfer reagents to the body
- var/metabolism_efficiency = 0.1 // the lowest we should go is 0.05
+ var/metabolism_efficiency = 0.05 // the lowest we should go is 0.05
/obj/item/organ/stomach/Initialize()
@@ -36,14 +36,14 @@
if(!reagents)
create_reagents(reagent_vol)
-/obj/item/organ/stomach/on_life()
+/obj/item/organ/stomach/on_life(delta_time, times_fired)
. = ..()
//Manage species digestion
if(istype(owner, /mob/living/carbon/human))
var/mob/living/carbon/human/humi = owner
if(!(organ_flags & ORGAN_FAILING))
- humi.dna.species.handle_digestion(humi)
+ humi.dna.species.handle_digestion(humi, delta_time, times_fired)
var/mob/living/carbon/body = owner
@@ -53,11 +53,11 @@
// If the reagent does not metabolize then it will sit in the stomach
// This has an effect on items like plastic causing them to take up space in the stomach
- if(!(bit.metabolization_rate > 0))
+ if(bit.metabolization_rate <= 0)
continue
//Ensure that the the minimum is equal to the metabolization_rate of the reagent if it is higher then the STOMACH_METABOLISM_CONSTANT
- var/amount_min = max(bit.metabolization_rate, STOMACH_METABOLISM_CONSTANT)
+ var/rate_min = max(bit.metabolization_rate, STOMACH_METABOLISM_CONSTANT)
//Do not transfer over more then we have
var/amount_max = bit.volume
@@ -68,9 +68,9 @@
amount_max = max(amount_max - amount_food, 0)
// Transfer the amount of reagents based on volume with a min amount of 1u
- var/amount = min(round(metabolism_efficiency * bit.volume, 0.1) + amount_min, amount_max)
+ var/amount = min((round(metabolism_efficiency * amount_max, 0.05) + rate_min) * delta_time, amount_max)
- if(!(amount > 0))
+ if(amount <= 0)
continue
// transfer the reagents over to the body at the rate of the stomach metabolim
@@ -80,7 +80,7 @@
//Handle disgust
if(body)
- handle_disgust(body)
+ handle_disgust(body, delta_time, times_fired)
//If the stomach is not damage exit out
if(damage < low_threshold)
@@ -103,40 +103,40 @@
return
//The stomach is damage has nutriment but low on theshhold, lo prob of vomit
- if(prob(damage * 0.025 * nutri_vol * nutri_vol))
+ if(DT_PROB(0.0125 * damage * nutri_vol * nutri_vol, delta_time))
body.vomit(damage)
to_chat(body, "Your stomach reels in pain as you're incapable of holding down all that food!")
return
// the change of vomit is now high
- if(damage > high_threshold && prob(damage * 0.1 * nutri_vol * nutri_vol))
+ if(damage > high_threshold && DT_PROB(0.05 * damage * nutri_vol * nutri_vol, delta_time))
body.vomit(damage)
to_chat(body, "Your stomach reels in pain as you're incapable of holding down all that food!")
/obj/item/organ/stomach/get_availability(datum/species/S)
return !(NOSTOMACH in S.inherent_traits)
-/obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H)
+/obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H, delta_time, times_fired)
if(H.disgust)
- var/pukeprob = 5 + 0.05 * H.disgust
+ var/pukeprob = 2.5 + (0.025 * H.disgust)
if(H.disgust >= DISGUST_LEVEL_GROSS)
- if(prob(10))
+ if(DT_PROB(5, delta_time))
H.stuttering += 1
H.add_confusion(2)
- if(prob(10) && !H.stat)
+ if(DT_PROB(5, delta_time) && !H.stat)
to_chat(H, "You feel kind of iffy...")
H.jitteriness = max(H.jitteriness - 3, 0)
if(H.disgust >= DISGUST_LEVEL_VERYGROSS)
- if(prob(pukeprob)) //iT hAndLeS mOrE ThaN PukInG
+ if(DT_PROB(pukeprob, delta_time)) //iT hAndLeS mOrE ThaN PukInG
H.add_confusion(2.5)
H.stuttering += 1
H.vomit(10, 0, 1, 0, 1, 0)
H.Dizzy(5)
if(H.disgust >= DISGUST_LEVEL_DISGUSTED)
- if(prob(25))
+ if(DT_PROB(13, delta_time))
H.blur_eyes(3) //We need to add more shit down here
- H.adjust_disgust(-0.5 * disgust_metabolism)
+ H.adjust_disgust(-0.25 * disgust_metabolism * delta_time)
switch(H.disgust)
if(0 to DISGUST_LEVEL_GROSS)
H.clear_alert("disgust")
@@ -161,30 +161,32 @@
/obj/item/organ/stomach/bone
desc = "You have no idea what this strange ball of bones does."
- metabolism_efficiency = 0.05 //very bad
+ metabolism_efficiency = 0.025 //very bad
+ /// How much [BRUTE] damage milk heals every second
var/milk_brute_healing = 1.5
+ /// How much [BURN] damage milk heals every second
var/milk_burn_healing = 1.5
-/obj/item/organ/stomach/bone/on_life()
+/obj/item/organ/stomach/bone/on_life(delta_time, times_fired)
var/datum/reagent/consumable/milk/milk = locate(/datum/reagent/consumable/milk) in reagents.reagent_list
if(milk)
var/mob/living/carbon/body = owner
if(milk.volume > 10)
reagents.remove_reagent(milk.type, milk.volume - 10)
to_chat(owner, "The excess milk is dripping off your bones!")
+ body.heal_bodypart_damage(milk_brute_healing * REAGENTS_EFFECT_MULTIPLIER * delta_time, milk_burn_healing * REAGENTS_EFFECT_MULTIPLIER * delta_time)
- body.heal_bodypart_damage(brute = milk_brute_healing, burn = milk_burn_healing)
for(var/i in body.all_wounds)
var/datum/wound/iter_wound = i
- iter_wound.on_xadone(2)
- reagents.remove_reagent(milk.type, milk.metabolization_rate)
+ iter_wound.on_xadone(1 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
+ reagents.remove_reagent(milk.type, milk.metabolization_rate * delta_time)
return ..()
/obj/item/organ/stomach/bone/plasmaman
name = "digestive crystal"
icon_state = "stomach-p"
desc = "A strange crystal that is responsible for metabolizing the unseen energy force that feeds plasmamen."
- metabolism_efficiency = 0.12
+ metabolism_efficiency = 0.06
milk_burn_healing = 0
/obj/item/organ/stomach/ethereal
@@ -193,9 +195,9 @@
desc = "A crystal-like organ that stores the electric charge of ethereals."
var/crystal_charge = ETHEREAL_CHARGE_FULL
-/obj/item/organ/stomach/ethereal/on_life()
+/obj/item/organ/stomach/ethereal/on_life(delta_time, times_fired)
..()
- adjust_charge(-ETHEREAL_CHARGE_FACTOR)
+ adjust_charge(-ETHEREAL_CHARGE_FACTOR * delta_time)
/obj/item/organ/stomach/ethereal/Insert(mob/living/carbon/M, special = 0)
..()
@@ -226,7 +228,7 @@
organ_flags = ORGAN_SYNTHETIC
maxHealth = STANDARD_ORGAN_THRESHOLD * 0.5
var/emp_vulnerability = 80 //Chance of permanent effects if emp-ed.
- metabolism_efficiency = 0.7 // not as good at digestion
+ metabolism_efficiency = 0.35 // not as good at digestion
/obj/item/organ/stomach/cybernetic/tier2
name = "cybernetic stomach"
@@ -235,7 +237,7 @@
maxHealth = 1.5 * STANDARD_ORGAN_THRESHOLD
disgust_metabolism = 2
emp_vulnerability = 40
- metabolism_efficiency = 0.14
+ metabolism_efficiency = 0.07
/obj/item/organ/stomach/cybernetic/tier3
name = "upgraded cybernetic stomach"
@@ -244,7 +246,7 @@
maxHealth = 2 * STANDARD_ORGAN_THRESHOLD
disgust_metabolism = 3
emp_vulnerability = 20
- metabolism_efficiency = 0.2
+ metabolism_efficiency = 0.1
/obj/item/organ/stomach/cybernetic/emp_act(severity)
. = ..()
diff --git a/code/modules/unit_tests/metabolizing.dm b/code/modules/unit_tests/metabolizing.dm
index 67c9c4e2586..05091b7efa3 100644
--- a/code/modules/unit_tests/metabolizing.dm
+++ b/code/modules/unit_tests/metabolizing.dm
@@ -9,7 +9,7 @@
/datum/unit_test/metabolization/proc/test_reagent(mob/living/carbon/C, reagent_type)
C.reagents.add_reagent(reagent_type, 10)
- C.reagents.metabolize(C, can_overdose = TRUE)
+ C.reagents.metabolize(C, SSMOBS_DT, 0, can_overdose = TRUE)
C.reagents.clear_reagents()
/datum/unit_test/metabolization/Destroy()
@@ -24,15 +24,15 @@
var/datum/reagent/drug/methamphetamine/meth = /datum/reagent/drug/methamphetamine
// Give them enough meth to be consumed in 2 metabolizations
- pill.reagents.add_reagent(meth, initial(meth.metabolization_rate) * 1.9)
+ pill.reagents.add_reagent(meth, 1.9 * initial(meth.metabolization_rate) * SSMOBS_DT)
pill.attack(user, user)
- user.Life()
+ user.Life(SSMOBS_DT)
TEST_ASSERT(user.reagents.has_reagent(meth), "User does not have meth in their system after consuming it")
TEST_ASSERT(user.has_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine), "User consumed meth, but did not gain movespeed modifier")
- user.Life()
+ user.Life(SSMOBS_DT)
TEST_ASSERT(!user.reagents.has_reagent(meth), "User still has meth in their system when it should've finished metabolizing")
TEST_ASSERT(!user.has_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine), "User still has movespeed modifier despite not containing any more meth")
diff --git a/code/modules/unit_tests/pills.dm b/code/modules/unit_tests/pills.dm
index ed8f64ce958..2cabae24f9d 100644
--- a/code/modules/unit_tests/pills.dm
+++ b/code/modules/unit_tests/pills.dm
@@ -5,6 +5,6 @@
TEST_ASSERT_EQUAL(human.has_reagent(/datum/reagent/iron), FALSE, "Human somehow has iron before taking pill")
pill.attack(human, human)
- human.Life()
+ human.Life(SSMOBS_DT)
TEST_ASSERT(human.has_reagent(/datum/reagent/iron), "Human doesn't have iron after taking pill")
diff --git a/code/modules/unit_tests/reagent_mod_expose.dm b/code/modules/unit_tests/reagent_mod_expose.dm
index d893fef405f..80cc039736a 100644
--- a/code/modules/unit_tests/reagent_mod_expose.dm
+++ b/code/modules/unit_tests/reagent_mod_expose.dm
@@ -25,7 +25,7 @@
drink.reagents.add_reagent(/datum/reagent/phlogiston, 10)
drink.attack(human, human)
TEST_ASSERT_EQUAL(human.fire_stacks, 1, "Human does not have fire stacks after taking phlogiston")
- human.Life()
+ human.Life(SSMOBS_DT)
TEST_ASSERT(human.fire_stacks > 1, "Human fire stacks did not increase after life tick")
// TOUCH
diff --git a/code/modules/unit_tests/stomach.dm b/code/modules/unit_tests/stomach.dm
index 06fdc71dd47..fbc86ee394f 100644
--- a/code/modules/unit_tests/stomach.dm
+++ b/code/modules/unit_tests/stomach.dm
@@ -17,9 +17,9 @@
TEST_ASSERT_EQUAL(human.reagents.has_reagent(/datum/reagent/consumable/ketchup), FALSE, "Human body has ketchup after eating it should only be in the stomach")
//Give them meth and let it kick in
- pill.reagents.add_reagent(meth, initial(meth.metabolization_rate) * 1.9)
+ pill.reagents.add_reagent(meth, 1.9 * initial(meth.metabolization_rate) * SSMOBS_DT)
pill.attack(human, human)
- human.Life()
+ human.Life(SSMOBS_DT)
TEST_ASSERT(human.reagents.has_reagent(meth), "Human body does not have meth after life tick")
TEST_ASSERT(human.has_movespeed_modifier(/datum/movespeed_modifier/reagent/methamphetamine), "Human consumed meth, but did not gain movespeed modifier")
diff --git a/html/changelogs/AutoChangeLog-pr-3495.yml b/html/changelogs/AutoChangeLog-pr-3495.yml
deleted file mode 100644
index 7ae18ce091f..00000000000
--- a/html/changelogs/AutoChangeLog-pr-3495.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "SkyratBot"
-delete-after: True
-changes:
- - code_imp: "improves holder.dm readability"