Merge pull request #2785 from Nerezza/doortweaks

Misc windoor fixes. Dron (and borgs) can now rename airlock/windoor assemblies.
This commit is contained in:
MagmaRam
2016-11-21 12:35:43 -06:00
committed by GitHub
5 changed files with 168 additions and 120 deletions

View File

@@ -357,7 +357,7 @@ About the new airlock wires panel:
else /*if(src.justzap)*/
return
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
user << "<span class='danger'>You feel a powerful shock course through your body!</span>"
to_chat(user,"<span class='danger'>You feel a powerful shock course through your body!</span>")
user.halloss += 10
user.stunned += 10
return
@@ -461,7 +461,7 @@ About the new airlock wires panel:
src.electrified_until = duration == -1 ? -1 : world.time + SecondsToTicks(duration)
if(feedback && message)
usr << message
to_chat(usr,message)
/obj/machinery/door/airlock/proc/set_idscan(var/activate, var/feedback = 0)
var/message = ""
@@ -475,7 +475,7 @@ About the new airlock wires panel:
message = "IdScan feature has been disabled."
if(feedback && message)
usr << message
to_chat(usr,message)
/obj/machinery/door/airlock/proc/set_safeties(var/activate, var/feedback = 0)
var/message = ""
@@ -488,7 +488,7 @@ About the new airlock wires panel:
safe = 1
if(feedback && message)
usr << message
to_chat(usr,message)
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
@@ -596,43 +596,43 @@ About the new airlock wires panel:
src.aiHacking=1
spawn(20)
//TODO: Make this take a minute
user << "Airlock AI control has been blocked. Beginning fault-detection."
to_chat(user,"Airlock AI control has been blocked. Beginning fault-detection.")
sleep(50)
if(src.canAIControl())
user << "Alert cancelled. Airlock control has been restored without our assistance."
to_chat(user,"Alert cancelled. Airlock control has been restored without our assistance.")
src.aiHacking=0
return
else if(!src.canAIHack(user))
user << "We've lost our connection! Unable to hack airlock."
to_chat(user,"We've lost our connection! Unable to hack airlock.")
src.aiHacking=0
return
user << "Fault confirmed: airlock control wire disabled or cut."
to_chat(user,"Fault confirmed: airlock control wire disabled or cut.")
sleep(20)
user << "Attempting to hack into airlock. This may take some time."
to_chat(user,"Attempting to hack into airlock. This may take some time.")
sleep(200)
if(src.canAIControl())
user << "Alert cancelled. Airlock control has been restored without our assistance."
to_chat(user,"Alert cancelled. Airlock control has been restored without our assistance.")
src.aiHacking=0
return
else if(!src.canAIHack(user))
user << "We've lost our connection! Unable to hack airlock."
to_chat(user,"We've lost our connection! Unable to hack airlock.")
src.aiHacking=0
return
user << "Upload access confirmed. Loading control program into airlock software."
to_chat(user,"Upload access confirmed. Loading control program into airlock software.")
sleep(170)
if(src.canAIControl())
user << "Alert cancelled. Airlock control has been restored without our assistance."
to_chat(user,"Alert cancelled. Airlock control has been restored without our assistance.")
src.aiHacking=0
return
else if(!src.canAIHack(user))
user << "We've lost our connection! Unable to hack airlock."
to_chat(user,"We've lost our connection! Unable to hack airlock.")
src.aiHacking=0
return
user << "Transfer complete. Forcing airlock to execute program."
to_chat(user,"Transfer complete. Forcing airlock to execute program.")
sleep(50)
//disable blocked control
src.aiControlDisabled = 2
user << "Receiving control information from airlock."
to_chat(user,"Receiving control information from airlock.")
sleep(10)
//bring up airlock dialog
src.aiHacking = 0
@@ -664,16 +664,16 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/CanUseTopic(var/mob/user)
if(operating < 0) //emagged
user << "<span class='warning'>Unable to interface: Internal error.</span>"
to_chat(user,"<span class='warning'>Unable to interface: Internal error.</span>")
return STATUS_CLOSE
if(issilicon(user) && !src.canAIControl())
if(src.canAIHack(user))
src.hack(user)
else
if (src.isAllPowerLoss()) //don't really like how this gets checked a second time, but not sure how else to do it.
user << "<span class='warning'>Unable to interface: Connection timed out.</span>"
to_chat(user,"<span class='warning'>Unable to interface: Connection timed out.</span>")
else
user << "<span class='warning'>Unable to interface: Connection refused.</span>"
to_chat(user,"<span class='warning'>Unable to interface: Connection refused.</span>")
return STATUS_CLOSE
return ..()
@@ -694,20 +694,20 @@ About the new airlock wires panel:
src.loseBackupPower()
if("bolts")
if(src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
usr << "The door bolt control wire is cut - Door bolts permanently dropped."
to_chat(usr,"The door bolt control wire is cut - Door bolts permanently dropped.")
else if(activate && src.lock())
usr << "The door bolts have been dropped."
to_chat(usr,"The door bolts have been dropped.")
else if(!activate && src.unlock())
usr << "The door bolts have been raised."
to_chat(usr,"The door bolts have been raised.")
if("electrify_temporary")
electrify(30 * activate, 1)
if("electrify_permanently")
electrify(-1 * activate, 1)
if("open")
if(src.welded)
usr << text("The airlock has been welded shut!")
to_chat(usr,text("The airlock has been welded shut!"))
else if(src.locked)
usr << text("The door bolts are down!")
to_chat(usr,text("The door bolts are down!"))
else if(activate && density)
open()
else if(!activate && !density)
@@ -717,7 +717,7 @@ About the new airlock wires panel:
if("timing")
// Door speed control
if(src.isWireCut(AIRLOCK_WIRE_SPEED))
usr << text("The timing wire is cut - Cannot alter timing.")
to_chat(usr,text("The timing wire is cut - Cannot alter timing."))
else if (activate && src.normalspeed)
normalspeed = 0
else if (!activate && !src.normalspeed)
@@ -725,13 +725,13 @@ About the new airlock wires panel:
if("lights")
// Bolt lights
if(src.isWireCut(AIRLOCK_WIRE_LIGHT))
usr << "The bolt lights wire is cut - The door bolt lights are permanently disabled."
to_chat(usr,"The bolt lights wire is cut - The door bolt lights are permanently disabled.")
else if (!activate && src.lights)
lights = 0
usr << "The door bolt lights have been disabled."
to_chat(usr,"The door bolt lights have been disabled.")
else if (activate && !src.lights)
lights = 1
usr << "The door bolt lights have been enabled."
to_chat(usr,"The door bolt lights have been enabled.")
update_icon()
return 1
@@ -764,7 +764,7 @@ About the new airlock wires panel:
else if(istype(C, /obj/item/weapon/screwdriver))
if (src.p_open)
if (stat & BROKEN)
usr << "<span class='warning'>The panel is broken and cannot be closed.</span>"
to_chat(usr,"<span class='warning'>The panel is broken and cannot be closed.</span>")
else
src.p_open = 0
else
@@ -784,7 +784,7 @@ About the new airlock wires panel:
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
if(do_after(user,40))
user << "<span class='notice'>You removed the airlock electronics!</span>"
to_chat(user,"<span class='notice'>You removed the airlock electronics!</span>")
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
if (istype(da, /obj/structure/door_assembly/multi_tile))
@@ -812,9 +812,9 @@ About the new airlock wires panel:
qdel(src)
return
else if(arePowerSystemsOn())
user << "<span class='notice'>The airlock's motors resist your efforts to force it.</span>"
to_chat(user,"<span class='notice'>The airlock's motors resist your efforts to force it.</span>")
else if(locked)
user << "<span class='notice'>The airlock's bolts prevent it from being forced.</span>"
to_chat(user,"<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
else
if(density)
spawn(0) open(1)
@@ -826,12 +826,12 @@ About the new airlock wires panel:
var/obj/item/weapon/W = C
if((W.pry == 1) && !arePowerSystemsOn())
if(locked)
user << "<span class='notice'>The airlock's bolts prevent it from being forced.</span>"
to_chat(user,"<span class='notice'>The airlock's bolts prevent it from being forced.</span>")
else if( !welded && !operating )
if(istype(C, /obj/item/weapon/material/twohanded/fireaxe)) // If this is a fireaxe, make sure it's held in two hands.
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)
user << "<span class='warning'>You need to be wielding \the [F] to do that.</span>"
to_chat(user,"<span class='warning'>You need to be wielding \the [F] to do that.</span>")
return
// At this point, it's an armblade or a fireaxe that passed the wielded test, let's try to open it.
if(density)

View File

@@ -189,43 +189,40 @@
visible_message("<span class='warning'>The glass door was sliced open by [user]!</span>")
return 1
//If it's emagged, crowbar can pry electronics out.
if (src.operating == -1 && istype(I, /obj/item/weapon/crowbar))
//If it's opened/emagged, crowbar can pry it out of its frame.
if (!density && istype(I, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the windoor.", "You start to remove electronics from the windoor.")
user.visible_message("[user] begins prying the windoor out of the frame.", "You start to pry the windoor out of the frame.")
if (do_after(user,40))
user << "<span class='notice'>You removed the windoor electronics!</span>"
to_chat(user,"<span class='notice'>You pried the windoor out of the frame!</span>")
var/obj/structure/windoor_assembly/wa = new/obj/structure/windoor_assembly(src.loc)
if (istype(src, /obj/machinery/door/window/brigdoor))
wa.secure = "secure_"
wa.name = "secure wired windoor assembly"
else
wa.name = "wired windoor assembly"
if (src.base_state == "right" || src.base_state == "rightsecure")
wa.facing = "r"
wa.set_dir(src.dir)
wa.anchored = 1
wa.created_name = name
wa.state = "02"
wa.update_icon()
wa.step = 2
wa.update_state()
var/obj/item/weapon/airlock_electronics/ae
if(!electronics)
ae = new/obj/item/weapon/airlock_electronics( src.loc )
if(!src.req_access)
src.check_access()
if(src.req_access.len)
ae.conf_access = src.req_access
else if (src.req_one_access.len)
ae.conf_access = src.req_one_access
ae.one_access = 1
if(operating == -1)
wa.electronics = new/obj/item/weapon/circuitboard/broken()
else
ae = electronics
electronics = null
ae.loc = src.loc
ae.icon_state = "door_electronics_smoked"
if(!electronics)
wa.electronics = new/obj/item/weapon/airlock_electronics()
if(!src.req_access)
src.check_access()
if(src.req_access.len)
wa.electronics.conf_access = src.req_access
else if (src.req_one_access.len)
wa.electronics.conf_access = src.req_one_access
wa.electronics.one_access = 1
else
wa.electronics = electronics
electronics = null
operating = 0
qdel(src)
return

View File

@@ -138,14 +138,20 @@
bound_width = world.icon_size
bound_height = width * world.icon_size
/obj/structure/door_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
/obj/structure/door_assembly/attack_robot(mob/living/silicon/robot/user)
if(Adjacent(user) && (user.module && (istype(user.module,/obj/item/weapon/robot_module/robot/engineering/general)) \
|| istype(user.module,/obj/item/weapon/robot_module/drone))) //Only dron (and engiborg) needs this.
rename_door(user)
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
rename_door(user)
return
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
@@ -156,7 +162,7 @@
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You welded the [glass] plating off!</span>"
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
var/M = text2path("/obj/item/stack/material/[glass]")
new M(src.loc, 2)
glass = 0
@@ -164,18 +170,18 @@
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You welded the glass panel out!</span>"
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You dissasembled the airlock assembly!</span>"
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
new /obj/item/stack/material/steel(src.loc, 4)
qdel (src)
else
user << "<span class='notice'>You need more welding fuel.</span>"
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
return
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
@@ -187,19 +193,19 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>"
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
anchored = !anchored
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 1)
user << "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>"
to_chat(user, "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>")
return
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
if(do_after(user, 40) && state == 0 && anchored)
if (C.use(1))
src.state = 1
user << "<span class='notice'>You wire the airlock.</span>"
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -207,7 +213,7 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the airlock wires.!</span>"
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
@@ -219,14 +225,14 @@
if(!src) return
user.drop_item()
W.loc = src
user << "<span class='notice'>You installed the airlock electronics!</span>"
to_chat(user, "<span class='notice'>You installed the airlock electronics!</span>")
src.state = 2
src.electronics = W
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
//This should never happen, but just in case I guess
if (!electronics)
user << "<span class='notice'>There was nothing to remove.</span>"
to_chat(user, "<span class='notice'>There was nothing to remove.</span>")
src.state = 1
return
@@ -235,7 +241,7 @@
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You removed the airlock electronics!</span>"
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
src.state = 1
electronics.loc = src.loc
electronics = null
@@ -250,28 +256,28 @@
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
to_chat(user, "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>")
glass = 1
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
user << "You cannot make an airlock out of that material."
to_chat(user, "You cannot make an airlock out of that material.")
return
if(S.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
to_chat(user, "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>")
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now finishing the airlock.</span>"
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You finish the airlock!</span>"
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
var/path
if(istext(glass))
path = text2path("/obj/machinery/door/airlock/[glass]")

View File

@@ -25,6 +25,7 @@ obj/structure/windoor_assembly
var/facing = "l" //Does the windoor open to the left or right?
var/secure = "" //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed in terms of sprites
var/step = null //How far the door assembly has progressed in terms of steps
obj/structure/windoor_assembly/secure
name = "secure windoor assembly"
@@ -41,6 +42,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
set_dir(start_dir)
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
set_dir(NORTH)
update_state()
update_nearby_tiles(need_rebuild=1)
@@ -69,13 +71,20 @@ obj/structure/windoor_assembly/Destroy()
else
return 1
/obj/structure/windoor_assembly/proc/rename_door(mob/living/user)
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!in_range(src, user) && src.loc != user) return
created_name = t
update_state()
/obj/structure/windoor_assembly/attack_robot(mob/living/silicon/robot/user)
if(Adjacent(user) && (user.module && (istype(user.module,/obj/item/weapon/robot_module/robot/engineering/general)) \
|| istype(user.module,/obj/item/weapon/robot_module/drone))) //Only dron (and engiborg) needs this.
rename_door(user)
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter the name for the windoor.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
rename_door(user)
return
switch(state)
@@ -88,14 +97,14 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You disassembled the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You disassembled the windoor assembly!</span>")
if(secure)
new /obj/item/stack/material/glass/reinforced(get_turf(src), 2)
else
new /obj/item/stack/material/glass(get_turf(src), 2)
qdel(src)
else
user << "<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>"
to_chat(user,"<span class='notice'>You need more welding fuel to disassemble the windoor assembly.</span>")
return
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
@@ -105,12 +114,9 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You've secured the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
src.anchored = 1
if(src.secure)
src.name = "secure anchored windoor assembly"
else
src.name = "anchored windoor assembly"
step = 0
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(istype(W, /obj/item/weapon/wrench) && anchored)
@@ -119,12 +125,9 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You've unsecured the windoor assembly!</span>"
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
src.anchored = 0
if(src.secure)
src.name = "secure windoor assembly"
else
src.name = "windoor assembly"
step = null
//Adding cable to the assembly. Step 5 complete.
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
@@ -133,12 +136,9 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/stack/cable_coil/CC = W
if(do_after(user, 40))
if (CC.use(1))
user << "<span class='notice'>You wire the windoor!</span>"
to_chat(user,"<span class='notice'>You wire the windoor!</span>")
src.state = "02"
if(src.secure)
src.name = "secure wired windoor assembly"
else
src.name = "wired windoor assembly"
step = 1
else
..()
@@ -152,16 +152,13 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src) return
user << "<span class='notice'>You cut the windoor wires.!</span>"
to_chat(user,"<span class='notice'>You cut the windoor wires.!</span>")
new/obj/item/stack/cable_coil(get_turf(user), 1)
src.state = "01"
if(src.secure)
src.name = "secure anchored windoor assembly"
else
src.name = "anchored windoor assembly"
step = 0
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics) && W:icon_state != "door_electronics_smoked")
else if(istype(W, /obj/item/weapon/airlock_electronics))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
@@ -170,8 +167,8 @@ obj/structure/windoor_assembly/Destroy()
user.drop_item()
W.loc = src
user << "<span class='notice'>You've installed the airlock electronics!</span>"
src.name = "near finished windoor assembly"
to_chat(user,"<span class='notice'>You've installed the airlock electronics!</span>")
step = 2
src.electronics = W
else
W.loc = src.loc
@@ -183,11 +180,8 @@ obj/structure/windoor_assembly/Destroy()
if(do_after(user, 40))
if(!src || !src.electronics) return
user << "<span class='notice'>You've removed the airlock electronics!</span>"
if(src.secure)
src.name = "secure wired windoor assembly"
else
src.name = "wired windoor assembly"
to_chat(user,"<span class='notice'>You've removed the airlock electronics!</span>")
step = 1
var/obj/item/weapon/airlock_electronics/ae = electronics
electronics = null
ae.loc = src.loc
@@ -195,9 +189,12 @@ obj/structure/windoor_assembly/Destroy()
//Crowbar to complete the assembly, Step 7 complete.
else if(istype(W, /obj/item/weapon/crowbar))
if(!src.electronics)
usr << "<span class='warning'>The assembly is missing electronics.</span>"
to_chat(usr,"<span class='warning'>The assembly is missing electronics.</span>")
return
usr << browse(null, "window=windoor_access")
if(src.electronics && istype(src.electronics, /obj/item/weapon/circuitboard/broken))
to_chat(usr,"<span class='warning'>The assembly has broken airlock electronics.</span>")
return
to_chat(usr,browse(null, "window=windoor_access")) //Not sure what this actually does... -Ner
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
@@ -206,7 +203,7 @@ obj/structure/windoor_assembly/Destroy()
if(!src) return
density = 1 //Shouldn't matter but just incase
user << "<span class='notice'>You finish the windoor!</span>"
to_chat(user,"<span class='notice'>You finish the windoor!</span>")
if(secure)
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
@@ -218,7 +215,8 @@ obj/structure/windoor_assembly/Destroy()
windoor.base_state = "rightsecure"
windoor.set_dir(src.dir)
windoor.density = 0
windoor.name = created_name
if(created_name)
windoor.name = created_name
spawn(0)
windoor.close()
@@ -239,7 +237,8 @@ obj/structure/windoor_assembly/Destroy()
windoor.base_state = "right"
windoor.set_dir(src.dir)
windoor.density = 0
windoor.name = created_name
if(created_name)
windoor.name = created_name
spawn(0)
windoor.close()
@@ -263,7 +262,15 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/proc/update_state()
update_icon()
name += " ([created_name])"
name = ""
switch(step)
if (0)
name = "anchored "
if (1)
name = "wired "
if (2)
name = "near finished "
name += "[secure ? "secure " : ""]windoor assembly[created_name ? " ([created_name])" : ""]"
//Rotates the windoor assembly clockwise
/obj/structure/windoor_assembly/verb/revrotate()
@@ -272,7 +279,7 @@ obj/structure/windoor_assembly/Destroy()
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
to_chat(usr,"It is fastened to the floor; therefore, you can't rotate it!")
return 0
if(src.state != "01")
update_nearby_tiles(need_rebuild=1) //Compel updates before
@@ -292,11 +299,11 @@ obj/structure/windoor_assembly/Destroy()
set src in oview(1)
if(src.facing == "l")
usr << "The windoor will now slide to the right."
to_chat(usr,"The windoor will now slide to the right.")
src.facing = "r"
else
src.facing = "l"
usr << "The windoor will now slide to the left."
to_chat(usr,"The windoor will now slide to the left.")
update_icon()
return

View File

@@ -0,0 +1,38 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Nerezza
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Windoors can now be disassembled. Apply crowbar when open."
- rscadd: "Engiborgs and drons can name door and windoor assemblines now. Click an adjacent assembly with no modules active."
- bugfix: "Windoors now know how to name themselves. In addition, unnamed windoors now spawn with their default name instead of null."