Merge pull request #9074 from RavingManiac/dev-2

Explosion tweaks and fixes
This commit is contained in:
Chinsky
2015-05-04 21:25:12 +03:00
5 changed files with 24 additions and 19 deletions

View File

@@ -4,7 +4,7 @@
icon_state = "door_closed" icon_state = "door_closed"
power_channel = ENVIRON power_channel = ENVIRON
explosion_resistance = 15 explosion_resistance = 10
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/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/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. var/electrified_until = 0 //World time when the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
@@ -80,6 +80,7 @@
icon = 'icons/obj/doors/Doorglass.dmi' icon = 'icons/obj/doors/Doorglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
glass = 1 glass = 1
@@ -91,6 +92,7 @@
/obj/machinery/door/airlock/vault /obj/machinery/door/airlock/vault
name = "Vault" name = "Vault"
icon = 'icons/obj/doors/vault.dmi' icon = 'icons/obj/doors/vault.dmi'
explosion_resistance = 20
opacity = 1 opacity = 1
secured_wires = 1 secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites. assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity //Until somebody makes better sprites.
@@ -108,12 +110,14 @@
/obj/machinery/door/airlock/hatch /obj/machinery/door/airlock/hatch
name = "Airtight Hatch" name = "Airtight Hatch"
icon = 'icons/obj/doors/Doorhatchele.dmi' icon = 'icons/obj/doors/Doorhatchele.dmi'
explosion_resistance = 20
opacity = 1 opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_hatch assembly_type = /obj/structure/door_assembly/door_assembly_hatch
/obj/machinery/door/airlock/maintenance_hatch /obj/machinery/door/airlock/maintenance_hatch
name = "Maintenance Hatch" name = "Maintenance Hatch"
icon = 'icons/obj/doors/Doorhatchmaint2.dmi' icon = 'icons/obj/doors/Doorhatchmaint2.dmi'
explosion_resistance = 20
opacity = 1 opacity = 1
assembly_type = /obj/structure/door_assembly/door_assembly_mhatch assembly_type = /obj/structure/door_assembly/door_assembly_mhatch
@@ -122,6 +126,7 @@
icon = 'icons/obj/doors/Doorcomglass.dmi' icon = 'icons/obj/doors/Doorcomglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_com assembly_type = /obj/structure/door_assembly/door_assembly_com
glass = 1 glass = 1
@@ -131,6 +136,7 @@
icon = 'icons/obj/doors/Doorengglass.dmi' icon = 'icons/obj/doors/Doorengglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_eng assembly_type = /obj/structure/door_assembly/door_assembly_eng
glass = 1 glass = 1
@@ -140,6 +146,7 @@
icon = 'icons/obj/doors/Doorsecglass.dmi' icon = 'icons/obj/doors/Doorsecglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_sec assembly_type = /obj/structure/door_assembly/door_assembly_sec
glass = 1 glass = 1
@@ -149,6 +156,7 @@
icon = 'icons/obj/doors/Doormedglass.dmi' icon = 'icons/obj/doors/Doormedglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_med assembly_type = /obj/structure/door_assembly/door_assembly_med
glass = 1 glass = 1
@@ -173,6 +181,7 @@
icon = 'icons/obj/doors/Doorresearchglass.dmi' icon = 'icons/obj/doors/Doorresearchglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_research assembly_type = /obj/structure/door_assembly/door_assembly_research
glass = 1 glass = 1
@@ -183,6 +192,7 @@
icon = 'icons/obj/doors/Doorminingglass.dmi' icon = 'icons/obj/doors/Doorminingglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_min assembly_type = /obj/structure/door_assembly/door_assembly_min
glass = 1 glass = 1
@@ -192,6 +202,7 @@
icon = 'icons/obj/doors/Dooratmoglass.dmi' icon = 'icons/obj/doors/Dooratmoglass.dmi'
hitsound = 'sound/effects/Glasshit.ogg' hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 300 maxhealth = 300
explosion_resistance = 5
opacity = 0 opacity = 0
assembly_type = /obj/structure/door_assembly/door_assembly_atmo assembly_type = /obj/structure/door_assembly/door_assembly_atmo
glass = 1 glass = 1
@@ -292,6 +303,7 @@
/obj/machinery/door/airlock/highsecurity /obj/machinery/door/airlock/highsecurity
name = "Secure Airlock" name = "Secure Airlock"
icon = 'icons/obj/doors/hightechsecurity.dmi' icon = 'icons/obj/doors/hightechsecurity.dmi'
explosion_resistance = 20
secured_wires = 1 secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity

View File

@@ -65,7 +65,7 @@ proc/explosion_rec(turf/epicenter, power)
var/explosion_resistance var/explosion_resistance
/turf/space /turf/space
explosion_resistance = 10 explosion_resistance = 3
/turf/simulated/floor /turf/simulated/floor
explosion_resistance = 1 explosion_resistance = 1
@@ -83,10 +83,10 @@ proc/explosion_rec(turf/epicenter, power)
explosion_resistance = 1 explosion_resistance = 1
/turf/simulated/shuttle/wall /turf/simulated/shuttle/wall
explosion_resistance = 5 explosion_resistance = 10
/turf/simulated/wall /turf/simulated/wall
explosion_resistance = 5 explosion_resistance = 10
/turf/simulated/wall/r_wall /turf/simulated/wall/r_wall
explosion_resistance = 25 explosion_resistance = 25
@@ -107,24 +107,16 @@ proc/explosion_rec(turf/epicenter, power)
explosion_turfs[src] = power 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/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) for(var/obj/O in src)
if(O.explosion_resistance) if(O.explosion_resistance)
spread_power -= O.explosion_resistance spread_power -= O.explosion_resistance
side_spread_power -= O.explosion_resistance
var/turf/T = get_step(src, direction) var/turf/T = get_step(src, direction)
T.explosion_spread(spread_power, direction) T.explosion_spread(spread_power, direction)
T = get_step(src, turn(direction,90)) T = get_step(src, turn(direction,90))
T.explosion_spread(side_spread_power, turn(direction,90)) T.explosion_spread(spread_power, turn(direction,90))
T = get_step(src, turn(direction,-90)) T = get_step(src, turn(direction,-90))
T.explosion_spread(side_spread_power, turn(direction,90)) T.explosion_spread(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) /turf/unsimulated/explosion_spread(power)
return //So it doesn't get to the parent proc, which simulates explosions return //So it doesn't get to the parent proc, which simulates explosions

View File

@@ -8,7 +8,7 @@
flags = CONDUCT flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9 layer = 2.9
explosion_resistance = 5 explosion_resistance = 1
var/health = 10 var/health = 10
var/destroyed = 0 var/destroyed = 0

View File

@@ -82,19 +82,19 @@ var/list/wood_icons = list("wood","wood-broken")
if(1.0) if(1.0)
src.ChangeTurf(/turf/space) src.ChangeTurf(/turf/space)
if(2.0) if(2.0)
switch(pick(1,2;75,3)) switch(pick(40;1,40;2,3))
if (1) if (1)
src.ReplaceWithLattice()
if(prob(33)) new /obj/item/stack/sheet/metal(src) if(prob(33)) new /obj/item/stack/sheet/metal(src)
src.ReplaceWithLattice()
if(2) if(2)
src.ChangeTurf(/turf/space) src.ChangeTurf(/turf/space)
if(3) if(3)
if(prob(33)) new /obj/item/stack/sheet/metal(src)
if(prob(80)) if(prob(80))
src.break_tile_to_plating() src.break_tile_to_plating()
else else
src.break_tile() src.break_tile()
src.hotspot_expose(1000,CELL_VOLUME) src.hotspot_expose(1000,CELL_VOLUME)
if(prob(33)) new /obj/item/stack/sheet/metal(src)
if(3.0) if(3.0)
if (prob(50)) if (prob(50))
src.break_tile() src.break_tile()

View File

@@ -338,7 +338,8 @@
/turf/proc/ReplaceWithLattice() /turf/proc/ReplaceWithLattice()
src.ChangeTurf(/turf/space) src.ChangeTurf(/turf/space)
new /obj/structure/lattice( locate(src.x, src.y, src.z) ) spawn()
new /obj/structure/lattice( locate(src.x, src.y, src.z) )
/turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N /turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N
//Useful to batch-add creatures to the list. //Useful to batch-add creatures to the list.