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\crayon.dm"
#include "code\game\objects\effects\decals\misc.dm" #include "code\game\objects\effects\decals\misc.dm"
#include "code\game\objects\effects\decals\remains.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\aliens.dm"
#include "code\game\objects\effects\decals\Cleanable\fuel.dm" #include "code\game\objects\effects\decals\Cleanable\fuel.dm"
#include "code\game\objects\effects\decals\Cleanable\humans.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 //If there are more than one connection, decrement the number of connections
//Otherwise, remove all connections between the zones. //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) if(zone_1.closed_connection_zones[zone_2] > 1)
zone_1.closed_connection_zones[zone_2]-- zone_1.closed_connection_zones[zone_2]--
else else
@@ -198,7 +198,7 @@ connection
zone_1.closed_connection_zones = null zone_1.closed_connection_zones = null
//Then do the same for the other zone. //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) if(zone_2.closed_connection_zones[zone_1] > 1)
zone_2.closed_connection_zones[zone_1]-- zone_2.closed_connection_zones[zone_1]--
else else

View File

@@ -3,16 +3,15 @@ client/proc/Zone_Info(turf/T as null|turf)
set category = "Debug" set category = "Debug"
if(T) if(T)
if(T.zone) if(T.zone)
T.zone.DebugDisplay(mob) T.zone.DebugDisplay(src)
else else
mob << "No zone here." mob << "No zone here."
else else
for(T in world) if(zone_debug_images)
T.overlays -= 'debug_space.dmi' images -= zone_debug_images
T.overlays -= 'debug_group.dmi' zone_debug_images = null
T.overlays -= 'debug_connect.dmi'
client/var/list/zone_debug_images
client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf) client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
set category = "Debug" set category = "Debug"
@@ -57,50 +56,60 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
zone/proc zone/proc
DebugDisplay(mob/M) DebugDisplay(client/client)
if(!istype(client))
return
if(!dbg_output) if(!dbg_output)
dbg_output = 1 //Don't want to be spammed when someone investigates a zone... 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) 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) 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>" client << "<u>Zone Air Contents</u>"
M << "Oxygen: [air.oxygen]" client << "Oxygen: [air.oxygen]"
M << "Nitrogen: [air.nitrogen]" client << "Nitrogen: [air.nitrogen]"
M << "Plasma: [air.toxins]" client << "Plasma: [air.toxins]"
M << "Carbon Dioxide: [air.carbon_dioxide]" client << "Carbon Dioxide: [air.carbon_dioxide]"
M << "Temperature: [air.temperature]" client << "Temperature: [air.temperature] K"
M << "Heat Energy: [air.temperature * air.heat_capacity()]" client << "Heat Energy: [air.temperature * air.heat_capacity()] J"
M << "Pressure: [air.return_pressure()]" client << "Pressure: [air.return_pressure()] KPa"
M << "" client << ""
M << "Space Tiles: [length(unsimulated_tiles)]" client << "Space Tiles: [length(unsimulated_tiles)]"
M << "Movable Objects: [length(movables())]" client << "Movable Objects: [length(movables())]"
M << "<u>Connections: [length(connections)]</u>" client << "<u>Connections: [length(connections)]</u>"
for(var/connection/C in connections) for(var/connection/C in connections)
M << "[C.A] --> [C.B] [(C.indirect?"Open":"Closed")]" client << "\ref[C] [C.A] --> [C.B] [(C.indirect?"Open":"Closed")]"
C.A.overlays += 'debug_connect.dmi' client.zone_debug_images += image('debug_connect.dmi', C.A)
C.B.overlays += 'debug_connect.dmi' 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) for(var/C in connections)
if(!istype(C,/connection)) if(!istype(C,/connection))
M << "[C] (Not Connection!)" client << "[C] (Not Connection!)"
client.images += client.zone_debug_images
else else
dbg_output = 0 dbg_output = 0
for(var/turf/T in contents) client.images -= client.zone_debug_images
T.overlays -= 'debug_group.dmi' 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) for(var/zone/Z in zones)
if(Z.air == air && Z != src) if(Z.air == air && Z != src)
var/turf/zloc = pick(Z.contents) 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' icon = 'icons/obj/doors/Door2x1glassfull.dmi'
opacity = 0 opacity = 0
doortype = 10 doortype = 10
bound_width = 64
glass = 1 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 /obj/machinery/door/airlock/freezer
name = "Freezer Airlock" name = "Freezer Airlock"
icon = 'icons/obj/doors/Doorfreezer.dmi' 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) ) if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
return return
if(safe) if(safe)
if(locate(/mob/living) in get_turf(src)) for(var/turf/turf in locs)
// playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete if(locate(/mob/living) in turf)
spawn (60) // playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0) //THE BUZZING IT NEVER STOPS -Pete
close() spawn (60)
return close()
return
for(var/mob/living/M in get_turf(src)) for(var/turf/turf in locs)
if(isrobot(M)) for(var/mob/living/M in turf)
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE) if(isrobot(M))
else M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
M.adjustBruteLoss(DOOR_CRUSH_DAMAGE) else
M.SetStunned(5) M.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
M.SetWeakened(5) M.SetStunned(5)
var/obj/effect/stop/S M.SetWeakened(5)
S = new /obj/effect/stop var/obj/effect/stop/S
S.victim = M S = new /obj/effect/stop
S.loc = src.loc S.victim = M
spawn(20) S.loc = src.loc
del(S) spawn(20)
M.emote("scream") del(S)
var/turf/location = src.loc M.emote("scream")
if(istype(location, /turf/simulated)) var/turf/location = src.loc
location.add_blood(M) if(istype(location, /turf/simulated))
location.add_blood(M)
use_power(50) use_power(50)
if(istype(src, /obj/machinery/door/airlock/glass)) 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) playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1)
else else
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1) playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src)) for(var/turf/turf in locs)
if(killthis) var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
killthis.ex_act(2)//Smashin windows if(killthis)
killthis.ex_act(2)//Smashin windows
..() ..()
return return

View File

@@ -272,4 +272,25 @@
if(istype(source)) air_master.tiles_to_update += source if(istype(source)) air_master.tiles_to_update += source
if(istype(destination)) air_master.tiles_to_update += destination if(istype(destination)) air_master.tiles_to_update += destination
return 1 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