Cigarette Fixes (#5597)

There was an issue with one of the travis checks that caused reagents with incorrect specific heat values to sneak into the game and cause havok. This fixes that.

Fixes #5594
Fixes #5593
This commit is contained in:
BurgerLUA
2018-11-12 09:39:28 +02:00
committed by Erki
parent 6d778d035c
commit c35ce60a50
11 changed files with 96 additions and 24 deletions
+3 -2
View File
@@ -81,8 +81,9 @@
dose = min(dose + removed, max_dose)
//Not based on science, based on balance.
M.bodytemperature += Clamp( ((get_temperature() - (T0C + 20)) * removed * 0.002),-5*removed,5*removed)
var/bodytempchange = Clamp((get_temperature() - M.bodytemperature) * removed * REAGENTS_BODYTEMP,-REAGENTS_BODYTEMP_MAX * removed, REAGENTS_BODYTEMP_MAX * removed)
if(abs(bodytempchange) >= REAGENTS_BODYTEMP_MIN)
M.bodytemperature += round(bodytempchange,REAGENTS_BODYTEMP_MIN)
for(var/datum/reagent/R in M.bloodstr.reagent_list)
if(istype(R, conflicting_reagent))
@@ -130,6 +130,7 @@
reagent_state = LIQUID
color = "#C81040"
taste_description = "slime"
fallback_specific_heat = 1.2
/datum/reagent/vaccine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(data)
@@ -153,6 +154,7 @@
reagent_state = LIQUID
color = "#0050F0"
taste_description = "slime"
fallback_specific_heat = 1.5
/datum/reagent/antibodies/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(src.data)
@@ -527,6 +527,7 @@
reagent_state = SOLID
color = "#000000"
taste_description = "pepper"
fallback_specific_heat = 1.25
/datum/reagent/enzyme
name = "Universal Enzyme"
@@ -537,6 +538,7 @@
overdose = REAGENTS_OVERDOSE
taste_description = "sweetness"
taste_mult = 0.7
fallback_specific_heat = 1
/datum/reagent/frostoil
name = "Frost Oil"
@@ -566,11 +568,14 @@
color = "#B31008"
taste_description = "hot peppers"
taste_mult = 1.5
fallback_specific_heat = 2
var/agony_dose = 5
var/agony_amount = 1
var/discomfort_message = "<span class='danger'>Your insides feel uncomfortably hot!</span>"
var/slime_temp_adj = 10
/datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(0.5 * removed)
@@ -591,6 +596,9 @@
M.bodytemperature += rand(0, 15) + slime_temp_adj
holder.remove_reagent("frostoil", 5)
#define EYES_PROTECTED 1
#define EYES_MECH 2
/datum/reagent/capsaicin/condensed
name = "Condensed Capsaicin"
id = "condensedcapsaicin"
@@ -603,10 +611,9 @@
agony_amount = 4
discomfort_message = "<span class='danger'>You feel like your insides are burning!</span>"
slime_temp_adj = 15
fallback_specific_heat = 4
/datum/reagent/capsaicin/condensed/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
#define EYES_PROTECTED 1
#define EYES_MECH 2
var/eyes_covered = 0
var/mouth_covered = 0
var/no_pain = 0
@@ -662,10 +669,7 @@
M.custom_emote(2, "[pick("coughs!","coughs hysterically!","splutters!")]")
M.apply_effect(40, AGONY, 0)
#undef EYES_PROTECTED
#undef EYES_MECH
/datum/reagent/condensedcapsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
/datum/reagent/capsaicin/condensed/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species && (H.species.flags & NO_PAIN))
@@ -680,6 +684,9 @@
M.bodytemperature += rand(15, 30)
holder.remove_reagent("frostoil", 5)
#undef EYES_PROTECTED
#undef EYES_MECH
/datum/reagent/spacespice
name = "Space Spice"
id = "spacespice"
@@ -688,6 +695,7 @@
color = "#e08702"
taste_description = "spices"
taste_mult = 1.5
fallback_specific_heat = 2
/datum/reagent/browniemix
name = "Brownie Mix"
@@ -3804,4 +3812,4 @@
description = "A delicious seasonal flavoring."
color = "#AE771C"
taste_description = "autumn bliss"
@@ -581,6 +581,8 @@
var/list/withdrawal_traumas //List of withdrawl effects that the medication permanently adds during withdrawl, with the key being the brain trauma, and the value being the base percent chance to add.
var/list/suppressing_reagents = list() // List of reagents that suppress the withdrawal effects, with the key being the reagent and the vlue being the minimum dosage required to suppress.
fallback_specific_heat = 1.5
/datum/reagent/mental/affect_blood(var/mob/living/carbon/human/H, var/alien, var/removed)
if(!istype(H) || max_dose < min_dose || (world.time < data && volume > removed) || messagedelay == -1)
@@ -1136,6 +1138,7 @@
color = "#BF0000"
taste_description = "bitter metal"
overdose = 5
fallback_specific_heat = 1.2
/datum/reagent/azoth/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
@@ -1222,6 +1225,7 @@
color = "#ffd700"
affects_dead = 1
taste_description = "eternal blissfulness"
fallback_specific_heat = 2
/datum/reagent/elixir/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
@@ -509,6 +509,8 @@
glass_name = "glass of beer"
glass_desc = "A freezing pint of beer"
glass_center_of_mass = list("x"=16, "y"=8)
fallback_specific_heat = 1.2
/* Drugs */
@@ -544,6 +546,7 @@
metabolism = REM * 0.25
overdose = REAGENTS_OVERDOSE
taste_description = "bitterness"
fallback_specific_heat = 1.2
/datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/mob/living/carbon/human/H = M
@@ -611,6 +614,7 @@
overdose = REAGENTS_OVERDOSE
metabolism = REM * 0.5
taste_description = "mushroom"
fallback_specific_heat = 1.2
/datum/reagent/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/mob/living/carbon/human/H = M
@@ -696,6 +700,7 @@
reagent_state = LIQUID
color = "#535E66"
taste_description = "slimey metal"
fallback_specific_heat = 3
/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(prob(10))
@@ -711,6 +716,7 @@
reagent_state = LIQUID
color = "#535E66"
taste_description = "sludge"
fallback_specific_heat = 2
/datum/reagent/xenomicrobes/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(prob(10))
@@ -26,15 +26,17 @@
/datum/reagents/proc/get_temperature()
var/HC = get_heat_capacity()
if(HC)
return get_thermal_energy() / (HC)
var/TE = get_thermal_energy()
if(HC && TE)
return TE / HC
else
return T0C + 20
/datum/reagent/proc/get_temperature()
var/HC = get_heat_capacity()
if(HC)
return get_thermal_energy() / (HC)
var/TE = get_thermal_energy()
if(HC && TE)
return TE / HC
else
return T0C + 20