mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Implement usesound/toolspeed
This commit is contained in:
@@ -74,7 +74,7 @@ var/global/list/rad_collectors = list()
|
||||
if(P)
|
||||
to_chat(user, "\blue Remove the plasma tank first.")
|
||||
return 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, 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.", \
|
||||
|
||||
@@ -236,14 +236,14 @@
|
||||
switch(state)
|
||||
if(0)
|
||||
state = 1
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, 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 a ratchet")
|
||||
src.anchored = 1
|
||||
if(1)
|
||||
state = 0
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc,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 a ratchet")
|
||||
@@ -262,11 +262,11 @@
|
||||
to_chat(user, "\red The [src.name] needs to be wrenched to the floor.")
|
||||
if(1)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(src.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, target = src))
|
||||
if(do_after(user, 20 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 2
|
||||
to_chat(user, "You weld the [src] to the floor.")
|
||||
@@ -275,11 +275,11 @@
|
||||
to_chat(user, "\red You need more welding fuel to complete this task.")
|
||||
if(2)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(src.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, target = src))
|
||||
if(do_after(user, 20 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
state = 1
|
||||
to_chat(user, "You cut the [src] free from the floor.")
|
||||
|
||||
@@ -87,14 +87,14 @@ field_generator power level display
|
||||
if(FG_UNSECURED)
|
||||
if(isinspace()) return
|
||||
state = FG_SECURED
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] secures [name] to the floor.", \
|
||||
"<span class='notice'>You secure the external reinforcing bolts to the floor.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = 1
|
||||
if(FG_SECURED)
|
||||
state = FG_UNSECURED
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
user.visible_message("[user.name] unsecures [name] reinforcing bolts from the floor.", \
|
||||
"<span class='notice'>You undo the external reinforcing bolts.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
@@ -110,11 +110,11 @@ field_generator power level display
|
||||
|
||||
if(FG_SECURED)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [name] to the floor.", \
|
||||
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20, target = src))
|
||||
if(do_after(user, 20 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
state = FG_WELDED
|
||||
@@ -122,11 +122,11 @@ field_generator power level display
|
||||
|
||||
if(FG_WELDED)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [name] free from the floor.", \
|
||||
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20, target = src))
|
||||
if(do_after(user, 20 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
state = FG_SECURED
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, 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.", \
|
||||
|
||||
@@ -214,7 +214,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))
|
||||
@@ -224,14 +224,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
switch(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) && !isinspace())
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
anchored = 1
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
temp_state++
|
||||
if(1)
|
||||
if(iswrench(O))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
anchored = 0
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
@@ -239,6 +239,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
else if(iscoil(O))
|
||||
var/obj/item/stack/cable_coil/C = O
|
||||
if(C.use(1))
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] adds wires to the [name].", \
|
||||
"You add some wires.")
|
||||
temp_state++
|
||||
@@ -247,15 +248,18 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
return
|
||||
if(2)
|
||||
if(iswirecutter(O))//TODO:Shock user if its on?
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] removes some wires from the [name].", \
|
||||
"You remove some wires.")
|
||||
temp_state--
|
||||
else if(isscrewdriver(O))
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] closes the [name]'s access panel.", \
|
||||
"You close the access panel.")
|
||||
temp_state++
|
||||
if(3)
|
||||
if(isscrewdriver(O))
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] opens the [name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
temp_state--
|
||||
@@ -352,7 +356,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))
|
||||
@@ -361,7 +365,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
switch(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(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
anchored = 1
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
@@ -369,7 +373,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
power_change()
|
||||
if(1)
|
||||
if(iswrench(O))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
anchored = 0
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
@@ -377,20 +381,24 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
power_change()
|
||||
else if(iscoil(O))
|
||||
if(O:use(1))
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] adds wires to the [name].", \
|
||||
"You add some wires.")
|
||||
temp_state++
|
||||
if(2)
|
||||
if(iswirecutter(O))//TODO:Shock user if its on?
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] removes some wires from the [name].", \
|
||||
"You remove some wires.")
|
||||
temp_state--
|
||||
else if(isscrewdriver(O))
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] closes the [name]'s access panel.", \
|
||||
"You close the access panel.")
|
||||
temp_state++
|
||||
if(3)
|
||||
if(isscrewdriver(O))
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
user.visible_message("[user.name] opens the [name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
temp_state--
|
||||
|
||||
Reference in New Issue
Block a user