mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Fixed windoors becoming a fountain of infinite airlock electronics, added a check to see if it had electronics in it. Fixes issue 1273.
Windoors now automatically close after being constructed like regular airlocks. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5718 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -178,6 +178,9 @@ obj/structure/windoor_assembly/Del()
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
|
||||
|
||||
@@ -186,7 +189,7 @@ obj/structure/windoor_assembly/Del()
|
||||
user << "\blue You've removed the airlock electronics!"
|
||||
src.name = "Wired Windoor Assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics)
|
||||
if (!electronics) //This shouldnt happen, but if it does, lets not crash and runtime.
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
@@ -224,6 +227,7 @@ obj/structure/windoor_assembly/Del()
|
||||
windoor.req_access = src.electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
src.electronics.loc = windoor
|
||||
windoor.close()
|
||||
else
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(src.loc)
|
||||
if(src.facing == "l")
|
||||
@@ -238,7 +242,7 @@ obj/structure/windoor_assembly/Del()
|
||||
windoor.req_access = src.electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
src.electronics.loc = windoor
|
||||
|
||||
windoor.close()
|
||||
|
||||
del(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user