Skip to content

Commit

Permalink
Multi-Tile Airlock Vision Fix (#17777)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geevies authored Nov 13, 2023
1 parent 2e909aa commit cb87fae
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
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.

0 comments on commit cb87fae

Please sign in to comment.