mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #751 from tigercat2000/Guitar
Ports Guitar from UristMcStation
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//copy pasta of the space piano, don't hurt me -Pete
|
||||
|
||||
/obj/item/device/guitar
|
||||
name = "guitar"
|
||||
desc = "It's made of wood and has bronze strings."
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
icon_state = "guitar"
|
||||
item_state = "guitar"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
force = 10
|
||||
var/datum/song/handheld/song
|
||||
|
||||
/obj/item/device/guitar/New()
|
||||
song = new("guitar", src)
|
||||
song.instrumentExt = "ogg"
|
||||
|
||||
/obj/item/device/guitar/Destroy()
|
||||
del(song)
|
||||
song = null
|
||||
..()
|
||||
|
||||
/obj/item/device/guitar/attack_self(mob/user as mob)
|
||||
interact(user)
|
||||
|
||||
/obj/item/device/guitar/interact(mob/user as mob)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
if(!isliving(user) || user.stat || user.restrained() || user.lying)
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
song.interact(user)
|
||||
|
||||
/datum/table_recipe/guitar
|
||||
name = "Guitar"
|
||||
result = /obj/item/device/guitar
|
||||
reqs = list(/obj/item/stack/sheet/wood = 5,
|
||||
/obj/item/stack/cable_coil = 6)
|
||||
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
|
||||
time = 80
|
||||
Reference in New Issue
Block a user