From 6d2b9882e45e37f3dc068f8868eceee241744800 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Sun, 23 Jun 2013 19:42:01 -0700 Subject: [PATCH 1/2] ZAS fixes, implements multi-tile doors (That work perfectly!) That multi-tile firedoor needs love. Lots of love. (It is missing a lot of icon states) --- baystation12.dme | 1 + code/ZAS/Connection.dm | 4 +- code/ZAS/Debug.dm | 77 ++++++++++++++------------ code/game/machinery/doors/airlock.dm | 71 +++++++++++++++--------- code/game/machinery/doors/firedoor.dm | 23 +++++++- icons/obj/doors/DoorHazard.dmi | Bin 2671 -> 2669 bytes 6 files changed, 114 insertions(+), 62 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index c9e41c74def..d8416d1446b 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -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" diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index ab479450cf1..ee8a5470d8b 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -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 diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm index a6562858256..b3f069a5540 100644 --- a/code/ZAS/Debug.dm +++ b/code/ZAS/Debug.dm @@ -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 << "Zone Air Contents" - 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 << "Connections: [length(connections)]" + client << "Zone Air Contents" + 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 << "Connections: [length(connections)]" 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]" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index e8d4078593e..dea31aab3f2 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 58b838d5550..93f0abb4d09 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -272,4 +272,25 @@ if(istype(source)) air_master.tiles_to_update += source if(istype(destination)) air_master.tiles_to_update += destination return 1 -*/ \ No newline at end of file +*/ + +/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 \ No newline at end of file diff --git a/icons/obj/doors/DoorHazard.dmi b/icons/obj/doors/DoorHazard.dmi index f828889ba2620b13920a702afcbf304faf527b39..757c94f32704ddaf541ce82e8f819dc782498c36 100644 GIT binary patch delta 197 zcmV;$06PEg6zvqSFaZI{lQ97xe-gFy)=N=}hx&ygW~-rTB1x$D`^E~jg;*?8^+Y3$UFaZI}lQ97xe`2)s)=N=}hx&ygW?MtkM3PYP_l*@A3tB9cz058% zo7o{DIpoKpB-yFJ5734yN%myBi81OpvyE%g1fvG{wXtJkY-Pd0fGMTVwNM6FfDz-` zxGBZxqN_WM_>(JCeOt>_El4h}^W>eIf~a~2ljvO-38mVZU4zGe?HYV7G+nTyVIcc? zP3j+~kt;9kK(G~AjkK?>e#n)^lQ3eRhKJPG Date: Sun, 23 Jun 2013 19:53:09 -0700 Subject: [PATCH 2/2] Forgot the files, doh! --- .../objects/effects/decals/warning_stripes.dm | 9 +++++++++ icons/effects/warning_stripes.dmi | Bin 0 -> 3040 bytes icons/obj/doors/DoorHazard2x1.dmi | Bin 0 -> 804 bytes 3 files changed, 9 insertions(+) create mode 100644 code/game/objects/effects/decals/warning_stripes.dm create mode 100644 icons/effects/warning_stripes.dmi create mode 100644 icons/obj/doors/DoorHazard2x1.dmi diff --git a/code/game/objects/effects/decals/warning_stripes.dm b/code/game/objects/effects/decals/warning_stripes.dm new file mode 100644 index 00000000000..89067ada2a4 --- /dev/null +++ b/code/game/objects/effects/decals/warning_stripes.dm @@ -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 \ No newline at end of file diff --git a/icons/effects/warning_stripes.dmi b/icons/effects/warning_stripes.dmi new file mode 100644 index 0000000000000000000000000000000000000000..a0cf5e32447ce3a0f114f1d6f0557a8432455257 GIT binary patch literal 3040 zcmbVOX*ksH8vcz5g|r~qnx-txU)DckNk*3J#-0{yCF@wn=wL>R!ej|WmWC`@N~DG? zgKXKFvY(6wGYDlG!i;6+jQ^+e<$O6G-siop`+1-HdbjJj?<9LW^MgXtLI409w6rjF zovEc+|AX4QB_;0*g-8KI%`_!GB)z#hQ6J)(3R7} zL(ltAQ^>7=2U^C6;|N`go@<#{Ic>3>UzQ&AJANO7P3s*}F(9l~+nBmH%}Pp9OQi zjg}pjf2Ph8>gRw(UoHp9A<*UyGq^2-+%f=ZP zKg2Kx0QF}!05Cm6dwgER{7rxN^6_p=)Wez&wY*Ekpm6*^{M)ldXRZIxkcycgc^eex zZQZ&14-b_A_6ng|((PaKylI1nAU57wxk@|wG~aMu@ue+pTneGUZh5>+7ued}K`}=e zID@+jNT`1}(8MaVn}*=9UdQqrX0&ISuQQ+z-W(lO%)GMgqddSj=hr6) z=$L>tU3OSH%{BP_JsW=fKV>Z0E9l4?J<(Z#Xe!akb4Bi}?8^;gBEk zQ8#_~>+wi*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bvv1a!`_PSunX9Q+vONQ4gSg%*B zbnGpmh+SO}%*#{k0WsfUfvSS7W|Q;Ui?AjEj{AuS?;j3_v)G$#aQJ7O03gg?pJXf4 z{ynYX$67LMmAWx_QGzN*wh4DsF${pc_=U>UQp2Z{ocz)~G3B)3gKnu+YkEnjXRGES)N4`J^z4Roh0k z!)p<^>=Ch;9XL;Qpk0Hx@N4>Bub3t`juPpir_2Ox6iC)IY4!KB5lL~YA86aC6fOl$=+iRGq;O-L$Q^gtA{LGP(!z(P+O7N9VLpFsOS1!s*nLz8Vu!74) z_cND6DNK`c(VQIdk8)I=O5rDz2tQ6PwQDkAJ5n;|p|!`T?cVR9byfb-9fVL9e28J{GTBY?WR&Mwot}{PNv+^5 zao*#38Z>>4{&l4=Y(t@m3EP!gGqXdD*6uPXD>Ze)WO>egI1vE>upAR!%VK4f?Xz5r zFB&to!WqY`mRe|B<2>R4?!867m9pGo1w?TdLp*C3bXPel!*H;2;kOcn+T`~rVkthK z^XT??Z&y46MP9+rZ79*lKzazS0?sIit4A&d+;%|{9^qGCe#DC3B@^gmW&AnnV8CyxazxOb6L}@xKlA!_E1JjWZ?g5OVdN^}Nq@S8*V1c3G9-h~ z#=k%Ntt>q)aFpi|EQHlJR6P4udFh{5Nm*4F9OGf{uzy{;wRnE$Y!O^=^dJ)TTFquhUVg8??U{il8<(JrS^L#_$d(hoseX2wQbPbq;-b)%CU zhZ0KF-0(<^eY>EFU1rvwa+zU`yrDQ+Hv~DUIqbW4uqN1ft!n-pI2RmF5;1ah-O}V) PcEHli&a~Rt>+XL5o}Kdp literal 0 HcmV?d00001 diff --git a/icons/obj/doors/DoorHazard2x1.dmi b/icons/obj/doors/DoorHazard2x1.dmi new file mode 100644 index 0000000000000000000000000000000000000000..102bcf081dd951828db33ac2ed1b9c7f72f4fc0e GIT binary patch literal 804 zcmV+<1Ka$GP)m~`q)!F1e+AvS1b{>c9v&VlDk=ao z039720A>IHnE;=L34T8a+JXod7Z(i;4foIk)T#uXWdSEACybTPYybcN0d!JMQvg8b z*k%9#0D*c`Sad{Xb7OL8aCB*JZU6vyoKseCa&`CgQ*iP1H!U5~3Jt0NSc7e7+F@7(N2PKwDQEfX*ko9!LZa*n7aI2XvfPfah2OK+6LTT^K+d zgaCj9I6MP(N&qE>RX_&NB>>HVumlg4yD45)Vc!aXkVfwTLs$Wh0l+Q63Lp%@ufnP4 zdw}8(>OtoK{mBCcX$UJZL-2sX1I`x*UZ}pMHUchSd8OeR;ej{@16b)mIFQ&_V=N2-&`SWH+VSKF=+Cs7ctE#oFc}aw z)BcMGxDCBE0s@2sTj^hMC<#b;k zH(DmF6JWaC#!yaAb*aUb0Z>+eIR2Qx_T^+A>uif_Km>QS&4G}oUw^skulHB@1M$Qt zg2eFR58NZXiYPH0{Xvnf=noVC@&`%)v=+(a^A}T0000