Adds a Bunch of Instruments

This commit is contained in:
Fox-McCloud
2017-08-02 03:19:03 -04:00
parent 0ae3cc5041
commit d7da6cb94c
712 changed files with 152 additions and 10 deletions
+25
View File
@@ -209,6 +209,19 @@
button.name = name
..()
/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 rune at any time.<br>If no such rune exists, will produce a rune at your location."
@@ -337,6 +350,18 @@
var/image/img = image(button_icon, current_button, "scan_mode")
current_button.overlays += img
/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/remove_badge
name = "Remove Holobadge"
+16
View File
@@ -1513,6 +1513,22 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
containername = "foam force pistols crate"
contraband = 1
/datum/supply_packs/misc/bigband
name = "Big band instrument collection"
contains = list(/obj/item/device/instrument/violin,
/obj/item/device/instrument/guitar,
/obj/item/device/instrument/eguitar,
/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/item/device/instrument/xylophone,
/obj/structure/piano)
cost = 50
containername = "Big band musical instruments collection"
/datum/supply_packs/misc/randomised/contraband
num_contained = 5
contains = list(/obj/item/weapon/storage/pill_bottle/random_drug_bottle,
+3 -2
View File
@@ -215,17 +215,18 @@
uniform = /obj/item/clothing/under/rank/clown
shoes = /obj/item/clothing/shoes/clown_shoes
mask = /obj/item/clothing/mask/gas/clown_hat
l_pocket = /obj/item/weapon/bikehorn
l_ear = /obj/item/device/radio/headset/headset_service
id = /obj/item/weapon/card/id/clown
pda = /obj/item/device/pda/clown
backpack_contents = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/banana = 1,
/obj/item/weapon/bikehorn = 1,
/obj/item/weapon/stamp/clown = 1,
/obj/item/toy/crayon/rainbow = 1,
/obj/item/weapon/storage/fancy/crayons = 1,
/obj/item/weapon/reagent_containers/spray/waterflower = 1,
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofbanana = 1
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofbanana = 1,
/obj/item/device/instrument/bikehorn = 1
)
backpack = /obj/item/weapon/storage/backpack/clown
+88 -3
View File
@@ -2,14 +2,15 @@
/obj/item/device/instrument
name = "generic instrument"
icon = 'icons/obj/musician.dmi'
lefthand_file = 'icons/mob/inhands/equipment/instruments_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/instruments_righthand.dmi'
burn_state = FLAMMABLE
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
song = new(instrumentId, src, instrumentExt)
..()
/obj/item/device/instrument/Destroy()
@@ -44,6 +45,7 @@
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"
item_state = "violin"
instrumentExt = "ogg"
force = 10
hitsound = "swing_hit"
instrumentId = "violin"
@@ -55,11 +57,26 @@
item_state = "golden_violin"
burn_state = LAVA_PROOF
/obj/item/device/instrument/piano_synth
name = "synthesizer"
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", "glockenspiel" = "mid", "guitar" = "ogg", "eguitar" = "ogg", "harmonica" = "mid", "piano" = "ogg", "recorder" = "mid", "saxophone" = "mid", "trombone" = "mid", "violin" = "ogg", "xylophone" = "mid")
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/effects/guitarsmash.ogg'
@@ -70,11 +87,79 @@
desc = "Makes all your shredding needs possible."
icon_state = "eguitar"
item_state = "eguitar"
instrumentExt = "ogg"
force = 12
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"
force = 5
w_class = WEIGHT_CLASS_SMALL
/obj/item/device/instrument/xylophone
name = "xylophone"
desc = "a percussion instrument with a bright tone."
icon_state = "xylophone"
item_state = "xylophone"
instrumentId = "xylophone"
/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"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
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'
/datum/crafting_recipe/violin
name = "Violin"
result = /obj/item/device/instrument/violin
+13 -2
View File
@@ -14,10 +14,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
@@ -50,7 +51,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))
@@ -147,6 +148,7 @@
lines = new()
tempo = sanitize_tempo(5) // default 120 BPM
name = ""
nanomanager.update_uis(src)
else if(href_list["import"])
playing = 0
@@ -182,9 +184,11 @@
lines.Remove(l)
else
linenum++
nanomanager.update_uis(src)
else if(href_list["help"])
help = !help
nanomanager.update_uis(src)
if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
if(playing)
@@ -194,9 +198,11 @@
repeat = 0
if(repeat > max_repeat)
repeat = max_repeat
nanomanager.update_uis(src)
else if(href_list["tempo"])
tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]) * world.tick_lag)
nanomanager.update_uis(src)
else if(href_list["play"])
if(playing)
@@ -204,6 +210,7 @@
playing = 1
spawn()
playsong(usr)
nanomanager.update_uis(src)
else if(href_list["insertline"])
var/num = round(text2num(href_list["insertline"]))
@@ -219,12 +226,14 @@
newline = copytext(newline, 1, 50)
lines.Insert(num, newline)
nanomanager.update_uis(src)
else if(href_list["deleteline"])
var/num = round(text2num(href_list["deleteline"]))
if(num > lines.len || num < 1)
return
lines.Cut(num, num + 1)
nanomanager.update_uis(src)
else if(href_list["modifyline"])
var/num = round(text2num(href_list["modifyline"]))
@@ -236,9 +245,11 @@
if(num > lines.len || num < 1)
return
lines[num] = content
nanomanager.update_uis(src)
else if(href_list["stop"])
playing = 0
nanomanager.update_uis(src)
/datum/song/proc/sanitize_tempo(new_tempo)
new_tempo = abs(new_tempo)
@@ -255,9 +255,7 @@
modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
modules += new /obj/item/weapon/pen(src)
modules += new /obj/item/weapon/razor(src)
modules += new /obj/item/device/instrument/violin(src)
modules += new /obj/item/device/instrument/guitar(src)
modules += new /obj/item/device/instrument/eguitar(src)
modules += new /obj/item/device/instrument/piano_synth(src)
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
+6
View File
@@ -93,6 +93,12 @@
typepath = /obj/item/toy/katana
cost = 500
/datum/storeitem/piano_synth
name = "piano synthesizer"
desc = "An advanced electronic synthesizer that can be used as various instruments."
typepath = /obj/item/device/instrument/piano_synth
cost = 1000
/datum/storeitem/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.\""
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More