diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
index 8e4b0e3676f..852a8761a24 100644
--- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
@@ -5432,7 +5432,7 @@
"cax" = (/obj/structure/noticeboard{pixel_y = 32},/obj/structure/table,/obj/item/weapon/reagent_containers/glass/beaker/large{pixel_y = 3},/obj/item/weapon/reagent_containers/glass/beaker{pixel_x = 8; pixel_y = 2},/obj/item/weapon/reagent_containers/glass/bottle/charcoal{pixel_x = -5; pixel_y = 0},/obj/item/weapon/reagent_containers/glass/bottle/morphine,/obj/item/weapon/reagent_containers/syringe/epinephrine{pixel_x = 3; pixel_y = -2},/obj/item/weapon/reagent_containers/dropper,/turf/simulated/floor{dir = 1; icon_state = "whiteblue"},/area/medical/medbay2{name = "Medbay Storage"})
"cay" = (/obj/structure/closet/secure_closet/medical3,/obj/item/weapon/screwdriver{pixel_y = 6},/obj/structure/sign/nosmoking_2{pixel_x = 0; pixel_y = 30},/turf/simulated/floor{dir = 1; icon_state = "whiteblue"},/area/medical/medbay2{name = "Medbay Storage"})
"caz" = (/obj/structure/closet/secure_closet/medical3,/obj/machinery/light{dir = 1},/obj/machinery/alarm{pixel_y = 24},/obj/item/weapon/screwdriver{pixel_y = 6},/turf/simulated/floor{dir = 1; icon_state = "whiteblue"},/area/medical/medbay2{name = "Medbay Storage"})
-"caA" = (/obj/item/device/radio/intercom{broadcasting = 1; freerange = 0; frequency = 1485; listening = 0; name = "Station Intercom (Medbay)"; pixel_x = 0; pixel_y = 30},/obj/structure/closet/wardrobe/white/medical,/turf/simulated/floor{dir = 1; icon_state = "whiteblue"},/area/medical/medbay2{name = "Medbay Storage"})
+"caA" = (/obj/item/device/radio/intercom{broadcasting = 1; freerange = 0; frequency = 1485; listening = 0; name = "Station Intercom (Medbay)"; pixel_x = 0; pixel_y = 30},/obj/structure/closet/wardrobe/medical_white,/turf/simulated/floor{dir = 1; icon_state = "whiteblue"},/area/medical/medbay2{name = "Medbay Storage"})
"caB" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk,/turf/simulated/floor{dir = 5; icon_state = "whiteblue"},/area/medical/medbay2{name = "Medbay Storage"})
"caC" = (/obj/machinery/power/apc{dir = 8; name = "Medical Security Checkpoint APC"; pixel_x = -24; pixel_y = 0},/obj/machinery/alarm{pixel_y = 28},/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/structure/closet/secure_closet/security/med,/turf/simulated/floor{icon_state = "red"; dir = 9},/area/security/checkpoint/medical)
"caD" = (/obj/machinery/recharger{pixel_y = 4},/obj/structure/table/reinforced,/obj/machinery/requests_console{department = "Security"; departmentType = 5; pixel_y = 30},/obj/machinery/light{dir = 1},/obj/machinery/camera{c_tag = "Security Post - Medbay"; dir = 2; network = list("SS13","Medbay")},/turf/simulated/floor{icon_state = "red"; dir = 1},/area/security/checkpoint/medical)
@@ -7978,7 +7978,7 @@
"cXv" = (/obj/machinery/smartfridge,/turf/simulated/wall,/area/crew_quarters/bar)
"cXw" = (/obj/effect/spawner/window/reinforced{useFull = 1; tag = "fullReinWin"},/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/obj/structure/cable/yellow{d2 = 4; icon_state = "0-4"},/obj/machinery/door/poddoor/preopen{id_tag = "Xenolab"; name = "test chamber blast door"},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/toxins/xenobiology{name = "\improper Secure Lab"})
"cXx" = (/obj/effect/spawner/window/reinforced{useFull = 1; tag = "fullReinWin"},/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/obj/machinery/door/poddoor/preopen{id_tag = "Xenolab"; name = "test chamber blast door"},/turf/simulated/floor/plating,/area/toxins/xenobiology{name = "\improper Secure Lab"})
-
+
(1,1,1) = {"
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
diff --git a/_maps/map_files/MetaStation/z4.dmm b/_maps/map_files/MetaStation/z4.dmm
index d8409fa724a..e9ad9ae4182 100644
--- a/_maps/map_files/MetaStation/z4.dmm
+++ b/_maps/map_files/MetaStation/z4.dmm
@@ -593,7 +593,7 @@
"lS" = (/obj/structure/closet/wardrobe/orange,/turf/simulated/floor/plating/airless,/area/space)
"lT" = (/obj/structure/window/basic{dir = 4},/turf/space,/area/space)
"lU" = (/obj/structure/grille,/turf/simulated/floor/plating,/area/derelict/arrival)
-"lV" = (/obj/structure/closet/wardrobe,/turf/simulated/floor,/area/derelict/arrival)
+"lV" = (/obj/structure/closet/wardrobe/generic,/turf/simulated/floor,/area/derelict/arrival)
"lW" = (/turf/simulated/floor/plating/airless{icon_state = "floorscorched1"},/area/derelict/hallway/primary)
"lX" = (/obj/structure/closet,/turf/simulated/floor/plating/airless,/area/derelict/hallway/primary)
"lY" = (/turf/simulated/floor,/area/derelict/atmospherics)
diff --git a/_maps/map_files/RandomZLevels/stationCollision.dmm b/_maps/map_files/RandomZLevels/stationCollision.dmm
index b1757a12302..43bbb2b261d 100644
--- a/_maps/map_files/RandomZLevels/stationCollision.dmm
+++ b/_maps/map_files/RandomZLevels/stationCollision.dmm
@@ -317,7 +317,7 @@
"ge" = (/obj/item/weapon/storage/secure/safe/sc_ssafe{pixel_x = 4; pixel_y = -26},/turf/simulated/floor{icon_state = "grimy"},/area/awaymission/northblock)
"gf" = (/obj/structure/stool/bed,/obj/item/weapon/bedsheet/captain,/obj/item/clothing/under/rank/captain,/obj/effect/decal/remains/human,/obj/effect/decal/cleanable/blood/splatter,/obj/item/weapon/gun/energy/laser/retro/sc_retro,/turf/simulated/floor{icon_state = "grimy"},/area/awaymission/northblock)
"gg" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/airless{icon_state = "floorscorched2"},/area/awaymission/midblock)
-"gh" = (/obj/structure/closet/wardrobe,/turf/simulated/floor,/area/awaymission/midblock)
+"gh" = (/obj/structure/closet/wardrobe/generic,/turf/simulated/floor,/area/awaymission/midblock)
"gi" = (/turf/simulated/floor,/area/awaymission/midblock)
"gj" = (/obj/structure/closet/wardrobe/pjs,/obj/structure/window/reinforced/tinted{dir = 8; icon_state = "twindow"; tag = ""},/obj/structure/window/reinforced/tinted{dir = 4; icon_state = "twindow"; tag = ""},/obj/machinery/light/small{dir = 1},/turf/simulated/floor,/area/awaymission/midblock)
"gk" = (/obj/structure/closet/wardrobe/pink,/turf/simulated/floor,/area/awaymission/midblock)
diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm
index 934aa2cc5ee..19ca2c9e865 100644
--- a/_maps/map_files/cyberiad/cyberiad.dmm
+++ b/_maps/map_files/cyberiad/cyberiad.dmm
@@ -4614,7 +4614,7 @@
"bKL" = (/turf/simulated/floor{dir = 1; icon_state = "whitebluecorner"; tag = "icon-whitebluecorner"},/area/medical/medbay2)
"bKM" = (/obj/effect/spawner/window/reinforced,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id_tag = "atmos"; name = "Atmos Blast Door"; opacity = 0},/obj/machinery/atmospherics/pipe/simple/visible/green{dir = 4; level = 2},/obj/machinery/atmospherics/pipe/simple/visible/cyan{level = 2},/turf/simulated/floor/plating,/area/atmos)
"bKN" = (/obj/structure/table,/obj/item/clothing/suit/straight_jacket,/obj/item/clothing/mask/muzzle,/obj/item/device/radio/intercom{broadcasting = 0; canhear_range = 5; freerange = 0; frequency = 1485; listening = 1; name = "Station Intercom (Medbay)"; pixel_x = 0; pixel_y = -27},/obj/machinery/light,/obj/item/weapon/gun/syringe,/turf/simulated/floor{tag = "icon-whiteblue (SOUTHWEST)"; icon_state = "whiteblue"; dir = 10},/area/medical/medbay3)
-"bKO" = (/obj/machinery/camera{c_tag = "Medbay Equipment"; dir = 1; network = list("SS13")},/obj/structure/closet/wardrobe/white/medical,/turf/simulated/floor{dir = 2; icon_state = "whiteblue"; tag = "icon-whitehall (WEST)"},/area/medical/medbay3)
+"bKO" = (/obj/machinery/camera{c_tag = "Medbay Equipment"; dir = 1; network = list("SS13")},/obj/structure/closet/wardrobe/medical_white,/turf/simulated/floor{dir = 2; icon_state = "whiteblue"; tag = "icon-whitehall (WEST)"},/area/medical/medbay3)
"bKP" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/floor{dir = 2; icon_state = "whiteblue"; tag = "icon-whitehall (WEST)"},/area/medical/medbay3)
"bKQ" = (/obj/structure/table,/obj/item/weapon/storage/box/gloves{pixel_y = 8},/obj/item/weapon/storage/box/masks{pixel_y = -3},/obj/machinery/light,/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/item/weapon/wirecutters{desc = "This cuts gloves."; name = "Glove Snippers"},/turf/simulated/floor{tag = "icon-whiteblue (SOUTHEAST)"; icon_state = "whiteblue"; dir = 6},/area/medical/medbay3)
"bKR" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor{tag = "icon-whiteblue (EAST)"; icon_state = "whiteblue"; dir = 4},/area/medical/medbay2)
diff --git a/_maps/map_files/cyberiad/z6.dmm b/_maps/map_files/cyberiad/z6.dmm
index 50d36ba0a3a..8be2571bced 100644
--- a/_maps/map_files/cyberiad/z6.dmm
+++ b/_maps/map_files/cyberiad/z6.dmm
@@ -498,7 +498,7 @@
"jM" = (/obj/structure/closet/wardrobe/orange,/turf/simulated/floor/airless,/area/space)
"jN" = (/obj/structure/window/basic{dir = 4},/turf/space,/area/space)
"jO" = (/obj/structure/grille,/turf/simulated/floor/plating,/area/derelict/arrival)
-"jP" = (/obj/structure/closet/wardrobe,/turf/simulated/floor,/area/derelict/arrival)
+"jP" = (/obj/structure/closet/wardrobe/generic,/turf/simulated/floor,/area/derelict/arrival)
"jQ" = (/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/derelict/hallway/primary)
"jR" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/window/reinforced,/turf/simulated/floor/airless,/area/space)
"jS" = (/obj/structure/window/reinforced,/turf/simulated/floor/airless,/area/space)
diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm
index 30974675e07..509f8b3c66c 100644
--- a/code/_globalvars/configuration.dm
+++ b/code/_globalvars/configuration.dm
@@ -28,12 +28,11 @@ var/Debug = 0 // global debug switch
var/Debug2 = 1 // enables detailed job debug file in secrets
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
-var/MAX_EXPLOSION_RANGE = 14
var/MAX_EX_DEVESTATION_RANGE = 3
var/MAX_EX_HEAVY_RANGE = 7
var/MAX_EX_LIGHT_RANGE = 14
var/MAX_EX_FLASH_RANGE = 14
-//#define MAX_EXPLOSION_RANGE 14 // Defaults to 12 (was 8) -- TLE
+var/MAX_EX_FLAME_RANGE = 14
var/list/be_special_flags = list(
"traitor" = BE_TRAITOR,
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 5aec63c8129..658d255aa64 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -346,9 +346,6 @@
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
- if("reactionary_explosions")
- config.reactionary_explosions = 1
-
if ("probability")
var/prob_pos = findtext(value, " ")
var/prob_name = null
@@ -561,6 +558,22 @@
config.bones_can_break = value
if("limbs_can_break")
config.limbs_can_break = value
+ if("reactionary_explosions")
+ config.reactionary_explosions = 1
+ if("bombcap")
+ var/BombCap = text2num(value)
+ if (!BombCap)
+ continue
+ if (BombCap < 4)
+ BombCap = 4
+ if (BombCap > 128)
+ BombCap = 128
+
+ MAX_EX_DEVESTATION_RANGE = round(BombCap/4)
+ MAX_EX_HEAVY_RANGE = round(BombCap/2)
+ MAX_EX_LIGHT_RANGE = BombCap
+ MAX_EX_FLASH_RANGE = BombCap
+ MAX_EX_FLAME_RANGE = BombCap
if("default_laws")
config.default_laws = text2num(value)
else
diff --git a/code/datums/pizza_bomb.dm b/code/datums/pizza_bomb.dm
index 1ec911ccb72..9a3180a15e8 100644
--- a/code/datums/pizza_bomb.dm
+++ b/code/datums/pizza_bomb.dm
@@ -54,7 +54,7 @@
return
src.audible_message("\icon[src] [src] beeps, \"Enjoy the pizza!\"")
src.visible_message("\The [src] violently explodes!")
- explosion(src.loc,1,2,4) //Identical to a minibomb
+ explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb
qdel(src)
/obj/item/device/pizza_bomb/attackby(var/obj/item/I, var/mob/user, params)
diff --git a/code/datums/spells/explosion.dm b/code/datums/spells/explosion.dm
index dc319800a43..1e3d3bddb2f 100644
--- a/code/datums/spells/explosion.dm
+++ b/code/datums/spells/explosion.dm
@@ -5,10 +5,11 @@
var/ex_severe = 1
var/ex_heavy = 2
var/ex_light = 3
+ var/ex_flash = 4
/obj/effect/proc_holder/spell/wizard/targeted/explosion/cast(list/targets)
for(var/mob/living/target in targets)
- explosion(target.loc,ex_severe,ex_heavy,ex_light)
+ explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
return
\ No newline at end of file
diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm
index 60978486a0f..97a693317fe 100644
--- a/code/datums/spells/wizard.dm
+++ b/code/datums/spells/wizard.dm
@@ -272,7 +272,7 @@
action_icon_state = "fireball"
/obj/effect/proc_holder/spell/wizard/turf/fireball/cast(var/turf/T)
- explosion(T, -1, 0, 2, 3, 0)
+ explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
/obj/effect/proc_holder/spell/wizard/targeted/inflict_handler/fireball
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 0cf042c7185..e73508e2678 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -89,8 +89,6 @@ var/global/list/ghdel_profiling = list()
*/
-/atom/proc/meteorhit(obj/meteor as obj)
- return
/atom/proc/allow_drop()
return 1
diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm
index 6ba085f98e5..560e86ec8bb 100644
--- a/code/game/gamemodes/events/clang.dm
+++ b/code/game/gamemodes/events/clang.dm
@@ -34,7 +34,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
else if (istype(clong, /mob))
if(clong.density || prob(10))
- clong.meteorhit(src)
+ clong.ex_act(2)
else
del(src)
diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm
index ff424a51134..73ada2fc387 100644
--- a/code/game/gamemodes/events/dust.dm
+++ b/code/game/gamemodes/events/dust.dm
@@ -99,7 +99,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if(ismob(A))
- A.meteorhit(src)//This should work for now I guess
+ A.ex_act(strength)//This should work for now I guess
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 7b3066160e7..7266762eeb1 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -196,7 +196,7 @@ rcd light flash thingy on matter drain
V.show_message("You hear a loud electrical buzzing sound!", 2)
spawn(50)
explosion(get_turf(M), 0,1,1,0)
- del(M)
+ qdel(M)
else src << "Out of uses."
else src << "That's not a machine."
diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm
index 2f3b19f0dcc..95f5dc8b7ff 100644
--- a/code/game/gamemodes/meteor/meteor.dm
+++ b/code/game/gamemodes/meteor/meteor.dm
@@ -37,7 +37,7 @@
var/waitduration = rand(3000,9000)
while(waveduration - world.time > 0)
sleep(20)
- spawn() spawn_meteors(6)
+ spawn() spawn_meteors(6, meteors_normal)
sleep(waitduration)
nometeors = 0
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index c0e48f5b7ba..ff04ec4d190 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -1,149 +1,254 @@
-/*/proc/meteor_wave(var/number = meteors_in_wave)
- if(!ticker || wavesecret)
- return
+//Meteors probability of spawning during a given wave
+/var/list/meteors_normal = list(/obj/effect/meteor/dust=3, /obj/effect/meteor/medium=8, /obj/effect/meteor/big=3, \
+ /obj/effect/meteor/flaming=1, /obj/effect/meteor/irradiated=3) //for normal meteor event
- wavesecret = 1
- for(var/i = 0 to number)
- spawn(rand(10,100))
- spawn_meteor()
- spawn(meteor_wave_delay)
- wavesecret = 0
-*/
-/proc/spawn_meteors(var/number)
+/var/list/meteors_threatening = list(/obj/effect/meteor/medium=4, /obj/effect/meteor/big=8, \
+ /obj/effect/meteor/flaming=3, /obj/effect/meteor/irradiated=3) //for threatening meteor event
+
+/var/list/meteors_catastrophic = list(/obj/effect/meteor/medium=5, /obj/effect/meteor/big=75, \
+ /obj/effect/meteor/flaming=10, /obj/effect/meteor/irradiated=10, /obj/effect/meteor/tunguska = 1) //for catastrophic meteor event
+
+/var/list/meteors_dust = list(/obj/effect/meteor/dust) //for space dust event
+
+
+///////////////////////////////
+//Meteor spawning global procs
+///////////////////////////////
+/proc/spawn_meteors(var/number = 10, var/list/meteortypes)
for(var/i = 0; i < number; i++)
- spawn(0)
- spawn_meteor()
+ spawn_meteor(meteortypes)
-/proc/spawn_meteor()
-
- var/startx
- var/starty
- var/endx
- var/endy
+/proc/spawn_meteor(var/list/meteortypes)
var/turf/pickedstart
var/turf/pickedgoal
var/max_i = 10//number of tries to spawn meteor.
-
-
- do
- switch(pick(1,2,3,4))
- if(1) //NORTH
- starty = world.maxy-(TRANSITIONEDGE+1)
- startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
- endy = TRANSITIONEDGE
- endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
- if(2) //EAST
- starty = rand((TRANSITIONEDGE+1),world.maxy-(TRANSITIONEDGE+1))
- startx = world.maxx-(TRANSITIONEDGE+1)
- endy = rand(TRANSITIONEDGE, world.maxy-TRANSITIONEDGE)
- endx = TRANSITIONEDGE
- if(3) //SOUTH
- starty = (TRANSITIONEDGE+1)
- startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
- endy = world.maxy-TRANSITIONEDGE
- endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
- if(4) //WEST
- starty = rand((TRANSITIONEDGE+1), world.maxy-(TRANSITIONEDGE+1))
- startx = (TRANSITIONEDGE+1)
- endy = rand(TRANSITIONEDGE,world.maxy-TRANSITIONEDGE)
- endx = world.maxx-TRANSITIONEDGE
-
- pickedstart = locate(startx, starty, 1)
- pickedgoal = locate(endx, endy, 1)
+ while (!istype(pickedstart, /turf/space))
+ var/startSide = pick(cardinal)
+ pickedstart = spaceDebrisStartLoc(startSide, 1)
+ pickedgoal = spaceDebrisFinishLoc(startSide, 1)
max_i--
- if(max_i<=0) return
-
- while (!istype(pickedstart, /turf/space) || pickedstart.loc.name != "Space" ) //FUUUCK, should never happen.
-
-
- var/obj/effect/meteor/M
- switch(rand(1, 100))
-
- if(1 to 10)
- M = new /obj/effect/meteor/big( pickedstart )
- if(11 to 75)
- M = new /obj/effect/meteor( pickedstart )
- if(76 to 100)
- M = new /obj/effect/meteor/small( pickedstart )
-
+ if(max_i<=0)
+ return
+ var/Me = pickweight(meteortypes)
+ var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
+ M.z_original = 1
spawn(0)
walk_towards(M, M.dest, 1)
-
return
+/proc/spaceDebrisStartLoc(startSide, Z)
+ var/starty
+ var/startx
+ switch(startSide)
+ if(NORTH)
+ starty = world.maxy-(TRANSITIONEDGE+1)
+ startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
+ if(EAST)
+ starty = rand((TRANSITIONEDGE+1),world.maxy-(TRANSITIONEDGE+1))
+ startx = world.maxx-(TRANSITIONEDGE+1)
+ if(SOUTH)
+ starty = (TRANSITIONEDGE+1)
+ startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
+ if(WEST)
+ starty = rand((TRANSITIONEDGE+1), world.maxy-(TRANSITIONEDGE+1))
+ startx = (TRANSITIONEDGE+1)
+ var/turf/T = locate(startx, starty, Z)
+ return T
+
+/proc/spaceDebrisFinishLoc(startSide, Z)
+ var/endy
+ var/endx
+ switch(startSide)
+ if(NORTH)
+ endy = TRANSITIONEDGE
+ endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
+ if(EAST)
+ endy = rand(TRANSITIONEDGE, world.maxy-TRANSITIONEDGE)
+ endx = TRANSITIONEDGE
+ if(SOUTH)
+ endy = world.maxy-TRANSITIONEDGE
+ endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
+ if(WEST)
+ endy = rand(TRANSITIONEDGE,world.maxy-TRANSITIONEDGE)
+ endx = world.maxx-TRANSITIONEDGE
+ var/turf/T = locate(endx, endy, Z)
+ return T
+
+///////////////////////
+//The meteor effect
+//////////////////////
+
/obj/effect/meteor
- name = "meteor"
+ name = "the concept of meteor"
+ desc = "You should probably run instead of gawking at this."
icon = 'icons/obj/meteor.dmi'
- icon_state = "flaming"
+ icon_state = "small"
density = 1
- anchored = 1.0
- var/hits = 1
+ anchored = 1
+ var/hits = 4
+ var/hitpwr = 2 //Level of ex_act to be called on hit.
var/dest
pass_flags = PASSTABLE
+ var/heavy = 0
+ var/meteorsound = 'sound/effects/meteorimpact.ogg'
+ var/z_original = 1
-/obj/effect/meteor/small
- name = "small meteor"
- icon_state = "smallf"
- pass_flags = PASSTABLE | PASSGRILLE
+ var/meteordrop = /obj/item/weapon/ore/iron
+ var/dropamt = 2
+
+/obj/effect/meteor/Move()
+ if(z != z_original || loc == dest)
+ qdel(src)
+ return
+
+ . = ..() //process movement...
+
+ if(.)//.. if did move, ram the turf we get in
+ var/turf/T = get_turf(loc)
+ ram_turf(T)
+
+ if(prob(10) && !istype(T, /turf/space))//randomly takes a 'hit' from ramming
+ get_hit()
+
+ return .
+
+/obj/effect/meteor/Destroy()
+ walk(src,0) //this cancels the walk_towards() proc
+ ..()
+
+/obj/effect/meteor/New()
+ ..()
+ SpinAnimation()
/obj/effect/meteor/Bump(atom/A)
- spawn(0)
+ if(A)
+ ram_turf(get_turf(A))
+ playsound(src.loc, meteorsound, 40, 1)
+ get_hit()
- if (A)
- A.meteorhit(src)
- playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 40, 1)
- if (--src.hits <= 0)
+/obj/effect/meteor/proc/ram_turf(var/turf/T)
+ //first bust whatever is in the turf
+ for(var/atom/A in T)
+ if(A != src)
+ A.ex_act(hitpwr)
- //Prevent meteors from blowing up the singularity's containment.
- //Changing emitter and generator ex_act would result in them being bomb and C4 proof.
- if(!istype(A,/obj/machinery/power/emitter) && \
- !istype(A,/obj/machinery/field_generator) && \
- prob(15))
- explosion(src.loc, 4, 5, 6, 7, 0)
- del(src)
- return
+ //then, ram the turf if it still exists
+ if(T)
+ T.ex_act(hitpwr)
-
-/obj/effect/meteor/ex_act(severity)
-
- if (severity < 4)
+//process getting 'hit' by colliding with a dense object
+//or randomly when ramming turfs
+/obj/effect/meteor/proc/get_hit()
+ hits--
+ if(hits <= 0)
+ make_debris()
+ meteor_effect(heavy)
qdel(src)
+
+/obj/effect/meteor/ex_act()
return
-/obj/effect/meteor/big
- name = "big meteor"
- hits = 5
-
- ex_act(severity)
- return
-
- Bump(atom/A)
- spawn(0)
- //Prevent meteors from blowing up the singularity's containment.
- //Changing emitter and generator ex_act would result in them being bomb and C4 proof
- if(!istype(A,/obj/machinery/power/emitter) && \
- !istype(A,/obj/machinery/field_generator))
- if(--src.hits <= 0)
- del(src) //Dont blow up singularity containment if we get stuck there.
-
- if (A)
- for(var/mob/M in player_list)
- var/turf/T = get_turf(M)
- if(!T || T.z != src.z)
- continue
- shake_camera(M, 3, get_dist(M.loc, src.loc) > 20 ? 1 : 3)
- M.playsound_local(src.loc, 'sound/effects/meteorimpact.ogg', 50, 1, get_rand_frequency(), 10)
- explosion(src.loc, 0, 1, 2, 3, 0)
-
- if (--src.hits <= 0)
- if(prob(15) && !istype(A, /obj/structure/grille))
- explosion(src.loc, 1, 2, 3, 4, 0)
- del(src)
- return
-
/obj/effect/meteor/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/pickaxe))
- del(src)
+ qdel(src)
return
- ..()
\ No newline at end of file
+ ..()
+
+/obj/effect/meteor/proc/make_debris()
+ for(var/throws = dropamt, throws > 0, throws--)
+ var/obj/item/O = new meteordrop(get_turf(src))
+ O.throw_at(dest, 5, 10)
+
+/obj/effect/meteor/proc/meteor_effect(var/sound=1)
+ if(sound)
+ for(var/mob/M in player_list)
+ var/turf/T = get_turf(M)
+ if(!T || T.z != src.z)
+ continue
+ var/dist = get_dist(M.loc, src.loc)
+ shake_camera(M, dist > 20 ? 3 : 5, dist > 20 ? 1 : 3)
+ M.playsound_local(src.loc, meteorsound, 50, 1, get_rand_frequency(), 10)
+
+///////////////////////
+//Meteor types
+///////////////////////
+
+//Dust
+/obj/effect/meteor/dust
+ name = "space dust"
+ icon_state = "dust"
+ pass_flags = PASSTABLE | PASSGRILLE
+ hits = 1
+ hitpwr = 3
+ meteorsound = 'sound/weapons/tap.ogg'
+ meteordrop = /obj/item/weapon/ore/glass
+
+//Medium-sized
+/obj/effect/meteor/medium
+ name = "meteor"
+ dropamt = 3
+
+/obj/effect/meteor/medium/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 0, 1, 2, 3, 0)
+
+//Large-sized
+/obj/effect/meteor/big
+ name = "big meteor"
+ icon_state = "large"
+ hits = 6
+ heavy = 1
+ dropamt = 4
+
+/obj/effect/meteor/big/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 1, 2, 3, 4, 0)
+
+//Flaming meteor
+/obj/effect/meteor/flaming
+ name = "flaming meteor"
+ icon_state = "flaming"
+ hits = 5
+ heavy = 1
+ meteorsound = 'sound/effects/bamf.ogg'
+ meteordrop = /obj/item/weapon/ore/plasma
+
+/obj/effect/meteor/flaming/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 1, 2, 3, 4, 0, 0, flame_range = 5)
+
+//Radiation meteor
+/obj/effect/meteor/irradiated
+ name = "glowing meteor"
+ icon_state = "glowing"
+ heavy = 1
+ meteordrop = /obj/item/weapon/ore/uranium
+
+
+/obj/effect/meteor/irradiated/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 0, 0, 4, 3, 0)
+ new /obj/effect/decal/cleanable/greenglow(get_turf(src))
+ for(var/mob/living/L in view(5, src))
+ L.apply_effect(40, IRRADIATE)
+
+//Station buster Tunguska
+/obj/effect/meteor/tunguska
+ name = "tunguska meteor"
+ icon_state = "flaming"
+ desc = "Your life briefly passes before your eyes the moment you lay them on this monstruosity."
+ hits = 30
+ hitpwr = 1
+ heavy = 1
+ meteorsound = 'sound/effects/bamf.ogg'
+ meteordrop = /obj/item/weapon/ore/plasma
+
+/obj/effect/meteor/tunguska/meteor_effect()
+ ..(heavy)
+ explosion(src.loc, 5, 10, 15, 20, 0)
+
+/obj/effect/meteor/tunguska/Bump()
+ ..()
+ if(prob(20))
+ explosion(src.loc,2,4,6,8)
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index c0af29571d0..d126c6c164e 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -555,8 +555,8 @@
/obj/item/weapon/spellbook/oneuse/fireball/recoil(mob/user as mob)
..()
- explosion(user.loc, -1, 0, 2, 3, 0)
- del(src)
+ explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
+ qdel(src)
/obj/item/weapon/spellbook/oneuse/smoke
spell = /obj/effect/proc_holder/spell/wizard/targeted/smoke
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 80c4d5dfea7..8ab3b3e626a 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -334,11 +334,6 @@ update_flag
healthcheck()
..()
-/obj/machinery/portable_atmospherics/canister/meteorhit(var/obj/O as obj)
- src.health = 0
- healthcheck()
- return
-
/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(iswelder(W) && src.destroyed)
if(weld(W, user))
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index f52492b1399..c8d2addfc09 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -184,11 +184,6 @@
emergencyShutdown()
return ..()
-/obj/machinery/computer/HolodeckControl/meteorhit(var/obj/O as obj)
- emergencyShutdown()
- ..()
-
-
/obj/machinery/computer/HolodeckControl/emp_act(severity)
emergencyShutdown()
..()
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index ae85a93d76b..d6a71a72080 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -22,21 +22,9 @@
/obj/machinery/computer/process()
if(stat & (NOPOWER|BROKEN))
- luminosity = 0
return 0
- luminosity = 2
return 1
-/obj/machinery/computer/meteorhit(var/obj/O as obj)
- for(var/x in verbs)
- verbs -= x
- set_broken()
- var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
- smoke.set_up(5, 0, src)
- smoke.start()
- return
-
-
/obj/machinery/computer/emp_act(severity)
if(prob(20/severity)) set_broken()
..()
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 8cde409e649..48b1ce8418a 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -108,14 +108,6 @@ for reference:
qdel(src)
return
- meteorhit()
- visible_message("\red The barricade is smashed apart!")
- new /obj/item/stack/sheet/wood(get_turf(src))
- new /obj/item/stack/sheet/wood(get_turf(src))
- new /obj/item/stack/sheet/wood(get_turf(src))
- del(src)
- return
-
blob_act()
src.health -= 25
if (src.health <= 0)
@@ -200,7 +192,7 @@ for reference:
if (src.health <= 0)
src.explode()
..()
-
+
emag_act(user as mob)
if (!emagged)
emagged = 1
@@ -236,10 +228,6 @@ for reference:
anchored = !anchored
icon_state = "barrier[src.locked]"
- meteorhit()
- src.explode()
- return
-
blob_act()
src.health -= 25
if (src.health <= 0)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 89b54d18c8c..ac589278c09 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -97,6 +97,7 @@
icon = 'icons/obj/doors/vault.dmi'
opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites.
+ explosion_block = 2
/obj/machinery/door/airlock/freezer
name = "Freezer Airlock"
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 76784c4ebff..6702399aad3 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -123,11 +123,6 @@
flick("door_deny", src)
return
-/obj/machinery/door/meteorhit(obj/M as obj)
- src.open()
- return
-
-
/obj/machinery/door/attack_ai(mob/user as mob)
return src.attack_hand(user)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index beaf044b177..e731689cbba 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -175,7 +175,6 @@
/obj/machinery/door/window/hitby(AM as mob|obj)
..()
- visible_message("\The [src] was hit by \the [AM].")
var/tforce = 0
if(ismob(AM))
tforce = 40
diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm
index d3bd4f56b47..643aacaf549 100644
--- a/code/game/machinery/doppler_array.dm
+++ b/code/game/machinery/doppler_array.dm
@@ -21,10 +21,15 @@ var/list/doppler_arrays = list()
/obj/machinery/doppler_array/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/wrench))
+ if(!anchored && !isinspace())
+ anchored = 1
+ power_change()
+ user << "You fasten [src]."
+ else if(anchored)
+ anchored = 0
+ power_change()
+ user << "You unfasten [src]."
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
- anchored = !anchored
- power_change()
- user << "You [anchored ? "wrench" : "unwrench"] [src]."
/obj/machinery/doppler_array/verb/rotate()
set name = "Rotate Tachyon-doppler Dish"
@@ -33,12 +38,13 @@ var/list/doppler_arrays = list()
if(!usr || !isturf(usr.loc))
return
- if(usr.stat || usr.restrained())
+ if(usr.stat || usr.restrained() || !usr.canmove)
return
src.dir = turn(src.dir, 90)
return
-/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took)
+/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,
+ var/took,var/orig_dev_range,var/orig_heavy_range,var/orig_light_range)
if(stat & NOPOWER) return
if(z != z0) return
@@ -59,10 +65,18 @@ var/list/doppler_arrays = list()
if(distance > 100) return
if(!(direct & dir)) return
- var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [took] seconds."
+
+ var/list/messages = list("Explosive disturbance detected.", \
+ "Epicenter at: grid ([x0],[y0]). Temporal displacement of tachyons: [took] seconds.", \
+ "Factual: Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range].")
+
+ // If the bomb was capped, say it's theoretical size.
+ if(devastation_range < orig_dev_range || heavy_impact_range < orig_heavy_range || light_impact_range < orig_light_range)
+ messages += "Theoretical: Epicenter radius: [orig_dev_range]. Outer radius: [orig_heavy_range]. Shockwave radius: [orig_light_range]."
for(var/mob/O in hearers(src, null))
- O.show_message("[src] states coldly, \"[message]\"",2)
+ for(var/message in messages)
+ O.show_message("[src] states coldly, \"[message]\"",2)
/obj/machinery/doppler_array/power_change()
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index bb6948eda6b..e65f470a0d6 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -183,23 +183,19 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
if(3.0)
if (prob(5))
- del(src)
+ qdel(src)
return
/obj/machinery/hologram/blob_act()
del(src)
return
-/obj/machinery/hologram/meteorhit()
- del(src)
- return
-
/obj/machinery/hologram/Del()
if(hologram)
src:clear_holo()
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 0317cd2d76c..c5c61e87c69 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -55,18 +55,6 @@
..()
-/obj/machinery/shield/meteorhit()
- src.health -= max_health*0.75 //3/4 health as damage
-
- if(src.health <= 0)
- visible_message("\blue The [src] dissipates")
- del(src)
- return
-
- opacity = 1
- spawn(20) if(src) opacity = 0
- return
-
/obj/machinery/shield/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
@@ -103,8 +91,6 @@
/obj/machinery/shield/hitby(AM as mob|obj)
- //Let everyone know we've been hit!
- visible_message("\red [src] was hit by [AM].")
//Super realistic, resource-intensive, real-time damage calculations.
var/tforce = 0
@@ -192,13 +178,6 @@
update_icon()
return
-/obj/machinery/shieldgen/meteorhit(obj/O as obj)
- src.health -= max_health*0.25 //A quarter of the machine's health
- if (prob(5))
- src.malfunction = 1
- src.checkhp()
- return
-
/obj/machinery/shieldgen/ex_act(severity)
switch(severity)
if(1.0)
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index fb6b23d17d1..1cb98f35541 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -187,8 +187,10 @@
if(adminlog)
message_admins(adminlog)
log_game(adminlog)
- explosion(get_turf(src),2,5,11)
- del(src)
+ explosion(get_turf(src),2,5,11, flame_range = 11)
+ if(src.loc && istype(src.loc,/obj/machinery/syndicatebomb/))
+ qdel(src.loc)
+ qdel(src)
/obj/item/weapon/bombcore/proc/defuse()
//Note: Because of how var/defused is used you shouldn't override this UNLESS you intend to set the var to 0 or
@@ -269,16 +271,17 @@
var/HeavyExplosion = 2
var/MediumExplosion = 5
var/LightExplosion = 11
+ var/Flames = 11
/obj/item/weapon/bombcore/badmin/explosion/detonate()
- explosion(get_turf(src),HeavyExplosion,MediumExplosion,LightExplosion)
+ explosion(get_turf(src),HeavyExplosion,MediumExplosion,LightExplosion, flame_range = Flames)
/obj/item/weapon/bombcore/miniature
name = "small bomb core"
w_class = 2
/obj/item/weapon/bombcore/miniature/detonate()
- explosion(src.loc,1,2,4) //Identical to a minibomb
+ explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb
qdel(src)
///Syndicate Detonator (aka the big red button)///
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index c6979895b8c..18f41d604a7 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -422,10 +422,6 @@
/obj/machinery/gun_turret/emp_act() //Can't emp an mechanical turret.
return
-/obj/machinery/gun_turret/meteorhit()
- die()
- return
-
/obj/machinery/gun_turret/update_icon()
if(state > 2 || state < 0) //someone fucked up the vars so fix them
take_damage(0)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 3f82973767d..a9ef99f5676 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -363,8 +363,8 @@
throw_impact(atom/hit_atom)
if(primed)
- explosion(hit_atom, 0, 0, 2, 4)
- del(src)
+ explosion(hit_atom, 0, 0, 2, 4, 0)
+ qdel(src)
else
..()
return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 265c352cb3d..f40127bf46b 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -632,7 +632,7 @@
T.Entered(O)
if(prob(30))
- explosion(T, 0, 0, 1, 3)
+ explosion(get_turf(loc), 0, 0, 1, 3)
spawn(0)
if(wreckage)
var/obj/effect/decal/mecha_wreckage/WR = new wreckage(T)
@@ -709,9 +709,6 @@
take_damage(30, "brute")
return
-/obj/mecha/meteorhit()
- return ex_act(rand(1,3))//should do for now
-
/obj/mecha/emp_act(severity)
if(get_charge())
use_power((cell.charge/2)/severity)
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index f88992671ca..3608b06c25d 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -91,11 +91,11 @@
return answer
emp_act()
- del src
+ qdel(src)
return
ex_act()
- del src
+ qdel(src)
return
proc/in_mecha()
diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index 536f6bb8b2f..8312fc0f328 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -99,7 +99,6 @@
/obj/structure/alien/resin/hitby(atom/movable/AM)
..()
- visible_message("[src] was hit by [AM].")
var/tforce = 0
if(!isobj(AM))
tforce = 10
@@ -209,8 +208,8 @@
new /obj/structure/alien/weeds(T, linked_node)
-/obj/structure/alien/weeds/ex_act(severity, target)
- del(src)
+/obj/structure/alien/weeds/ex_act(severity)
+ qdel(src)
/obj/structure/alien/weeds/attackby(obj/item/I, mob/user, params)
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index 08640fe9737..b897b1899dc 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -1100,11 +1100,11 @@ steam.start() -- spawns the effect
qdel(src)
blob_act()
- del(src)
+ qdel(src)
bullet_act()
if(metal==1 || prob(50))
- del(src)
+ qdel(src)
attack_hand(var/mob/user)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
@@ -1113,7 +1113,7 @@ steam.start() -- spawns the effect
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
- del(src)
+ qdel(src)
else
user << "\blue You hit the metal foam but bounce off it."
return
@@ -1127,8 +1127,8 @@ steam.start() -- spawns the effect
for(var/mob/O in viewers(src))
if (O.client)
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
- del(I)
- del(src)
+ qdel(I)
+ qdel(src)
return
if(prob(I.force*20 - metal*25))
@@ -1136,7 +1136,7 @@ steam.start() -- spawns the effect
for(var/mob/O in oviewers(user))
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
- del(src)
+ qdel(src)
else
user << "\blue You hit the metal foam to no effect."
diff --git a/code/game/objects/effects/sm_crystals.dm b/code/game/objects/effects/sm_crystals.dm
index d725b23d0bc..910f724d079 100644
--- a/code/game/objects/effects/sm_crystals.dm
+++ b/code/game/objects/effects/sm_crystals.dm
@@ -156,15 +156,15 @@
/obj/effect/supermatter_crystal/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(5))
- del(src)
+ qdel(src)
return
else
return
@@ -176,4 +176,4 @@
/obj/effect/supermatter_crystal/proc/CheckEndurance()
if(endurance <= 0)
- del(src)
\ No newline at end of file
+ qdel(src)
\ No newline at end of file
diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm
index 169486cd78e..60cbc8daafd 100644
--- a/code/game/objects/explosion.dm
+++ b/code/game/objects/explosion.dm
@@ -6,7 +6,7 @@
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
else return dy + (0.5*dx)
-proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
+/proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
@@ -19,42 +19,60 @@ proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY process
return block(x1y1,x2y2)
-proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, adminlog = 1)
+/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0 ,silent = 0)
src = null //so we don't abort once src is deleted
+ epicenter = get_turf(epicenter)
+
+ // Archive the uncapped explosion for the doppler array
+ var/orig_dev_range = devastation_range
+ var/orig_heavy_range = heavy_impact_range
+ var/orig_light_range = light_impact_range
+
+ if(!ignorecap)
+ // Clamp all values to MAX_EXPLOSION_RANGE
+ devastation_range = min (MAX_EX_DEVESTATION_RANGE, devastation_range)
+ heavy_impact_range = min (MAX_EX_HEAVY_RANGE, heavy_impact_range)
+ light_impact_range = min (MAX_EX_LIGHT_RANGE, light_impact_range)
+ flash_range = min (MAX_EX_FLASH_RANGE, flash_range)
+ flame_range = min (MAX_EX_FLAME_RANGE, flame_range)
+
spawn(0)
var/start = world.timeofday
- epicenter = get_turf(epicenter)
if(!epicenter) return
- var/max_range = max(devastation_range, heavy_impact_range, light_impact_range)
+ var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
- // Play sounds; since playsound uses range() for each use, we'll try doing it through the player list.
- // Playsound_local will also have an extra bonus of panning the sound, depending on the source. So stereo users will hear the direction of the explosion
- for(var/mob/M in player_list)
- // Double check for client
- if(M && M.client)
- var/turf/M_turf = get_turf(M)
- if(M_turf && M_turf.z == epicenter.z)
- var/dist = get_dist(M_turf, epicenter)
- // If inside the blast radius + world.view - 2
- if(dist <= round(max_range + world.view - 2, 1))
- M.playsound_local(epicenter, "explosion", 100, 1)
- // You hear a far explosion if you're outside the blast radius (*5) Small bombs shouldn't be heard all over the station.
- else if(dist <= round(max_range * 10, 1))
- var/far_volume = Clamp(max_range * 10, 30, 60) // Volume is based on explosion size and dist
- far_volume += (dist > max_range * 2 ? 0 : 40) // add 40 volume if the mob is pretty close to the explosion
- M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1)
-
-
- var/close = range(world.view+round(devastation_range,1), epicenter)
- // to all distanced mobs play a different sound
- for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close))
- // check if the mob can hear
- if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space))
- M << 'sound/effects/explosionfar.ogg'
if(adminlog)
- msg_admin_attack("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (JMP)")
- log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
+ message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (JMP)")
+ log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])")
+
+ // Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
+ // Stereo users will also hear the direction of the explosion!
+
+ // Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
+ // 3/7/14 will calculate to 80 + 35
+
+ var/far_dist = 0
+ far_dist += heavy_impact_range * 5
+ far_dist += devastation_range * 20
+
+ if(!silent)
+ var/frequency = get_rand_frequency()
+ for(var/mob/M in player_list)
+ // Double check for client
+ if(M && M.client)
+ var/turf/M_turf = get_turf(M)
+ if(M_turf && M_turf.z == epicenter.z)
+ var/dist = get_dist(M_turf, epicenter)
+ // If inside the blast radius + world.view - 2
+ if(dist <= round(max_range + world.view - 2, 1))
+ M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
+ // You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
+ else if(dist <= far_dist)
+ var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
+ far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
+ M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
+
//Pause the lighting updates for a bit
var/datum/controller/process/lighting = processScheduler.getProcess("lighting")
@@ -74,7 +92,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/z0 = epicenter.z
for(var/turf/T in trange(max_range, epicenter))
- var/dist = sqrt((T.x - x0)**2 + (T.y - y0)**2)
+
+ var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(config.reactionary_explosions)
var/turf/Trajectory = T
@@ -87,19 +106,25 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
if(D.density && D.explosion_block)
dist += D.explosion_block
+ var/flame_dist = 0
var/throw_dist = dist
+ if(dist < flame_range)
+ flame_dist = 1
+
if(dist < devastation_range) dist = 1
else if(dist < heavy_impact_range) dist = 2
else if(dist < light_impact_range) dist = 3
- else dist = 0
+ else dist = 0
+
+ //------- TURF FIRES -------
if(T)
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
var/atom/movable/AM = atom_movable
- if(AM && AM.simulated) AM.ex_act(dist)
-// if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
-// PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience!
+ if(AM) AM.ex_act(dist)
+ if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
+ new/obj/effect/hotspot(T) //Mostly for ambience!
if(dist > 0)
T.ex_act(dist)
@@ -122,7 +147,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/i,i<=doppler_arrays.len,i++)
var/obj/machinery/doppler_array/Array = doppler_arrays[i]
if(Array)
- Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took)
+ Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
sleep(8)
@@ -136,7 +161,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
-proc/secondaryexplosion(turf/epicenter, range)
+/proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in trange(range, epicenter))
tile.ex_act(2)
@@ -145,8 +170,10 @@ proc/secondaryexplosion(turf/epicenter, range)
set category = "Debug"
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
+ var/turf/epicenter = get_turf(mob)
+ if(!epicenter)
+ return
- var/turf/epicenter = get_turf(usr)
var/dev = 0
var/heavy = 0
var/light = 0
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index d655e2c32ec..bc161a5d70e 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -1293,7 +1293,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (ismob(loc))
var/mob/M = loc
- M.show_message("\red Your [src] explodes!", 1)
+ M.show_message("Your [src] explodes!", 1)
if(T)
T.hotspot_expose(700,125)
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index 70791bddab2..b2107561a60 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -134,6 +134,6 @@
if(1.0)
del(src)
if(2.0)
- if(prob(50)) del(src)
+ if(prob(50)) qdel(src)
if(3.0)
- if(prob(25)) del(src)
+ if(prob(25)) qdel(src)
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index d34aa54a96a..4393408d8f7 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -317,4 +317,4 @@
if(pai)
pai.ex_act(severity)
else
- del(src)
+ qdel(src)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index c87d3f9ef3f..c972821fcb0 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -35,7 +35,7 @@
return
/obj/item/weapon/a_gift/ex_act()
- del(src)
+ qdel(src)
return
/obj/effect/spresent/relaymove(mob/user as mob)
diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm
index 707697a9fba..bc07fb389b9 100644
--- a/code/game/objects/items/weapons/grenades/ghettobomb.dm
+++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm
@@ -122,7 +122,7 @@
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
update_mob()
- explosion(src.loc,0,0,2,2) //explosion(src.loc,-1,-1,-1, flame_range = range)
+ explosion(src.loc,-1,-1,-1, flame_range = range) // no explosive damage, only a large fireball.
qdel(src)
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
diff --git a/code/game/objects/items/weapons/grenades/syndieminibomb.dm b/code/game/objects/items/weapons/grenades/syndieminibomb.dm
index acd086c6205..52efab0a48b 100644
--- a/code/game/objects/items/weapons/grenades/syndieminibomb.dm
+++ b/code/game/objects/items/weapons/grenades/syndieminibomb.dm
@@ -9,5 +9,5 @@
/obj/item/weapon/grenade/syndieminibomb/prime()
update_mob()
- explosion(src.loc,1,2,4)
- del(src)
\ No newline at end of file
+ explosion(src.loc,1,2,4,flame_range = 2)
+ qdel(src)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index a06e14f6358..6a977006fb8 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -248,13 +248,15 @@
air_contents.react()
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
- range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
var/turf/epicenter = get_turf(loc)
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
- del(src)
+ if(istype(src.loc,/obj/item/device/transfer_valve))
+ qdel(src.loc)
+ else
+ qdel(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
@@ -264,7 +266,7 @@
return
T.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
- del(src)
+ qdel(src)
else
integrity--
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 3bfb64cf128..88649ff62fa 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -19,10 +19,6 @@
if(3.0)
return
-/obj/structure/meteorhit(obj/O as obj)
- del(src)
-
-
/obj/structure/Destroy()
if(hascall(src, "unbuckle"))
src:unbuckle()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index e79d61eb2f4..edc99071fb4 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -175,13 +175,6 @@
A.loc = src.loc
del(src)
-/obj/structure/closet/meteorhit(obj/O as obj)
- if(O.icon_state == "flaming")
- for(var/mob/M in src)
- M.meteorhit(O)
- src.dump_contents()
- del(src)
-
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index dfe09d025d9..e4249321488 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -99,12 +99,15 @@
/obj/structure/closet/statue/toggle()
return
-/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
- health -= Proj.damage
+/obj/structure/closet/statue/proc/check_health()
if(health <= 0)
for(var/mob/M in src)
shatter(M)
+/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
+ health -= Proj.damage
+ check_health()
+
return
/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user as mob)
@@ -116,21 +119,17 @@
for(var/mob/M in src)
shatter(M)
-/obj/structure/closet/statue/meteorhit(obj/O as obj)
- if(O.icon_state == "flaming")
- for(var/mob/M in src)
- M.meteorhit(O)
- shatter(M)
+/obj/structure/closet/statue/ex_act(severity)
+ for(var/mob/M in src)
+ M.ex_act(severity)
+ health -= 60 / severity
+ check_health()
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
health -= I.force
visible_message("\red [user] strikes [src] with [I].")
- if(health <= 0)
- for(var/mob/M in src)
- shatter(M)
-
-
+ check_health()
/obj/structure/closet/statue/MouseDrop_T()
return
diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
index ee2b6d7754c..08130cac90a 100644
--- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
@@ -4,7 +4,10 @@
icon_state = "blue"
icon_closed = "blue"
-/obj/structure/closet/wardrobe/New()
+/obj/structure/closet/wardrobe/generic
+ // Identical to the base wardrobe, aside from containing some stuff.
+
+/obj/structure/closet/wardrobe/generic/New()
..()
sleep(2)
new /obj/item/clothing/under/color/blue(src)
@@ -267,10 +270,12 @@
new /obj/item/clothing/shoes/white(src)
return
-/obj/structure/closet/wardrobe/white/medical
+/obj/structure/closet/wardrobe/medical_white
name = "medical doctor's wardrobe"
+ icon_state = "white"
+ icon_closed = "white"
-/obj/structure/closet/wardrobe/white/medical/New()
+/obj/structure/closet/wardrobe/medical_white/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/nursesuit (src)
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 8a7202b1925..115f4a0b5d2 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -181,13 +181,13 @@
switch(severity)
if(1.0)
for(var/obj/O in src.contents)
- del(O)
+ qdel(O)
qdel(src)
return
if(2.0)
for(var/obj/O in src.contents)
if(prob(50))
- del(O)
+ qdel(O)
qdel(src)
return
if(3.0)
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index 01d5632bd44..b33bb093469 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -101,7 +101,7 @@
PoolOrNew(/obj/item/weapon/shard, loc)
if (occupant)
dump()
- del(src)
+ qdel(src)
if (2)
if (prob(50))
src.health -= 15
@@ -124,14 +124,7 @@
PoolOrNew(/obj/item/weapon/shard, loc)
if(occupant) dump()
del(src)
-
-
-/obj/structure/displaycase/meteorhit(obj/O as obj)
- PoolOrNew(/obj/item/weapon/shard, loc)
- if(occupant) dump()
- del(src)
-
-
+
/obj/structure/displaycase/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 0e8a3ab7dd2..9af24b455f8 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -44,11 +44,7 @@
/obj/structure/grille/blob_act()
qdel(src)
-
-/obj/structure/grille/meteorhit(var/obj/M)
- qdel(src)
-
-
+
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index e75625b6a78..fe5171d84c9 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -62,11 +62,6 @@
blob_act()
deflate(1)
-
- meteorhit()
- //world << "glass at [x],[y],[z] Mhit"
- deflate(1)
-
attack_hand(mob/user as mob)
add_fingerprint(user)
return
diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm
index daea6072db8..c59bcaf648b 100644
--- a/code/game/objects/structures/lamarr_cage.dm
+++ b/code/game/objects/structures/lamarr_cage.dm
@@ -38,14 +38,7 @@
PoolOrNew(/obj/item/weapon/shard, loc)
Break()
qdel(src)
-
-
-/obj/structure/lamarr/meteorhit(obj/O as obj)
- PoolOrNew(/obj/item/weapon/shard, loc)
- Break()
- qdel(src)
-
-
+
/obj/structure/lamarr/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index d665589182e..10b8d73a92b 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -168,10 +168,6 @@ obj/structure/safe/ex_act(severity)
return
-obj/structure/safe/meteorhit(obj/O as obj)
- return
-
-
//FLOOR SAFES
/obj/structure/safe/floor
name = "floor safe"
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 68c29aab45a..de51f62114d 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -905,10 +905,6 @@
W.Move(loc)
return
-/obj/structure/rack/meteorhit(obj/O as obj)
- del(src)
-
-
/obj/structure/table/attack_hand(mob/user)
if(HULK in user.mutations)
visible_message("[user] smashes [src] apart!")
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index f9c3e075530..ac2efbe2866 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -76,9 +76,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/blob_act()
destroy()
-/obj/structure/window/meteorhit()
- destroy()
-
/obj/structure/window/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
destroy()
@@ -102,7 +99,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/hitby(AM as mob|obj)
..()
- visible_message("[src] was hit by [AM].")
var/tforce = 0
if(isobj(AM))
var/obj/item/I = AM
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index c0d85564de8..1ffea6a4d93 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -241,15 +241,6 @@
// F.sd_LumReset() //TODO: ~Carn
return
-/turf/simulated/wall/meteorhit(obj/M as obj)
- if (prob(15) && !rotting)
- dismantle_wall()
- else if(prob(70) && !rotting)
- ChangeTurf(/turf/simulated/floor/plating)
- else
- ReplaceWithLattice()
- return 0
-
//Interactions
/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M)
diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm
index 6e5aa0c33a8..20d476238cb 100644
--- a/code/game/turfs/simulated/walls_mineral.dm
+++ b/code/game/turfs/simulated/walls_mineral.dm
@@ -53,7 +53,6 @@
icon_state = "uranium0"
walltype = "uranium"
mineral = "uranium"
- explosion_block = 0
/turf/simulated/wall/mineral/uranium/proc/radiate()
if(!active)
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 87ab3a48ae0..0fd7432660d 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -19,6 +19,8 @@
update_starlight() //MC will initialize all the space turfs that get created before config
/turf/space/proc/update_starlight()
+ . = ..()
+
if(!config) return
if(!config.starlight)
return
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 0392140834c..7adcbf2560c 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -38,7 +38,8 @@
src.Entered(AM)
return
- if(!dynamic_lighting)
+ var/area/A = loc
+ if(!dynamic_lighting || !A.lighting_use_dynamic)
luminosity = 1
// Adds the adjacent turfs to the current atmos processing
@@ -431,4 +432,4 @@
if(O.invisibility == 101)
O.singularity_act()
ChangeTurf(/turf/space)
- return(2)
\ No newline at end of file
+ return(2)
diff --git a/code/game/vehicles/spacepods/spacepod.dm b/code/game/vehicles/spacepods/spacepod.dm
index ce08d04d51f..d5e46566fbb 100644
--- a/code/game/vehicles/spacepods/spacepod.dm
+++ b/code/game/vehicles/spacepods/spacepod.dm
@@ -179,8 +179,8 @@
H2.forceMove(get_turf(src))
H2.ex_act(severity + 1)
H2 << "You are forcefully thrown from \the [src]!"
- del(ion_trail)
- del(src)
+ qdel(ion_trail)
+ qdel(src)
if(2)
deal_damage(100)
if(3)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 89fe2f3a863..92d1bf5a331 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -384,17 +384,26 @@ var/list/admin_verbs_mentor = list(
if(null)
return 0
if("Small Bomb")
- explosion(epicenter, 1, 2, 3)
+ explosion(epicenter, 1, 2, 3, 3)
if("Medium Bomb")
- explosion(epicenter, 2, 3, 4)
+ explosion(epicenter, 2, 3, 4, 4)
if("Big Bomb")
- explosion(epicenter, 3, 5, 7)
+ explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
- var/devastation_range = input("Devastation range (in tiles):") as num
- var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
- var/light_impact_range = input("Light impact range (in tiles):") as num
- explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range)
- message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].")
+ var/devastation_range = input("Devastation range (in tiles):") as null|num
+ if(devastation_range == null)
+ return
+ var/heavy_impact_range = input("Heavy impact range (in tiles):") as null|num
+ if(heavy_impact_range == null)
+ return
+ var/light_impact_range = input("Light impact range (in tiles):") as null|num
+ if(light_impact_range == null)
+ return
+ var/flash_range = input("Flash range (in tiles):") as null|num
+ if(flash_range == null)
+ return
+ explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, 1, 1)
+ message_admins("[ckey] creating an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index ec3362fa23b..fc6bfa4ed53 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2332,18 +2332,22 @@
if("togglebombcap")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
- switch(MAX_EXPLOSION_RANGE)
- if(14) MAX_EXPLOSION_RANGE = 16
- if(16) MAX_EXPLOSION_RANGE = 20
- if(20) MAX_EXPLOSION_RANGE = 28
- if(28) MAX_EXPLOSION_RANGE = 56
- if(56) MAX_EXPLOSION_RANGE = 128
- else MAX_EXPLOSION_RANGE = 14
- var/range_dev = MAX_EXPLOSION_RANGE *0.25
- var/range_high = MAX_EXPLOSION_RANGE *0.5
- var/range_low = MAX_EXPLOSION_RANGE
- message_admins("\red [key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]", 1)
- log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EXPLOSION_RANGE]")
+
+ var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", MAX_EX_LIGHT_RANGE) as num|null
+ if (newBombCap < 4)
+ return
+ if (newBombCap > 128)
+ newBombCap = 128
+
+ MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
+ MAX_EX_HEAVY_RANGE = round(newBombCap/2)
+ MAX_EX_LIGHT_RANGE = newBombCap
+ //I don't know why these are their own variables, but fuck it, they are.
+ MAX_EX_FLASH_RANGE = newBombCap
+ MAX_EX_FLAME_RANGE = newBombCap
+
+ message_admins("[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
+ log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
if("flicklights")
feedback_inc("admin_secrets_fun_used",1)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 385dccf3e01..feb735baef2 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -698,15 +698,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(light == null) return
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) return
+ var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
+ if(flames == null) return
- if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
- if ((devastation > 20) || (heavy > 20) || (light > 20))
+ if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
+ if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
return
- explosion(O, devastation, heavy, light, flash)
- log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])")
- message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
+ explosion(O, devastation, heavy, light, flash, null, null,flames)
+ log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
+ message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
feedback_add_details("admin_verb","EXPL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
else
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 127f3c5d9ca..19fe8d84219 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -192,15 +192,15 @@
ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(50))
- del(src)
+ qdel(src)
return
if(3.0)
if (prob(25))
- del(src)
+ qdel(src)
return
return
diff --git a/code/modules/computer3/computer.dm b/code/modules/computer3/computer.dm
index 157fc1e6d2e..3e4d8116fac 100644
--- a/code/modules/computer3/computer.dm
+++ b/code/modules/computer3/computer.dm
@@ -201,14 +201,6 @@
// todo does this do enough
-
- meteorhit(var/obj/O as obj)
- for(var/x in verbs)
- verbs -= x
- set_broken()
- return
-
-
emp_act(severity)
if(prob(20/severity)) set_broken()
..()
@@ -217,11 +209,11 @@
ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
return
if(2.0)
if (prob(25))
- del(src)
+ qdel(src)
return
if (prob(50))
for(var/x in verbs)
diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm
index 4347ae160a3..1908bfde173 100644
--- a/code/modules/events/event_container.dm
+++ b/code/modules/events/event_container.dm
@@ -144,7 +144,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Vines", /datum/event/spacevine, 250, list(ASSIGNMENT_ENGINEER = 10)),
- new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 20)),
+ new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meaty Ores", /datum/event/dust/meaty, 0, list(ASSIGNMENT_ENGINEER = 30)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm
index 3838980832d..c73b85a4857 100644
--- a/code/modules/events/event_dynamic.dm
+++ b/code/modules/events/event_dynamic.dm
@@ -86,7 +86,6 @@ var/global/list/possibleEvents = list()
possibleEvents[/datum/event/anomaly/anomaly_flux] = 50 + 50 * active_with_role["Engineer"]
possibleEvents[/datum/event/meteor_wave] = 10 * active_with_role["Engineer"]
- possibleEvents[/datum/event/meteor_shower] = 20 * active_with_role["Engineer"]
possibleEvents[/datum/event/blob] = 10 * active_with_role["Engineer"]
if(active_with_role["Medical"] > 0)
diff --git a/code/modules/events/meteors.dm b/code/modules/events/meteors.dm
index 42b0b1eda1d..d26e43dba6b 100644
--- a/code/modules/events/meteors.dm
+++ b/code/modules/events/meteors.dm
@@ -1,46 +1,39 @@
-//cael - two events here
-
-//meteor storms are much heavier
/datum/event/meteor_wave
- startWhen = 6
- endWhen = 33
-
-/datum/event/meteor_wave/setup()
- endWhen = rand(10,25) * 3
-
-/datum/event/meteor_wave/announce()
- command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
-
-/datum/event/meteor_wave/tick()
- if(IsMultiple(activeFor, 3))
- spawn_meteors(rand(2,5))
-
-/datum/event/meteor_wave/end()
- command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
-
-//
-/datum/event/meteor_shower
startWhen = 5
endWhen = 7
var/next_meteor = 6
var/waves = 1
-/datum/event/meteor_shower/setup()
- waves = rand(1,4)
+/datum/event/meteor_wave/setup()
+ waves = severity * rand(1,3)
-/datum/event/meteor_shower/announce()
- command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
+/datum/event/meteor_wave/announce()
+ switch(severity)
+ if(EVENT_LEVEL_MAJOR)
+ command_announcement.Announce("Meteors have been detected on collision course with the station.", "Meteor Alert", new_sound = 'sound/AI/meteors.ogg')
+ else
+ command_announcement.Announce("The station is now in a meteor shower.", "Meteor Alert")
//meteor showers are lighter and more common,
-/datum/event/meteor_shower/tick()
- if(activeFor >= next_meteor)
- spawn_meteors(rand(1,4))
- next_meteor += rand(20,100)
+/datum/event/meteor_wave/tick()
+ if(waves && activeFor >= next_meteor)
+ spawn() spawn_meteors(severity * rand(1,2), get_meteors())
+ next_meteor += rand(15, 30) / severity
waves--
- if(waves <= 0)
- endWhen = activeFor + 1
- else
- endWhen = next_meteor + 1
+ endWhen = (waves ? next_meteor + 1 : activeFor + 15)
-/datum/event/meteor_shower/end()
- command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
+/datum/event/meteor_wave/end()
+ switch(severity)
+ if(EVENT_LEVEL_MAJOR)
+ command_announcement.Announce("The station has cleared the meteor storm.", "Meteor Alert")
+ else
+ command_announcement.Announce("The station has cleared the meteor shower", "Meteor Alert")
+
+/datum/event/meteor_wave/proc/get_meteors()
+ switch(severity)
+ if(EVENT_LEVEL_MAJOR)
+ return meteors_catastrophic
+ if(EVENT_LEVEL_MODERATE)
+ return meteors_threatening
+ else
+ return meteors_normal
\ No newline at end of file
diff --git a/code/modules/events/sayuevents/meaty_ores.dm b/code/modules/events/sayuevents/meaty_ores.dm
index d6e640934d9..b5cb7e390cc 100644
--- a/code/modules/events/sayuevents/meaty_ores.dm
+++ b/code/modules/events/sayuevents/meaty_ores.dm
@@ -32,7 +32,7 @@
invisibility = 101
new /obj/effect/decal/cleanable/blood(get_turf(A))
if(ismob(A))
- A.meteorhit(src)
+ A.ex_act(strength)
else
spawn(0)
if(A)
diff --git a/code/modules/events/tgevents/anomaly_flux.dm b/code/modules/events/tgevents/anomaly_flux.dm
index d02af07b3ef..b7a14ab9327 100644
--- a/code/modules/events/tgevents/anomaly_flux.dm
+++ b/code/modules/events/tgevents/anomaly_flux.dm
@@ -12,6 +12,6 @@
newAnomaly = new /obj/effect/anomaly/flux(T.loc)
/datum/event/anomaly/anomaly_flux/end()
- if(newAnomaly)//If it hasn't been neutralized, it's time to blow up.
- explosion(newAnomaly.loc, 0, 4, 6, 5)
+ if(newAnomaly.loc)//If it hasn't been neutralized, it's time to blow up.
+ explosion(newAnomaly, -1, 3, 5, 5)
qdel(newAnomaly)
\ No newline at end of file
diff --git a/code/modules/events/tgevents/anomaly_pyro.dm b/code/modules/events/tgevents/anomaly_pyro.dm
index 29e2a1c1401..b1cf81b23c3 100644
--- a/code/modules/events/tgevents/anomaly_pyro.dm
+++ b/code/modules/events/tgevents/anomaly_pyro.dm
@@ -20,7 +20,7 @@
/datum/event/anomaly/anomaly_pyro/end()
if(newAnomaly.loc)
- explosion(get_turf(newAnomaly), -1,0,3)
+ explosion(get_turf(newAnomaly), -1,0,3, flame_range = 4)
var/mob/living/carbon/slime/S = new/mob/living/carbon/slime(get_turf(newAnomaly))
S.colour = pick("red", "orange")
diff --git a/code/modules/events/tgevents/brand_intelligence.dm b/code/modules/events/tgevents/brand_intelligence.dm
index edc01bd81ed..661adb95f0c 100644
--- a/code/modules/events/tgevents/brand_intelligence.dm
+++ b/code/modules/events/tgevents/brand_intelligence.dm
@@ -50,7 +50,7 @@
M.speak = rampant_speeches.Copy()
M.speak_chance = 15
else
- explosion(upriser.loc, -1, 1, 2)
+ explosion(upriser.loc, -1, 1, 2, 4, 0)
qdel(upriser)
kill()
diff --git a/code/modules/events/tgevents/dust.dm b/code/modules/events/tgevents/dust.dm
index cefa4f250c8..17523a92e8e 100644
--- a/code/modules/events/tgevents/dust.dm
+++ b/code/modules/events/tgevents/dust.dm
@@ -80,7 +80,7 @@
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
if(ismob(A))
- A.meteorhit(src)//This should work for now I guess
+ A.ex_act(strength)//This should work for now I guess
else if(!istype(A,/obj/machinery/power/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
@@ -99,5 +99,5 @@
ex_act(severity)
- del(src)
+ qdel(src)
return
diff --git a/code/modules/events/tgevents/immovable_rod.dm b/code/modules/events/tgevents/immovable_rod.dm
index ec86e89981f..d1a09d8633d 100644
--- a/code/modules/events/tgevents/immovable_rod.dm
+++ b/code/modules/events/tgevents/immovable_rod.dm
@@ -85,7 +85,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
else if (istype(clong, /mob))
if(clong.density || prob(10))
- clong.meteorhit(src)
+ clong.ex_act(2)
else
del(src)
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index 7ca5d9496d7..7b7f6eded45 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -82,8 +82,8 @@
if (attempts == 0)
user << "The crate's anti-tamper system activates!"
var/turf/T = get_turf(src.loc)
- explosion(T, 0, 0, 0, 1)
- del(src)
+ explosion(T, -1, -1, 1, 1)
+ qdel(src)
return
else
user << "You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out."
diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm
index 702a87ab336..52998277e5a 100644
--- a/code/modules/mining/equipment_locker.dm
+++ b/code/modules/mining/equipment_locker.dm
@@ -264,7 +264,7 @@
s.set_up(5, 1, src)
s.start()
if(prob(50 / severity) && severity < 3)
- del(src)
+ qdel(src)
/**********************Mining Equipment Locker Items**************************/
diff --git a/code/modules/mining/manufacturing.dm b/code/modules/mining/manufacturing.dm
index 52274b0ea32..d74386828df 100644
--- a/code/modules/mining/manufacturing.dm
+++ b/code/modules/mining/manufacturing.dm
@@ -43,7 +43,7 @@
ex_act(severity)
switch(severity)
- if(1.0) del(src)
+ if(1.0) qdel(src)
if(2.0)
if (prob(60)) stat |= BROKEN
if(3.0)
@@ -54,10 +54,6 @@
if (prob(25)) del src
return
- meteorhit()
- if (prob(50)) del src
- return
-
power_change()
if(stat & BROKEN) icon_state = "fab-broken"
else
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 6c01076a72f..b8a4cd05a7e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -125,18 +125,6 @@
adjustFireLoss(damage)
return
-/mob/living/carbon/alien/humanoid/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (health > 0)
- adjustFireLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
- adjustFireLoss(30)
-
- updatehealth()
- return
-
-
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index a7207f22f9d..2934093a3f6 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -129,17 +129,6 @@
/mob/living/carbon/alien/larva/attack_ui(slot_id)
return
-/mob/living/carbon/alien/larva/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (health > 0)
- adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
- adjustFireLoss(30)
-
- updatehealth()
- return
-
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 7adb3db6607..93199dce0c2 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -382,22 +382,6 @@
apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee"))
return
-/mob/living/carbon/human/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message("\red [src] has been hit by [O]", 1)
- if (health > 0)
- var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
- if(!affecting) return
- if (istype(O, /obj/effect/immovablerod))
- if(affecting.take_damage(101, 0))
- UpdateDamageIcon()
- else
- if(affecting.take_damage((istype(O, /obj/effect/meteor/small) ? 10 : 25), 30))
- UpdateDamageIcon()
- updatehealth()
- return
-
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm
index 25c197c70f5..1981bb8ec6c 100644
--- a/code/modules/mob/living/carbon/metroid/metroid.dm
+++ b/code/modules/mob/living/carbon/metroid/metroid.dm
@@ -239,17 +239,6 @@
/mob/living/carbon/slime/attack_ui(slot)
return
-/mob/living/carbon/slime/meteorhit(O as obj)
- for(var/mob/M in viewers(src, null))
- if ((M.client && !( M.blinded )))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (health > 0)
- adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
- adjustFireLoss(30)
-
- updatehealth()
- return
-
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
M << "You cannot attack people before the game has started."
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 669eacbccee..5324628ef90 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -591,17 +591,6 @@ var/list/ai_verbs_default = list(
return
-/mob/living/silicon/ai/meteorhit(obj/O as obj)
- for(var/mob/M in viewers(src, null))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- //Foreach goto(19)
- if (health > 0)
- adjustBruteLoss(30)
- if ((O.icon_state == "flaming"))
- adjustFireLoss(40)
- updatehealth()
- return
-
/mob/living/silicon/ai/bullet_act(var/obj/item/projectile/Proj)
..(Proj)
updatehealth()
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index ae26734975f..76a265a7c95 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -203,16 +203,6 @@
// See software.dm for Topic()
-/mob/living/silicon/pai/meteorhit(obj/O as obj)
- for(var/mob/M in viewers(src, null))
- M.show_message(text("\red [] has been hit by []", src, O), 1)
- if (src.health > 0)
- src.adjustBruteLoss(30)
- if ((O.icon_state == "flaming"))
- src.adjustFireLoss(40)
- src.updatehealth()
- return
-
/mob/living/silicon/pai/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 241f35ec0eb..3ae26fea4cf 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -528,18 +528,6 @@ var/list/robot_verbs_default = list(
return
-/mob/living/silicon/robot/meteorhit(obj/O as obj)
- for(var/mob/M in viewers(src, null))
- M.show_message(text("\red [src] has been hit by [O]"), 1)
- //Foreach goto(19)
- if (health > 0)
- adjustBruteLoss(30)
- if ((O.icon_state == "flaming"))
- adjustFireLoss(40)
- updatehealth()
- return
-
-
/mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj)
..(Proj)
updatehealth()
@@ -1236,7 +1224,7 @@ var/list/robot_verbs_default = list(
if(emagged)
if(mmi)
qdel(mmi)
- explosion(src.loc,1,2,4)
+ explosion(src.loc,1,2,4,flame_range = 2)
else
explosion(src.loc,-1,0,2)
gib()
diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm
index 2b6fab41b8e..fa8051f43a2 100644
--- a/code/modules/mob/living/simple_animal/tribbles.dm
+++ b/code/modules/mob/living/simple_animal/tribbles.dm
@@ -140,7 +140,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
if (1)
new /obj/item/weapon/shard( src.loc )
Break()
- del(src)
+ qdel(src)
if (2)
if (prob(50))
src.health -= 15
@@ -165,12 +165,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
del(src)
-/obj/structure/tribble_cage/meteorhit(obj/O as obj)
- new /obj/item/weapon/shard( src.loc )
- Break()
- del(src)
-
-
/obj/structure/tribble_cage/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index d2d68db05db..bc20b6fe13c 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -132,10 +132,10 @@
/obj/machinery/photocopier/ex_act(severity)
switch(severity)
if(1.0)
- del(src)
+ qdel(src)
if(2.0)
if(prob(50))
- del(src)
+ qdel(src)
else
if(toner > 0)
new /obj/effect/decal/cleanable/blood/oil(get_turf(src))
@@ -149,7 +149,7 @@
/obj/machinery/photocopier/blob_act()
if(prob(50))
- del(src)
+ qdel(src)
else
if(toner > 0)
new /obj/effect/decal/cleanable/blood/oil(get_turf(src))
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 2aa3dcccab9..d8570e289d2 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1254,11 +1254,6 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
// damage and destruction acts
-/obj/machinery/power/apc/meteorhit(var/obj/O as obj)
-
- set_broken()
- return
-
/obj/machinery/power/apc/emp_act(severity)
if(cell)
cell.emp_act(severity)
diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm
index 72ed8a10f71..5d61d7a93ca 100644
--- a/code/modules/power/cell.dm
+++ b/code/modules/power/cell.dm
@@ -110,9 +110,7 @@
message_admins("LOG: Rigged power cell explosion, last touched by [fingerprintslast]")
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
-
- spawn(1)
- del(src)
+ qdel(src)
/obj/item/weapon/stock_parts/cell/proc/corrupt()
charge /= 2
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index 67f2836369f..b908fc4be22 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -36,8 +36,6 @@
/obj/machinery/containment_field/ex_act(severity)
return 0
-/obj/machinery/containment_field/meteorhit()
- return 0
/obj/machinery/containment_field/HasProximity(atom/movable/AM as mob|obj)
if(istype(AM,/mob/living/silicon) && prob(40))
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index a17cbdf566b..687cbd7dcb5 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -135,8 +135,6 @@
src.use_power = 1 */
return 1
-/obj/machinery/containment_field/meteorhit()
- return 0
/obj/machinery/power/emitter/process()
if(stat & (BROKEN))
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index 467b41c894b..826f75c140e 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -163,8 +163,6 @@ field_generator power level display
else
..()
-/obj/machinery/containment_field/meteorhit()
- return 0
/obj/machinery/field_generator/bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet")
diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm
index b645f7b6b79..0163786e65e 100644
--- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm
+++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm
@@ -157,11 +157,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return
-/obj/structure/particle_accelerator/meteorhit()
- if(prob(50))
- del(src)
- return
-
/obj/structure/particle_accelerator/update_icon()
switch(construction_state)
if(0,1)
@@ -344,12 +339,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return
-/obj/machinery/particle_accelerator/meteorhit()
- if(prob(50))
- del(src)
- return
-
-
/obj/machinery/particle_accelerator/proc/update_state()
return 0
diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm
index 10dcf66ee00..b2ab8f470ff 100644
--- a/code/modules/projectiles/guns/magic/wand.dm
+++ b/code/modules/projectiles/guns/magic/wand.dm
@@ -148,6 +148,6 @@
/obj/item/weapon/gun/magic/wand/fireball/zap_self(mob/living/user as mob)
if(alert(user, "Zapping yourself with a wand of fireball is probably a bad idea, do it anyway?",, "Yes", "No") == "Yes" && charges && user.get_active_hand() == src && isliving(user))
- explosion(user.loc, -1, 0, 2, 3, 0)
+ explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
charges--
..()
\ No newline at end of file
diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm
index 3f2e4d0f245..785b619186b 100644
--- a/code/modules/projectiles/projectile/magic.dm
+++ b/code/modules/projectiles/projectile/magic.dm
@@ -24,7 +24,7 @@
/obj/item/projectile/magic/fireball/on_hit(var/target)
var/turf/T = get_turf(target)
- explosion(T, -1, 0, 2, 3, 0)
+ explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
if(ismob(target)) //multiple flavors of pain
var/mob/living/M = target
M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm
index 77d5ea37bc8..c4813e05bb1 100644
--- a/code/modules/projectiles/projectile/special.dm
+++ b/code/modules/projectiles/projectile/special.dm
@@ -38,7 +38,8 @@
flag = "bullet"
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = 0)
- explosion(target, -1, 0, 2, 1, 0)
+ ..()
+ explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
return 1
/obj/item/projectile/temp
@@ -75,7 +76,7 @@
if(src)//Do not add to this if() statement, otherwise the meteor won't delete them
if(A)
- A.meteorhit(src)
+ A.ex_act(2)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in range(10, src))
@@ -217,6 +218,7 @@ obj/item/projectile/kinetic/New()
weaken = 5
/obj/item/projectile/bullet/frag12/on_hit(atom/target, blocked = 0)
+ ..()
explosion(target, -1, 0, 1)
return 1
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index 2fd1d0cdde1..44e077013bd 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -97,10 +97,6 @@
if (prob(50))
del(src)
-/obj/machinery/chem_dispenser/meteorhit()
- del(src)
- return
-
/**
* The ui_interact proc is used to open and update Nano UIs
* If ui_interact is not used then the UI will not update correctly
@@ -401,10 +397,6 @@
if (prob(50))
qdel(src)
-/obj/machinery/chem_master/meteorhit()
- qdel(src)
- return
-
/obj/machinery/chem_master/power_change()
if(powered())
stat &= ~NOPOWER
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 244d65aab13..eb13ba91b21 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -103,7 +103,7 @@
explode()
blob_act()
- explode()
+ explosion(src.loc,0,1,5,7,10, flame_range = 5)
ex_act()
explode()
@@ -150,14 +150,13 @@
return ..()
/obj/structure/reagent_dispensers/fueltank/proc/explode()
- explosion(src.loc,0,1,4)
+ explosion(src.loc,-1,0,2, flame_range = 2)
if(src)
- del(src)
+ qdel(src)
/obj/structure/reagent_dispensers/fueltank/fire_act(datum/gas_mixture/air, temperature, volume)
- if(temperature > T0C+500)
- explode()
- return ..()
+ blob_act() //saving a few lines of copypasta
+
/obj/structure/reagent_dispensers/fueltank/Move()
..()
@@ -219,7 +218,7 @@
/obj/structure/reagent_dispensers/beerkeg/blob_act()
explosion(src.loc,0,3,5,7,10)
- del(src)
+ qdel(src)
/obj/structure/reagent_dispensers/virusfood
name = "Virus Food Dispenser"
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index 72f50c3bfb0..295094b7856 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -70,11 +70,6 @@
produce_heat(heat_gen)
delay = initial(delay)
-/obj/machinery/r_n_d/server/meteorhit(var/obj/O as obj)
- griefProtection()
- ..()
-
-
/obj/machinery/r_n_d/server/emp_act(severity)
griefProtection()
..()
diff --git a/code/modules/research/xenoarchaeology/machinery/coolant.dm b/code/modules/research/xenoarchaeology/machinery/coolant.dm
index 30b43495dba..79da41e5f2a 100644
--- a/code/modules/research/xenoarchaeology/machinery/coolant.dm
+++ b/code/modules/research/xenoarchaeology/machinery/coolant.dm
@@ -56,4 +56,4 @@ datum/chemical_reaction/coolant
sleep(10)
if(src)
- del(src)
+ qdel(src)
diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm
index b3d22e0e36f..8eaa0b168b8 100644
--- a/code/modules/shieldgen/energy_field.dm
+++ b/code/modules/shieldgen/energy_field.dm
@@ -18,11 +18,6 @@
/obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj)
Stress(Proj.damage / 10)
-/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj)
- if(M)
- walk(M,0)
- Stress(2)
-
/obj/effect/energy_field/proc/Stress(var/severity)
strength -= severity
diff --git a/code/modules/tram/tram.dm b/code/modules/tram/tram.dm
index 01b5066864c..9e76a976028 100644
--- a/code/modules/tram/tram.dm
+++ b/code/modules/tram/tram.dm
@@ -242,9 +242,6 @@
if(prob(50))
qdel(src)
-/obj/tram/meteorhit()
- qdel(src)
-
/obj/tram/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
if(prob(M.melee_damage_upper))
diff --git a/code/modules/vehicle/vehicle.dm b/code/modules/vehicle/vehicle.dm
index d74897a1b76..08fc98cacf0 100644
--- a/code/modules/vehicle/vehicle.dm
+++ b/code/modules/vehicle/vehicle.dm
@@ -118,10 +118,6 @@
..()
healthcheck()
-/obj/vehicle/meteorhit()
- explode()
- return
-
/obj/vehicle/blob_act()
src.health -= rand(20,40)*fire_dam_coeff
healthcheck()
diff --git a/config/example/game_options.txt b/config/example/game_options.txt
index 4040f7b1e27..3f282e5a6ce 100644
--- a/config/example/game_options.txt
+++ b/config/example/game_options.txt
@@ -54,6 +54,24 @@ ALIEN_DELAY 0
METROID_DELAY 0
ANIMAL_DELAY 0
+
+//Comment for "normal" explosions, which ignore obstacles
+//Uncomment for explosions that react to doors and walls
+REACTIONARY_EXPLOSIONS
+
+### Configure the bomb cap
+## This caps all explosions to the specified range. Used for both balance reasons and to prevent overloading the server and lagging the game out.
+## This is given as the 3rd number(light damage) in the standard (1,2,3) explosion notation. The other numbers are derived by dividing by 2 and 4.
+## eg: If you give the number 20. The bomb cap will be 5,10,20.
+## Can be any number between 4 and 128, some examples are provided below.
+
+## Default (3,7,14)
+#BOMBCAP 14
+## One 'step' up (5,10,20) (recommended if you enable REACTIONARY_EXPLOSIONS above)
+BOMBCAP 20
+## LagHell (7,14,28)
+#BOMBCAP 28
+
### ROUNDSTART SILICON LAWS ###
## This controls what the AI's laws are at the start of the round.
## Set to 0/commented for "off", silicons will just start with Asimov.
diff --git a/icons/obj/meteor.dmi b/icons/obj/meteor.dmi
index 0dc50a27967..f928a56a584 100644
Binary files a/icons/obj/meteor.dmi and b/icons/obj/meteor.dmi differ