Fixed and cleaned up ZAS. Added some better sanity to explosion locations.

ZAS procs are now more standardized, needs more comments though.
Connections between zones now self-manage themselves, adjusting things if/when the turfs they are on change zones. (The check for this is very efficient and fast, but a bit hard to read codewise)
Zone share percent set to 4.  Seems to work well.
This commit is contained in:
SkyMarshal
2012-06-04 14:56:28 -07:00
parent 81efb76970
commit bfa48835f9
22 changed files with 538 additions and 332 deletions
+1 -1
View File
@@ -46,7 +46,7 @@
var/strength = convert2energy(mass)
if (strength < 773.0)
var/turf/T = get_turf(src.loc)
var/turf/T = get_turf(src)
if (strength > (450+T0C))
explosion(T, 0, 1, 2, 4)
+1 -1
View File
@@ -399,7 +399,7 @@
// explode the light
/obj/machinery/light/proc/explode()
var/turf/T = get_turf(src.loc)
var/turf/T = get_turf(src)
spawn(0)
broken() // break it first to give a warning
sleep(2)
+1 -1
View File
@@ -70,7 +70,7 @@
proc
overheat()
explosion(src.loc, 2, 5, 2, -1)
explosion(get_turf(src), 2, 5, 2, -1)
attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/tank/plasma))
+4 -4
View File
@@ -183,7 +183,7 @@ display round(lastgen) and plasmatank amount
proc
overheat()
explosion(src.loc, 2, 5, 2, -1)
explosion(get_turf(src), 2, 5, 2, -1)
attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, sheet_path))
@@ -302,7 +302,7 @@ display round(lastgen) and plasmatank amount
time_per_sheet = 25
board_path = "/obj/item/weapon/circuitboard/pacman/super"
overheat()
explosion(src.loc, 3, 3, 3, -1)
explosion(get_turf(src), 3, 3, 3, -1)
/obj/machinery/power/port_gen/pacman/mrs
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
@@ -312,7 +312,7 @@ display round(lastgen) and plasmatank amount
time_per_sheet = 30
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
overheat()
explosion(src.loc, 4, 4, 4, -1)
explosion(get_turf(src), 4, 4, 4, -1)
/obj/machinery/power/port_gen/pacman/industrial
name = "Industrial P.A.C.M.A.N.-type Portable Generator"
@@ -322,4 +322,4 @@ display round(lastgen) and plasmatank amount
time_per_sheet = 30
board_path = "/obj/item/weapon/circuitboard/pacman/industrial"
overheat()
explosion(src.loc, 4, 4, 4, -1)
explosion(get_turf(src), 4, 4, 4, -1)
@@ -258,7 +258,7 @@ var/global/list/uneatable = list(
if (istype(A,/obj/item/weapon/storage/backpack/holding))
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
explosion(get_turf(src),(dist),(dist*2),(dist*4))
return
if(istype(A, /obj/machinery/singularity))//Welp now you did it
@@ -266,7 +266,7 @@ var/global/list/uneatable = list(
src.energy += (S.energy/2)//Absorb most of it
del(S)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
explosion(get_turf(src),(dist),(dist*2),(dist*4))
return//Quits here, the obj should be gone, hell we might be
if((teleport_del) && (!istype(A, /obj/machinery)))//Going to see if it does not lag less to tele items over to Z 2
+5 -5
View File
@@ -304,9 +304,9 @@
proc/ion_act()
if(src.z == 1)
if(z == 1)
if(prob(1)) //explosion
world << "\red SMES explosion in [src.loc.loc]"
world << "\red SMES explosion in \the [get_turf(src)]"
for(var/mob/M in viewers(src))
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
sleep(10*pick(4,5,6,7,10,14))
@@ -314,11 +314,11 @@
smoke.set_up(3, 0, src.loc)
smoke.attach(src)
smoke.start()
explosion(src.loc, -1, 0, 1, 3, 0)
explosion(get_turf(src), -1, 0, 1, 3, 0)
del(src)
return
if(prob(15)) //Power drain
world << "\red SMES power drain in [src.loc.loc]"
world << "\red SMES power drain in \the [get_turf(src)]"
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
@@ -327,7 +327,7 @@
else
emp_act(2)
if(prob(5)) //smoke only
world << "\red SMES smoke in [src.loc.loc]"
world << "\red SMES smoke in \the [get_turf(src)]"
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(3, 0, src.loc)
smoke.attach(src)