code folder. 221 files changed wew
This commit is contained in:
@@ -87,36 +87,34 @@
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if("01")
|
||||
if(istype(W, /obj/item/weldingtool) && !anchored )
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the windoor assembly.</span>")
|
||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
||||
RG.add_fingerprint(user)
|
||||
if(secure)
|
||||
var/obj/item/stack/rods/R = new (get_turf(src), 4)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
if(istype(W, /obj/item/weldingtool) && !anchored)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
user.visible_message("[user] disassembles the windoor assembly.",
|
||||
"<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You disassemble the windoor assembly.</span>")
|
||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
||||
RG.add_fingerprint(user)
|
||||
if(secure)
|
||||
var/obj/item/stack/rods/R = new (get_turf(src), 4)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(istype(W, /obj/item/wrench) && !anchored)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
to_chat(user, "<span class='warning'>There is already a windoor in that location!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.",
|
||||
"<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || anchored)
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(anchored)
|
||||
return
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
@@ -131,11 +129,11 @@
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/wrench) && anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.",
|
||||
"<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || !anchored)
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(!anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the windoor assembly.</span>")
|
||||
anchored = FALSE
|
||||
@@ -188,11 +186,10 @@
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || state != "02")
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(state != "02")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You cut the windoor wires.</span>")
|
||||
@@ -207,8 +204,9 @@
|
||||
else if(istype(W, /obj/item/electronics/airlock))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
W.play_tool_sound(src, 100)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.",
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!src || electronics)
|
||||
@@ -225,12 +223,10 @@
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.",
|
||||
"<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || !electronics)
|
||||
return
|
||||
if(W.use_tool(src, user, 40, volume=100) && electronics)
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/electronics/airlock/ae
|
||||
@@ -254,58 +250,56 @@
|
||||
if(!electronics)
|
||||
to_chat(usr, "<span class='warning'>The assembly is missing electronics!</span>")
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "<span class='notice'>You start prying the windoor into the frame...</span>")
|
||||
user << browse(null, "window=windoor_access")
|
||||
user.visible_message("[user] pries the windoor into the frame.",
|
||||
"<span class='notice'>You start prying the windoor into the frame...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
|
||||
if(loc && electronics)
|
||||
|
||||
density = TRUE //Shouldn't matter but just incase
|
||||
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(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.accesses
|
||||
else
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.forceMove(windoor)
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
if(W.use_tool(src, user, 40, volume=100) && electronics)
|
||||
|
||||
density = TRUE //Shouldn't matter but just incase
|
||||
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(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.accesses
|
||||
else
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
windoor.electronics = electronics
|
||||
electronics.forceMove(windoor)
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
|
||||
else
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
|
||||
else
|
||||
@@ -318,7 +312,13 @@
|
||||
|
||||
/obj/structure/windoor_assembly/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation))
|
||||
AddComponent(
|
||||
/datum/component/simple_rotation,
|
||||
ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS,
|
||||
null,
|
||||
CALLBACK(src, .proc/can_be_rotated),
|
||||
CALLBACK(src,.proc/after_rotation)
|
||||
)
|
||||
|
||||
/obj/structure/windoor_assembly/proc/can_be_rotated(mob/user,rotation_type)
|
||||
if(anchored)
|
||||
|
||||
Reference in New Issue
Block a user