Part 2 of the WIP chemistry stuff

Map update with secure doors!
This commit is contained in:
SkyMarshal
2012-02-09 19:09:54 -07:00
parent c38d7d1d8f
commit 1d29574bc3
12 changed files with 7831 additions and 7793 deletions

View File

@@ -1 +0,0 @@
/obj/structure/closet/detective

View File

@@ -390,6 +390,7 @@ steam.start() -- spawns the effect
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
var/divisor = 1
icon = 'chemsmoke.dmi'
pixel_x = -32
@@ -407,14 +408,22 @@ steam.start() -- spawns the effect
/obj/effect/effect/chem_smoke/Move()
..()
var/obj/R = new /obj()
R.reagents = new/datum/reagents(500)
reagents.trans_to(R, reagents.total_volume/divisor)
for(var/atom/A in view(1, src))
reagents.reaction(A)
R.reagents.reaction(A)
del(R)
return
/obj/effect/effect/chem_smoke/HasEntered(mob/living/carbon/M as mob )
..()
reagents.reaction(M)
var/obj/R = new /obj()
R.reagents = new/datum/reagents(500)
reagents.trans_to(R, reagents.total_volume/divisor)
R.reagents.reaction(M)
del(R)
return
@@ -475,7 +484,9 @@ steam.start() -- spawns the effect
spawn(0)
if(holder)
src.location = get_turf(holder)
var/iterator = pick(0,1,1,1,2,2,2,3)
var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location)
smoke.divisor = iterator + 1
src.total_smoke++
var/direction = src.direction
if(!direction)
@@ -485,7 +496,7 @@ steam.start() -- spawns the effect
direction = pick(alldirs)
if(chemholder.reagents.total_volume != 1) // can't split 1 very well
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / number) // copy reagents to each smoke, divide evenly
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume*2 / number) // copy reagents to each smoke, divide evenly
if(finalcolor)
smoke.icon += finalcolor // give the smoke color, if it has any to begin with
@@ -494,7 +505,7 @@ steam.start() -- spawns the effect
smoke.icon = '96x96.dmi'
smoke.icon_state = "smoke"
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
for(i=0, i<iterator, i++)
sleep(10)
step(smoke,direction)
spawn(150+rand(10,30))

View File

@@ -140,7 +140,6 @@
process()
processing_objects.Remove(src)
return

View File

@@ -7,7 +7,7 @@
w_amt = 100
origin_tech = "magnets=2"
secured = 0
secured = 1
small_icon_state_left = "infrared_left"
small_icon_state_right = "infrared_right"
@@ -45,6 +45,9 @@
if(scanning)
src.overlays += text("infrared_old2")
src.small_icon_state_overlays += text("infrared_on")
if(master && istype(master, /obj/item/weapon/chem_grenade))
var/obj/item/weapon/chem_grenade/M = master
M.c_state(1)
if(holder)
holder.update_icon()

View File

@@ -7,7 +7,7 @@
w_amt = 50
origin_tech = "magnets=1"
secured = 0
secured = 1
small_icon_state_left = "prox_left"
small_icon_state_right = "prox_right"
@@ -87,11 +87,18 @@
if(timing)
overlays += text("prox_timing")
small_icon_state_overlays += text("prox_timing")
if(master && istype(master, /obj/item/weapon/chem_grenade))
var/obj/item/weapon/chem_grenade/M = master
M.c_state(1)
if(scanning)
overlays += text("prox_scanning")
small_icon_state_overlays += text("prox_scanning")
if(master && istype(master, /obj/item/weapon/chem_grenade))
var/obj/item/weapon/chem_grenade/M = master
M.c_state(1)
if(holder)
holder.update_icon()
return

View File

@@ -125,6 +125,8 @@
A.pulse(src.airlock_wire)
else if(holder)
holder.process_activation(src, 1, 0)
else
..()
return 1

View File

@@ -7,7 +7,7 @@
w_amt = 10
origin_tech = "magnets=1"
secured = 0
secured = 1
small_icon_state_left = "timer_left"
small_icon_state_right = "timer_right"
@@ -64,6 +64,9 @@
if(timing)
overlays += text("timer_timing")
small_icon_state_overlays += text("timer_timing")
if(master && istype(master, /obj/item/weapon/chem_grenade))
var/obj/item/weapon/chem_grenade/M = master
M.c_state(1)
if(holder)
holder.update_icon()
return

View File

@@ -512,6 +512,21 @@ datum
description = "A colorless, odorless gas."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
reaction_obj(var/obj/O, var/volume)
if((!O) || (!volume)) return 0
src = null
var/turf/the_turf = get_turf(O)
var/datum/gas_mixture/napalm = new
napalm.oxygen = volume*10
napalm.temperature = T0C
the_turf.assume_air(napalm)
reaction_turf(var/turf/T, var/volume)
src = null
var/datum/gas_mixture/napalm = new
napalm.oxygen = volume*10
napalm.temperature = T0C
T.assume_air(napalm)
return
copper
name = "Copper"
@@ -974,13 +989,13 @@ datum
if(!the_turf)
return //No sense trying to start a fire if you don't have a turf to set on fire. --NEO
var/datum/gas_mixture/napalm = new
napalm.toxins = volume
napalm.toxins = volume*10
napalm.temperature = T0C
the_turf.assume_air(napalm)
reaction_turf(var/turf/T, var/volume)
src = null
var/datum/gas_mixture/napalm = new
napalm.toxins = volume
napalm.toxins = volume*10
napalm.temperature = T0C
T.assume_air(napalm)
return

View File

@@ -348,7 +348,7 @@ datum
var/datum/gas_mixture/napalm = new
napalm.toxins = created_volume
napalm.toxins = created_volume*10
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)

View File

@@ -257,36 +257,42 @@
D.sense()
proc/explode()
if(exploding) return
exploding = 1
proc
explode()
if(exploding) return
exploding = 1
if(reliability)
playsound(src.loc, 'bamf.ogg', 50, 1)
beaker_two.reagents.maximum_volume += beaker_one.reagents.maximum_volume // make sure everything can mix
beaker_one.reagents.update_total()
beaker_one.reagents.trans_to(beaker_two, beaker_one.reagents.total_volume)
if(beaker_one.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
if(reliability)
playsound(src.loc, 'bamf.ogg', 50, 1)
beaker_two.reagents.maximum_volume += beaker_one.reagents.maximum_volume // make sure everything can mix
beaker_one.reagents.update_total()
beaker_one.reagents.trans_to(beaker_two, beaker_one.reagents.total_volume)
if(beaker_one.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
invisibility = 100 //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
if(beaker_one)
beaker_one.loc = get_turf(src.loc)
if(beaker_two)
beaker_two.loc = get_turf(src.loc)
invisibility = 100 //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
if(beaker_one)
beaker_one.loc = get_turf(src.loc)
if(beaker_two)
beaker_two.loc = get_turf(src.loc)
c_state(var/i = 0)
if(i)
icon_state = initial(icon_state) + "_armed"
return
large