From 12fd4ca1780e9ebd60ea2d535e39af2e4fe02e75 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sun, 12 Nov 2023 21:40:50 +0200 Subject: [PATCH] Multi-Tile Airlock Vision Fix --- code/game/machinery/doors/multi_tile.dm | 41 ++++++++++++++++++ .../geeves-firedoor_vision_blocker.yml | 6 +++ icons/effects/effects.dmi | Bin 340460 -> 340461 bytes 3 files changed, 47 insertions(+) create mode 100644 html/changelogs/geeves-firedoor_vision_blocker.yml diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index ca5daeed723..3e3ead762af 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -25,6 +25,24 @@ welded_file = 'icons/obj/doors/basic/double/generic/welded.dmi' emag_file = 'icons/obj/doors/basic/double/generic/emag.dmi' + var/list/vision_blockers + +/obj/machinery/door/airlock/multi_tile/Initialize(mapload, d, populate_components, obj/structure/door_assembly/DA) + . = ..() + if(visible && !glass) + for(var/turf/turf in locs) + var/obj/effect/turf_vision_blocker/vision_blocker = new /obj/effect/turf_vision_blocker(turf) + LAZYADD(vision_blockers, vision_blocker) + +/obj/machinery/door/airlock/multi_tile/Destroy() + QDEL_NULL_LIST(vision_blockers) + return ..() + +/obj/machinery/door/airlock/multi_tile/set_opacity(var/new_opacity) + . = ..() + for(var/obj/effect/turf_vision_blocker/vision_blocker in vision_blockers) + vision_blocker.set_opacity(new_opacity) + /obj/machinery/door/airlock/multi_tile/glass name = "glass airlock" opacity = 0 @@ -71,3 +89,26 @@ open_sound = 'sound/machines/firewideopen.ogg' close_sound = 'sound/machines/firewideclose.ogg' + + var/list/vision_blockers + +/obj/machinery/door/firedoor/multi_tile/Initialize(mapload) + . = ..() + if(visible && !glass) + for(var/turf/turf in locs) + var/obj/effect/turf_vision_blocker/vision_blocker = new /obj/effect/turf_vision_blocker(turf) + LAZYADD(vision_blockers, vision_blocker) + +/obj/machinery/door/firedoor/multi_tile/Destroy() + QDEL_NULL_LIST(vision_blockers) + return ..() + +/obj/machinery/door/firedoor/multi_tile/set_opacity(var/new_opacity) + . = ..() + for(var/obj/effect/turf_vision_blocker/vision_blocker in vision_blockers) + vision_blocker.set_opacity(new_opacity) + + +/obj/effect/turf_vision_blocker + name = "turf vision blocker" + opacity = FALSE diff --git a/html/changelogs/geeves-firedoor_vision_blocker.yml b/html/changelogs/geeves-firedoor_vision_blocker.yml new file mode 100644 index 00000000000..74ed1049a30 --- /dev/null +++ b/html/changelogs/geeves-firedoor_vision_blocker.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "Multi-tile airlocks and firedoors now properly block vision when closed." diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index e61c408f84a2dc589c31a6d7e745946f24000f28..5561d7a028722e9bb5f4a012f290008bc415708e 100644 GIT binary patch delta 1123 zcmV-p1f2Wq;}q@V6p$o;FnUy2bVOxyV{&P5bZKvH004NL?OEM!qc{}4PM!kI+|r0Z zY150`j5-=s+L?U>(9640hDG^MBC_bl`Iznqo#?rQI;+j4Y0Z~AHQfr3`E=Li|&Yj+UqaN1!YP{+vst* zs1#{IN89LmxuC$wDcVNs*t(VrE@c;OqqU`{VZf>Gh}v^N^gTKCSvp#|2RHQb49(&! z&f@G0YkO^oqF!Jcr*RrvvBS|YQTI$YXY6Jk>xi65QB;H?j%O1cW1LZhaU@%o31~aY zG}&=~b}o_%ZP)dGTwBPsh1?(|b{Dx;075s!7*K9~`9;dyNwYPj_o>?P9%g+CE2E_b zacHiUIIA1uhS{|^c3f&E#ovFuBEpxYbX~3hgftBkb+{95$(I=iTxLxJs$~Z0FH5kJ zqzw{!piE1CKs5SDqz$su{s)G@5FTWVDJg;kYXu-`E{E`cA{HG{hLtumAQa{$?}2dc z)^b5&3k3rcbkYf+%{_R^lz)UOE_-CoEvZuO2H33;Ih$GXeAMFU=XW-(_J>A<88S=b zI!~~vMgI`HFnMAX$gpyMnhD7z`XCRWI62*dK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