Merge pull request #3150 from SkyMarshal/master

ZAS fixes, implements multi-tile doors (That work perfectly!)
This commit is contained in:
Zuhayr
2013-06-23 22:23:44 -07:00
9 changed files with 123 additions and 62 deletions

View File

@@ -459,6 +459,7 @@
#include "code\game\objects\effects\decals\crayon.dm"
#include "code\game\objects\effects\decals\misc.dm"
#include "code\game\objects\effects\decals\remains.dm"
#include "code\game\objects\effects\decals\warning_stripes.dm"
#include "code\game\objects\effects\decals\Cleanable\aliens.dm"
#include "code\game\objects\effects\decals\Cleanable\fuel.dm"
#include "code\game\objects\effects\decals\Cleanable\humans.dm"

View File

@@ -188,7 +188,7 @@ connection
//If there are more than one connection, decrement the number of connections
//Otherwise, remove all connections between the zones.
if(zone_2 in zone_1.connected_zones)
if(zone_2 in zone_1.closed_connection_zones)
if(zone_1.closed_connection_zones[zone_2] > 1)
zone_1.closed_connection_zones[zone_2]--
else
@@ -198,7 +198,7 @@ connection
zone_1.closed_connection_zones = null
//Then do the same for the other zone.
if(zone_1 in zone_2.connected_zones)
if(zone_1 in zone_2.closed_connection_zones)
if(zone_2.closed_connection_zones[zone_1] > 1)
zone_2.closed_connection_zones[zone_1]--
else

View File

@@ -3,16 +3,15 @@ client/proc/Zone_Info(turf/T as null|turf)
set category = "Debug"
if(T)
if(T.zone)
T.zone.DebugDisplay(mob)
T.zone.DebugDisplay(src)
else
mob << "No zone here."
else
for(T in world)
T.overlays -= 'debug_space.dmi'
T.overlays -= 'debug_group.dmi'
T.overlays -= 'debug_connect.dmi'
if(zone_debug_images)
images -= zone_debug_images
zone_debug_images = null
client/var/list/zone_debug_images
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug"
@@ -57,50 +56,60 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
zone/proc
DebugDisplay(mob/M)
DebugDisplay(client/client)
if(!istype(client))
return
if(!dbg_output)
dbg_output = 1 //Don't want to be spammed when someone investigates a zone...
if(!client.zone_debug_images)
client.zone_debug_images = list()
for(var/turf/T in contents)
T.overlays += 'debug_group.dmi'
client.zone_debug_images += image('debug_group.dmi', T)
for(var/turf/space/S in unsimulated_tiles)
S.overlays += 'debug_space.dmi'
client.zone_debug_images += image('debug_space.dmi', S)
M << "<u>Zone Air Contents</u>"
M << "Oxygen: [air.oxygen]"
M << "Nitrogen: [air.nitrogen]"
M << "Plasma: [air.toxins]"
M << "Carbon Dioxide: [air.carbon_dioxide]"
M << "Temperature: [air.temperature]"
M << "Heat Energy: [air.temperature * air.heat_capacity()]"
M << "Pressure: [air.return_pressure()]"
M << ""
M << "Space Tiles: [length(unsimulated_tiles)]"
M << "Movable Objects: [length(movables())]"
M << "<u>Connections: [length(connections)]</u>"
client << "<u>Zone Air Contents</u>"
client << "Oxygen: [air.oxygen]"
client << "Nitrogen: [air.nitrogen]"
client << "Plasma: [air.toxins]"
client << "Carbon Dioxide: [air.carbon_dioxide]"
client << "Temperature: [air.temperature] K"
client << "Heat Energy: [air.temperature * air.heat_capacity()] J"
client << "Pressure: [air.return_pressure()] KPa"
client << ""
client << "Space Tiles: [length(unsimulated_tiles)]"
client << "Movable Objects: [length(movables())]"
client << "<u>Connections: [length(connections)]</u>"
for(var/connection/C in connections)
M << "[C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
C.A.overlays += 'debug_connect.dmi'
C.B.overlays += 'debug_connect.dmi'
client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
client.zone_debug_images += image('debug_connect.dmi', C.A)
client.zone_debug_images += image('debug_connect.dmi', C.B)
client << "Connected Zones:"
for(var/zone/zone in connected_zones)
client << "\ref[zone] [zone] - [connected_zones[zone]] (Connected)"
for(var/zone/zone in closed_connection_zones)
client << "\ref[zone] [zone] - [closed_connection_zones[zone]] (Unconnected)"
for(var/C in connections)
if(!istype(C,/connection))
M << "[C] (Not Connection!)"
client << "[C] (Not Connection!)"
client.images += client.zone_debug_images
else
dbg_output = 0
for(var/turf/T in contents)
T.overlays -= 'debug_group.dmi'
client.images -= client.zone_debug_images
client.zone_debug_images = null
for(var/turf/space/S in unsimulated_tiles)
S.overlays -= 'debug_space.dmi'
for(var/connection/C in connections)
C.A.overlays -= 'debug_connect.dmi'
C.B.overlays -= 'debug_connect.dmi'
for(var/zone/Z in zones)
if(Z.air == air && Z != src)
var/turf/zloc = pick(Z.contents)
M << "\red Illegal air datum shared by: [zloc.loc.name]"
client << "\red Illegal air datum shared by: [zloc.loc.name]"

View File

@@ -147,8 +147,26 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
icon = 'icons/obj/doors/Door2x1glassfull.dmi'
opacity = 0
doortype = 10
bound_width = 64
glass = 1
update_nearby_tiles(need_rebuild)
. = ..()
if(!.)
return
var/turf/simulated/second_turf = get_step(src, EAST)
var/turf/simulated/north = get_step(second_turf, NORTH)
var/turf/simulated/east = get_step(second_turf, EAST)
var/turf/simulated/south = get_step(second_turf, SOUTH)
update_heat_protection(second_turf)
if(istype(north)) air_master.tiles_to_update |= north
if(istype(south)) air_master.tiles_to_update |= south
if(istype(east)) air_master.tiles_to_update |= east
/obj/machinery/door/airlock/freezer
name = "Freezer Airlock"
icon = 'icons/obj/doors/Doorfreezer.dmi'
@@ -1306,29 +1324,31 @@ About the new airlock wires panel:
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
return
if(safe)
if(locate(/mob/living) in get_turf(src))
// playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete
spawn (60)
close()
return
for(var/turf/turf in locs)
if(locate(/mob/living) in turf)
// playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete
spawn (60)
close()
return
for(var/mob/living/M in get_turf(src))
if(isrobot(M))
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
else
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
M.SetStunned(5)
M.SetWeakened(5)
var/obj/effect/stop/S
S = new /obj/effect/stop
S.victim = M
S.loc = src.loc
spawn(20)
del(S)
M.emote("scream")
var/turf/location = src.loc
if(istype(location, /turf/simulated))
location.add_blood(M)
for(var/turf/turf in locs)
for(var/mob/living/M in turf)
if(isrobot(M))
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
else
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
M.SetStunned(5)
M.SetWeakened(5)
var/obj/effect/stop/S
S = new /obj/effect/stop
S.victim = M
S.loc = src.loc
spawn(20)
del(S)
M.emote("scream")
var/turf/location = src.loc
if(istype(location, /turf/simulated))
location.add_blood(M)
use_power(50)
if(istype(src, /obj/machinery/door/airlock/glass))
@@ -1337,9 +1357,10 @@ About the new airlock wires panel:
playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1)
else
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
if(killthis)
killthis.ex_act(2)//Smashin windows
for(var/turf/turf in locs)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis)
killthis.ex_act(2)//Smashin windows
..()
return

View File

@@ -272,4 +272,25 @@
if(istype(source)) air_master.tiles_to_update += source
if(istype(destination)) air_master.tiles_to_update += destination
return 1
*/
*/
/obj/machinery/door/firedoor/multi_tile
icon = 'DoorHazard2x1.dmi'
bound_width = 64
update_nearby_tiles(need_rebuild)
if(!.)
return
. = ..()
var/turf/simulated/second_turf = get_step(src, EAST)
var/turf/simulated/north = get_step(second_turf, NORTH)
var/turf/simulated/east = get_step(second_turf, EAST)
var/turf/simulated/south = get_step(second_turf, SOUTH)
update_heat_protection(second_turf)
if(istype(north)) air_master.tiles_to_update |= north
if(istype(south)) air_master.tiles_to_update |= south
if(istype(east)) air_master.tiles_to_update |= east

View File

@@ -0,0 +1,9 @@
/obj/effect/decal/warning_stripes
icon = 'icons/effects/warning_stripes.dmi'
layer = 2
/obj/effect/decal/warning_stripes/New()
. = ..()
loc.overlays += src
del src

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B