Merge pull request #10493 from phil235/SmokeFoamBuff

Foam&Smoke buff, some tweaks to sorium/ldm effect, plus some fixes.
This commit is contained in:
Remie Richards
2015-07-18 03:45:38 +01:00
16 changed files with 136 additions and 77 deletions
@@ -7,7 +7,7 @@
opacity = 0
anchored = 1
density = 0
layer = TURF_LAYER + 0.1
layer = OBJ_LAYER + 0.05 //above table, below windoor/airlock/foamed metal.
mouse_opacity = 0
var/amount = 3
animate_movement = 0
@@ -15,7 +15,7 @@
var/lifetime = 6
/obj/effect/effect/foam/metal/aluminium
/obj/effect/effect/foam/metal
name = "aluminium foam"
metal = 1
icon_state = "mfoam"
@@ -153,7 +153,7 @@
location = get_turf(loca)
amount = round(sqrt(amt / 2), 1)
carry.copy_to(chemholder, carry.total_volume)
carry.copy_to(chemholder, 4*carry.total_volume) //The foam holds 4 times the total reagents volume for balance purposes.
/datum/effect/effect/system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype)
..()
@@ -166,7 +166,7 @@
else
var/obj/effect/effect/foam/F = PoolOrNew(foamtype, location)
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount) //how much reagents each foam cell holds
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
F.color = foamcolor
F.amount = amount
F.metal = metal
@@ -149,11 +149,10 @@
icon = 'icons/effects/chemsmoke.dmi'
icon_state = ""
lifetime = 10
var/max_lifetime = 10
/obj/effect/effect/smoke/chem/process()
if(..())
var/fraction = 1/max_lifetime
var/fraction = 1/initial(lifetime)
for(var/obj/O in range(1,src))
if(O.type == src.type)
continue
@@ -173,7 +172,7 @@
return 0
if(!istype(M))
return 0
var/fraction = 1/max_lifetime
var/fraction = 1/initial(lifetime)
reagents.reaction(M, TOUCH, fraction)
lifetime--
return 1
@@ -207,7 +206,7 @@
location = get_turf(loca)
if(direct)
direction = direct
carry.copy_to(chemholder, carry.total_volume)
carry.copy_to(chemholder, 4*carry.total_volume) //The smoke holds 4 times the total reagents volume for balance purposes.
if(!silent)
var/contained = ""
@@ -256,8 +255,6 @@
else
S.steps = pick(0,1,1,1,2,2,2,3)
S.max_lifetime = S.lifetime
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume/number) // copy reagents to each smoke, divide evenly
@@ -355,11 +355,11 @@
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("condensedcapsaicin", 70)
B1.reagents.add_reagent("potassium", 30)
B2.reagents.add_reagent("phosphorus", 30)
B2.reagents.add_reagent("sugar", 30)
B1.reagents.add_reagent("condensedcapsaicin", 40)
B1.reagents.add_reagent("condensedcapsaicin", 60)
B1.reagents.add_reagent("potassium", 40)
B2.reagents.add_reagent("phosphorus", 40)
B2.reagents.add_reagent("sugar", 40)
B1.reagents.add_reagent("condensedcapsaicin", 20)
beakers += B1
beakers += B2
@@ -191,6 +191,10 @@
item_state = "waterbackpackatmos"
volume = 200
/obj/item/weapon/watertank/atmos/New()
..()
reagents.add_reagent("water", 200)
/obj/item/weapon/watertank/atmos/make_noz()
return new /obj/item/weapon/extinguisher/mini/nozzle(src)
@@ -294,8 +298,7 @@
F.amount = 0
metal_synthesis_cooldown++
spawn(100)
if(src)
metal_synthesis_cooldown--
metal_synthesis_cooldown--
else
user << "<span class='warning'>Metal foam mix is still being synthesized...</span>"
return
@@ -333,7 +336,7 @@
var/turf/simulated/T = A
if(T.air)
var/datum/gas_mixture/G = T.air
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
if(get_dist(T, location) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
G.temperature = 2
T.air_update_turf()
for(var/obj/effect/hotspot/H in T)
@@ -341,10 +344,11 @@
if(G.toxins)
G.nitrogen += (G.toxins)
G.toxins = 0
for(var/obj/machinery/atmospherics/components/unary/vent_pump/V in T)
V.welded = 1
V.update_icon()
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
for(var/obj/machinery/atmospherics/components/unary/U in T)
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
U.welded = 1
U.update_icon()
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
for(var/mob/living/L in T)
L.ExtinguishMob()
for(var/obj/item/Item in T)