mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Replace tool istypes() with macros
This commit is contained in:
@@ -224,7 +224,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
if(user.drop_item(pipe))
|
||||
pipe.setPipingLayer(src.piping_layer) //align it with us
|
||||
return 1
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if(src.machine_flags & WRENCHMOVE)
|
||||
return ..()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
node.build_network()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent/burstpipe/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -168,7 +168,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
|
||||
// Just for digital valves.
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
if(src.frequency && istype(W, /obj/item/weapon/wrench))
|
||||
if(src.frequency && iswrench(W))
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it's digitally connected to another device.</span>")
|
||||
return 1
|
||||
return ..() // Pass to the method below (does stuff ALL valves should do)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
"}
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (connected_device)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], dettach [connected_device] first.</span>")
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return 1
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return 1
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
|
||||
|
||||
@@ -398,7 +398,7 @@ var/list/heat_pipes = list(PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_JUNCTION)
|
||||
/obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
..()
|
||||
//*
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
if (!isturf(src.loc))
|
||||
return 1
|
||||
@@ -537,7 +537,7 @@ var/list/heat_pipes = list(PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_JUNCTION)
|
||||
/obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
..()
|
||||
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
var/obj/machinery/atmospherics/pipe/pipe
|
||||
for(var/obj/machinery/atmospherics/pipe/P in src.loc)
|
||||
@@ -573,7 +573,7 @@ var/list/heat_pipes = list(PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_JUNCTION)
|
||||
|
||||
/obj/item/pipe_gsensor/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
..()
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
new/obj/machinery/air_sensor( src.loc )
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
siemens_coefficient = 1
|
||||
|
||||
/obj/item/mounted/frame/rust_fuel_assembly_port/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
|
||||
del(src)
|
||||
return
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
if (iscrowbar(W))
|
||||
if(opened)
|
||||
if(has_electronics & 1)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
@@ -83,7 +83,7 @@
|
||||
has_electronics &= 2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2))
|
||||
else if (iswirecutter(W) && opened && (has_electronics & 2))
|
||||
to_chat(user, "You begin to cut the cables...")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, src, 50))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
siemens_coefficient = 1
|
||||
|
||||
/obj/item/mounted/frame/rust_fuel_compressor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
|
||||
del(src)
|
||||
return
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
if (istype(W, /obj/item/weapon/crowbar))
|
||||
if (iscrowbar(W))
|
||||
if(opened)
|
||||
if(has_electronics & 1)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
@@ -110,7 +110,7 @@
|
||||
has_electronics &= 2
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && opened && (has_electronics & 2))
|
||||
else if (iswirecutter(W) && opened && (has_electronics & 2))
|
||||
to_chat(user, "You begin to cut the cables...")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, src, 50))
|
||||
|
||||
@@ -196,7 +196,7 @@ var/list/alldepartments = list("Central Command")
|
||||
if(usr.drop_item(idcard, src))
|
||||
scan = idcard
|
||||
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
else if(iswrench(O))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
pod.loc = F.loc
|
||||
qdel(F)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
if(iswrench(O))
|
||||
to_chat(user, "<span class='notice'>You [!anchored ? "secure \the [src] in place." : "remove the securing bolts."]</span>")
|
||||
anchored = !anchored
|
||||
density = anchored
|
||||
|
||||
@@ -71,16 +71,16 @@
|
||||
return 0
|
||||
|
||||
/datum/construction/proc/custom_action(step, used_atom, user)
|
||||
if(istype(used_atom, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(used_atom))
|
||||
playsound(holder, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/weapon/wrench))
|
||||
else if(iswrench(used_atom))
|
||||
playsound(holder, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/weapon/screwdriver))
|
||||
else if(isscrewdriver(used_atom))
|
||||
playsound(holder, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
else if(istype(used_atom, /obj/item/weapon/wirecutters))
|
||||
else if(iswirecutter(used_atom))
|
||||
playsound(holder, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
|
||||
construct_message(step, user)
|
||||
|
||||
@@ -117,7 +117,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
var/obj/item/I = L.get_active_hand()
|
||||
holder.add_hiddenprint(L)
|
||||
if(href_list["cut"]) // Toggles the cut/mend status
|
||||
if(istype(I, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(I))
|
||||
var/colour = href_list["cut"]
|
||||
CutWireColour(colour)
|
||||
else
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
var/obj/item/I = O
|
||||
if(istype(O, /obj/item/weapon/legcuffs/bolas)) //don't stack into infinity
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/wirecutters)) //allows you to convert the wire back to a cable coil
|
||||
if(iswirecutter(I)) //allows you to convert the wire back to a cable coil
|
||||
if(!weight1 && !weight2) //if there's nothing attached
|
||||
user.show_message("<span class='notice'>You cut the knot in the [src].</span>")
|
||||
playsound(usr, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
@@ -435,7 +435,7 @@
|
||||
to_chat(user, "<span class='danger'>You shouldn't be reading this message! Contact a coder or someone, something broke!</span>")
|
||||
IED = null
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(I))
|
||||
if(IED)
|
||||
IED.loc = get_turf(src.loc)
|
||||
IED = null
|
||||
|
||||
@@ -949,7 +949,7 @@ FIRE ALARM
|
||||
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
|
||||
if (isscrewdriver(W) && buildstage == 2)
|
||||
wiresexposed = !wiresexposed
|
||||
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"].")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
@@ -983,7 +983,7 @@ FIRE ALARM
|
||||
to_chat(user, "You wire \the [src]!")
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
else if(iscrowbar(W))
|
||||
to_chat(user, "You start prying out the circuit...")
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
if (do_after(user, src, 20) && buildstage == 1)
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
qdel (src)
|
||||
return
|
||||
|
||||
if(!istype(W, /obj/item/weapon/wrench) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
|
||||
if(!iswrench(W) && !istype(W, /obj/item/weapon/tank) && !istype(W, /obj/item/device/analyzer) && !istype(W, /obj/item/device/pda))
|
||||
visible_message("<span class='warning'>[user] hits the [src] with a [W]!</span>")
|
||||
investigation_log(I_ATMOS, "<span style='danger'>was smacked with \a [W] by [key_name(user)]</span>")
|
||||
src.health -= W.force
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
</ul>"}
|
||||
|
||||
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
if (!iswrench(W))
|
||||
return ..()
|
||||
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wrench))
|
||||
else if (iswrench(W))
|
||||
if(connected_port)
|
||||
disconnect()
|
||||
to_chat(user, "<span class='notice'>You disconnect [name] from the port.</span>")
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
icon_state = "scrubber:0"
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
if(on)
|
||||
to_chat(user, "<span class='notice'>Turn it off first!</span>")
|
||||
return
|
||||
@@ -70,7 +70,7 @@
|
||||
name = "Stationary Air Scrubber"
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
to_chat(user, "<span class='notice'>The bolts are too tight for you to unscrew!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
stored_matter += M.amount * 10
|
||||
returnToPool(M)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(iswrench(W))
|
||||
user.visible_message("<span class='notice'>[user] begins to [anchored? "unfasten" : "fasten"] \the [src].</span>", "<span class='notice'>You begin to [anchored? "unfasten" : "fasten"] \the [src].</span>", "<span class='notice'>You hear a ratchet.</span>")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 30))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
/obj/machinery/bot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(flags & INVULNERABLE)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
if(!locked)
|
||||
open = !open
|
||||
to_chat(user, "<span class='notice'>Maintenance panel is now [src.open ? "opened" : "closed"].</span>")
|
||||
|
||||
@@ -225,7 +225,7 @@ Auto Patrol: []"},
|
||||
to_chat(user, "<span class='notice'>Access denied.</span>")
|
||||
else
|
||||
..()
|
||||
if (!istype(W, /obj/item/weapon/screwdriver) && (!src.target))
|
||||
if (!isscrewdriver(W) && (!src.target))
|
||||
if(hasvar(W,"force") && W.force)//If force is defined and non-zero
|
||||
threatlevel = user.assess_threat(src)
|
||||
threatlevel +=6
|
||||
@@ -1055,7 +1055,7 @@ Auto Patrol: []"},
|
||||
qdel(W)
|
||||
|
||||
if(8)
|
||||
if( istype(W, /obj/item/weapon/screwdriver) )
|
||||
if( isscrewdriver(W) )
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
to_chat(user, "<span class='notice'>Now attaching the gun to the frame...</span>")
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
else
|
||||
..()
|
||||
if (health < maxhealth && !istype(W, /obj/item/weapon/screwdriver) && W.force)
|
||||
if (health < maxhealth && !isscrewdriver(W) && W.force)
|
||||
step_to(src, (get_step_away(src,user)))
|
||||
|
||||
/obj/machinery/bot/medbot/Emag(mob/user as mob)
|
||||
|
||||
@@ -142,7 +142,7 @@ var/global/mulebot_count = 0
|
||||
icon_state = "mulebot0"
|
||||
|
||||
updateDialog()
|
||||
else if (istype(I, /obj/item/weapon/wrench))
|
||||
else if (iswrench(I))
|
||||
if (src.health < maxhealth)
|
||||
src.health = min(maxhealth, src.health+25)
|
||||
user.visible_message(
|
||||
|
||||
@@ -203,7 +203,7 @@ Auto Patrol: []"},
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
|
||||
return
|
||||
if(!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!target) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
|
||||
if(!isscrewdriver(W) && (W.force) && (!target) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
|
||||
threatlevel = user.assess_threat(src)
|
||||
threatlevel += 6
|
||||
if(threatlevel > 0)
|
||||
|
||||
@@ -171,12 +171,12 @@ var/list/camera_names=list()
|
||||
/obj/machinery/camera/attackby(W as obj, mob/living/user as mob)
|
||||
|
||||
// DECONSTRUCTION
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
// to_chat(user, "<span class='notice'>You start to [panel_open ? "close" : "open"] the camera's panel.</span>")
|
||||
//if(toggle_panel(user)) // No delay because no one likes screwdrivers trying to be hip and have a duration cooldown
|
||||
togglePanelOpen(W, user, icon_state, icon_state)
|
||||
|
||||
else if((istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
else if((iswirecutter(W) || istype(W, /obj/item/device/multitool)) && panel_open)
|
||||
wires.Interact(user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && wires.CanDeconstruct())
|
||||
@@ -438,7 +438,7 @@ var/list/camera_names=list()
|
||||
upgradeHearing()
|
||||
|
||||
/obj/machinery/camera/arena/attackby(W as obj, mob/living/user as mob)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(user, "<span class='warning'>There aren't any visible screws to unscrew.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [user] hits \the [src] with \the [W] but it doesn't seem to affect it in the least.</span>","<span class='warning'>You hit \the [src] with \the [W] but it doesn't seem to affect it in the least</span>")
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
to_chat(user, "It's a holotable! There are no bolts!")
|
||||
return
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 20))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = 1
|
||||
state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(P))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "The welder must be on for this task.")
|
||||
@@ -34,7 +34,7 @@
|
||||
new /obj/item/stack/sheet/plasteel( loc, 4)
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 20))
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
@@ -46,12 +46,12 @@
|
||||
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
|
||||
icon_state = "1"
|
||||
circuit = P
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
if(isscrewdriver(P) && circuit)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
if(istype(P, /obj/item/weapon/crowbar) && circuit)
|
||||
if(iscrowbar(P) && circuit)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
state = 1
|
||||
@@ -59,7 +59,7 @@
|
||||
circuit.loc = loc
|
||||
circuit = null
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
if(isscrewdriver(P) && circuit)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = 1
|
||||
@@ -75,7 +75,7 @@
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(P))
|
||||
if (brain)
|
||||
to_chat(user, "Get that brain out of there first")
|
||||
else
|
||||
@@ -149,7 +149,7 @@
|
||||
to_chat(user, "Added [P].")
|
||||
icon_state = "3b"
|
||||
|
||||
if(istype(P, /obj/item/weapon/crowbar) && brain)
|
||||
if(iscrowbar(P) && brain)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.loc = loc
|
||||
@@ -157,7 +157,7 @@
|
||||
icon_state = "3"
|
||||
|
||||
if(4)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(P))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
@@ -168,7 +168,7 @@
|
||||
new /obj/item/stack/sheet/glass/rglass( loc, 2 )
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(P))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain )
|
||||
|
||||
@@ -311,14 +311,14 @@
|
||||
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 5) && state == 0)
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
src.anchored = 1
|
||||
src.state = 1
|
||||
return 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(P))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "The welding tool must be on to complete this task.")
|
||||
@@ -333,7 +333,7 @@
|
||||
qdel(src)
|
||||
return 1
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 20) && state == 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
@@ -352,13 +352,13 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return 1
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
if(isscrewdriver(P) && circuit)
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
return 1
|
||||
if(istype(P, /obj/item/weapon/crowbar) && circuit)
|
||||
if(iscrowbar(P) && circuit)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
src.state = 1
|
||||
@@ -367,7 +367,7 @@
|
||||
src.circuit = null
|
||||
return 1
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
if(isscrewdriver(P) && circuit)
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
src.state = 1
|
||||
@@ -388,7 +388,7 @@
|
||||
|
||||
return 1
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(P))
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
src.state = 2
|
||||
@@ -411,14 +411,14 @@
|
||||
|
||||
return 1
|
||||
if(4)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(P))
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
new /obj/item/stack/sheet/glass/glass( src.loc, 2 )
|
||||
return 1
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(P))
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/B = new src.circuit.build_path ( src.loc )
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1)
|
||||
to_chat(user, "<span class='notice'>You dismantle the frame.</span>")
|
||||
//new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
@@ -109,7 +109,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(P))
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
set_build_state(1)
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
if(3)
|
||||
if(!..())
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(P))
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
set_build_state(2)
|
||||
circuit.loc = src.loc
|
||||
@@ -133,7 +133,7 @@
|
||||
req_components = null
|
||||
components = null
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(P))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
|
||||
@@ -327,7 +327,7 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
|
||||
if(user.drop_item(G, src))
|
||||
beaker = G
|
||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||
if(istype(G, /obj/item/weapon/wrench))//FUCK YOU PARENT, YOU AREN'T MY REAL DAD
|
||||
if(iswrench(G))//FUCK YOU PARENT, YOU AREN'T MY REAL DAD
|
||||
return
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
..()
|
||||
..()
|
||||
/* For later implementation
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (isscrewdriver(W))
|
||||
{
|
||||
if(wiresexposed)
|
||||
icon_state = "doorctrl0"
|
||||
@@ -145,7 +145,7 @@
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 30))
|
||||
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
|
||||
|
||||
@@ -1042,7 +1042,7 @@ About the new airlock wires panel:
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/weapon/weldingtool))
|
||||
if (iswelder(I))
|
||||
if (density && !operating)
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
|
||||
@@ -1054,19 +1054,19 @@ About the new airlock wires panel:
|
||||
welded = null
|
||||
|
||||
update_icon()
|
||||
else if (istype(I, /obj/item/weapon/wirecutters))
|
||||
else if (iswirecutter(I))
|
||||
if (!operating && panel_open)
|
||||
wires.Interact(user)
|
||||
else if (istype(I, /obj/item/device/multitool))
|
||||
else if (ismultitool(I))
|
||||
if (!operating)
|
||||
if(panel_open) wires.Interact(user)
|
||||
else update_multitool_menu(user)
|
||||
attack_hand(user)
|
||||
else if(istype(I, /obj/item/weapon/crowbar) || istype(I, /obj/item/weapon/fireaxe) )
|
||||
else if(iscrowbar(I) || istype(I, /obj/item/weapon/fireaxe) )
|
||||
if(src.busy) return
|
||||
src.busy = 1
|
||||
var/beingcrowbarred = null
|
||||
if(istype(I, /obj/item/weapon/crowbar) )
|
||||
if(iscrowbar(I) )
|
||||
beingcrowbarred = 1 //derp, Agouri
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
|
||||
@@ -232,7 +232,7 @@ var/global/list/alert_overlays_global = list()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if( istype(C, /obj/item/weapon/crowbar) || ( istype(C,/obj/item/weapon/fireaxe) && C.wielded ) )
|
||||
if( iscrowbar(C) || ( istype(C,/obj/item/weapon/fireaxe) && C.wielded ) )
|
||||
force_open(user, C)
|
||||
return
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ var/list/poddoors = list()
|
||||
|
||||
/obj/machinery/door/poddoor/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if (!( istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
|
||||
if (!( iscrowbar(C) || (istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
|
||||
return
|
||||
if ((src.density && (stat & NOPOWER) && !( src.operating )))
|
||||
spawn( 0 )
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
if(!(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
|
||||
if(!(iscrowbar(C) || (istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
|
||||
return
|
||||
if(density && (stat & NOPOWER) && !operating)
|
||||
operating = 1
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
// Make emagged/open doors able to be deconstructed
|
||||
if (!src.density && src.operating != 1 && istype(I, /obj/item/weapon/crowbar))
|
||||
if (!src.density && src.operating != 1 && iscrowbar(I))
|
||||
user.visible_message("[user] removes the electronics from the windoor assembly.", "You start to remove the electronics from the windoor assembly.")
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 100, 1)
|
||||
if (do_after(user, src, 40) && src && !src.density && src.operating != 1)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(type==/obj/machinery/embedded_controller)
|
||||
switch(build)
|
||||
if(0) // Empty hull
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(usr, "You begin removing screws from \the [src] backplate...")
|
||||
if(do_after(user, src, 50))
|
||||
to_chat(usr, "<span class='notice'>You unscrew \the [src] from the wall.</span>")
|
||||
@@ -60,7 +60,7 @@
|
||||
update_icon()
|
||||
return 1
|
||||
if(1) // Circuitboard installed
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
to_chat(usr, "You begin to pry out \the [W] into \the [src].")
|
||||
if(do_after(user, src, 10))
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
@@ -89,7 +89,7 @@
|
||||
"<span class='warning'>[user.name] has added cables to \the [src]!</span>",\
|
||||
"You add cables to \the [src].")
|
||||
if(2) // Circuitboard installed, wired.
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
to_chat(usr, "You begin to remove the wiring from \the [src].")
|
||||
if(do_after(user, src, 50))
|
||||
new /obj/item/stack/cable_coil(loc,5)
|
||||
@@ -99,7 +99,7 @@
|
||||
build--
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(user, "You begin to complete \the [src]...")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, src, 20))
|
||||
|
||||
@@ -55,7 +55,7 @@ var/list/obj/machinery/flasher/flashers = list()
|
||||
|
||||
//Don't want to render prison breaks impossible
|
||||
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if (iswirecutter(W))
|
||||
add_fingerprint(user)
|
||||
src.disable = !src.disable
|
||||
if (src.disable)
|
||||
@@ -126,7 +126,7 @@ var/list/obj/machinery/flasher/flashers = list()
|
||||
src.flash()
|
||||
|
||||
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
add_fingerprint(user)
|
||||
src.anchored = !src.anchored
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ var/global/list/igniters = list()
|
||||
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (isscrewdriver(W))
|
||||
add_fingerprint(user)
|
||||
src.disable = !src.disable
|
||||
if (src.disable)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if(isobserver(user)) return
|
||||
if(user.stat)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
var/obj/item/stack/sheet/metal/M = getFromPool(/obj/item/stack/sheet/metal,get_turf(src))
|
||||
M.amount = 2
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
********************/
|
||||
/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
if(src.broken == 2 && isscrewdriver(O)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] starts to fix part of the microwave.</span>", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
@@ -95,7 +95,7 @@
|
||||
"<span class='notice'>You have fixed part of the microwave.</span>" \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench
|
||||
else if(src.broken == 1 && iswrench(O)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] starts to fix part of the microwave.</span>", \
|
||||
"<span class='notice'>You start to fix part of the microwave.</span>" \
|
||||
|
||||
@@ -496,7 +496,7 @@ Class Procs:
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
to_chat(user, "<span class='notice'>\icon[src] You [panel_open ? "open" : "close"] the maintenance hatch of \the [src].</span>")
|
||||
if(istype(toggleitem, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(toggleitem))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -586,20 +586,20 @@ Class Procs:
|
||||
emag(user)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/wrench) && machine_flags & WRENCHMOVE) //make sure this is BEFORE the fixed2work check
|
||||
if(iswrench(O) && machine_flags & WRENCHMOVE) //make sure this is BEFORE the fixed2work check
|
||||
if(!panel_open)
|
||||
return wrenchAnchor(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src]'s maintenance panel must be closed first!</span>")
|
||||
return -1 //we return -1 rather than 0 for the if(..()) checks
|
||||
|
||||
if(istype(O, /obj/item/weapon/screwdriver) && machine_flags & SCREWTOGGLE)
|
||||
if(isscrewdriver(O) && machine_flags & SCREWTOGGLE)
|
||||
return togglePanelOpen(O, user)
|
||||
|
||||
if(istype(O, /obj/item/weapon/weldingtool) && machine_flags & WELD_FIXED)
|
||||
if(iswelder(O) && machine_flags & WELD_FIXED)
|
||||
return weldToFloor(O, user)
|
||||
|
||||
if(istype(O, /obj/item/weapon/crowbar) && machine_flags & CROWDESTROY)
|
||||
if(iscrowbar(O) && machine_flags & CROWDESTROY)
|
||||
if(panel_open)
|
||||
if(crowbarDestroy(user) == 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -29,7 +29,7 @@ var/list/mass_drivers = list()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(user, "You begin to unscrew the bolts off the [src]...")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, src, 30))
|
||||
@@ -122,7 +122,7 @@ var/list/mass_drivers = list()
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(src),3)
|
||||
qdel(src)
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
to_chat(user, "You begin to anchor \the [src] on the floor.")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 10) && (build == 0))
|
||||
@@ -132,7 +132,7 @@ var/list/mass_drivers = list()
|
||||
update_icon()
|
||||
return 1
|
||||
if(1) // Fixed to the floor
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
to_chat(user, "You begin to de-anchor \the [src] from the floor.")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, src, 10) && (build == 1))
|
||||
@@ -175,7 +175,7 @@ var/list/mass_drivers = list()
|
||||
build++
|
||||
update_icon()
|
||||
if(3) // Wired
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
to_chat(user, "You begin to remove the wiring from \the [src].")
|
||||
if(do_after(user, src, 10) && (build == 3))
|
||||
new /obj/item/stack/cable_coil(loc,3)
|
||||
@@ -195,7 +195,7 @@ var/list/mass_drivers = list()
|
||||
update_icon()
|
||||
return 1
|
||||
if(4) // Grille in place
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
to_chat(user, "You begin to pry off the grille from \the [src]...")
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
if(do_after(user, src, 30) && (build == 4))
|
||||
@@ -203,7 +203,7 @@ var/list/mass_drivers = list()
|
||||
build--
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(user, "You finalize the Mass Driver...")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/machinery/mass_driver/M = new(get_turf(src))
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
if(..(W, user) == 1)
|
||||
return 1 // resolved for click code!
|
||||
|
||||
/*if (istype(W, /obj/item/weapon/wirecutters))
|
||||
/*if (iswirecutter(W))
|
||||
add_fingerprint(user)
|
||||
src.disable = !src.disable
|
||||
if (src.disable)
|
||||
|
||||
@@ -357,7 +357,7 @@ Status: []<BR>"},
|
||||
on = 1 // turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
|
||||
/obj/machinery/porta_turret/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
|
||||
// If the turret is destroyed, you can remove it with a crowbar to
|
||||
// try and salvage its components
|
||||
@@ -381,7 +381,7 @@ Status: []<BR>"},
|
||||
|
||||
..()
|
||||
|
||||
if((istype(W, /obj/item/weapon/wrench)) && (!on))
|
||||
if((iswrench(W)) && (!on))
|
||||
if(raised) return
|
||||
// This code handles moving the turret around. After all, it's a portable turret!
|
||||
|
||||
@@ -778,14 +778,14 @@ Status: []<BR>"},
|
||||
// this is a bit unweildy but self-explanitory
|
||||
switch(build_step)
|
||||
if(0) // first step
|
||||
if(istype(W, /obj/item/weapon/wrench) && !anchored)
|
||||
if(iswrench(W) && !anchored)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
|
||||
anchored = 1
|
||||
build_step = 1
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && !anchored)
|
||||
else if(iscrowbar(W) && !anchored)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 75, 1)
|
||||
to_chat(user, "You dismantle the turret construction.")
|
||||
//new /obj/item/stack/sheet/metal( loc, 5)
|
||||
@@ -805,7 +805,7 @@ Status: []<BR>"},
|
||||
returnToPool(W)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1)
|
||||
to_chat(user, "You unfasten the external bolts.")
|
||||
anchored = 0
|
||||
@@ -814,7 +814,7 @@ Status: []<BR>"},
|
||||
|
||||
|
||||
if(2)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>You bolt the metal armor into place.</span>")
|
||||
build_step = 3
|
||||
@@ -849,7 +849,7 @@ Status: []<BR>"},
|
||||
qdel(W) // delete the gun :(
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
to_chat(user, "You remove the turret's metal armor bolts.")
|
||||
build_step = 2
|
||||
@@ -866,7 +866,7 @@ Status: []<BR>"},
|
||||
// attack_hand() removes the gun
|
||||
|
||||
if(5)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
build_step = 6
|
||||
to_chat(user, "<span class='notice'>You close the internal access hatch.</span>")
|
||||
@@ -884,14 +884,14 @@ Status: []<BR>"},
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(isscrewdriver(W))
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
build_step = 5
|
||||
to_chat(user, "You open the internal access hatch.")
|
||||
return
|
||||
|
||||
if(7)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.isOn()) return
|
||||
if (WT.get_fuel() < 5)
|
||||
@@ -911,7 +911,7 @@ Status: []<BR>"},
|
||||
Turret.update_gun()
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
else if(iscrowbar(W))
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 75, 1)
|
||||
to_chat(user, "You pry off the turret's exterior armor.")
|
||||
//new /obj/item/stack/sheet/metal( loc, 2)
|
||||
@@ -1105,7 +1105,7 @@ Status: []<BR>"},
|
||||
sleep(40)
|
||||
Parent_Turret.on = 1
|
||||
|
||||
else if((istype(W, /obj/item/weapon/wrench)) && (!Parent_Turret.on))
|
||||
else if((iswrench(W)) && (!Parent_Turret.on))
|
||||
if(Parent_Turret.raised) return
|
||||
|
||||
if(!Parent_Turret.anchored)
|
||||
|
||||
@@ -395,7 +395,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
|
||||
//deconstruction and hacking
|
||||
/obj/machinery/requests_console/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/crowbar))
|
||||
if (iscrowbar(O))
|
||||
if(open)
|
||||
open = 0
|
||||
icon_state="req_comp0"
|
||||
@@ -405,7 +405,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
icon_state="req_comp_open"
|
||||
else
|
||||
icon_state="req_comp_rewired"
|
||||
if (istype(O, /obj/item/weapon/screwdriver))
|
||||
if (isscrewdriver(O))
|
||||
if(open)
|
||||
if(!hackState)
|
||||
hackState = 1
|
||||
|
||||
@@ -22,25 +22,25 @@
|
||||
|
||||
switch(construct_op)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(P))
|
||||
to_chat(user, "You unfasten the bolts.")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
construct_op ++
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(P))
|
||||
to_chat(user, "You fasten the bolts.")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
construct_op --
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
to_chat(user, "You dislodge the external plating.")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1)
|
||||
construct_op ++
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
if(iswrench(P))
|
||||
to_chat(user, "You secure the external plating.")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 75, 1)
|
||||
construct_op --
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(P))
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
to_chat(user, "You remove the cables.")
|
||||
construct_op ++
|
||||
@@ -60,7 +60,7 @@
|
||||
stat &= ~BROKEN // the machine's not borked anymore!
|
||||
else
|
||||
to_chat(user, "You need more cable")
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(P))
|
||||
to_chat(user, "You begin prying out the circuit board and components...")
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
if(do_after(user, src,60))
|
||||
|
||||
@@ -358,7 +358,7 @@ var/global/num_vending_terminals = 1
|
||||
to_chat(user, "<span class='notice'>You slot some cardboard into the machine into [src].</span>")
|
||||
cardboard = 1
|
||||
src.updateUsrDialog()
|
||||
if(istype(W, /obj/item/device/multitool)||istype(W, /obj/item/weapon/wirecutters))
|
||||
if(istype(W, /obj/item/device/multitool)||iswirecutter(W))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
@@ -1326,7 +1326,7 @@ var/global/num_vending_terminals = 1
|
||||
/obj/machinery/wallmed_frame/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
switch(build)
|
||||
if(0) // Empty hull
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(usr, "You begin removing screws from \the [src] backplate...")
|
||||
if(do_after(user, src, 50))
|
||||
to_chat(usr, "<span class='notice'>You unscrew \the [src] from the wall.</span>")
|
||||
@@ -1349,7 +1349,7 @@ var/global/num_vending_terminals = 1
|
||||
update_icon()
|
||||
return 1
|
||||
if(1) // Circuitboard installed
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
to_chat(usr, "You begin to pry out \the [W] into \the [src].")
|
||||
if(do_after(user, src, 10))
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
@@ -1378,7 +1378,7 @@ var/global/num_vending_terminals = 1
|
||||
"<span class='warning'>[user.name] has added cables to \the [src]!</span>",\
|
||||
"You add cables to \the [src].")
|
||||
if(2) // Circuitboard installed, wired.
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
to_chat(usr, "You begin to remove the wiring from \the [src].")
|
||||
if(do_after(user, src, 50))
|
||||
new /obj/item/stack/cable_coil(loc,5)
|
||||
@@ -1388,7 +1388,7 @@ var/global/num_vending_terminals = 1
|
||||
build--
|
||||
update_icon()
|
||||
return 1
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(user, "You begin to complete \the [src]...")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, src, 20))
|
||||
@@ -1401,7 +1401,7 @@ var/global/num_vending_terminals = 1
|
||||
"You finish \the [src].")
|
||||
return 1
|
||||
if(3) // Waiting for a recharge pack
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
to_chat(user, "You begin to unscrew \the [src]...")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, src, 30))
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(iswrench(W))
|
||||
if(state==STATE_BOLTSEXPOSED)
|
||||
state = STATE_BOLTSOPENED
|
||||
to_chat(user, "You undo the securing bolts.")
|
||||
@@ -758,7 +758,7 @@
|
||||
to_chat(user, "You tighten the securing bolts.")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
else if(iscrowbar(W))
|
||||
if(state==STATE_BOLTSOPENED)
|
||||
var/list/removable_components = list()
|
||||
if(cell) removable_components += "power cell"
|
||||
@@ -791,7 +791,7 @@
|
||||
else
|
||||
to_chat(user, "There's not enough wire to finish the task.")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(isscrewdriver(W))
|
||||
if(hasInternalDamage(MECHA_INT_TEMP_CONTROL))
|
||||
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
|
||||
to_chat(user, "You repair the damaged temperature controller.")
|
||||
@@ -827,7 +827,7 @@
|
||||
to_chat(user, "There's already an electropack installed.")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != I_HURT)
|
||||
else if(iswelder(W) && user.a_intent != I_HURT)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
if (hasInternalDamage(MECHA_INT_TANK_BREACH))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "You don't see anything that can be cut with [W].")
|
||||
return
|
||||
@@ -61,7 +61,7 @@
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "You failed to salvage anything valuable from [src].")
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
if(!isemptylist(crowbar_salvage))
|
||||
var/obj/S = pick(crowbar_salvage)
|
||||
if(S)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
var/cant_drop = 0 //If 1, can't drop it from hands!
|
||||
|
||||
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
src.name += " ([t])"
|
||||
src.overlays += image(src.icon, "bodybag_label")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
else if(iswirecutter(W))
|
||||
to_chat(user, "You cut the tag off the bodybag")
|
||||
src.name = "body bag"
|
||||
src.overlays.len = 0
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
var/wrenching = 0
|
||||
|
||||
/obj/item/device/deskbell/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/weapon/wrench) && isturf(src.loc))
|
||||
if(iswrench(W) && isturf(src.loc))
|
||||
user.visible_message(
|
||||
"[user] begins to [anchored ? "undo" : "wrench"] \the [src]'s securing bolts.",
|
||||
"You begin to [anchored ? "undo" : "wrench"] \the [src]'s securing bolts..."
|
||||
@@ -128,7 +128,7 @@
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
/obj/item/device/deskbell/signaler/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
user.visible_message(
|
||||
"[user] begins to [anchored ? "undo" : "wrench"] \the [src]'s securing bolts.",
|
||||
"You begin to [anchored ? "undo" : "wrench"] \the [src]'s securing bolts..."
|
||||
@@ -275,7 +275,7 @@
|
||||
else
|
||||
switch(build_step)
|
||||
if(0)
|
||||
if(istype(W,/obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
to_chat(user, "<span class='notice'>You deconstruct \the [src].</span>")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
//new /obj/item/stack/sheet/metal( get_turf(src.loc), 2)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(C.lit)
|
||||
lit(user,W)
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
fuse_lit = 0
|
||||
update_icon()
|
||||
to_chat(user, "<span class='warning'>You extinguish the fuse with [seconds_left] seconds left!</span>")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/obj/structure/cable/attached // the attached cable
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(I))
|
||||
if(mode == 0)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
if (!( isscrewdriver(W) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
if(keyslot)
|
||||
|
||||
|
||||
|
||||
@@ -261,10 +261,10 @@
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
if (!( isscrewdriver(W) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
if(keyslot1 || keyslot2)
|
||||
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
user.set_machine(src)
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) ))
|
||||
if (!( isscrewdriver(W) ))
|
||||
return
|
||||
b_stat = !( b_stat )
|
||||
if (b_stat)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/mounted/frame/driver_button/signaler_button/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
new /obj/item/stack/sheet/metal(get_turf(src.loc))
|
||||
var/obj/item/device/assembly/signaler/I = new (get_turf(src.loc))
|
||||
I.code = src.code
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/mounted/frame/attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench) && sheets_refunded)
|
||||
if (iswrench(W) && sheets_refunded)
|
||||
//new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
var/obj/item/stack/sheet/S = getFromPool(frame_material, get_turf(src))
|
||||
S.amount = sheets_refunded
|
||||
|
||||
@@ -73,7 +73,7 @@ obj/structure/sign/poster/New(var/serial)
|
||||
..()
|
||||
|
||||
obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
|
||||
@@ -113,7 +113,7 @@ var/global/list/datum/stack_recipe/cable_recipes = list ( \
|
||||
// - Wirecutters : Cut a piece off
|
||||
// - Cable coil : Merge the cables
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
if((istype(W, /obj/item/weapon/wirecutters)) && (amount > 1))
|
||||
if((iswirecutter(W)) && (amount > 1))
|
||||
use(1)
|
||||
getFromPool(/obj/item/stack/cable_coil, user.loc, 1, _color)
|
||||
to_chat(user, "<span class='notice'>You cut a piece off the cable coil.</span>")
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
return .
|
||||
|
||||
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(I))
|
||||
open_panel = !open_panel
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
|
||||
else if(iswirecutter(I) || ismultitool(I) || istype(I, /obj/item/device/assembly/signaler ))
|
||||
wires.Interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/item/weapon/extinguisher/attackby(obj/item/W, mob/user)
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
if(!is_open_container())
|
||||
user.visible_message("[user] begins to unwrench the fill cap on \the [src].","<span class='notice'>You begin to unwrench the fill cap on \the [src].</span>")
|
||||
if(do_after(user, src, 25))
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
to_chat(user, "<span class='notice'>You can't move.</span>")
|
||||
|
||||
/obj/structure/strange_present/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if (iswirecutter(W))
|
||||
to_chat(user, "<span class='notice'>You cut open the present.</span>")
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
to_chat(user, "<span class='warning'> \the [W] is empty.</span>")
|
||||
else if (istype(W,/obj/item/slime_extract))
|
||||
to_chat(user, "<span class='warning'> This grenade case is too small for a slime core to fit in it.</span>")
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
else if(iscrowbar(W))
|
||||
to_chat(user, "You begin pressing \the [W] into \the [src].")
|
||||
if(do_after(user, src, 30))
|
||||
to_chat(user, "You poke a hole in \the [src].")
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
to_chat(user, "<span class='info'>\The [src.name] has maximum charge!</span>")
|
||||
|
||||
/obj/item/weapon/stock_parts/capacitor/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
if(!istype(src.loc, /turf))
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be on the ground to be secured.</span>")
|
||||
return
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/briefcase/false_bottomed/attackby(var/obj/item/item, mob/user)
|
||||
if(istype(item, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(item))
|
||||
if(!bottom_open && !busy_hunting)
|
||||
to_chat(user, "You begin to hunt around the rim of \the [src]...")
|
||||
busy_hunting = 1
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
to_chat(user, "You short out the lock on [src].")
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (isscrewdriver(W))
|
||||
if (do_after(user, src, 20))
|
||||
src.open =! src.open
|
||||
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(isscrewdriver(W))
|
||||
if(bcell)
|
||||
bcell.updateicon()
|
||||
bcell.loc = get_turf(src.loc)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
/obj/item/weapon/table_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
var/obj/item/stack/sheet/metal/M = getFromPool(/obj/item/stack/sheet/metal, get_turf(src))
|
||||
M.amount = 1
|
||||
//SN src = null
|
||||
@@ -39,7 +39,7 @@
|
||||
* Reinforced Table Parts
|
||||
*/
|
||||
/obj/item/weapon/table_parts/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
var/obj/item/stack/sheet/metal/M = getFromPool(/obj/item/stack/sheet/metal, get_turf(src))
|
||||
M.amount = 1
|
||||
new /obj/item/stack/rods( user.loc )
|
||||
@@ -55,7 +55,7 @@
|
||||
* Wooden Table Parts
|
||||
*/
|
||||
/obj/item/weapon/table_parts/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
new /obj/item/stack/sheet/wood( user.loc )
|
||||
qdel(src)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
*/
|
||||
|
||||
/obj/item/weapon/table_parts/wood/poker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
new /obj/item/stack/sheet/wood( user.loc )
|
||||
new /obj/item/stack/tile/grass( user.loc )
|
||||
qdel(src)
|
||||
@@ -97,7 +97,7 @@
|
||||
*/
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
var/obj/item/stack/sheet/metal/M = getFromPool(/obj/item/stack/sheet/metal, get_turf(src))
|
||||
M.amount = 1
|
||||
qdel(src)
|
||||
|
||||
@@ -557,7 +557,6 @@
|
||||
origin_tech = "engineering=1"
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
|
||||
|
||||
suicide_act(mob/user)
|
||||
to_chat(viewers(user), "<span class='danger'>[user] is smashing \his head in with the [src.name]! It looks like \he's trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
@@ -166,7 +166,7 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
||||
I = null
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||
else if(iswirecutter(I))
|
||||
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
||||
|
||||
user.before_take_item(I)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/obj/structure/window/barricade/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar) && user.a_intent == I_HURT && !busy) //Only way to deconstruct, needs harm intent
|
||||
if(iscrowbar(W) && user.a_intent == I_HURT && !busy) //Only way to deconstruct, needs harm intent
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
user.visible_message("<span class='warning'>[user] starts struggling to pry \the [src] back into planks.</span>", \
|
||||
"<span class='notice'>You start struggling to pry \the [src] back into planks.</span>")
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob)
|
||||
if(!C || !user)
|
||||
return 0
|
||||
if(istype(C, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(C))
|
||||
to_chat(user, "<span class='notice'>You begin undoing the screws holding the catwalk together.</span>")
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 80, 1)
|
||||
if(do_after(user, src, 30) && src)
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
if(user.drop_item(W, src.loc))
|
||||
to_chat(user, "<span class='notice'>You attach [W] to [src].</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
else if(iswirecutter(W))
|
||||
if(rigged)
|
||||
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
new /obj/item/stack/sheet/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/O in contents)
|
||||
@@ -33,7 +33,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/lisa/attackby(obj/item/weapon/W as obj, mob/user as mob) //ugly but oh well
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
new /mob/living/simple_animal/corgi/Lisa(loc)
|
||||
..()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/cow/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
..()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/goat/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
|
||||
..()
|
||||
|
||||
@@ -60,14 +60,14 @@
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/chick/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
var/num = rand(4, 6)
|
||||
for(var/i = 0, i < num, i++)
|
||||
new /mob/living/simple_animal/chick(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/porcelain/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
var/obj/structure/toilet/T = new (loc)
|
||||
T.anchored = 0
|
||||
var/obj/structure/sink/S = new (loc)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
circuit.installed = 1
|
||||
state++
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
var/obj/machinery/constructable_frame/machine_frame/MF = new /obj/machinery/constructable_frame/machine_frame(T)
|
||||
MF.state = 1
|
||||
MF.set_build_state(1)
|
||||
@@ -43,7 +43,7 @@
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
circuit.loc=T
|
||||
circuit.installed = 0
|
||||
circuit=null
|
||||
@@ -194,7 +194,7 @@
|
||||
else
|
||||
to_chat(user, "\icon[src] <span class='notice'>You close \the [src] and swipe your card, locking it.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && (!locked || destroyed))
|
||||
else if(iscrowbar(W) && (!locked || destroyed))
|
||||
user.visible_message("[user.name] pries \the [src] apart.", \
|
||||
"You pry \the [src] apart.", \
|
||||
"You hear something pop.")
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
else if(iswrench(W) && state == 0)
|
||||
busy = 1
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
if(anchored)
|
||||
@@ -230,7 +230,7 @@
|
||||
to_chat(user, "<span class='notice'>You wire the Airlock!</span>")
|
||||
busy = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
else if(iswirecutter(W) && state == 1 )
|
||||
busy = 1
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
@@ -260,7 +260,7 @@
|
||||
W.loc = src.loc
|
||||
busy = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
else if(iscrowbar(W) && state == 2 )
|
||||
busy = 1
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
@@ -303,7 +303,7 @@
|
||||
glass = "[M]"
|
||||
busy = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
else if(isscrewdriver(W) && state == 2 )
|
||||
busy = 1
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
if(T.density)
|
||||
to_chat(user, "<span class='warning'>The wall is blocked!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
|
||||
if(!mineral || mineral == "metal")
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
@@ -262,7 +262,7 @@
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving.</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
var/turf/T = get_turf(src)
|
||||
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
|
||||
T.ChangeTurf(/turf/simulated/wall/r_wall) //Why not make rwall?
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
icon_state = "displaced_wood"
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
if(state == 0) //Normal girder or wooden girder
|
||||
if(anchored && !istype(src, /obj/structure/girder/displaced)) //Anchored, destroy it
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
@@ -70,7 +70,7 @@
|
||||
getFromPool(material, get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2) //Unsecuring support struts, stage 2 to 1
|
||||
else if(isscrewdriver(W) && state == 2) //Unsecuring support struts, stage 2 to 1
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] starts unsecuring \the [src]'s internal support struts.</span>", \
|
||||
"<span class='notice'>You start unsecuring \the [src]'s internal support struts.</span>")
|
||||
@@ -82,7 +82,7 @@
|
||||
state = 1
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 1) //Securing support struts, stage 1 to 2
|
||||
else if(isscrewdriver(W) && state == 1) //Securing support struts, stage 1 to 2
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("<span class='notice'>[user] starts securing \the [src]'s internal support struts.</span>", \
|
||||
"<span class='notice'>You start securing \the [src]'s internal support struts.</span>")
|
||||
@@ -94,7 +94,7 @@
|
||||
state = 2
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1) //Removing support struts, stage 1 to 0 (normal girder)
|
||||
else if(iswirecutter(W) && state == 1) //Removing support struts, stage 1 to 0 (normal girder)
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] starts removing \the [src]'s internal support struts.</span>", \
|
||||
"<span class='notice'>You start removing \the [src]'s internal support struts.</span>")
|
||||
@@ -127,7 +127,7 @@
|
||||
state = 1
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored) //Turning normal girder into disloged girder
|
||||
else if(iscrowbar(W) && state == 0 && anchored) //Turning normal girder into disloged girder
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] starts dislodging \the [src].</span>", \
|
||||
"<span class='notice'>You start dislodging \the [src].</span>")
|
||||
@@ -372,7 +372,7 @@
|
||||
layer = 2
|
||||
|
||||
/obj/structure/cultgirder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("<span class='notice'>[user] starts disassembling \the [src].</span>", \
|
||||
"<span class='notice'>You start disassembling \the [src].</span>")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='warning'>You can't disassemble [src] with meat and gore all over it.</span>")
|
||||
return
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (iswrench(O))
|
||||
if (anchored)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to loosen \the [src]'s casters...</span>")
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
if(isscrewdriver(tool) && !istype(src, /obj/structure/sign/double))
|
||||
to_chat(user, "You unfasten the sign with your [tool].")
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
@@ -57,7 +57,7 @@
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && isturf(user.loc))
|
||||
if(isscrewdriver(tool) && isturf(user.loc))
|
||||
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
|
||||
if(direction == "Cancel") return
|
||||
var/obj/structure/sign/S = new(user.loc)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/mob/living/carbon/human/supported_mob
|
||||
|
||||
/obj/structure/support_rail/attackby(obj/item/weapon/W, mob/living/carbon/human/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
var/obj/item/stack/sheet/metal/M = getFromPool(/obj/item/stack/sheet/metal, get_turf(src))
|
||||
M.amount = 1
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
returnToPool(W)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench) && can_disassemble())
|
||||
if (iswrench(W) && can_disassemble())
|
||||
//if(!params_list.len || text2num(params_list["icon-y"]) < 8) //8 above the bottom of the icon
|
||||
to_chat(user, "<span class='notice'>Now disassembling table</span>")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
@@ -648,7 +648,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (iswrench(W))
|
||||
new /obj/item/weapon/rack_parts( src.loc )
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
del(src)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
if(iswrench(I))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
|
||||
anchored = 0
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(I))
|
||||
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>")
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(do_after(user, src, 30))
|
||||
|
||||
@@ -102,7 +102,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
src.name = "Anchored Windoor Assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored)
|
||||
else if(iswrench(W) && anchored)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
|
||||
|
||||
@@ -185,7 +185,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
W.forceMove(src.loc)
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && electronics)
|
||||
else if(isscrewdriver(W) && electronics)
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
if(WINDOWSECURE) //Reinforced, fully secured
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user.visible_message("<span class='warning'>[user] unfastens \the [src] from its frame.</span>", \
|
||||
"<span class='notice'>You unfasten \the [src] from its frame.</span>")
|
||||
@@ -282,14 +282,14 @@
|
||||
|
||||
if(WINDOWUNSECUREFRAME)
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user.visible_message("<span class='notice'>[user] fastens \the [src] to its frame.</span>", \
|
||||
"<span class='notice'>You fasten \the [src] to its frame.</span>")
|
||||
d_state = WINDOWSECURE
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
user.visible_message("<span class='warning'>[user] pries \the [src] from its frame.</span>", \
|
||||
"<span class='notice'>You pry \the [src] from its frame.</span>")
|
||||
@@ -298,14 +298,14 @@
|
||||
|
||||
if(WINDOWLOOSEFRAME)
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
user.visible_message("<span class='notice'>[user] pries \the [src] into its frame.</span>", \
|
||||
"<span class='notice'>You pry \the [src] into its frame.</span>")
|
||||
d_state = WINDOWUNSECUREFRAME
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user.visible_message("<span class='warning'>[user] unfastens \the [src]'s frame from the floor.</span>", \
|
||||
"<span class='notice'>You unfasten \the [src]'s frame from the floor.</span>")
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
if(WINDOWLOOSE)
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user.visible_message("<span class='notice'>[user] fastens \the [src]'s frame to the floor.</span>", \
|
||||
"<span class='notice'>You fasten \the [src]'s frame to the floor.</span>")
|
||||
@@ -353,7 +353,7 @@
|
||||
|
||||
else if(!reinforced) //Normal window steps
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user.visible_message("<span class='[d_state ? "warning":"notice"]'>[user] [d_state ? "un":""]fastens \the [src].</span>", \
|
||||
"<span class='notice'>You [d_state ? "un":""]fasten \the [src].</span>")
|
||||
|
||||
@@ -32,7 +32,7 @@ var/list/mechtoys = list(
|
||||
var/airtight = 0
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/crowbar) && anchored == 1)
|
||||
if(iscrowbar(I) && anchored == 1)
|
||||
if(airtight == 0)
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
else
|
||||
@@ -42,7 +42,7 @@ var/list/mechtoys = list(
|
||||
name = "\improper [airtight? "Airtight p" : "P"]lastic flaps"
|
||||
desc = "[airtight? "Heavy duty, airtight, plastic flaps." : "I definitely can't get past those. No way."]"
|
||||
return 1
|
||||
if(istype(I, /obj/item/weapon/wrench) && airtight != 1)
|
||||
if(iswrench(I) && airtight != 1)
|
||||
if(anchored == 0)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
else
|
||||
@@ -567,7 +567,7 @@ var/list/mechtoys = list(
|
||||
to_chat(user, "<span class='notice'>Special supplies unlocked.</span>")
|
||||
hacked = 1
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(I))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, src, 20))
|
||||
if (stat & BROKEN)
|
||||
|
||||
@@ -480,7 +480,7 @@ turf/simulated/floor/update_icon()
|
||||
if(!C || !user)
|
||||
return 0
|
||||
|
||||
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())))
|
||||
if(iscrowbar(C) && (!(is_plating())))
|
||||
if(broken || burnt)
|
||||
to_chat(user, "<span class='warning'>You remove the broken plating.</span>")
|
||||
else
|
||||
@@ -496,7 +496,7 @@ turf/simulated/floor/update_icon()
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 80, 1)
|
||||
|
||||
return
|
||||
else if(istype(C, /obj/item/weapon/screwdriver))
|
||||
else if(isscrewdriver(C))
|
||||
if(is_wood_floor())
|
||||
if(broken || burnt)
|
||||
return
|
||||
@@ -570,7 +570,7 @@ turf/simulated/floor/update_icon()
|
||||
make_plating()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot shovel this.</span>")
|
||||
else if(istype(C, /obj/item/weapon/weldingtool))
|
||||
else if(iswelder(C))
|
||||
var/obj/item/weapon/weldingtool/welder = C
|
||||
if(welder.isOn() && (is_plating()))
|
||||
if(broken || burnt)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
if(istype(C, /obj/item/weapon/wrench))
|
||||
if(iswrench(C))
|
||||
to_chat(user, "<span class='notice'>Removing rods...</span>")
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 80, 1)
|
||||
if(do_after(user, src, 30) && istype(src, /turf/simulated/floor/engine)) // Somehow changing the turf does NOT kill the current running proc.
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
//Deconstruction and reconstruction
|
||||
switch(d_state)
|
||||
if(WALLCOMPLETED)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(iswirecutter(W))
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
src.d_state = WALLCOVEREXPOSED
|
||||
update_icon()
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
|
||||
if(WALLCOVEREXPOSED)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(isscrewdriver(W))
|
||||
user.visible_message("<span class='warning'>[user] begins unsecuring \the [src]'s external cover.</span>", \
|
||||
"<span class='notice'>You begin unsecuring \the [src]'s external cover.</span>")
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
@@ -138,7 +138,7 @@
|
||||
return
|
||||
|
||||
//Repairing outer grille, use welding tool
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
else if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
user.visible_message("<span class='notice'>[user] begins mending the damage on \the [src]'s outer grille.</span>", \
|
||||
@@ -157,7 +157,7 @@
|
||||
return
|
||||
|
||||
if(WALLCOVERUNSECURED)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(W))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
@@ -194,7 +194,7 @@
|
||||
return
|
||||
|
||||
//Re-secure external cover, unsurprisingly exact same step as above
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(isscrewdriver(W))
|
||||
user.visible_message("<span class='notice'>[user] begins securing \the [src]'s external cover.</span>", \
|
||||
"<span class='notice'>You begin securing \the [src]'s external cover.</span>")
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
@@ -207,7 +207,7 @@
|
||||
return
|
||||
|
||||
if(WALLCOVERWEAKENED)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
|
||||
user.visible_message("<span class='warning'>[user] starts prying off \the [src]'s external cover.</span>", \
|
||||
"<span class='notice'>You struggle to pry off \the [src]'s external cover.</span>", \
|
||||
@@ -224,7 +224,7 @@
|
||||
return
|
||||
|
||||
//Fix welding damage caused above, by welding shit into place again
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
else if(iswelder(W))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
@@ -245,7 +245,7 @@
|
||||
return
|
||||
|
||||
if(WALLCOVERREMOVED)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
|
||||
user.visible_message("<span class='warning'>[user] starts loosening the bolts anchoring \the [src]'s external support rods.</span>", \
|
||||
"<span class='notice'>You start loosening the bolts anchoring \the [src]'s external support rods.</span>")
|
||||
@@ -275,7 +275,7 @@
|
||||
return
|
||||
|
||||
if(WALLRODSUNSECURED)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(iswelder(W))
|
||||
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
@@ -308,7 +308,7 @@
|
||||
return
|
||||
|
||||
//Repair step, tighten the anchoring bolts
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
else if(iswrench(W))
|
||||
|
||||
user.visible_message("<span class='notice'>[user] starts tightening the bolts anchoring \the [src]'s external support rods.</span>", \
|
||||
"<span class='notice'>You start tightening the bolts anchoring \the [src]'s external support rods.</span>")
|
||||
@@ -322,7 +322,7 @@
|
||||
return
|
||||
|
||||
if(WALLRODSCUT)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
|
||||
user.visible_message("<span class='warning'>[user] starts prying off [src]'s internal cover.</span>", \
|
||||
"<span class='notice'>You struggle to pry off [src]'s internal cover.</span>")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(istype(W, /obj/item/device/analyzer))
|
||||
bombtank.attackby(W, user)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wrench) && !status) //This is basically bomb assembly code inverted. apparently it works.
|
||||
if(iswrench(W) && !status) //This is basically bomb assembly code inverted. apparently it works.
|
||||
|
||||
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
return
|
||||
|
||||
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(iswrench(W))
|
||||
var/turf/T = loc
|
||||
if(ismob(T))
|
||||
T = T.loc
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
if(n_name && Adjacent(user) && !user.stat)
|
||||
name = "[n_name]"
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(iscrowbar(W))
|
||||
to_chat(user, "You begin prying \the [src] off the wall.")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, src,10))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user