mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Implement usesound/toolspeed
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
/obj/item/clothing/suit/space/rig
|
||||
)
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
/obj/item/device/modkit/afterattack(obj/item/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
to_chat(user, "<span class='warning'>[O] must be safely placed on the ground for modification.</span>")
|
||||
return
|
||||
|
||||
playsound(user.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(user.loc, O.usesound, 100, 1)
|
||||
|
||||
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires
|
||||
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
|
||||
return
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
|
||||
playsound(src, I.usesound, 50, 1, 1)
|
||||
user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>")
|
||||
sleep(5)
|
||||
if(chosen_wire == correct_wire)
|
||||
@@ -84,8 +84,8 @@
|
||||
to_chat(user, "<span class='warning'>You can't see the box well enough to cut the wires out.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] starts removing the payload and wires from \the [src].</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
|
||||
if(do_after(user, 40 * I.toolspeed, target = src))
|
||||
playsound(src, I.usesound, 50, 1, 1)
|
||||
user.unEquip(src)
|
||||
user.visible_message("<span class='notice'>[user] removes the insides of \the [src]!</span>")
|
||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(src.loc)
|
||||
|
||||
@@ -138,8 +138,8 @@
|
||||
if(3)
|
||||
if(iswirecutter(W) && b_stat && wires.IsAllCut())
|
||||
to_chat(user, "<span class='notice'>You cut out the intercoms wiring and disconnect its electronics.</span>")
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
if(buildstage != 3)
|
||||
return
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
@@ -152,8 +152,8 @@
|
||||
else return ..()
|
||||
if(2)
|
||||
if(isscrewdriver(W))
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
update_icon()
|
||||
on = 1
|
||||
b_stat = 0
|
||||
@@ -170,15 +170,15 @@
|
||||
if(coil.amount < 5)
|
||||
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
|
||||
return
|
||||
if(do_after(user, 10, target = src))
|
||||
if(do_after(user, 10 * coil.toolspeed, target = src))
|
||||
coil.use(5)
|
||||
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
|
||||
buildstage = 2
|
||||
return 1
|
||||
if(iscrowbar(W))
|
||||
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
if(buildstage != 1)
|
||||
return
|
||||
new /obj/item/weapon/intercom_electronics(get_turf(src))
|
||||
@@ -187,19 +187,19 @@
|
||||
return 1
|
||||
if(0)
|
||||
if(istype(W,/obj/item/weapon/intercom_electronics))
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
qdel(W)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
|
||||
buildstage = 1
|
||||
return 1
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT=W
|
||||
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
|
||||
playsound(get_turf(src), WT.usesound, 50, 1)
|
||||
if(!WT.remove_fuel(3, user))
|
||||
to_chat(user, "<span class='warning'>You're out of welding fuel.</span>")
|
||||
return 1
|
||||
if(do_after(user, 10, target = src))
|
||||
if(do_after(user, 10 * WT.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You cut the intercom frame from the wall!</span>")
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
@@ -233,6 +233,8 @@
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
w_class = 2
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
/obj/item/device/radio/intercom/locked
|
||||
var/locked_frequency
|
||||
|
||||
@@ -279,7 +279,7 @@ REAGENT SCANNER
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install the upgrade in the [src].</span>")
|
||||
overlays += "advanced"
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, usesound, 50, 1)
|
||||
upgraded = 1
|
||||
qdel(W)
|
||||
|
||||
@@ -296,6 +296,7 @@ REAGENT SCANNER
|
||||
desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality."
|
||||
w_class = 1
|
||||
origin_tech = "magnets=2;biotech=2"
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
/obj/item/device/analyzer
|
||||
desc = "A hand-held environmental scanner which reports current gas levels."
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user)
|
||||
if(ruined && istype(I, /obj/item/weapon/screwdriver))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in.</span>")
|
||||
if(do_after(user, 120, target = src))
|
||||
if(do_after(user, 120 * I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in!</span>")
|
||||
fix()
|
||||
else if(istype(I, /obj/item/weapon/pen))
|
||||
|
||||
Reference in New Issue
Block a user