Ports instruments from /VG/station, including harmonicas, xylophones, saxophones, trombones, and a BIKE HORN. Repaths instruments to sound/instruments. Also, allows piano synth to play all instruments but eguitar and gives cargo a crate with everything. Clown gets the bike horn trumpet at roundstart. (#2034)

This commit is contained in:
CitadelStationBot
2017-07-17 02:52:43 -05:00
committed by kevinz000
parent 344dc1a061
commit 260a140f97
751 changed files with 115 additions and 8 deletions
+24
View File
@@ -236,6 +236,19 @@
name = "Toggle Friendly Fire \[ON\]"
..()
/datum/action/item_action/synthswitch
name = "Change Synthesizer Instrument"
desc = "Change the type of instrument your synthesizer is playing as."
/datum/action/item_action/synthswitch/Trigger()
if(istype(target, /obj/item/device/instrument/piano_synth))
var/obj/item/device/instrument/piano_synth/synth = target
var/chosen = input("Choose the type of instrument you want to use", "Instrument Selection", "piano") as null|anything in synth.insTypes
if(!synth.insTypes[chosen])
return
return synth.changeInstrument(chosen)
return ..()
/datum/action/item_action/vortex_recall
name = "Vortex Recall"
desc = "Recall yourself, and anyone nearby, to an attuned hierophant beacon at any time.<br>If the beacon is still attached, will detach it."
@@ -367,6 +380,17 @@
active = FALSE
..()
/datum/action/item_action/instrument
name = "Use Instrument"
desc = "Use the instrument specified"
/datum/action/item_action/instrument/Trigger()
if(istype(target, /obj/item/device/instrument))
var/obj/item/device/instrument/I = target
I.interact(usr)
return
return ..()
/datum/action/item_action/initialize_ninja_suit
name = "Toggle ninja suit"
+74 -6
View File
@@ -6,12 +6,11 @@
icon = 'icons/obj/musician.dmi'
var/datum/song/handheld/song
var/instrumentId = "generic"
var/instrumentExt = "ogg"
var/instrumentExt = "mid"
/obj/item/device/instrument/New()
song = new(instrumentId, src)
song.instrumentExt = instrumentExt
..()
/obj/item/device/instrument/Initialize()
. = ..()
song = new(instrumentId, src, instrumentExt)
/obj/item/device/instrument/Destroy()
qdel(song)
@@ -61,16 +60,24 @@
/obj/item/device/instrument/piano_synth
name = "synthesizer"
desc = "An electronic synthesizer that can play piano music."
desc = "An advanced electronic synthesizer that can be used as various instruments."
icon_state = "synth"
item_state = "synth"
instrumentId = "piano"
instrumentExt = "ogg"
var/static/list/insTypes = list("accordion" = "mid", "bikehorn" = "ogg", "glockenspiel" = "mid", "guitar" = "ogg", "harmonica" = "mid", "piano" = "ogg", "recorder" = "mid", "saxophone" = "mid", "trombone" = "mid", "violin" = "mid", "xylophone" = "mid") //No eguitar you ear-rapey fuckers.
actions_types = list(/datum/action/item_action/synthswitch)
/obj/item/device/instrument/piano_synth/proc/changeInstrument(name = "piano")
song.instrumentDir = name
song.instrumentExt = insTypes[name]
/obj/item/device/instrument/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
icon_state = "guitar"
item_state = "guitar"
instrumentExt = "ogg"
force = 10
attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
hitsound = 'sound/weapons/stringsmash.ogg'
@@ -85,3 +92,64 @@
attack_verb = list("played metal on", "shredded", "crashed", "smashed")
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "eguitar"
/obj/item/device/instrument/glockenspiel
name = "glockenspiel"
desc = "Smooth metal bars perfect for any marching band."
icon_state = "glockenspiel"
item_state = "glockenspiel"
instrumentId = "glockenspiel"
/obj/item/device/instrument/accordion
name = "accordion"
desc = "Pun-Pun not included."
icon_state = "accordion"
item_state = "accordion"
instrumentId = "accordion"
/obj/item/device/instrument/saxophone
name = "saxophone"
desc = "This soothing sound will be sure to leave your audience in tears."
icon_state = "saxophone"
item_state = "saxophone"
instrumentId = "saxophone"
/obj/item/device/instrument/trombone
name = "trombone"
desc = "How can any pool table ever hope to compete?"
icon_state = "trombone"
item_state = "trombone"
instrumentId = "trombone"
/obj/item/device/instrument/recorder
name = "recorder"
desc = "Just like in school, playing ability and all."
icon_state = "recorder"
item_state = "recorder"
instrumentId = "recorder"
/obj/item/device/instrument/harmonica
name = "harmonica"
desc = "For when you get a bad case of the space blues."
icon_state = "harmonica"
item_state = "harmonica"
instrumentId = "harmonica"
slot_flags = SLOT_MASK
force = 5
w_class = WEIGHT_CLASS_SMALL
actions_types = list(/datum/action/item_action/instrument)
/obj/item/device/instrument/bikehorn
name = "gilded bike horn"
desc = "An exquisitely decorated bike horn, capable of honking in a variety of notes."
icon_state = "bike_horn"
item_state = "bike_horn"
attack_verb = list("beautifully honks")
instrumentId = "bikehorn"
instrumentExt = "ogg"
w_class = WEIGHT_CLASS_TINY
force = 0
throw_speed = 3
throw_range = 15
hitsound = 'sound/items/bikehorn.ogg'
+3 -2
View File
@@ -16,10 +16,11 @@
var/instrumentExt = "ogg" // the file extension
var/obj/instrumentObj = null // the associated obj playing the sound
/datum/song/New(dir, obj)
/datum/song/New(dir, obj, ext = "ogg")
tempo = sanitize_tempo(tempo)
instrumentDir = dir
instrumentObj = obj
instrumentExt = ext
/datum/song/Destroy()
instrumentObj = null
@@ -52,7 +53,7 @@
return
// now generate name
var/soundfile = "sound/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
var/soundfile = "sound/instruments/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
soundfile = file(soundfile)
// make sure the note exists
if(!fexists(soundfile))
+13
View File
@@ -1600,6 +1600,19 @@
var/item = pick_n_take(L)
new item(C)
/datum/supply_pack/misc/bigband
contains = list(/obj/item/device/instrument/violin,
/obj/item/device/instrument/guitar,
/obj/item/device/instrument/glockenspiel,
/obj/item/device/instrument/accordion,
/obj/item/device/instrument/saxophone,
/obj/item/device/instrument/trombone,
/obj/item/device/instrument/recorder,
/obj/item/device/instrument/harmonica,
/obj/structure/piano)
name = "Big band instrument collection"
cost = 5000
crate_name = "Big band musical instruments collection"
/datum/supply_pack/misc/randomised/contraband
name = "Contraband Crate"
+1
View File
@@ -33,6 +33,7 @@ Clown
/obj/item/weapon/stamp/clown = 1,
/obj/item/weapon/reagent_containers/spray/waterflower = 1,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana = 1,
/obj/item/device/instrument/bikehorn = 1,
)
implants = list(/obj/item/weapon/implant/sad_trombone)