Merge pull request #602 from Fox-McCloud/Recursive-Explosions

Removes Recursive Explosions
This commit is contained in:
ZomgPonies
2015-03-20 02:58:54 -04:00
15 changed files with 15 additions and 183 deletions
-5
View File
@@ -119,8 +119,6 @@
var/simultaneous_pm_warning_timeout = 100
var/use_recursive_explosions //Defines whether the server uses recursive or circular explosions.
var/assistant_maint = 0 //Do assistants get maint access?
var/gateway_delay = 6000 //How long the gateway takes before it activates. Default is half an hour.
var/ghost_interaction = 0
@@ -216,9 +214,6 @@
if ("jobs_have_minimal_access")
config.jobs_have_minimal_access = 1
if ("use_recursive_explosions")
use_recursive_explosions = 1
if ("log_ooc")
config.log_ooc = 1
-1
View File
@@ -25,7 +25,6 @@
icon_state = "door_closed"
power_channel = ENVIRON
explosion_resistance = 15
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
var/hackProof = 0 // if 1, this door can't be hacked by the AI
var/electrified_until = 0 // World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
+1 -5
View File
@@ -33,11 +33,9 @@
. = ..()
if(density)
layer = closed_layer
explosion_resistance = initial(explosion_resistance)
update_heat_protection(get_turf(src))
else
layer = open_layer
explosion_resistance = 0
if(width > 1)
@@ -222,7 +220,7 @@
flick("doorc1", src)
if("deny")
flick("door_deny", src)
return
return
/obj/machinery/door/proc/open()
if(!density)
@@ -239,7 +237,6 @@
src.density = 0
sleep(5)
src.layer = 2.7
explosion_resistance = 0
update_icon()
SetOpacity(0)
operating = 0
@@ -262,7 +259,6 @@
operating = 1
do_animate("closing")
explosion_resistance = initial(explosion_resistance)
src.layer = 3.1
sleep(5)
src.density = 1
-1
View File
@@ -4,7 +4,6 @@
icon = 'icons/obj/doors/rapid_pdoor.dmi'
icon_state = "pdoor1"
var/id = 1.0
explosion_resistance = 25
/obj/machinery/door/poddoor/preopen
icon_state = "pdoor0"
-1
View File
@@ -4,7 +4,6 @@
icon = 'icons/effects/beam.dmi'
icon_state = "n_beam"
var/id = 1.0
explosion_resistance = 25
density = 0
anchored = 1
+1 -4
View File
@@ -9,7 +9,6 @@
flags = ON_BORDER
opacity = 0
var/obj/item/weapon/airlock_electronics/electronics = null
explosion_resistance = 5
/obj/machinery/door/window/New()
..()
@@ -112,7 +111,6 @@
src.icon_state = text("[]open", src.base_state)
sleep(10)
explosion_resistance = 0
src.density = 0
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
@@ -136,7 +134,6 @@
src.icon_state = src.base_state
src.density = 1
explosion_resistance = initial(explosion_resistance)
// if(src.visible)
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
@@ -247,7 +244,7 @@
open()
emagged = 1
return 1
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/living/user as mob, params)
//If it's in the process of opening/closing, ignore the click
-5
View File
@@ -22,11 +22,6 @@ proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY process
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, adminlog = 1)
src = null //so we don't abort once src is deleted
spawn(0)
if(config.use_recursive_explosions)
var/power = devastation_range * 2 + heavy_impact_range + light_impact_range //The ranges add up, ie light 14 includes both heavy 7 and devestation 3. So this calculation means devestation counts for 4, heavy for 2 and light for 1 power, giving us a cap of 27 power.
explosion_rec(epicenter, power)
return
var/start = world.timeofday
epicenter = get_turf(epicenter)
if(!epicenter) return
-139
View File
@@ -1,139 +0,0 @@
/client/proc/kaboom()
set category = "Debug"
var/power = input(src, "power?", "power?") as num
var/turf/T = get_turf(src.mob)
explosion_rec(T, power)
/obj
var/explosion_resistance
var/list/explosion_turfs = list()
var/explosion_in_progress = 0
proc/explosion_rec(turf/epicenter, power)
var/loopbreak = 0
while(explosion_in_progress)
if(loopbreak >= 15) return
sleep(10)
loopbreak++
if(power <= 0) return
epicenter = get_turf(epicenter)
if(!epicenter) return
message_admins("Explosion with size ([power]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])")
log_game("Explosion with size ([power]) in area [epicenter.loc.name] ")
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(power*2,1) )
playsound(epicenter, "explosion", 100, 1, round(power,1) )
explosion_in_progress = 1
explosion_turfs = list()
explosion_turfs[epicenter] = power
//This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it.
for(var/direction in cardinal)
var/turf/T = get_step(epicenter, direction)
T.explosion_spread(power - epicenter.explosion_resistance, direction)
//This step applies the ex_act effects for the explosion, as planned in the previous step.
for(var/turf/T in explosion_turfs)
if(explosion_turfs[T] <= 0) continue
if(!T) continue
//Wow severity looks confusing to calculate... Fret not, I didn't leave you with any additional instructions or help. (just kidding, see the line under the calculation)
var/severity = 4 - round(max(min( 3, ((explosion_turfs[T] - T.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1) //sanity effective power on tile divided by either 3 or one third the total explosion power
// One third because there are three power levels and I
// want each one to take up a third of the crater
var/x = T.x
var/y = T.y
var/z = T.z
T.ex_act(severity)
if(!T)
T = locate(x,y,z)
for(var/atom/A in T)
A.ex_act(severity)
explosion_in_progress = 0
/turf
var/explosion_resistance
/turf/space
explosion_resistance = 10
/turf/simulated/floor
explosion_resistance = 1
/turf/unsimulated/floor
explosion_resistance = 1
/turf/simulated/mineral
explosion_resistance = 2
turf/unsimulated/mineral
explosion_resistance = 2
/turf/simulated/shuttle/floor
explosion_resistance = 1
/turf/simulated/shuttle/floor4
explosion_resistance = 1
/turf/simulated/shuttle/plating
explosion_resistance = 1
/turf/simulated/shuttle/wall
explosion_resistance = 5
/turf/simulated/wall
explosion_resistance = 5
/turf/simulated/wall/r_wall
explosion_resistance = 15
//Code-wise, a safe value for power is something up to ~25 or ~30.. This does quite a bit of damage to the station.
//direction is the direction that the spread took to come to this tile. So it is pointing in the main blast direction - meaning where this tile should spread most of it's force.
/turf/proc/explosion_spread(power, direction)
if(power <= 0)
return
/*
sleep(2)
new/obj/effect/debugging/marker(src)
*/
if(explosion_turfs[src] >= power)
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
explosion_turfs[src] = power
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles
for(var/obj/O in src)
if(O.explosion_resistance)
spread_power -= O.explosion_resistance
side_spread_power -= O.explosion_resistance
var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power, direction)
T = get_step(src, turn(direction,90))
T.explosion_spread(side_spread_power, turn(direction,90))
T = get_step(src, turn(direction,-90))
T.explosion_spread(side_spread_power, turn(direction,90))
/*
for(var/direction in cardinal)
var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power)
*/
/turf/unsimulated/explosion_spread(power)
return //So it doesn't get to the parent proc, which simulates explosions
-1
View File
@@ -8,7 +8,6 @@
flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
explosion_resistance = 5
var/health = 10
var/destroyed = 0
-2
View File
@@ -465,7 +465,6 @@ var/global/wcColored
glasstype = /obj/item/stack/sheet/plasmaglass
reinf = 1
health = 160
explosion_resistance = 4
/obj/structure/window/plasmareinforced/New(Loc,re=0)
@@ -485,7 +484,6 @@ var/global/wcColored
reinf = 1
basestate = "rwindow"
health = 40
explosion_resistance = 1
/obj/structure/window/reinforced/tinted
name = "tinted window"
+7 -8
View File
@@ -44,7 +44,6 @@ var/list/mechtoys = list(
density = 0
anchored = 1
layer = 4
explosion_resistance = 5
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
if(istype(A) && A.checkpass(PASSGLASS))
@@ -156,9 +155,9 @@ var/list/mechtoys = list(
proc/process()
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
var/datum/supply_packs/P = new typepath()
if(P.name == "HEADER")
if(P.name == "HEADER")
del(P)
continue
continue
supply_packs[P.name] = P
spawn(0)
@@ -376,10 +375,10 @@ var/list/mechtoys = list(
//Find the correct supply_pack datum
var/datum/supply_packs/P = supply_controller.supply_packs[href_list["see_contents"]]
if(!istype(P)) return
var/cat = P.group
var/tempaccess = get_access_desc(P.access)
temp = "<b>Supply points: [supply_controller.points]</b><BR>"
temp += "<A href='?src=\ref[src];order=[cat]'>Back to [get_supply_group_name(cat)]</A><HR><BR><BR>"
temp += "Access restriction: [tempaccess ? tempaccess : "None"]<br><br>"
@@ -597,16 +596,16 @@ var/list/mechtoys = list(
//Find the correct supply_pack datum
var/datum/supply_packs/P = supply_controller.supply_packs[href_list["see_contents"]]
if(!istype(P)) return
var/cat = P.group
var/tempaccess = get_access_desc(P.access)
temp = "<b>Supply points: [supply_controller.points]</b><BR>"
temp += "<A href='?src=\ref[src];order=[cat]'>Back to [get_supply_group_name(cat)]</A><HR><BR><BR>"
temp += "Access restriction: [tempaccess ? tempaccess : "None"]<br><br>"
temp += "Contents of <b>[P.name]</b>:<BR>"
temp += P.manifest
else if (href_list["doorder"])
if(world.time < reqtime)
for(var/mob/V in hearers(src))
-1
View File
@@ -136,7 +136,6 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/ticklag
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/kaboom
// src.verbs += /client/proc/splash
src.verbs += /client/proc/cmd_admin_areatest
src.verbs += /client/proc/cmd_admin_rejuvenate
-3
View File
@@ -21,9 +21,6 @@ JOBS_HAVE_MINIMAL_ACCESS
## See USE_AGE_RESTRICTION_FOR_JOBS for more information
#USE_AGE_RESTRICTION_FOR_ANTAGS
## Unhash this to use recursive explosions, keep it hashed to use circle explosions. Recursive explosions react to walls, airlocks and blast doors, making them look a lot cooler than the boring old circular explosions. They require more CPU and are (as of january 2013) experimental
#USE_RECURSIVE_EXPLOSIONS
## log OOC channel
LOG_OOC
+6 -6
View File
@@ -5072,9 +5072,9 @@
"bTB" = (/obj/machinery/alarm{pixel_y = 25},/turf/simulated/floor{icon_state = "white"},/area/toxins/mixing)
"bTC" = (/obj/machinery/atmospherics/pipe/simple/insulated{dir = 5},/turf/simulated/floor{icon_state = "white"},/area/toxins/mixing)
"bTD" = (/obj/machinery/meter,/obj/machinery/atmospherics/pipe/manifold/visible{dir = 4; initialize_directions = 11; level = 2},/turf/simulated/floor{icon_state = "white"},/area/toxins/mixing)
"bTE" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced{explosion_resistance = 10},/obj/structure/window/plasmareinforced{dir = 1},/obj/machinery/atmospherics/pipe/simple/insulated,/obj/machinery/meter,/turf/simulated/floor/plating,/area/toxins/mixing)
"bTF" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{explosion_resistance = 10},/obj/structure/window/plasmareinforced{dir = 1},/turf/simulated/floor/plating,/area/toxins/mixing)
"bTG" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{explosion_resistance = 10},/obj/structure/window/plasmareinforced{dir = 1},/obj/machinery/atmospherics/pipe/simple/insulated,/obj/machinery/meter,/turf/simulated/floor/plating,/area/toxins/mixing)
"bTE" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced,/obj/structure/window/plasmareinforced{dir = 1},/obj/machinery/atmospherics/pipe/simple/insulated,/obj/machinery/meter,/turf/simulated/floor/plating,/area/toxins/mixing)
"bTF" = (/obj/structure/grille,/obj/structure/window/plasmareinforced,/obj/structure/window/plasmareinforced{dir = 1},/turf/simulated/floor/plating,/area/toxins/mixing)
"bTG" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced,/obj/structure/window/plasmareinforced{dir = 1},/obj/machinery/atmospherics/pipe/simple/insulated,/obj/machinery/meter,/turf/simulated/floor/plating,/area/toxins/mixing)
"bTH" = (/obj/machinery/navbeacon{codes_txt = "delivery;dir=2"; freq = 1400; location = "Hydroponics"},/obj/structure/plasticflaps{opacity = 1},/turf/simulated/floor{icon_state = "bot"; dir = 1},/area/maintenance/fsmaint2)
"bTI" = (/obj/structure/closet/crate,/turf/simulated/shuttle/floor,/area/shuttle/mining/station)
"bTJ" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/shuttle/engine/heater,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating/airless,/area/shuttle/mining/station)
@@ -5386,7 +5386,7 @@
"bZD" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor{icon_state = "white"},/area/toxins/mixing)
"bZE" = (/obj/structure/disposaloutlet,/obj/structure/disposalpipe/trunk{dir = 1},/obj/structure/window/plasmareinforced{dir = 1},/obj/structure/window/plasmareinforced{dir = 4},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating{nitrogen = 0.01; oxygen = 0.01},/area/toxins/mixing)
"bZF" = (/obj/machinery/door/window/southright{name = "Toxins Launcher"; req_access_txt = "7"; req_one_access_txt = "0"},/obj/machinery/door/window/southright{dir = 1; name = "Toxins Launcher"; req_access_txt = "7"},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating,/area/toxins/mixing)
"bZG" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced{explosion_resistance = 10},/obj/structure/window/plasmareinforced{dir = 1},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating,/area/toxins/mixing)
"bZG" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced,/obj/structure/window/plasmareinforced{dir = 1},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating,/area/toxins/mixing)
"bZH" = (/turf/simulated/floor/airless{icon_state = "warning"},/area/toxins/test_area)
"bZI" = (/turf/simulated/floor/airless{dir = 6; icon_state = "warning"},/area/toxins/test_area)
"bZJ" = (/turf/simulated/floor/airless{dir = 10; icon_state = "warning"},/area/toxins/test_area)
@@ -6508,7 +6508,7 @@
"cvh" = (/obj/machinery/atmospherics/pipe/manifold/visible/green{dir = 4; tag = "icon-manifold-g (NORTH)"},/turf/simulated/floor,/area/atmos/distribution)
"cvi" = (/obj/machinery/computer/general_air_control/large_tank_control{frequency = 1441; input_tag = "waste_in"; name = "Gas Mix Tank Control"; output_tag = "waste_out"; sensors = list("waste_sensor" = "Tank")},/turf/simulated/floor{icon_state = "green"; dir = 4},/area/atmos/distribution)
"cvj" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/maintenance/apmaint)
"cvk" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced{explosion_resistance = 10},/obj/structure/window/plasmareinforced{dir = 1},/turf/simulated/floor/plating,/area/atmos)
"cvk" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced,/obj/structure/window/plasmareinforced{dir = 1},/turf/simulated/floor/plating,/area/atmos)
"cvl" = (/obj/machinery/air_sensor{frequency = 1441; id_tag = "waste_sensor"; output = 63},/turf/simulated/floor/engine{name = "vacuum floor"; nitrogen = 0.01; oxygen = 0.01},/area/atmos)
"cvm" = (/obj/machinery/light/small{dir = 4},/turf/simulated/floor/engine{name = "vacuum floor"; nitrogen = 0.01; oxygen = 0.01},/area/atmos)
"cvn" = (/obj/machinery/light{dir = 1},/obj/machinery/shower{icon_state = "shower"; dir = 4},/obj/machinery/alarm{dir = 4; icon_state = "alarm0"; pixel_x = -22; pixel_y = 0; tag = "icon-alarm0 (EAST)"},/turf/simulated/floor{dir = 9; icon_state = "warnwhite"; tag = "icon-warnwhite (NORTHEAST)"},/area/medical/virology/lab)
@@ -12878,7 +12878,7 @@
"eNJ" = (/obj/structure/disposalpipe/segment,/turf/simulated/wall,/area/medical/psych)
"eNK" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "psychoffice"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/psych)
"eNL" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/door/poddoor/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "psychoffice"; name = "Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/psych)
"eNM" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced{explosion_resistance = 10},/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating,/area/toxins/mixing)
"eNM" = (/obj/structure/grille,/obj/structure/window/plasmareinforced{dir = 4},/obj/structure/window/plasmareinforced{dir = 8},/obj/structure/window/plasmareinforced,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Biohazard"; name = "Biohazard Shutter"; opacity = 0},/turf/simulated/floor/plating,/area/toxins/mixing)
"eNN" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/wall,/area/medical/sleeper)
"eNO" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/obj/structure/sign/redcross{desc = "The Star of Life, a symbol of Medical Aid."; icon_state = "lifestar"; name = "Medbay"},/turf/simulated/wall,/area/maintenance/asmaint)
"eNP" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0; tag = ""},/turf/simulated/wall,/area/medical/sleeper)
-1
View File
@@ -593,7 +593,6 @@
#include "code\game\mecha\working\working.dm"
#include "code\game\objects\empulse.dm"
#include "code\game\objects\explosion.dm"
#include "code\game\objects\explosion_recursive.dm"
#include "code\game\objects\items.dm"
#include "code\game\objects\objs.dm"
#include "code\game\objects\structures.dm"