Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Tile Airlock Vision Fix #17777

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions code/game/machinery/doors/multi_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
6 changes: 6 additions & 0 deletions html/changelogs/geeves-firedoor_vision_blocker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: Geeves

delete-after: True

changes:
- bugfix: "Multi-tile airlocks and firedoors now properly block vision when closed."
Binary file modified icons/effects/effects.dmi
Binary file not shown.
Loading