fixes #5919 and some other reagent value issues

negative values everywhere.
This commit is contained in:
Walter0o
2014-08-11 12:46:43 +02:00
parent 7c46a67551
commit 342fbdd136
+19 -41
View File
@@ -1315,7 +1315,7 @@ datum
var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
if(istype(E))
if(E.damage > 0)
E.damage -= 1
E.damage = max(E.damage - 1, 0)
..()
return
@@ -1336,7 +1336,7 @@ datum
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
for(var/datum/organ/internal/I in H.internal_organs)
if(I.damage > 0)
I.damage -= 0.20
I.damage = max(I.damage - 0.20, 0)
..()
return
@@ -2039,7 +2039,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.nutrition -= nutriment_factor
M.nutrition = max(M.nutrition - nutriment_factor, 0)
M.overeatduration = 0
if(M.nutrition < 0)//Prevent from going into negatives.
M.nutrition = 0
@@ -2189,25 +2189,14 @@ datum
color = "#B31008" // rgb: 139, 166, 233
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
switch(data)
if(1 to 15)
M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature -= rand(10,20)
if(25 to INFINITY)
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1)) M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature -= rand(15,20)
data++
if(!M)
M = holder.my_atom
M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
if(prob(1))
M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature = max(M.bodytemperature - rand(10,20), 0)
holder.remove_reagent("capsaicin", 5)
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return
@@ -2830,25 +2819,14 @@ datum
adj_temp = -9
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
switch(data)
if(1 to 15)
M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature -= rand(10,20)
if(25 to INFINITY)
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1)) M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature -= rand(15,20)
data++
if(!M)
M = holder.my_atom
M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0)
if(prob(1))
M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature = max(M.bodytemperature - rand(10,20), 0)
holder.remove_reagent("capsaicin", 5)
holder.remove_reagent(src.id, FOOD_METABOLISM)
..()
return