Files
Bubberstation/code/modules/instruments/stationary.dm
SkyratBot b483bfd968 [MIRROR] Adds sound selection to certain instruments (#996)
* Adds sound selection to certain instruments (#53690)

This gives instruments a selection of fitting instrument sounds, since we have a bunch that have been exclusive to the synth piano until now. For example, the harmonica can pick between the hardcoded and synthetized versions.

It might also add a new special and rare instrument

* Adds sound selection to certain instruments

Co-authored-by: Mickyan <38563876+Mickyan@users.noreply.github.com>
2020-09-26 16:22:03 +02:00

53 lines
1.6 KiB
Plaintext

/obj/structure/musician
name = "Not A Piano"
desc = "Something broke, contact coderbus."
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_DEXTERITY
var/can_play_unanchored = FALSE
var/list/allowed_instrument_ids = list("r3grand","r3harpsi","crharpsi","crgrand1","crbright1", "crichugan", "crihamgan","piano")
var/datum/song/song
/obj/structure/musician/Initialize(mapload)
. = ..()
song = new(src, allowed_instrument_ids)
allowed_instrument_ids = null
/obj/structure/musician/Destroy()
QDEL_NULL(song)
return ..()
/obj/structure/musician/proc/should_stop_playing(mob/user)
if(!(anchored || can_play_unanchored))
return TRUE
if(!user)
return FALSE
return !user.canUseTopic(src, FALSE, TRUE, FALSE, FALSE) //can play with TK and while resting because fun.
/obj/structure/musician/ui_interact(mob/user)
. = ..()
song.ui_interact(user)
/obj/structure/musician/wrench_act(mob/living/user, obj/item/I)
default_unfasten_wrench(user, I, 40)
return TRUE
/obj/structure/musician/piano
name = "space minimoog"
icon = 'icons/obj/musician.dmi'
icon_state = "minimoog"
anchored = TRUE
density = TRUE
/obj/structure/musician/piano/unanchored
anchored = FALSE
/obj/structure/musician/piano/Initialize(mapload)
. = ..()
if(prob(50) && icon_state == initial(icon_state))
name = "space minimoog"
desc = "This is a minimoog, like a space piano, but more spacey!"
icon_state = "minimoog"
else
name = "space piano"
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
icon_state = "piano"