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
@@ -34,7 +34,7 @@
if(istype(A, /obj/item/weapon/crowbar))
if(modkits.len)
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(loc, A.usesound, 100, 1)
for(var/obj/item/borg/upgrade/modkit/M in modkits)
M.uninstall(src)
else
@@ -230,6 +230,7 @@
origin_tech = "programming=2;materials=2;magnets=4"
require_module = 1
module_type = /obj/item/weapon/robot_module/miner
usesound = 'sound/items/Screwdriver.ogg'
var/denied_type = null
var/maximum_of_type = 1
var/cost = 30
@@ -266,7 +267,7 @@
if(KA.get_remaining_mod_capacity() >= cost)
if(.)
to_chat(user, "<span class='notice'>You install the modkit.</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(loc, usesound, 100, 1)
user.unEquip(src)
forceMove(KA)
KA.modkits += src
@@ -139,6 +139,8 @@
origin_tech = "combat=1;materials=3;magnets=2;plasmatech=2;engineering=1"
ammo_type = list(/obj/item/ammo_casing/energy/plasma)
fire_sound = 'sound/weapons/laser.ogg'
usesound = 'sound/items/Welder.ogg'
toolspeed = 1
flags = CONDUCT | OPENCONTAINER
attack_verb = list("attacked", "slashed", "cut", "sliced")
force = 12
@@ -121,7 +121,7 @@
afterattack(user, user) //you know the drill
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30, target = src))
if(do_after(user, 30 * A.toolspeed, target = src))
if(magazine.ammo_count())
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
@@ -134,7 +134,7 @@
afterattack(user, user) //and again
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30, target = src))
if(do_after(user, 30 * A.toolspeed, target = src))
if(magazine.ammo_count())
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return