- 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 KorPhaeron
parent e3da8ae8ff
commit b1dfa4f140
5 changed files with 9 additions and 7 deletions

View File

@@ -189,7 +189,7 @@
location = get_turf(loca)
amount = round(sqrt(amt / 2), 1)
carry.copy_to(chemholder, 4*carry.total_volume) //The foam holds 4 times the total reagents volume for balance purposes.
carry.copy_to(chemholder, carry.total_volume, 4) //The foam holds 4 times the total reagents volume for balance purposes.
/datum/effect_system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype)
..()

View File

@@ -271,7 +271,7 @@
else
location = get_turf(loca)
amount = radius
carry.copy_to(chemholder, 4*carry.total_volume) //The smoke holds 4 times the total reagents volume for balance purposes.
carry.copy_to(chemholder, carry.total_volume, 4) //The smoke holds 4 times the total reagents volume for balance purposes.
if(!silent)
var/contained = ""

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

View File

@@ -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)

View File

@@ -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