From e5a3694c0f990fbedf8f5e17dcb642e62ecd5fac Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Sun, 8 Mar 2015 19:43:17 -0700 Subject: [PATCH] Adds Napalm as a reagent and merges old napalm into Phlog. Fixes some foam stuff. --- .../effects/effect_system/effects_foam.dm | 5 ++- .../reagents/Chemistry-Goon-Pyrotechnics.dm | 33 +++++++++++++++++++ .../Chemistry-Reagents/Chemistry-Reagents.dm | 6 ++-- code/modules/reagents/Chemistry-Recipes.dm | 13 -------- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index a4a5dcad577..dd4270ece3f 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -106,7 +106,6 @@ var/obj/chemholder var/obj/effect/effect/foam/foamtype = /obj/effect/effect/foam var/metal = 0 - var/foam_color /datum/effect/effect/system/foam_spread/metal @@ -129,7 +128,6 @@ amount = round(sqrt(amt / 2), 1) carry.copy_to(chemholder, carry.total_volume) - foam_color = mix_color_from_reagents(carry.reagent_list) /datum/effect/effect/system/foam_spread/metal/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metaltype) @@ -142,8 +140,9 @@ foundfoam.amount += amount else var/obj/effect/effect/foam/F = new foamtype(src.location) + var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list) chemholder.reagents.copy_to(F, chemholder.reagents.total_volume) - F.color = foam_color + F.color = foamcolor F.amount = amount F.metal = metal diff --git a/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm b/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm index 4c23803e8f6..d80b815c51f 100644 --- a/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm +++ b/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm @@ -368,6 +368,14 @@ required_reagents = list("phosphorus" = 1, "sacid" = 1, "stable_plasma" = 1) result_amount = 3 +/datum/chemical_reaction/phlogiston/on_reaction(var/datum/reagents/holder, var/created_volume) + if(holder.has_reagent("stabilizing_agent")) + return + var/turf/simulated/T = get_turf(holder.my_atom) + if(istype(T)) + T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, created_volume) + return + /datum/reagent/goonchem/phlogiston/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M.adjust_fire_stacks(1) @@ -376,6 +384,31 @@ ..() return +/datum/reagent/goonchem/napalm + name = "Napalm" + id = "napalm" + description = "Very flammable." + reagent_state = LIQUID + color = "#FF9999" // rgb: 96, 165, 132 + +/datum/reagent/goonchem/napalm/on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjust_fire_stacks(1) + ..() + return + +/datum/reagent/goonchem/napalm/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if(method == TOUCH && ishuman(M)) + M.adjust_fire_stacks(7) + return + +/datum/chemical_reaction/napalm + name = "Napalm" + id = "napalm" + result = null + required_reagents = list("aluminium" = 1, "plasma" = 1, "sacid" = 1 ) + result_amount = 1 + datum/reagent/goonchem/cryostylane name = "Cryostylane" id = "cryostylane" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm index 7c6edf65ddb..9c58cc50270 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents.dm @@ -271,7 +271,8 @@ datum/reagent/water/reaction_turf(var/turf/simulated/T, var/volume) datum/reagent/water/reaction_obj(var/obj/O, var/volume) src = null - O.color = initial(O.color) + if(!istype(O, /obj/effect)) + O.color = initial(O.color) if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube)) var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O if(!cube.wrapped) @@ -681,7 +682,8 @@ datum/reagent/space_cleaner/reaction_obj(var/obj/O, var/volume) else if(O) O.clean_blood() - O.color = initial(O.color) + if(!istype(O, /obj/effect)) + O.color = initial(O.color) datum/reagent/space_cleaner/reaction_turf(var/turf/T, var/volume) if(volume >= 1) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index bc28f3954f1..1ee9283e34b 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -186,19 +186,6 @@ silicate required_reagents = list("water" = 1, "sodium" = 1, "chlorine" = 1) result_amount = 3 -/datum/chemical_reaction/napalm - name = "Napalm" - id = "napalm" - result = null - required_reagents = list("aluminium" = 1, "plasma" = 1, "sacid" = 1 ) - result_amount = 1 -/datum/chemical_reaction/napalm/on_reaction(var/datum/reagents/holder, var/created_volume) - var/turf/simulated/T = get_turf(holder.my_atom) - if(istype(T)) - T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, created_volume) - holder.del_reagent(id) - return - /datum/chemical_reaction/chloralhydrate name = "Chloral Hydrate" id = "chloralhydrate"