Merge pull request #3676 from Neerti/8/3/2017_tool_update

Updates Tools
This commit is contained in:
Anewbe
2017-08-04 14:05:06 -05:00
committed by GitHub
171 changed files with 905 additions and 516 deletions
+1
View File
@@ -30,6 +30,7 @@
if(istype(W, /obj/item/weapon/screwdriver))
status = !status
to_chat(user, "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>")
playsound(src, W.usesound, 50, 1)
add_fingerprint(user)
return
+1 -1
View File
@@ -142,7 +142,7 @@
if("fire")
damage = (W.force / fire_resist)
if(istype(W, /obj/item/weapon/weldingtool))
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
if("brute")
damage = (W.force / brute_resist)
+1 -1
View File
@@ -214,7 +214,7 @@
update_icon()
return
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 50, 1)
user.visible_message("<font color='red'>[user] cuts the fingertips off of the [src].</font>","<font color='red'>You cut the fingertips off of the [src].</font>")
clipped = 1
@@ -225,18 +225,22 @@
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
user << "You pop \the [tank] out of \the [src]'s storage compartment."
tank.forceMove(get_turf(src))
playsound(src, W.usesound, 50, 1)
src.tank = null
else if(choice == cooler)
user << "You pop \the [cooler] out of \the [src]'s storage compartment."
cooler.forceMove(get_turf(src))
playsound(src, W.usesound, 50, 1)
src.cooler = null
else if(choice == helmet)
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
helmet.forceMove(get_turf(src))
playsound(src, W.usesound, 50, 1)
src.helmet = null
else if(choice == boots)
user << "You detatch \the [boots] from \the [src]'s boot mounts."
boots.forceMove(get_turf(src))
playsound(src, W.usesound, 50, 1)
src.boots = null
else
user << "\The [src] does not have anything installed."
+2 -2
View File
@@ -488,8 +488,8 @@
else
user.visible_message("<span class='warning'>\The [user] begins unsecuring \the [src] from the floor.</span>",
"You begin unsecuring \the [src] from the floor.")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(!do_after(user, 20))
playsound(src, W.usesound, 50, 1)
if(!do_after(user, 20 * W.toolspeed))
manipulating = 0
return
if(!anchored)
+5 -5
View File
@@ -8,11 +8,11 @@ var/global/list/description_icons = list(
"radiation_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="radiation_protection"),
"biohazard_armor" = image(icon='icons/mob/screen1_stats.dmi',icon_state="biohazard_protection"),
"welder" = image(icon='icons/obj/items.dmi',icon_state="welder"),
"wirecutters" = image(icon='icons/obj/items.dmi',icon_state="cutters"),
"screwdriver" = image(icon='icons/obj/items.dmi',icon_state="screwdriver"),
"wrench" = image(icon='icons/obj/items.dmi',icon_state="wrench"),
"crowbar" = image(icon='icons/obj/items.dmi',icon_state="crowbar"),
"welder" = image(icon='icons/obj/tools.dmi',icon_state="welder"),
"wirecutters" = image(icon='icons/obj/tools.dmi',icon_state="cutters"),
"screwdriver" = image(icon='icons/obj/tools.dmi',icon_state="screwdriver"),
"wrench" = image(icon='icons/obj/tools.dmi',icon_state="wrench"),
"crowbar" = image(icon='icons/obj/tools.dmi',icon_state="crowbar"),
"multitool" = image(icon='icons/obj/device.dmi',icon_state="multitool"),
"metal sheet" = image(icon='icons/obj/items.dmi',icon_state="sheet-metal"),
@@ -43,6 +43,7 @@
return
else if(istype(I, /obj/item/weapon/wrench))
anchored = !anchored
playsound(loc, I.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] [anchored ? "wrenches" : "unwrenches"] \the [src].</span>", "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
return
else if(istype(I, /obj/item/bee_smoker))
@@ -111,7 +112,7 @@
user << "<span class='notice'>You can't dismantle \the [src] with these bees inside.</span>"
return
user << "<span class='notice'>You start dismantling \the [src]...</span>"
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 30))
user.visible_message("<span class='notice'>[user] dismantles \the [src].</span>", "<span class='notice'>You dismantle \the [src].</span>")
new /obj/item/beehive_assembly(loc)
+1 -1
View File
@@ -297,7 +297,7 @@
user << "<span class='notice'>There are no seeds in \the [O.name].</span>"
return
else if(istype(O, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, O.usesound, 50, 1)
anchored = !anchored
user << "You [anchored ? "wrench" : "unwrench"] \the [src]."
+1 -1
View File
@@ -543,7 +543,7 @@
if(locate(/obj/machinery/atmospherics/portables_connector/) in loc)
return ..()
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, O.usesound, 50, 1)
anchored = !anchored
user << "You [anchored ? "wrench" : "unwrench"] \the [src]."
+4 -4
View File
@@ -25,7 +25,7 @@
I.loc = src
update_icon()
/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob)
/obj/structure/bookcase/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/book))
user.drop_item()
O.loc = src
@@ -37,13 +37,13 @@
else
name = ("bookcase ([newname])")
else if(istype(O,/obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, O.usesound, 100, 1)
user << (anchored ? "<span class='notice'>You unfasten \the [src] from the floor.</span>" : "<span class='notice'>You secure \the [src] to the floor.</span>")
anchored = !anchored
else if(istype(O,/obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(loc, O.usesound, 75, 1)
user << "<span class='notice'>You begin dismantling \the [src].</span>"
if(do_after(user,25))
if(do_after(user,25 * O.toolspeed))
user << "<span class='notice'>You dismantle \the [src].</span>"
new /obj/item/stack/material/wood(get_turf(src), 3)
for(var/obj/item/weapon/book/b in contents)
+1 -1
View File
@@ -310,7 +310,7 @@
user << "<span class='notice'>You can't anchor something to empty space. Idiot.</span>"
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You [anchored ? "un" : ""]anchor the brace.</span>"
anchored = !anchored
+2
View File
@@ -100,6 +100,7 @@
if(!locked)
open = !open
user << "<span class='notice'>Maintenance panel is now [open ? "opened" : "closed"].</span>"
playsound(src, O.usesound, 50, 1)
else
user << "<span class='notice'>You need to unlock the controls first.</span>"
return
@@ -108,6 +109,7 @@
if(open)
health = min(getMaxHealth(), health + 10)
user.visible_message("<span class='notice'>[user] repairs [src].</span>","<span class='notice'>You repair [src].</span>")
playsound(src, O.usesound, 50, 1)
else
user << "<span class='notice'>Unable to repair with the maintenance panel closed.</span>"
else
+1 -1
View File
@@ -168,7 +168,7 @@
if(8)
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
var/turf/T = get_turf(user)
user << "<span class='notice'>Now attaching the gun to the frame...</span>"
sleep(40)
+4 -2
View File
@@ -697,16 +697,18 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c
else if(istype(W, /obj/item/weapon/wrench))
if(anchored)
playsound(src, W.usesound, 50, 1)
user.visible_message("<font color='blue'>\The [user] starts to unbolt \the [src] from the plating...</font>")
if(!do_after(user,40))
if(!do_after(user,40 * W.toolspeed))
user.visible_message("<font color='blue'>\The [user] decides not to unbolt \the [src].</font>")
return
user.visible_message("<font color='blue'>\The [user] finishes unfastening \the [src]!</font>")
anchored = 0
return
else
playsound(src, W.usesound, 50, 1)
user.visible_message("<font color='blue'>\The [user] starts to bolt \the [src] to the plating...</font>")
if(!do_after(user,40))
if(!do_after(user,40 * W.toolspeed))
user.visible_message("<font color='blue'>\The [user] decides not to bolt \the [src].</font>")
return
user.visible_message("<font color='blue'>\The [user] finishes fastening down \the [src]!</font>")
@@ -576,6 +576,7 @@
else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
playsound(src, W.usesound, 50, 1)
updateicon()
else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio
@@ -153,7 +153,7 @@ var/global/list/robot_modules = list(
/obj/item/weapon/robot_module/robot/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/weapon/crowbar/cyborg(src)
src.modules += new /obj/item/weapon/extinguisher(src)
/obj/item/weapon/robot_module/robot/standard
@@ -177,7 +177,7 @@ var/global/list/robot_modules = list(
/obj/item/weapon/robot_module/robot/standard/New()
..()
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.emag = new /obj/item/weapon/melee/energy/sword(src)
@@ -354,8 +354,8 @@ var/global/list/robot_modules = list(
..()
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/rcd/borg(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/screwdriver/cyborg(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src)
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/device/pipe_painter(src)
@@ -395,9 +395,9 @@ var/global/list/robot_modules = list(
..()
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/wirecutters(src)
src.modules += new /obj/item/weapon/screwdriver/cyborg(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/weapon/wirecutters/cyborg(src)
src.modules += new /obj/item/device/multitool(src)
src.modules += new /obj/item/device/t_scanner(src)
src.modules += new /obj/item/device/analyzer(src)
@@ -676,8 +676,8 @@ var/global/list/robot_modules = list(
/obj/item/weapon/robot_module/robot/miner/New()
..()
src.modules += new /obj/item/borg/sight/material(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/weapon/screwdriver/cyborg(src)
src.modules += new /obj/item/weapon/storage/bag/ore(src)
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
@@ -710,9 +710,9 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/device/robotanalyzer(src)
src.modules += new /obj/item/weapon/card/robot(src)
src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/wirecutters(src)
src.modules += new /obj/item/weapon/screwdriver/cyborg(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/weapon/wirecutters/cyborg(src)
src.modules += new /obj/item/device/multitool(src)
src.modules += new /obj/item/weapon/surgical/scalpel(src)
src.modules += new /obj/item/weapon/surgical/circular_saw(src)
@@ -809,10 +809,10 @@ var/global/list/robot_modules = list(
..()
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/weldingtool/electric/mounted(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/weapon/wirecutters(src)
src.modules += new /obj/item/weapon/screwdriver/cyborg(src)
src.modules += new /obj/item/weapon/wrench/cyborg(src)
src.modules += new /obj/item/weapon/crowbar/cyborg(src)
src.modules += new /obj/item/weapon/wirecutters/cyborg(src)
src.modules += new /obj/item/device/multitool(src)
src.modules += new /obj/item/device/lightreplacer(src)
src.modules += new /obj/item/weapon/gripper(src)
+4 -3
View File
@@ -40,13 +40,14 @@
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, P.usesound, 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
else if(istype(P, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin taking the [name] apart.</span>"
if(do_after(user, 10))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, P.usesound, 50, 1)
if(do_after(user, 10 * P.toolspeed))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You take the [name] apart.</span>"
new /obj/item/stack/material/steel( src.loc, 4 )
for(var/obj/item/I in contents)
+1 -1
View File
@@ -41,7 +41,7 @@
empty_bin(user, W)
return
else if(istype(W, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
return
+1 -1
View File
@@ -141,7 +141,7 @@
else
user << "<span class='notice'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>"
else if(istype(O, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, O.usesound, 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
+4 -4
View File
@@ -142,17 +142,17 @@
if(!istype(W) || !user) return
if(istype(W, /obj/item/weapon/wrench))
if(!anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the anchor bolts to the floor.", \
"You hear a ratchet")
"You hear a ratchet.")
src.anchored = 1
connect_to_network()
else if(!linked_shielding.len > 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] unsecures the [src.name].", \
"You remove the anchor bolts.", \
"You hear a ratchet")
"You hear a ratchet.")
src.anchored = 0
disconnect_from_network()
else
+8 -7
View File
@@ -444,9 +444,9 @@
if (terminal)
to_chat(user,"<span class='warning'>Disconnect the wires first.</span>")
return
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
to_chat(user,"You begin to remove the power control board...") //lpeters - fixed grammar issues //Ner - grrrrrr
if(do_after(user, 50))
if(do_after(user, 50 * W.toolspeed))
if (has_electronics==1)
has_electronics = 0
if ((stat & BROKEN))
@@ -498,12 +498,12 @@
if (has_electronics==1 && terminal)
has_electronics = 2
stat &= ~MAINT
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user,"You screw the circuit electronics into place.")
else if (has_electronics==2)
has_electronics = 1
stat |= MAINT
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
to_chat(user,"You unfasten the electronics.")
else /* has_electronics==0 */
to_chat(user,"<span class='warning'>There is nothing to secure.</span>")
@@ -512,6 +512,7 @@
else
wiresexposed = !wiresexposed
to_chat(user,"The wires have been [wiresexposed ? "exposed" : "unexposed"].")
playsound(src, W.usesound, 50, 1)
update_icon()
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
@@ -567,7 +568,7 @@
user.visible_message("<span class='warning'>[user.name] starts dismantling the [src]'s power terminal.</span>", \
"You begin to cut the cables...")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
if(do_after(user, 50 * W.toolspeed))
if(terminal && opened && has_electronics!=2)
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
@@ -599,8 +600,8 @@
user.visible_message("<span class='warning'>[user.name] begins cutting apart [src] with the [WT.name].</span>", \
"You start welding the APC frame...", \
"You hear welding.")
playsound(src.loc, 'sound/items/Welder.ogg', 25, 1)
if(do_after(user, 50))
playsound(src, WT.usesound, 25, 1)
if(do_after(user, 50 * WT.toolspeed))
if(!src || !WT.remove_fuel(3, user)) return
if (emagged || (stat & BROKEN) || opened==2)
new /obj/item/stack/material/steel(loc)
+1 -1
View File
@@ -81,7 +81,7 @@
if(istype(W, /obj/item/weapon/crowbar))
if (charge < (capacity / 100))
if (!output_attempt && !input_attempt)
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
var/obj/structure/frame/M = new /obj/structure/frame(src.loc)
M.frame_type = "machine"
M.state = 2
+1 -1
View File
@@ -109,7 +109,7 @@ var/list/fusion_cores = list()
else if(iswrench(W))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
if(anchored)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the [src.name] to the floor.", \
@@ -71,7 +71,7 @@ var/list/fuel_injectors = list()
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
return
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
if(anchored)
user.visible_message("\The [user] secures \the [src] to the floor.")
else
+2 -2
View File
@@ -138,11 +138,11 @@
/obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
anchored = !anchored
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \
"You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.", \
"You hear a ratchet")
"You hear a ratchet.")
use_power = anchored
if(anchored) // Powernet connection stuff.
connect_to_network()
+7 -7
View File
@@ -48,9 +48,9 @@
src.add_fingerprint(user)
if (istype(W, /obj/item/weapon/wrench))
if (src.stage == 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
usr << "You begin deconstructing [src]."
if (!do_after(usr, 30))
if (!do_after(usr, 30 * W.toolspeed))
return
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
user.visible_message("[user.name] deconstructs [src].", \
@@ -78,7 +78,7 @@
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
user.visible_message("[user.name] removes the wiring from [src].", \
"You remove the wiring from [src].", "You hear a noise.")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 50, 1)
return
if(istype(W, /obj/item/stack/cable_coil))
@@ -109,7 +109,7 @@
src.stage = 3
user.visible_message("[user.name] closes [src]'s casing.", \
"You close [src]'s casing.", "You hear a noise.")
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
switch(fixture_type)
@@ -418,7 +418,7 @@
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
if(istype(W, /obj/item/weapon/screwdriver)) //If it's a screwdriver open it.
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] opens [src]'s casing.", \
"You open [src]'s casing.", "You hear a noise.")
var/obj/machinery/light_construct/newlight = null
@@ -455,7 +455,7 @@
/obj/machinery/light/flamp/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
if(!lamp_shade)
@@ -467,7 +467,7 @@
else
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] removes [src]'s lamp shade.", \
"You remove [src]'s lamp shade.", "You hear a noise.")
lamp_shade = 0
+2 -1
View File
@@ -87,12 +87,13 @@
makepowernets()
else if(istype(O, /obj/item/weapon/screwdriver))
open = !open
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, O.usesound, 50, 1)
if(open)
user << "<font color='blue'>You open the access panel.</font>"
else
user << "<font color='blue'>You close the access panel.</font>"
else if(istype(O, /obj/item/weapon/crowbar) && !open)
playsound(loc, O.usesound, 50, 1)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
I.loc = src.loc
+2 -2
View File
@@ -80,11 +80,11 @@ var/global/list/rad_collectors = list()
if(P)
user << "<font color='blue'>Remove the phoron tank first.</font>"
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
src.anchored = !src.anchored
user.visible_message("[user.name] [anchored? "secures":"unsecures"] the [src.name].", \
"You [anchored? "secure":"undo"] the external bolts.", \
"You hear a ratchet")
"You hear a ratchet.")
if(anchored)
connect_to_network()
else
+8 -8
View File
@@ -151,17 +151,17 @@
switch(state)
if(0)
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] secures [src] to the floor.", \
"You secure the external reinforcing bolts to the floor.", \
"You hear a ratchet")
"You hear a ratchet.")
src.anchored = 1
if(1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] unsecures [src] reinforcing bolts from the floor.", \
"You undo the external reinforcing bolts.", \
"You hear a ratchet")
"You hear a ratchet.")
src.anchored = 0
if(2)
user << "<span class='warning'>\The [src] needs to be unwelded from the floor.</span>"
@@ -177,11 +177,11 @@
user << "<span class='warning'>\The [src] needs to be wrenched to the floor.</span>"
if(1)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to weld [src] to the floor.", \
"You start to weld [src] to the floor.", \
"You hear welding")
if (do_after(user,20))
if (do_after(user,20 * WT.toolspeed))
if(!src || !WT.isOn()) return
state = 2
user << "You weld [src] to the floor."
@@ -190,11 +190,11 @@
user << "<span class='warning'>You need more welding fuel to complete this task.</span>"
if(2)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to cut [src] free from the floor.", \
"You start to cut [src] free from the floor.", \
"You hear welding")
if (do_after(user,20))
if (do_after(user,20 * WT.toolspeed))
if(!src || !WT.isOn()) return
state = 1
user << "You cut [src] free from the floor."
@@ -106,14 +106,14 @@ field_generator power level display
switch(state)
if(0)
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the external reinforcing bolts to the floor.", \
"You hear ratchet")
src.anchored = 1
if(1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \
"You undo the external reinforcing bolts.", \
"You hear ratchet")
@@ -129,11 +129,11 @@ field_generator power level display
return
if(1)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
if (do_after(user,20))
if (do_after(user,20 * WT.toolspeed))
if(!src || !WT.isOn()) return
state = 2
user << "You weld the field generator to the floor."
@@ -141,11 +141,11 @@ field_generator power level display
return
if(2)
if (WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
if (do_after(user,20))
if (do_after(user,20 * WT.toolspeed))
if(!src || !WT.isOn()) return
state = 1
user << "You cut the [src] free from the floor."
+3 -3
View File
@@ -18,14 +18,14 @@
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
if(anchored)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the [src.name] to the floor.", \
"You hear a ratchet")
"You hear a ratchet.")
else
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
"You unsecure the [src.name] from the floor.", \
"You hear a ratchet")
"You hear a ratchet.")
return
return ..()
@@ -197,7 +197,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return 0
/obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/O, var/mob/user)
/obj/structure/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user)
if(!(O) || !(user))
return 0
if(!ismob(user) || !isobj(O))
@@ -207,14 +207,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
if(0)
if(iswrench(O))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, O.usesound, 75, 1)
src.anchored = 1
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the external bolts.")
temp_state++
if(1)
if(iswrench(O))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, O.usesound, 75, 1)
src.anchored = 0
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
"You remove the external bolts.")
@@ -337,7 +337,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
return 0
/obj/machinery/particle_accelerator/proc/process_tool_hit(var/obj/O, var/mob/user)
/obj/machinery/particle_accelerator/proc/process_tool_hit(var/obj/item/O, var/mob/user)
if(!(O) || !(user))
return 0
if(!ismob(user) || !isobj(O))
@@ -346,14 +346,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
switch(src.construction_state)//TODO:Might be more interesting to have it need several parts rather than a single list of steps
if(0)
if(iswrench(O))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, O.usesound, 75, 1)
src.anchored = 1
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"You secure the external bolts.")
temp_state++
if(1)
if(iswrench(O))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, O.usesound, 75, 1)
src.anchored = 0
user.visible_message("[user.name] detaches the [src.name] from the floor.", \
"You remove the external bolts.")
+3 -1
View File
@@ -238,10 +238,12 @@
if(!open_hatch)
open_hatch = 1
user << "<span class='notice'>You open the maintenance hatch of [src].</span>"
playsound(src, W.usesound, 50, 1)
return 0
else
open_hatch = 0
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
playsound(src, W.usesound, 50, 1)
return 0
if (!open_hatch)
@@ -276,7 +278,7 @@
else
user << "<span class='notice'>You begin to cut the cables...</span>"
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
if(do_after(user, 50 * W.toolspeed))
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
+2 -2
View File
@@ -335,9 +335,9 @@
user << "<span class='warning'>You have to disassemble the terminal first!</span>"
return
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
playsound(get_turf(src), W.usesound, 50, 1)
user << "<span class='warning'>You begin to disassemble the [src]!</span>"
if (do_after(usr, 100 * cur_coils)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s
if (do_after(usr, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar
if (failure_probability && prob(failure_probability))
total_system_failure(failure_probability, user)
+4 -4
View File
@@ -231,13 +231,13 @@ var/list/solars_list = list()
if(istype(W, /obj/item/weapon/wrench))
anchored = 1
user.visible_message("<span class='notice'>[user] wrenches the solar assembly into place.</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
return 1
else
if(istype(W, /obj/item/weapon/wrench))
anchored = 0
user.visible_message("<span class='notice'>[user] unwrenches the solar assembly from it's place.</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
return 1
if(istype(W, /obj/item/stack/material) && (W.get_material_name() == "glass" || W.get_material_name() == "rglass"))
@@ -402,9 +402,9 @@ var/list/solars_list = list()
return
/obj/machinery/power/solar_control/attackby(I as obj, user as mob)
/obj/machinery/power/solar_control/attackby(obj/item/I, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "<font color='blue'>The broken glass falls out.</font>"
+1 -1
View File
@@ -229,7 +229,7 @@
/*
/obj/machinery/computer/turbine_computer/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "<font color='blue'>The broken glass falls out.</font>"
+2 -1
View File
@@ -208,7 +208,8 @@
if(istype(A, /obj/item/weapon/screwdriver))
if(dna_lock && attached_lock && !attached_lock.controller_lock)
user << "<span class='notice'>You begin removing \the [attached_lock] from \the [src].</span>"
if(do_after(user, 25))
playsound(src, A.usesound, 50, 1)
if(do_after(user, 25 * A.toolspeed))
user << "<span class='notice'>You remove \the [attached_lock] from \the [src].</span>"
user.put_in_hands(attached_lock)
dna_lock = 0
@@ -167,6 +167,7 @@
var/obj/item/C = cell
C.loc = get_turf(user)
user << "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>"
playsound(src, W.usesound, 50, 1)
cell = null
else
user << "<span class='notice'>[src] doesn't have a cell installed.</span>"
@@ -231,7 +232,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You weld the rods into place.</span>"
buildstate++
update_icon()
@@ -267,6 +268,7 @@
else if(istype(W,/obj/item/weapon/screwdriver))
if(buildstate == 5)
user << "<span class='notice'>You secure the crossbow's various parts.</span>"
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/gun/launcher/crossbow(get_turf(src))
qdel(src)
return
@@ -191,7 +191,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You weld the pipe into place.</span>"
buildstate++
update_icon()
@@ -199,7 +199,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You weld the metal chassis together.</span>"
buildstate++
update_icon()
@@ -207,7 +207,7 @@
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You weld the valve into place.</span>"
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
qdel(src)
@@ -65,9 +65,9 @@
/obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You begin to [anchored ? "un" : ""]fasten \the [src].</span>"
if (do_after(user, 20))
if (do_after(user, 20 * W.toolspeed))
user.visible_message(
"<span class='notice'>\The [user] [anchored ? "un" : ""]fastens \the [src].</span>",
"<span class='notice'>You have [anchored ? "un" : ""]fastened \the [src].</span>",
@@ -86,6 +86,7 @@
if(C)
user << "<span class='notice'>You remove \the [C] from \the [src].</span>"
C.loc = loc
playsound(src, W.usesound, 50, 1)
else if(istype(W, /obj/item/weapon/reagent_containers/glass) || istype(W, /obj/item/weapon/reagent_containers/food))
if(container)
+7 -5
View File
@@ -111,6 +111,7 @@
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
modded = modded ? 0 : 1
playsound(src, W.usesound, 75, 1)
if (modded)
message_admins("[key_name_admin(user)] opened fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking fuel. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)")
log_game("[key_name(user)] opened fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]), leaking fuel.")
@@ -226,7 +227,7 @@
if(istype(I, /obj/item/weapon/wrench))
src.add_fingerprint(user)
if(bottle)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
if(do_after(user, 20) && bottle)
user << "<span class='notice'>You unfasten the jug.</span>"
var/obj/item/weapon/reagent_containers/glass/cooler_bottle/G = new /obj/item/weapon/reagent_containers/glass/cooler_bottle( src.loc )
@@ -241,15 +242,16 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20, src))
if(do_after(user, 20 * I.toolspeed, src))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
anchored = !anchored
playsound(loc, I.usesound, 50, 1)
return
if(istype(I, /obj/item/weapon/screwdriver))
if(cupholder)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
user << "<span class='notice'>You take the cup dispenser off.</span>"
new /obj/item/stack/material/plastic( src.loc )
if(cups)
@@ -260,9 +262,9 @@
update_icon()
return
if(!bottle && !cupholder)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, I.usesound, 50, 1)
user << "<span class='notice'>You start taking the water-cooler apart.</span>"
if(do_after(user, 20) && !bottle && !cupholder)
if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder)
user << "<span class='notice'>You take the water-cooler apart.</span>"
new /obj/item/stack/material/plastic( src.loc, 4 )
qdel(src)
+2 -2
View File
@@ -257,8 +257,8 @@
if(!WT.remove_fuel(0, user))
user << "The welding tool must be on to complete this task."
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20))
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You deconstruct the frame.</span>"
new /obj/item/stack/material/steel( src.loc, 2 )
@@ -263,16 +263,16 @@
else
density = 1 // We don't want disposal bins or outlets to go density 0
user << "You attach the [nicetype] to the underfloor."
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(loc, I.usesound, 100, 1)
update()
else if(istype(I, /obj/item/weapon/weldingtool))
if(anchored)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "Welding the [nicetype] in place."
if(do_after(user, 20))
if(do_after(user, 20 * W.toolspeed))
if(!src || !W.isOn()) return
user << "The [nicetype] has been welded in place!"
update() // TODO: Make this neat
+10 -10
View File
@@ -61,12 +61,12 @@
return
if(mode==0) // It's off but still not unscrewed
mode=-1 // Set it to doubleoff l0l
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, I.usesound, 50, 1)
user << "You remove the screws around the power connection."
return
else if(mode==-1)
mode=0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, I.usesound, 50, 1)
user << "You attach the screws around the power connection."
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1)
@@ -75,10 +75,10 @@
return
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "You start slicing the floorweld off the disposal unit."
if(do_after(user,20))
if(do_after(user,20 * W.toolspeed))
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the disposal unit."
var/obj/structure/disposalconstruct/C = new (src.loc)
@@ -881,7 +881,7 @@
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 50, 1)
// check if anything changed over 2 seconds
var/turf/uloc = user.loc
var/atom/wloc = W.loc
@@ -1361,7 +1361,7 @@
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
// check if anything changed over 2 seconds
var/turf/uloc = user.loc
var/atom/wloc = W.loc
@@ -1478,20 +1478,20 @@
if(istype(I, /obj/item/weapon/screwdriver))
if(mode==0)
mode=1
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You remove the screws around the power connection."
playsound(src, I.usesound, 50, 1)
return
else if(mode==1)
mode=0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "You attach the screws around the power connection."
playsound(src, I.usesound, 50, 1)
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==1)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "You start slicing the floorweld off the disposal outlet."
if(do_after(user,20))
if(do_after(user,20 * W.toolspeed))
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the disposal outlet."
var/obj/structure/disposalconstruct/C = new (src.loc)
+4 -4
View File
@@ -424,20 +424,20 @@
if(istype(I, /obj/item/weapon/screwdriver))
if(c_mode==0)
c_mode=1
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user << "You remove the screws around the power connection."
return
else if(c_mode==1)
c_mode=0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user << "You attach the screws around the power connection."
return
else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src.loc, W.usesound, 50, 1)
user << "You start slicing the floorweld off the delivery chute."
if(do_after(user,20))
if(do_after(user,20 * W.toolspeed))
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the delivery chute."
var/obj/structure/disposalconstruct/C = new (src.loc)
@@ -43,7 +43,8 @@
if(istype(W, /obj/item/weapon/screwdriver))
user << "You begin removing the faceplate from the [src]"
if(do_after(user, 10))
playsound(src, W.usesound, 50, 1)
if(do_after(user, 10 * W.toolspeed))
user << "You remove the faceplate from the [src]"
var/obj/structure/frame/A = new /obj/structure/frame(loc)
var/obj/item/weapon/circuitboard/M = new circuit(A)
+3 -3
View File
@@ -279,7 +279,7 @@
/obj/machinery/shieldgen/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
if(is_open)
user << "<font color='blue'>You close the panel.</font>"
is_open = 0
@@ -303,7 +303,7 @@
user << "The bolts are covered, unlocking this would retract the covers."
return
if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<font color='blue'>You unsecure the [src] from the floor!</font>"
if(active)
user << "<font color='blue'>The [src] shuts off!</font>"
@@ -311,7 +311,7 @@
anchored = 0
else
if(istype(get_turf(src), /turf/space)) return //No wrenching these in space!
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<font color='blue'>You secure the [src] to the floor!</font>"
anchored = 1
+2 -2
View File
@@ -165,14 +165,14 @@
else if(state == 0)
state = 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user << "You secure the external reinforcing bolts to the floor."
src.anchored = 1
return
else if(state == 1)
state = 0
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user << "You undo the external reinforcing bolts."
src.anchored = 0
return
@@ -41,6 +41,7 @@
user << "<font color='red'>Access denied.</font>"
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
playsound(src, W.usesound, 75, 1)
src.visible_message("<font color='blue'>\icon[src] [src] has been [anchored ? "bolted to the floor" : "unbolted from the floor"] by [user].</font>")
if(anchored)
+1
View File
@@ -62,6 +62,7 @@
user << "<font color='red'>Access denied.</font>"
else if(istype(W, /obj/item/weapon/wrench))
src.anchored = !src.anchored
playsound(src, W.usesound, 75, 1)
src.visible_message("<font color='blue'>\icon[src] [src] has been [anchored?"bolted to the floor":"unbolted from the floor"] by [user].</font>")
if(active)
+7 -7
View File
@@ -140,8 +140,8 @@
var/obj/item/weapon/weldingtool/F = W
if(F.welding)
user << "<span class='notice'>You begin reparing damage to \the [src].</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(!do_after(user, 20) || !F.remove_fuel(1, user))
playsound(src, F.usesound, 50, 1)
if(!do_after(user, 20 * F.toolspeed) || !F.remove_fuel(1, user))
return
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>",
"<span class='notice'>You repair some damage to \the [src].</span>")
@@ -229,7 +229,7 @@
"<span class='notice'>You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.</span>")
if(sound)
playsound(src.loc, sound, 50, 1)
if(!do_after(user, 40))
if(!do_after(user, delay))
manipulating = 0
return M
user.visible_message("<span class='notice'>\The [user] removes the [M.display_name] [what] from \the [src].</span>",
@@ -239,18 +239,18 @@
return null
/obj/structure/table/proc/remove_reinforced(obj/item/weapon/screwdriver/S, mob/user)
reinforced = common_material_remove(user, reinforced, 40, "reinforcements", "screws", 'sound/items/Screwdriver.ogg')
reinforced = common_material_remove(user, reinforced, 40 * S.toolspeed, "reinforcements", "screws", S.usesound)
/obj/structure/table/proc/remove_material(obj/item/weapon/wrench/W, mob/user)
material = common_material_remove(user, material, 20, "plating", "bolts", 'sound/items/Ratchet.ogg')
material = common_material_remove(user, material, 20 * W.toolspeed, "plating", "bolts", W.usesound)
/obj/structure/table/proc/dismantle(obj/item/weapon/wrench/W, mob/user)
if(manipulating) return
manipulating = 1
user.visible_message("<span class='notice'>\The [user] begins dismantling \the [src].</span>",
"<span class='notice'>You begin dismantling \the [src].</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(!do_after(user, 20))
playsound(src, W.usesound, 50, 1)
if(!do_after(user, 20 * W.toolspeed))
manipulating = 0
return
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>",
+2
View File
@@ -82,6 +82,7 @@
open = !open
update_icon()
user << "<span class='notice'>Maintenance panel is now [open ? "opened" : "closed"].</span>"
playsound(src, W.usesound, 50, 1)
else if(istype(W, /obj/item/weapon/crowbar) && cell && open)
remove_cell(user)
@@ -94,6 +95,7 @@
if(open)
health = min(maxhealth, health+10)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(src, T.usesound, 50, 1)
user.visible_message("<font color='red'>[user] repairs [src]!</font>","<font color='blue'> You repair [src]!</font>")
else
user << "<span class='notice'>Unable to repair with the maintenance panel closed.</span>"
@@ -133,6 +133,7 @@
anchored = 0
else
anchored = 1
playsound(loc, W.usesound, 50, 1)
user << "<span class='info'>You wrench the stabilising legs [anchored ? "into place" : "up against the body"].</span>"
if(anchored)
desc = "It is resting securely on four stubby legs."