mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
Abductor tools and tool sound refactor. (#22125)
* Everything in the PR * I'm taking that as a yes
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
if(!WT.isOn())
|
||||
user << "<span class='warning'>The welder must be on for this task!</span>"
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user << "<span class='notice'>You start to deconstruct the frame...</span>"
|
||||
if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>You deconstruct the frame.</span>"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
return ..()
|
||||
@@ -166,4 +166,4 @@
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
icon_state = "abed"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
if(!user.drop_item())
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, 'sound/items/welder.ogg', 50, 1)
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
welded = !welded
|
||||
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [WT].</span>",
|
||||
@@ -246,7 +246,7 @@
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='italics'>You hear a ratchet.</span>")
|
||||
@@ -439,4 +439,4 @@
|
||||
/obj/structure/closet/contents_explosion(severity, target)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity, target)
|
||||
CHECK_TICK
|
||||
CHECK_TICK
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
do_animate()
|
||||
else 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)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
|
||||
user << "<span class='notice'>You begin repairing [src].</span>"
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
@@ -204,7 +204,7 @@
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench)) //The player can only deconstruct the wooden frame
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
else if(istype(I, /obj/item/weapon/electronics/airlock))
|
||||
user << "<span class='notice'>You start installing the electronics into [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(user.unEquip(I) && do_after(user, 30, target = src))
|
||||
I.loc = src
|
||||
electronics = I
|
||||
@@ -250,4 +250,3 @@
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
|
||||
req_access = list(access_rd)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/chair/e_chair/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
C.setDir(dir)
|
||||
part.loc = loc
|
||||
part.master = null
|
||||
@@ -44,4 +44,4 @@
|
||||
buckled_mob << "<span class='userdanger'>You feel a deep shock course through your body!</span>"
|
||||
spawn(1)
|
||||
buckled_mob.electrocute_act(85, src, 1)
|
||||
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
|
||||
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench) && !stored_extinguisher)
|
||||
user << "<span class='notice'>You start unsecuring [name]...</span>"
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 60*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unsecure [name].</span>"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity && WT.remove_fuel(2, user))
|
||||
user << "<span class='notice'>You begin repairing [src].</span>"
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/fluff/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench) && deconstructible)
|
||||
user.visible_message("<span class='notice'>[user] starts disassembling [src]...</span>", "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
if(!do_after(user, 50, target = src))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] disassembles [src]!</span>", "<span class='notice'>You break down [src] into scrap metal.</span>")
|
||||
@@ -159,4 +159,4 @@
|
||||
/obj/structure/fluff/divine/shrine
|
||||
name = "shrine"
|
||||
desc = "A shrine dedicated to a deity."
|
||||
icon_state = "shrine"
|
||||
icon_state = "shrine"
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
|
||||
playsound(src.loc, "sound/items/Welder.ogg", 40, 1)
|
||||
playsound(src.loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
playsound(src.loc, "sound/items/Welder.ogg", 50, 1)
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
@@ -61,7 +61,7 @@
|
||||
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(!has_buckled_mobs())
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
user << "<span class='notice'>You pry the spikes out of the frame.</span>"
|
||||
deconstruct(TRUE)
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
/obj/structure/piano/attackby(obj/item/O, mob/user, params)
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
user << "<span class='notice'> You begin to tighten \the [src] to the floor...</span>"
|
||||
if (do_after(user, 20*O.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
@@ -357,7 +357,7 @@
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
user << "<span class='notice'> You begin to loosen \the [src]'s casters...</span>"
|
||||
if (do_after(user, 40*O.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(anchored)
|
||||
user << "Unweld the [src] first!"
|
||||
if(do_after(user, 80*W.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "You dismantle the [src]."
|
||||
new framebuildstacktype(loc, framebuildstackamount)
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(istype(O, /obj/item/weapon/wrench) && buildable_sign)
|
||||
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
|
||||
"<span class='notice'>You start unfastening [src].</span>")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if(!do_after(user, 30*O.toolspeed, target = src))
|
||||
return
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
@@ -265,5 +265,3 @@
|
||||
name = "escape arm"
|
||||
desc = "A direction sign, pointing out which way the escape shuttle dock is."
|
||||
icon_state = "direction_evac"
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is loosening the [name]'s bolts.", \
|
||||
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
|
||||
if(do_after(user,40*W.toolspeed, target = src))
|
||||
@@ -32,7 +32,7 @@
|
||||
if(!isfloorturf(src.loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is securing the [name]'s bolts...", \
|
||||
"<span class='notice'>You are securing the [name]'s bolts...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
@@ -63,7 +63,7 @@
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
user.visible_message("[user] is slicing apart the [name].", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
@@ -322,4 +322,4 @@
|
||||
/obj/structure/statue/snow/snowman
|
||||
name = "snowman"
|
||||
desc = "Several lumps of snow put together to form a snowman."
|
||||
icon_state = "snowman"
|
||||
icon_state = "snowman"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE)
|
||||
|
||||
@@ -102,14 +102,14 @@
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && deconstruction_ready)
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20, target = src))
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/wrench) && deconstruction_ready)
|
||||
user << "<span class='notice'>You start deconstructing [src]...</span>"
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 40, target = src))
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE, 1)
|
||||
return
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You begin repairing [src]...</span>"
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
Reference in New Issue
Block a user