mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
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:
@@ -3221,19 +3221,19 @@
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
|
||||
explosion(src.loc,-1,0,2)
|
||||
explosion(get_turf(src),-1,0,2)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
blob_act()
|
||||
explosion(src.loc,0,1,5,7,10)
|
||||
explosion(get_turf(src),0,1,5,7,10)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
ex_act()
|
||||
explosion(src.loc,-1,0,2)
|
||||
explosion(get_turf(src),-1,0,2)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
@@ -3274,7 +3274,7 @@
|
||||
reagents.add_reagent("beer",1000)
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/blob_act()
|
||||
explosion(src.loc,0,3,5,7,10)
|
||||
explosion(get_turf(src),0,3,5,7,10)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
//For ninjas exploding when they die./N
|
||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||
src << browse(null, "window=spideros")//Just in case.
|
||||
var/location = loc
|
||||
var/turf/location = get_turf(src)
|
||||
explosion(location, 1, 2, 3, 4)
|
||||
|
||||
canmove = 0
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if (ghost.client)
|
||||
ghost.client.eye = ghost
|
||||
|
||||
explosion(src.loc, -1,-1,3,12)
|
||||
explosion(get_turf(src), -1,-1,3,12)
|
||||
sleep(2)
|
||||
del(src)
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
explosion(get_turf(src), 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
src.stat = 2
|
||||
src.icon_state = "ai-crash"
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
explosion(get_turf(src), 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user