Skip to content

Commit

Permalink
qol: Breaking windoors now gives airlock electronics (#3995)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell authored Dec 12, 2023
1 parent 48ab75c commit ebe0967
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/game/machinery/doors/windowdoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,22 @@

/obj/machinery/door/window/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT) && !disassembled)
var/obj/item/airlock_electronics/ae
for(var/obj/fragment in debris)
fragment.forceMove(get_turf(src))
transfer_fingerprints_to(fragment)
debris -= fragment
if(!electronics)
ae = new/obj/item/airlock_electronics(loc)
if(!req_access)
check_access()
ae.selected_accesses = req_access
ae.one_access = check_one_access
else
ae = electronics
electronics = null
ae.forceMove(loc)

qdel(src)

/obj/machinery/door/window/narsie_act()
Expand Down

0 comments on commit ebe0967

Please sign in to comment.