- Fixes smoke and foam having 1/4th of the reagents they should have (yoooo)

- Fixes copy_to runtiming if you transfer from a container that contains nothing directly to a reagents datum
- Removes redundant total_volume check in trans_to
- Fixes cryostylane and pyrosium not heating up people
- Fixes cryostylane cooling beakers to negative kelvins
- Fixes cryostylane cooling people to negative kelvins (stop copypasting code for temperature)
This commit is contained in:
BordListian
2018-01-15 21:09:20 +01:00
committed by CitadelStationBot
parent 7ec2a4230d
commit 8d5d7d1d50
5 changed files with 9 additions and 7 deletions
+3 -3
View File
@@ -158,7 +158,7 @@
if(istype(target, /datum/reagents))
R = target
else
if(!target.reagents || src.total_volume<=0)
if(!target.reagents)
return
R = target.reagents
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
@@ -181,14 +181,14 @@
/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1)
var/list/cached_reagents = reagent_list
if(!target)
if(!target || !total_volume)
return
var/datum/reagents/R
if(istype(target, /datum/reagents))
R = target
else
if(!target.reagents || src.total_volume<=0)
if(!target.reagents)
return
R = target.reagents
@@ -187,7 +187,7 @@
/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube
if(M.reagents.has_reagent("oxygen"))
M.reagents.remove_reagent("oxygen", 0.5)
M.bodytemperature -= 15
M.bodytemperature = max(M.bodytemperature - 15,0)
..()
/datum/reagent/cryostylane/reaction_turf(turf/T, reac_volume)
@@ -346,15 +346,17 @@
id = "cryostylane_oxygen"
results = list("cryostylane" = 1)
required_reagents = list("cryostylane" = 1, "oxygen" = 1)
mob_react = FALSE
/datum/chemical_reaction/cryostylane_oxygen/on_reaction(datum/reagents/holder, created_volume)
holder.chem_temp -= 10*created_volume
holder.chem_temp = max(holder.chem_temp - 10*created_volume,0)
/datum/chemical_reaction/pyrosium_oxygen
name = "ephemeral pyrosium reaction"
id = "pyrosium_oxygen"
results = list("pyrosium" = 1)
required_reagents = list("pyrosium" = 1, "oxygen" = 1)
mob_react = FALSE
/datum/chemical_reaction/pyrosium_oxygen/on_reaction(datum/reagents/holder, created_volume)
holder.chem_temp += 10*created_volume