mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-13 10:52:32 +00:00
* Find and replace argless atom New() to Initialize(). * Manual replacement of no-arg New() to Initialize(). * Manually replacing remaining New() overrides. * Fixing linter issues with now-removed New() args. * Tidying area init overrides. * Porting Neb's atom subsystem. * Trying to isolate init problems. * Adjusting Init code post-test. * Merging duplicate Initialize() procs. * Merge resolution.
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
//copy pasta of the space piano, don't hurt me -Pete
|
|
/obj/item/device/instrument
|
|
name = "generic instrument"
|
|
var/datum/song/handheld/song
|
|
var/instrumentId = "generic"
|
|
var/instrumentExt = "mid"
|
|
icon = 'icons/obj/musician.dmi'
|
|
force = 10
|
|
|
|
/obj/item/device/instrument/Initialize()
|
|
. = ..()
|
|
song = new(instrumentId, src)
|
|
song.instrumentExt = instrumentExt
|
|
|
|
/obj/item/device/instrument/Destroy()
|
|
qdel(song)
|
|
song = null
|
|
..()
|
|
|
|
/obj/item/device/instrument/attack_self(mob/user as mob)
|
|
if(!user.IsAdvancedToolUser())
|
|
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
|
return 1
|
|
interact(user)
|
|
|
|
/obj/item/device/instrument/interact(mob/user as mob)
|
|
if(!user)
|
|
return
|
|
|
|
if(user.incapacitated() || user.lying)
|
|
return
|
|
|
|
user.set_machine(src)
|
|
song.interact(user)
|
|
|
|
/obj/item/device/instrument/violin
|
|
name = "space violin"
|
|
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
|
|
icon_state = "violin"
|
|
attack_verb = list("smashed")
|
|
instrumentId = "violin"
|