mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Implement usesound/toolspeed
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
desc = "Its patented design allows it to be folded larger or smaller to accommodate standard paper, photo, and poster, and canvas sizes."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
var/icon_base
|
||||
var/obj/displayed
|
||||
|
||||
@@ -58,7 +60,7 @@
|
||||
/obj/item/weapon/picture_frame/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(displayed)
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
user.visible_message("<span class=warning>[user] unfastens \the [displayed] out of \the [src].</span>", "<span class=warning>You unfasten \the [displayed] out of \the [src].</span>")
|
||||
|
||||
if(istype(displayed, /obj/structure/sign/poster))
|
||||
@@ -72,7 +74,7 @@
|
||||
else
|
||||
to_chat(user, "<span class=notice>There is nothing to remove from \the [src].</span>")
|
||||
else if(istype(I, /obj/item/weapon/crowbar))
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
user.visible_message("<span class=warning>[user] breaks down \the [src].</span>", "<span class=warning>You break down \the [src].</span>")
|
||||
for(var/A in contents)
|
||||
if(istype(A, /obj/structure/sign/poster))
|
||||
@@ -135,7 +137,7 @@
|
||||
PF.pixel_x = px
|
||||
PF.pixel_y = py
|
||||
|
||||
playsound(PF.loc, 'sound/items/Deconstruct.ogg', 100, 1)
|
||||
playsound(PF.loc, usesound, 100, 1)
|
||||
|
||||
/obj/item/weapon/picture_frame/examine(mob/user, var/distance = -1, var/infix = "", var/suffix = "")
|
||||
..()
|
||||
@@ -213,10 +215,10 @@
|
||||
|
||||
/obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
user.visible_message("<span class=warning>[user] begins to unfasten \the [src] from the wall.</span>", "<span class=warning>You begin to unfasten \the [src] from the wall.</span>")
|
||||
if(do_after(user, 100, target = src))
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 100, 1)
|
||||
if(do_after(user, 100 * I.toolspeed, target = src))
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
user.visible_message("<span class=warning>[user] unfastens \the [src] from the wall.</span>", "<span class=warning>You unfasten \the [src] from the wall.</span>")
|
||||
frame.forceMove(user.loc)
|
||||
frame = null
|
||||
|
||||
Reference in New Issue
Block a user