code folder. 221 files changed wew
This commit is contained in:
@@ -80,21 +80,19 @@
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if(stat & BROKEN)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn() || !(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(O.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
else
|
||||
|
||||
@@ -290,18 +290,17 @@ Class Procs:
|
||||
/obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames.
|
||||
return
|
||||
|
||||
/obj/machinery/proc/default_pry_open(obj/item/crowbar/C)
|
||||
. = !(state_open || panel_open || is_operational() || (flags_1 & NODECONSTRUCT_1)) && istype(C)
|
||||
/obj/machinery/proc/default_pry_open(obj/item/I)
|
||||
. = !(state_open || panel_open || is_operational() || (flags_1 & NODECONSTRUCT_1)) && I.tool_behaviour == TOOL_CROWBAR
|
||||
if(.)
|
||||
playsound(loc, C.usesound, 50, 1)
|
||||
I.play_tool_sound(src, 50)
|
||||
visible_message("<span class='notice'>[usr] pries open \the [src].</span>", "<span class='notice'>You pry open \the [src].</span>")
|
||||
open_machine()
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(obj/item/crowbar/C, ignore_panel = 0)
|
||||
. = istype(C) && (panel_open || ignore_panel) && !(flags_1 & NODECONSTRUCT_1)
|
||||
/obj/machinery/proc/default_deconstruction_crowbar(obj/item/I, ignore_panel = 0)
|
||||
. = (panel_open || ignore_panel) && !(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_CROWBAR
|
||||
if(.)
|
||||
playsound(loc, C.usesound, 50, 1)
|
||||
I.play_tool_sound(src, 50)
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/machinery/deconstruct(disassembled = TRUE)
|
||||
@@ -337,9 +336,9 @@ Class Procs:
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/screwdriver/S)
|
||||
if(istype(S) && !(flags_1 & NODECONSTRUCT_1))
|
||||
playsound(loc, S.usesound, 50, 1)
|
||||
/obj/machinery/proc/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/I)
|
||||
if(!(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
I.play_tool_sound(src, 50)
|
||||
if(!panel_open)
|
||||
panel_open = TRUE
|
||||
icon_state = icon_state_open
|
||||
@@ -351,9 +350,9 @@ Class Procs:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/proc/default_change_direction_wrench(mob/user, obj/item/wrench/W)
|
||||
if(panel_open && istype(W))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
/obj/machinery/proc/default_change_direction_wrench(mob/user, obj/item/I)
|
||||
if(panel_open && I.tool_behaviour == TOOL_WRENCH)
|
||||
I.play_tool_sound(src, 50)
|
||||
setDir(turn(dir,-90))
|
||||
to_chat(user, "<span class='notice'>You rotate [src].</span>")
|
||||
return 1
|
||||
@@ -365,20 +364,20 @@ Class Procs:
|
||||
return FAILED_UNFASTEN
|
||||
return SUCCESSFUL_UNFASTEN
|
||||
|
||||
/obj/proc/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20) //try to unwrench an object in a WONDERFUL DYNAMIC WAY
|
||||
if(istype(W) && !(flags_1 & NODECONSTRUCT_1))
|
||||
/obj/proc/default_unfasten_wrench(mob/user, obj/item/I, time = 20) //try to unwrench an object in a WONDERFUL DYNAMIC WAY
|
||||
if(!(flags_1 & NODECONSTRUCT_1) && I.tool_behaviour == TOOL_WRENCH)
|
||||
var/can_be_unfasten = can_be_unfasten_wrench(user)
|
||||
if(!can_be_unfasten || can_be_unfasten == FAILED_UNFASTEN)
|
||||
return can_be_unfasten
|
||||
if(time)
|
||||
to_chat(user, "<span class='notice'>You begin [anchored ? "un" : ""]securing [src]...</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
I.play_tool_sound(src, 50)
|
||||
var/prev_anchored = anchored
|
||||
//as long as we're the same anchored state and we're either on a floor or are anchored, toggle our anchored state
|
||||
if(!time || do_after(user, time*W.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/unfasten_wrench_check, prev_anchored, user)))
|
||||
if(I.use_tool(src, user, time, extra_checks = CALLBACK(src, .proc/unfasten_wrench_check, prev_anchored, user)))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [src].</span>")
|
||||
anchored = !anchored
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
return SUCCESSFUL_UNFASTEN
|
||||
return FAILED_UNFASTEN
|
||||
return CANT_UNFASTEN
|
||||
|
||||
@@ -61,7 +61,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
|
||||
/obj/machinery/announcement_system/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -74,21 +74,21 @@
|
||||
update_icon()
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] begins repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(src, WT.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, TRUE, target = src))
|
||||
if(!WT.isOn() || !(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
playsound(src, 'sound/items/welder2.ogg', 50, 1)
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max(obj_integrity, max_integrity)
|
||||
update_icon()
|
||||
if(!O.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
user.visible_message("[user] begins repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
|
||||
if(O.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max(obj_integrity, max_integrity)
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
else
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
|
||||
if(!device && !board && istype(W, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the button frame...</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
W.play_tool_sound(src)
|
||||
if(W.use_tool(src, user, 40))
|
||||
to_chat(user, "<span class='notice'>You unsecure the button frame.</span>")
|
||||
transfer_fingerprints_to(new /obj/item/wallframe/button(get_turf(src)))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
@@ -367,19 +367,16 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/camera/proc/weld(obj/item/weldingtool/WT, mob/living/user)
|
||||
/obj/machinery/camera/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
if(busy)
|
||||
return FALSE
|
||||
if(!WT.remove_fuel(0, user))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to weld [src]...</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
busy = TRUE
|
||||
if(do_after(user, 100*WT.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 100, volume=50))
|
||||
busy = FALSE
|
||||
if(!WT.isOn())
|
||||
return FALSE
|
||||
return TRUE
|
||||
busy = FALSE
|
||||
return FALSE
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
var/obj/U = locate(/obj) in upgrades
|
||||
if(U)
|
||||
to_chat(user, "<span class='notice'>You unattach an upgrade from the assembly.</span>")
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
tool.play_tool_sound(src)
|
||||
U.forceMove(drop_location())
|
||||
upgrades -= U
|
||||
return TRUE
|
||||
@@ -90,7 +90,7 @@
|
||||
if(state != 3)
|
||||
return FALSE
|
||||
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
tool.play_tool_sound(src)
|
||||
var/input = stripped_input(user, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")
|
||||
if(!input)
|
||||
to_chat(user, "<span class='warning'>No input found, please hang up and try your call again!</span>")
|
||||
@@ -109,35 +109,32 @@
|
||||
C.c_tag = "[A.name] ([rand(1, 999)])"
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/wirecutter_act(mob/user, obj/item/tool)
|
||||
/obj/structure/camera_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != 3)
|
||||
return FALSE
|
||||
|
||||
new /obj/item/stack/cable_coil(get_turf(src), 2)
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
new /obj/item/stack/cable_coil(drop_location(), 2)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the circuits.</span>")
|
||||
state = 2
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/wrench_act(mob/user, obj/item/tool)
|
||||
/obj/structure/camera_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != 1)
|
||||
return FALSE
|
||||
playsound(src, tool.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unattach the assembly from its place.</span>")
|
||||
new /obj/item/wallframe/camera(get_turf(src))
|
||||
new /obj/item/wallframe/camera(drop_location())
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/WT, mob/living/user)
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return 0
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You start to weld \the [src]...</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 20*WT.toolspeed, target = src))
|
||||
if(WT.isOn())
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
if(W.use_tool(src, user, 20, volume=50))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/camera_assembly/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -125,4 +125,4 @@
|
||||
charging.give(charge_rate) //this is 2558, efficient batteries exist
|
||||
|
||||
updateicon()
|
||||
|
||||
|
||||
@@ -69,14 +69,13 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) && circuit && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'> You start to disconnect the monitor...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
/obj/machinery/computer/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(circuit && !(flags_1&NODECONSTRUCT_1))
|
||||
to_chat(user, "<span class='notice'>You start to disconnect the monitor...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
deconstruct(TRUE, user)
|
||||
else
|
||||
return ..()
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/computer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
|
||||
@@ -105,12 +105,6 @@
|
||||
authenticated = TRUE
|
||||
auth_id = "[ID.registered_name] ([ID.assignment])"
|
||||
log_activity("logged in")
|
||||
if(!authenticated) //Check for emags
|
||||
var/obj/item/card/emag/E = usr.get_active_held_item()
|
||||
if(E && istype(E) && usr.Adjacent(src))
|
||||
to_chat(usr, "<span class='warning'>You bypass [src]'s access requirements using your emag.</span>")
|
||||
authenticated = TRUE
|
||||
log_activity("logged in") //Auth ID doesn't change, hinting that it was illicit
|
||||
if(href_list["log_out"])
|
||||
log_activity("logged out")
|
||||
authenticated = FALSE
|
||||
@@ -193,12 +187,15 @@
|
||||
interact(usr) //Refresh the UI after a filter changes
|
||||
|
||||
/obj/machinery/computer/apc_control/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
user.visible_message("<span class='warning'>You emag [src], disabling precise logging and allowing you to clear logs.</span>")
|
||||
log_game("[key_name(user)] emagged [src] at [get_area(src)], disabling operator tracking.")
|
||||
if(!authenticated)
|
||||
to_chat(user, "<span class='warning'>You bypass [src]'s access requirements using your emag.</span>")
|
||||
authenticated = TRUE
|
||||
log_activity("logged in")
|
||||
else if(!(obj_flags & EMAGGED))
|
||||
user.visible_message("<span class='warning'>You emag [src], disabling precise logging and allowing you to clear logs.</span>")
|
||||
log_game("[key_name(user)] emagged [src] at [get_area(src)], disabling operator tracking.")
|
||||
obj_flags |= EMAGGED
|
||||
playsound(src, "sparks", 50, 1)
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/machinery/computer/apc_control/proc/log_activity(log_text)
|
||||
var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]"
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
/obj/item/toy/windupToolbox = 2,
|
||||
/obj/item/toy/clockwork_watch = 2,
|
||||
/obj/item/toy/toy_dagger = 2,
|
||||
/obj/item/extendohand/acme = 1)
|
||||
/obj/item/extendohand/acme = 1,
|
||||
/obj/item/hot_potato/harmless/toy = 1,
|
||||
/obj/item/card/emagfake = 1)
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
|
||||
@@ -8,24 +8,18 @@
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
return
|
||||
if(istype(P, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = P
|
||||
if(!WT.remove_fuel(0, user))
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "<span class='warning'>[WT] must be on to complete this task!</span>")
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
|
||||
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (drop_location(), 5)
|
||||
M.add_fingerprint(user)
|
||||
@@ -33,9 +27,8 @@
|
||||
return
|
||||
if(1)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
anchored = FALSE
|
||||
state = 0
|
||||
@@ -54,13 +47,13 @@
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw [circuit] into place.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove [circuit].</span>")
|
||||
state = 1
|
||||
icon_state = "0"
|
||||
@@ -70,54 +63,47 @@
|
||||
return
|
||||
if(2)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
return
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(C.get_amount() >= 5 && state == 2)
|
||||
C.use(5)
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the frame!</span>")
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
if(state != 2)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/stack/cable_coil/A = new (drop_location())
|
||||
A.amount = 5
|
||||
var/obj/item/stack/cable_coil/A = new (drop_location(), 5)
|
||||
A.add_fingerprint(user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = P
|
||||
if(G.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two glass sheets to continue construction!</span>")
|
||||
if(!P.tool_start_check(user, amount=2))
|
||||
return
|
||||
else
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(G.get_amount() >= 2 && state == 3)
|
||||
G.use(2)
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
if(P.use_tool(src, user, 20, amount=2))
|
||||
if(state != 3)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
return
|
||||
if(4)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
@@ -125,7 +111,7 @@
|
||||
G.add_fingerprint(user)
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/obj/B = new circuit.build_path (loc, circuit)
|
||||
B.dir = dir
|
||||
|
||||
@@ -81,24 +81,20 @@
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src))
|
||||
if(C.get_amount() >= 5 && state == 1)
|
||||
C.use(5)
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five length of cable to wire the frame!</span>")
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && !anchored)
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the frame.</span>", \
|
||||
"<span class='notice'>You start to disassemble the frame...</span>", "You hear banging and clanking.")
|
||||
if(do_after(user, 40*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 40, volume=50))
|
||||
if(state == 1)
|
||||
to_chat(user, "<span class='notice'>You disassemble the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 5)
|
||||
@@ -107,8 +103,7 @@
|
||||
return
|
||||
if(istype(P, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
playsound(src.loc, P.usesound, 75, 1)
|
||||
if(do_after(user, 40*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
if(state == 1)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
anchored = !anchored
|
||||
@@ -117,8 +112,7 @@
|
||||
if(2)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
playsound(src.loc, P.usesound, 75, 1)
|
||||
if(do_after(user, 40*P.toolspeed, target = src))
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
anchored = !anchored
|
||||
return
|
||||
@@ -145,17 +139,16 @@
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
new /obj/item/stack/cable_coil(drop_location(), 5)
|
||||
return
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
state = 2
|
||||
circuit.forceMove(drop_location())
|
||||
components.Remove(circuit)
|
||||
@@ -179,7 +172,7 @@
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, 1)
|
||||
new_machine.on_construction()
|
||||
for(var/obj/O in new_machine.component_parts)
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && material == METAL)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume=40))
|
||||
obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -782,15 +782,12 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_METAL)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(!WT.remove_fuel(2, user))
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the panel's shielding...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!panel_open || !WT.isOn())
|
||||
if(C.use_tool(src, user, 40, volume=50, amount = 2))
|
||||
if(!panel_open)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
|
||||
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -802,8 +799,7 @@
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
var/obj/item/crowbar/W = C
|
||||
to_chat(user, "<span class='notice'>You start removing the inner layer of shielding...</span>")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(do_after(user, 40*W.toolspeed, 1, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
if(security_level != AIRLOCK_SECURITY_PLASTEEL_I_S)
|
||||
@@ -818,15 +814,12 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(!WT.remove_fuel(2, user))
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the inner layer of shielding...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!panel_open || !WT.isOn())
|
||||
if(C.use_tool(src, user, 40, volume=50, amount=2))
|
||||
if(!panel_open)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
|
||||
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -834,10 +827,8 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O_S)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
var/obj/item/crowbar/W = C
|
||||
to_chat(user, "<span class='notice'>You start removing outer layer of shielding...</span>")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(do_after(user, 40*W.toolspeed, 1, target = src))
|
||||
if(C.use_tool(src, user, 40, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
if(security_level != AIRLOCK_SECURITY_PLASTEEL_O_S)
|
||||
@@ -849,15 +840,12 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = C
|
||||
if(!WT.remove_fuel(2, user))
|
||||
if(!C.tool_start_check(user, amount=2))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting the outer layer of shielding...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!panel_open || !WT.isOn())
|
||||
if(C.use_tool(src, user, 40, volume=50, amount=2))
|
||||
if(!panel_open)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] cuts through \the [src]'s shielding.</span>",
|
||||
"<span class='notice'>You cut through \the [src]'s shielding.</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -865,12 +853,10 @@
|
||||
return
|
||||
if(AIRLOCK_SECURITY_PLASTEEL)
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/W = C
|
||||
if(src.hasPower() && src.shock(user, 60)) // Protective grille of wiring is electrified
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start cutting through the outer grille.</span>")
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
if(do_after(user, 10*W.toolspeed, 1, target = src))
|
||||
if(C.use_tool(src, user, 10, volume=100))
|
||||
if(!panel_open)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] cut through \the [src]'s outer grille.</span>",
|
||||
@@ -883,11 +869,11 @@
|
||||
return
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the airlock.</span>")
|
||||
playsound(src.loc, C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
src.update_icon()
|
||||
else if(istype(C, /obj/item/wirecutters) && note)
|
||||
user.visible_message("<span class='notice'>[user] cuts down [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
note.forceMove(get_turf(user))
|
||||
note = null
|
||||
update_icon()
|
||||
@@ -932,36 +918,34 @@
|
||||
/obj/machinery/door/airlock/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
if(!operating && density)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
if(W.remove_fuel(0,user))
|
||||
user.visible_message("[user] is [welded ? "unwelding":"welding"] the airlock.", \
|
||||
"<span class='notice'>You begin [welded ? "unwelding":"welding"] the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
if(do_after(user,40*W.toolspeed, 1, target = src, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
welded = !welded
|
||||
user.visible_message("[user.name] has [welded? "welded shut":"unwelded"] [src].", \
|
||||
"<span class='notice'>You [welded ? "weld the airlock shut":"unweld the airlock"].</span>")
|
||||
update_icon()
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is [welded ? "unwelding":"welding"] the airlock.", \
|
||||
"<span class='notice'>You begin [welded ? "unwelding":"welding"] the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
welded = !welded
|
||||
user.visible_message("[user.name] has [welded? "welded shut":"unwelded"] [src].", \
|
||||
"<span class='notice'>You [welded ? "weld the airlock shut":"unweld the airlock"].</span>")
|
||||
update_icon()
|
||||
else
|
||||
if(obj_integrity < max_integrity)
|
||||
if(W.remove_fuel(0,user))
|
||||
user.visible_message("[user] is welding the airlock.", \
|
||||
"<span class='notice'>You begin repairing the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
if(do_after(user,40*W.toolspeed, 1, target = src, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
user.visible_message("[user.name] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing the airlock.</span>")
|
||||
update_icon()
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is welding the airlock.", \
|
||||
"<span class='notice'>You begin repairing the airlock...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/weld_checks, W, user)))
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
user.visible_message("[user.name] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing the airlock.</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The airlock doesn't need repairing.</span>")
|
||||
|
||||
/obj/machinery/door/airlock/proc/weld_checks(obj/item/weldingtool/W, mob/user)
|
||||
return !operating && density && user && W && W.isOn() && user.loc
|
||||
return !operating && density
|
||||
|
||||
/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/living/user)
|
||||
var/beingcrowbarred = null
|
||||
@@ -971,8 +955,7 @@
|
||||
beingcrowbarred = 0
|
||||
if(panel_open && charge)
|
||||
to_chat(user, "<span class='notice'>You carefully start removing [charge] from [src]...</span>")
|
||||
playsound(get_turf(src), I.usesound, 50, 1)
|
||||
if(!do_after(user, 150*I.toolspeed, target = src))
|
||||
if(!I.use_tool(src, user, 150, volume=50))
|
||||
to_chat(user, "<span class='warning'>You slip and [charge] detonates!</span>")
|
||||
charge.ex_act(EXPLODE_DEVASTATE)
|
||||
user.Knockdown(60)
|
||||
@@ -983,13 +966,11 @@
|
||||
charge = null
|
||||
return
|
||||
if(beingcrowbarred && panel_open && ((obj_flags & EMAGGED) || (density && welded && !operating && !hasPower() && !locked)))
|
||||
playsound(src.loc, I.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
if(do_after(user,40*I.toolspeed, target = src))
|
||||
if(src.loc)
|
||||
deconstruct(TRUE, user)
|
||||
return
|
||||
if(I.use_tool(src, user, 40, volume=100))
|
||||
deconstruct(TRUE, user)
|
||||
return
|
||||
else if(hasPower())
|
||||
to_chat(user, "<span class='warning'>The airlock's motors resist your efforts to force it!</span>")
|
||||
else if(locked)
|
||||
|
||||
@@ -576,16 +576,14 @@
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(construction_state == GEAR_SECURE)
|
||||
user.visible_message("<span class='notice'>[user] begins loosening [src]'s cogwheel...</span>", "<span class='notice'>You begin loosening [src]'s cogwheel...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 75*I.toolspeed, target = src) || construction_state != GEAR_SECURE)
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_SECURE)
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s cogwheel!</span>", "<span class='notice'>[src]'s cogwheel pops off and dangles loosely.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
construction_state = GEAR_LOOSE
|
||||
else if(construction_state == GEAR_LOOSE)
|
||||
user.visible_message("<span class='notice'>[user] begins tightening [src]'s cogwheel...</span>", "<span class='notice'>You begin tightening [src]'s cogwheel into place...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 75*I.toolspeed, target = src) || construction_state != GEAR_LOOSE)
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_LOOSE)
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] tightens [src]'s cogwheel!</span>", "<span class='notice'>You firmly tighten [src]'s cogwheel into place.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
@@ -597,8 +595,7 @@
|
||||
return 1
|
||||
else if(construction_state == GEAR_LOOSE)
|
||||
user.visible_message("<span class='notice'>[user] begins slowly lifting off [src]'s cogwheel...</span>", "<span class='notice'>You slowly begin lifting off [src]'s cogwheel...</span>")
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
if(!do_after(user, 75*I.toolspeed, target = src) || construction_state != GEAR_LOOSE)
|
||||
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_LOOSE)
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] lifts off [src]'s cogwheel, causing it to fall apart!</span>", \
|
||||
"<span class='notice'>You lift off [src]'s cogwheel, causing it to fall apart!</span>")
|
||||
|
||||
@@ -100,10 +100,10 @@
|
||||
if(boltslocked)
|
||||
to_chat(user, "<span class='notice'>There are screws locking the bolts in place!</span>")
|
||||
return
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts undoing [src]'s bolts...</span>", \
|
||||
"<span class='notice'>You start unfastening [src]'s floor bolts...</span>")
|
||||
if(!do_after(user, 50*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 50))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] unfastens [src]'s bolts.</span>", \
|
||||
@@ -113,7 +113,7 @@
|
||||
if(istype(C, /obj/item/screwdriver))
|
||||
user.visible_message("<span class='notice'>[user] [boltslocked ? "unlocks" : "locks"] [src]'s bolts.</span>", \
|
||||
"<span class='notice'>You [boltslocked ? "unlock" : "lock"] [src]'s floor bolts.</span>")
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
boltslocked = !boltslocked
|
||||
return
|
||||
|
||||
@@ -123,14 +123,13 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/try_to_weld(obj/item/weldingtool/W, mob/user)
|
||||
if(W.remove_fuel(0, user))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] starts [welded ? "unwelding" : "welding"] [src].</span>", "<span class='notice'>You start welding [src].</span>")
|
||||
if(do_after(user, 40*W.toolspeed, 1, target=src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
welded = !welded
|
||||
to_chat(user, "<span class='danger'>[user] [welded?"welds":"unwelds"] [src].</span>", "<span class='notice'>You [welded ? "weld" : "unweld"] [src].</span>")
|
||||
update_icon()
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] starts [welded ? "unwelding" : "welding"] [src].</span>", "<span class='notice'>You start welding [src].</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
welded = !welded
|
||||
to_chat(user, "<span class='danger'>[user] [welded?"welds":"unwelds"] [src].</span>", "<span class='notice'>You [welded ? "weld" : "unweld"] [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/firedoor/try_to_crowbar(obj/item/I, mob/user)
|
||||
if(welded || operating)
|
||||
@@ -284,10 +283,10 @@
|
||||
switch(constructionStep)
|
||||
if(CONSTRUCTION_PANEL_OPEN)
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts prying something out from [src]...</span>", \
|
||||
"<span class='notice'>You begin prying out the wire cover...</span>")
|
||||
if(!do_after(user, 50*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 50))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_PANEL_OPEN)
|
||||
return
|
||||
@@ -301,10 +300,10 @@
|
||||
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
|
||||
to_chat(user, "<span class='warning'>There's already a firelock there.</span>")
|
||||
return
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts bolting down [src]...</span>", \
|
||||
"<span class='notice'>You begin bolting [src]...</span>")
|
||||
if(!do_after(user, 30*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 30))
|
||||
return
|
||||
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
|
||||
return
|
||||
@@ -340,10 +339,10 @@
|
||||
|
||||
if(CONSTRUCTION_WIRES_EXPOSED)
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts cutting the wires from [src]...</span>", \
|
||||
"<span class='notice'>You begin removing [src]'s wires...</span>")
|
||||
if(!do_after(user, 60*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 60))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_WIRES_EXPOSED)
|
||||
return
|
||||
@@ -355,10 +354,10 @@
|
||||
update_icon()
|
||||
return
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
C.play_tool_sound(src)
|
||||
user.visible_message("<span class='notice'>[user] starts prying a metal plate into [src]...</span>", \
|
||||
"<span class='notice'>You begin prying the cover plate back onto [src]...</span>")
|
||||
if(!do_after(user, 80*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 80))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_WIRES_EXPOSED)
|
||||
return
|
||||
@@ -372,15 +371,13 @@
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
user.visible_message("<span class='notice'>[user] begins removing the circuit board from [src]...</span>", \
|
||||
"<span class='notice'>You begin prying out the circuit board from [src]...</span>")
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
if(!do_after(user, 50*C.toolspeed, target = src))
|
||||
if(!C.use_tool(src, user, 50, volume=50))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_GUTTED)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] removes [src]'s circuit board.</span>", \
|
||||
"<span class='notice'>You remove the circuit board from [src].</span>")
|
||||
new /obj/item/electronics/firelock(get_turf(src))
|
||||
playsound(get_turf(src), C.usesound, 50, 1)
|
||||
new /obj/item/electronics/firelock(drop_location())
|
||||
constructionStep = CONSTRUCTION_NOCIRCUIT
|
||||
update_icon()
|
||||
return
|
||||
@@ -404,18 +401,17 @@
|
||||
return
|
||||
if(CONSTRUCTION_NOCIRCUIT)
|
||||
if(istype(C, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = C
|
||||
if(W.remove_fuel(1,user))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] begins cutting apart [src]'s frame...</span>", \
|
||||
"<span class='notice'>You begin slicing [src] apart...</span>")
|
||||
if(!do_after(user, 80*C.toolspeed, target = src))
|
||||
return
|
||||
if(!C.tool_start_check(user, amount=1))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] begins cutting apart [src]'s frame...</span>", \
|
||||
"<span class='notice'>You begin slicing [src] apart...</span>")
|
||||
|
||||
if(C.use_tool(src, user, 40, volume=50, amount=1))
|
||||
return
|
||||
if(constructionStep != CONSTRUCTION_NOCIRCUIT)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] cuts apart [src]!</span>", \
|
||||
"<span class='notice'>You cut [src] into metal.</span>")
|
||||
playsound(get_turf(src), 'sound/items/welder2.ogg', 50, 1)
|
||||
var/turf/T = get_turf(src)
|
||||
new /obj/item/stack/sheet/metal(T, 3)
|
||||
if(reinforced)
|
||||
|
||||
@@ -227,17 +227,16 @@
|
||||
if(density || operating)
|
||||
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel!</span>")
|
||||
return
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open":"close"] the maintenance panel of the [src.name].</span>")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(panel_open && !density && !operating)
|
||||
playsound(src.loc, I.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the [src.name].", \
|
||||
"<span class='notice'>You start to remove electronics from the [src.name]...</span>")
|
||||
if(do_after(user,40*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
if(panel_open && !density && !operating && src.loc)
|
||||
var/obj/structure/windoor_assembly/WA = new /obj/structure/windoor_assembly(src.loc)
|
||||
switch(base_state)
|
||||
|
||||
@@ -29,8 +29,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
/obj/machinery/doppler_array/process()
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/doppler_array/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/wrench))
|
||||
/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(!anchored && !isinspace())
|
||||
anchored = TRUE
|
||||
power_change()
|
||||
@@ -39,7 +39,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
anchored = FALSE
|
||||
power_change()
|
||||
to_chat(user, "<span class='notice'>You unfasten [src].</span>")
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -109,14 +109,14 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
. = ..()
|
||||
if(!istype(linked_techweb))
|
||||
say("Warning: No linked research system!")
|
||||
return
|
||||
return
|
||||
var/adjusted = orig_light - 10 - linked_techweb.max_bomb_value
|
||||
if(adjusted <= 0)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
var/point_gain = techweb_scale_bomb(adjusted)
|
||||
if(point_gain <= 0)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
linked_techweb.max_bomb_value = orig_light - 10
|
||||
linked_techweb.research_points += point_gain
|
||||
|
||||
@@ -210,35 +210,26 @@
|
||||
else
|
||||
icon_state = icon_on
|
||||
|
||||
/obj/machinery/droneDispenser/attackby(obj/item/O, mob/living/user)
|
||||
if(istype(O, /obj/item/crowbar))
|
||||
/obj/machinery/droneDispenser/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You retrieve the materials from [src].</span>")
|
||||
|
||||
else if(istype(O, /obj/item/weldingtool))
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
if(!(stat & BROKEN))
|
||||
to_chat(user, "<span class='warning'>[src] doesn't need repairs.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/weldingtool/WT = O
|
||||
|
||||
if(!WT.isOn())
|
||||
if(!I.tool_start_check(user, amount=1))
|
||||
return
|
||||
|
||||
if(WT.get_fuel() < 1)
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
return
|
||||
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] begins patching up [src] with [WT].</span>",
|
||||
"<span class='notice'>[user] begins patching up [src] with [I].</span>",
|
||||
"<span class='notice'>You begin restoring the damage to [src]...</span>")
|
||||
|
||||
if(!do_after(user, 40*O.toolspeed, target = src))
|
||||
return
|
||||
if(!src || !WT.remove_fuel(1, user))
|
||||
if(!I.use_tool(src, user, 40, volume=50, amount=1))
|
||||
return
|
||||
|
||||
user.visible_message(
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver) && buildstage == 2)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
|
||||
update_icon()
|
||||
@@ -158,15 +158,14 @@
|
||||
if(panel_open)
|
||||
|
||||
if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
obj_integrity = max_integrity
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
@@ -183,7 +182,7 @@
|
||||
|
||||
else if (istype(W, /obj/item/wirecutters))
|
||||
buildstage = 1
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
new /obj/item/stack/cable_coil(user.loc, 5)
|
||||
to_chat(user, "<span class='notice'>You cut the wires from \the [src].</span>")
|
||||
update_icon()
|
||||
@@ -201,10 +200,9 @@
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user.name] removes the electronics from [src.name].", \
|
||||
"<span class='notice'>You start prying out the circuit...</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 20, volume=50))
|
||||
if(buildstage == 1)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed circuit.</span>")
|
||||
@@ -238,7 +236,7 @@
|
||||
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
|
||||
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()
|
||||
frame.forceMove(user.drop_location())
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -54,8 +54,7 @@
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
if (bulb)
|
||||
user.visible_message("[user] begins to disconnect [src]'s flashbulb.", "<span class='notice'>You begin to disconnect [src]'s flashbulb...</span>")
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
if(do_after(user, 30*W.toolspeed, target = src) && bulb)
|
||||
if(W.use_tool(src, user, 30, volume=50) && bulb)
|
||||
user.visible_message("[user] has disconnected [src]'s flashbulb!", "<span class='notice'>You disconnect [src]'s flashbulb.</span>")
|
||||
bulb.forceMove(loc)
|
||||
bulb = null
|
||||
@@ -74,8 +73,7 @@
|
||||
else if (istype(W, /obj/item/wrench))
|
||||
if(!bulb)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the flasher frame...</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You unsecure the flasher frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
@@ -165,7 +163,7 @@
|
||||
|
||||
/obj/machinery/flasher/portable/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench))
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
|
||||
if (!anchored && !isinspace())
|
||||
to_chat(user, "<span class='notice'>[src] is now secured.</span>")
|
||||
|
||||
@@ -630,4 +630,4 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
alpha = 100
|
||||
|
||||
#undef HOLOPAD_PASSIVE_POWER_USAGE
|
||||
#undef HOLOGRAM_POWER_USAGE
|
||||
#undef HOLOGRAM_POWER_USAGE
|
||||
|
||||
@@ -724,8 +724,8 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
/obj/machinery/newscaster/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 60*I.toolspeed, target = src))
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The broken remains of [src] fall on the ground.</span>")
|
||||
@@ -737,21 +737,19 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
new /obj/item/wallframe/newscaster(loc)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(stat & BROKEN)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn() || !(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
user.visible_message("[user] is repairing [src].", \
|
||||
"<span class='notice'>You begin repairing [src]...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
if(!(stat & BROKEN))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
obj_integrity = max_integrity
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
else
|
||||
|
||||
@@ -151,7 +151,7 @@ Buildable meters
|
||||
A.on_construction(color, piping_layer)
|
||||
transfer_fingerprints_to(A)
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
user.visible_message( \
|
||||
"[user] fastens \the [src].", \
|
||||
"<span class='notice'>You fasten \the [src].</span>", \
|
||||
@@ -205,7 +205,7 @@ Buildable meters
|
||||
to_chat(user, "<span class='warning'>You need to fasten it to a pipe!</span>")
|
||||
return TRUE
|
||||
new /obj/machinery/meter(loc, piping_layer)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You fasten the meter to the pipe.</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -64,35 +64,15 @@
|
||||
to_chat(usr, "<span class='notice'>You put [W] back into [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
else if (istype(W, /obj/item/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to fasten \the [src] to the floor...</span>")
|
||||
if (do_after(user, 40*W.toolspeed, target = src))
|
||||
add_fingerprint(user)
|
||||
user.visible_message( \
|
||||
"[user] fastens \the [src].", \
|
||||
"<span class='notice'>You fasten \the [src]. Now it can dispense pipes.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = TRUE
|
||||
stat &= MAINT
|
||||
if (usr.machine==src)
|
||||
usr << browse(null, "window=pipedispenser")
|
||||
else if(anchored)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src] from the floor...</span>")
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
add_fingerprint(user)
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You unfasten \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = FALSE
|
||||
stat |= ~MAINT
|
||||
power_change()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/pipedispenser/wrench_act(mob/living/user, obj/item/I)
|
||||
if(default_unfasten_wrench(user, I, 40))
|
||||
user << browse(null, "window=pipedispenser")
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/pipedispenser/disposal
|
||||
name = "disposal pipe dispenser"
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
//If the turret is destroyed, you can remove it with a crowbar to
|
||||
//try and salvage its components
|
||||
to_chat(user, "<span class='notice'>You begin prying the metal coverings off...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 20))
|
||||
if(prob(70))
|
||||
if(stored_gun)
|
||||
stored_gun.forceMove(loc)
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
switch(build_step)
|
||||
if(PTURRET_UNSECURED) //first step
|
||||
if(istype(I, /obj/item/wrench) && !anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
|
||||
anchored = TRUE
|
||||
build_step = PTURRET_BOLTED
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/crowbar) && !anchored)
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You dismantle the turret construction.</span>")
|
||||
new /obj/item/stack/sheet/metal( loc, 5)
|
||||
qdel(src)
|
||||
@@ -48,7 +48,7 @@
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
|
||||
anchored = FALSE
|
||||
build_step = PTURRET_UNSECURED
|
||||
@@ -57,27 +57,21 @@
|
||||
|
||||
if(PTURRET_START_INTERNAL_ARMOUR)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
|
||||
build_step = PTURRET_INTERNAL_ARMOUR_ON
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
return
|
||||
if(WT.get_fuel() < 5) //uses up 5 fuel.
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
if(!I.tool_start_check(user, amount=5)) //uses up 5 fuel
|
||||
return
|
||||
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to remove the turret's interior metal armor...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(!WT.isOn() || !WT.remove_fuel(5, user))
|
||||
return
|
||||
|
||||
if(I.use_tool(src, user, 20, volume=50, amount=5)) //uses up 5 fuel
|
||||
build_step = PTURRET_BOLTED
|
||||
to_chat(user, "<span class='notice'>You remove the turret's interior metal armor.</span>")
|
||||
new /obj/item/stack/sheet/metal( loc, 2)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -92,7 +86,7 @@
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
|
||||
build_step = PTURRET_START_INTERNAL_ARMOUR
|
||||
return
|
||||
@@ -109,7 +103,7 @@
|
||||
|
||||
if(PTURRET_SENSORS_ON)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
build_step = PTURRET_CLOSED
|
||||
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
|
||||
return
|
||||
@@ -126,24 +120,18 @@
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
build_step = PTURRET_SENSORS_ON
|
||||
to_chat(user, "<span class='notice'>You open the internal access hatch.</span>")
|
||||
return
|
||||
|
||||
if(PTURRET_START_EXTERNAL_ARMOUR)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
if(!I.tool_start_check(user, amount=5))
|
||||
return
|
||||
if(WT.get_fuel() < 5)
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to weld the turret's armor down...</span>")
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
if(!WT.isOn() || !WT.remove_fuel(5, user))
|
||||
return
|
||||
if(I.use_tool(src, user, 30, volume=50, amount=5))
|
||||
build_step = PTURRET_EXTERNAL_ARMOUR_ON
|
||||
to_chat(user, "<span class='notice'>You weld the turret's armor down.</span>")
|
||||
|
||||
@@ -161,7 +149,7 @@
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'>You pry off the turret's exterior armor.</span>")
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
build_step = PTURRET_CLOSED
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
anchored = !anchored
|
||||
power_change()
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "attached" : "detached"] [src].</span>")
|
||||
playsound(loc, G.usesound, 75, 1)
|
||||
G.play_tool_sound(src)
|
||||
return
|
||||
|
||||
var/allowed = is_type_in_typecache(G, allowed_devices)
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
/obj/machinery/shieldgen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
panel_open = !panel_open
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>You open the panel and expose the wiring.</span>")
|
||||
@@ -170,11 +170,11 @@
|
||||
to_chat(user, "<span class='warning'>The bolts are covered! Unlocking this would retract the covers.</span>")
|
||||
return
|
||||
if(!anchored && !isinspace())
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You secure \the [src] to the floor!</span>")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
to_chat(user, "<span class='notice'>You unsecure \the [src] from the floor!</span>")
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>\The [src] shuts off!</span>")
|
||||
|
||||
@@ -116,14 +116,14 @@
|
||||
to_chat(user, "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You firmly wrench the bomb to the floor.</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
anchored = TRUE
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>The bolts lock in place.</span>")
|
||||
else
|
||||
if(!active)
|
||||
to_chat(user, "<span class='notice'>You wrench the bomb from the floor.</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
anchored = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The bolts are locked down!</span>")
|
||||
@@ -159,18 +159,12 @@
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
if(payload || !wires.is_all_cut() || !open_panel)
|
||||
return
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.isOn())
|
||||
return
|
||||
if(WT.get_fuel() < 5) //uses up 5 fuel.
|
||||
to_chat(user, "<span class='warning'>You need more fuel to complete this task!</span>")
|
||||
|
||||
if(!I.tool_start_check(user, amount=5)) //uses up 5 fuel
|
||||
return
|
||||
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to cut [src] apart...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(!WT.isOn() || !WT.remove_fuel(5, user))
|
||||
return
|
||||
if(I.use_tool(src, user, 20, volume=50, amount=5)) //uses up 5 fuel
|
||||
to_chat(user, "<span class='notice'>You cut [src] apart.</span>")
|
||||
new /obj/item/stack/sheet/plasteel( loc, 5)
|
||||
qdel(src)
|
||||
@@ -448,7 +442,7 @@
|
||||
|
||||
/obj/item/bombcore/chemical/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/crowbar) && beakers.len > 0)
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
for (var/obj/item/B in beakers)
|
||||
B.forceMove(drop_location())
|
||||
beakers -= B
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
cut_overlays()
|
||||
if(panel_open)
|
||||
add_overlay("[initial(icon_state)]-panel")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You must first secure [src].</span>")
|
||||
|
||||
Reference in New Issue
Block a user