Implement usesound/toolspeed

This commit is contained in:
Markolie
2017-03-07 16:46:28 +01:00
parent 3b73053bc4
commit 3aa1399995
179 changed files with 875 additions and 764 deletions
+2 -2
View File
@@ -201,7 +201,7 @@ BLIND // can't see anything
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wirecutters))
if(!clipped)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W>usesound, 100, 1)
user.visible_message("<span class='warning'>[user] snips the fingertips off [src].</span>","<span class='warning'>You snip the fingertips off [src].</span>")
clipped = 1
name = "mangled [name]"
@@ -399,7 +399,7 @@ BLIND // can't see anything
if(istype(I, /obj/item/weapon/wirecutters))
if(can_cut_open)
if(!cut_open)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, I.usesound, 100, 1)
user.visible_message("<span class='warning'>[user] cuts open the toes of [src].</span>","<span class='warning'>You cut open the toes of [src].</span>")
cut_open = 1
icon_state = "[icon_state]_opentoe"
+1 -1
View File
@@ -78,7 +78,7 @@
if(istype(W, /obj/item/weapon/wirecutters))
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
playsound(user.loc,'sound/items/Wirecutter.ogg', rand(10,50), 1)
playsound(user.loc, W.usesound, rand(10,50), 1)
var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc)
if(pickpocket)
F.pickpocket = 1
@@ -13,6 +13,8 @@
desc = "It looks pretty sciency."
icon = 'icons/obj/rig_modules.dmi'
icon_state = "module"
toolspeed = 1
var/damage = 0
var/obj/item/weapon/rig/holder
@@ -73,7 +75,7 @@
to_chat(user, "You start mending the damaged portions of \the [src]...")
if(!do_after(user,30, target = src) || !W || !src)
if(!do_after(user, 30 * W.toolspeed, target = src) || !W || !src)
return
var/obj/item/stack/nanopaste/paste = W
@@ -98,7 +100,7 @@
return
to_chat(user, "You start mending the damaged portions of \the [src]...")
if(!do_after(user, 30, target = src) || !W || !src)
if(!do_after(user, 30 * W.toolspeed, target = src) || !W || !src)
return
damage = 1
+1 -1
View File
@@ -1025,7 +1025,7 @@
if(!can_touch(user, wearer) || !has_emergency_release)
return can_touch(user,wearer)
usr.visible_message("<span class='warning'>[user] starts activating \the [src] emergency seals release!</span>")
if(!do_after(user,240, target = wearer))
if(!do_after(user, 240, target = wearer))
to_chat(user, "<span class='notice'>You need to focus on activating the emergency release.</span>")
return 0
usr.visible_message("<span class='warning'>[user] activated \the [src] emergency seals release!</span>")
@@ -80,7 +80,7 @@
var/obj/item/rig_module/mod = W
to_chat(user, "You begin installing \the [mod] into \the [src].")
if(!do_after(user,40, target = src))
if(!do_after(user, 40 * W.toolspeed, target = src))
return
if(!user || !W)
return
@@ -65,7 +65,7 @@
var/obj/item/clothing/under/U = H.w_uniform
if(istype(U))
user.visible_message("<span class='notice'>[user] is putting a [src.name] on [H]'s [U.name]!</span>", "<span class='notice'>You begin to put a [src.name] on [H]'s [U.name]...</span>")
if(do_after(user,40,target=H) && H.w_uniform == U)
if(do_after(user, 40, target=H) && H.w_uniform == U)
user.visible_message("<span class='notice'>[user] puts a [src.name] on [H]'s [U.name]!</span>", "<span class='notice'>You finish putting a [src.name] on [H]'s [U.name].</span>")
U.attackby(src, user)
else