From daee15b8ad0dc468cbcc47f3f1d2da3c4afbb323 Mon Sep 17 00:00:00 2001 From: Mr Phoenix <120045865+HuKuTaPan4@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:27:52 +0300 Subject: [PATCH] fix(synthesized_instruments): updated UI for old instruments #12880 --- baystation12.dme | 6 ++++ .../instrument_data/accordion.dm | 21 +++++++++++++ .../instrument_data/harmonica.dm | 11 +++++++ .../instrument_data/organ.dm | 28 +----------------- .../real_instruments/Accordion/accordion.dm | 15 ++++++++++ .../real_instruments/Harmonica/harmonica.dm | 15 ++++++++++ .../real_instruments/Recorder/recorder.dm | 15 ++++++++++ .../real_instruments/Saxophone/saxophone.dm | 15 ++++++++++ .../crisis_accordian/c2.ogg | Bin .../crisis_accordian/c3.ogg | Bin .../crisis_accordian/c4.ogg | Bin .../crisis_accordian/c5.ogg | Bin .../crisis_tangaccordian/c2.ogg | Bin .../crisis_tangaccordian/c3.ogg | Bin .../crisis_tangaccordian/c4.ogg | Bin .../crisis_tangaccordian/c5.ogg | Bin .../crisis_harmonica/c3.ogg | Bin .../crisis_harmonica/c4.ogg | Bin .../crisis_harmonica/c5.ogg | Bin 19 files changed, 99 insertions(+), 27 deletions(-) create mode 100644 code/modules/synthesized_instruments/instrument_data/accordion.dm create mode 100644 code/modules/synthesized_instruments/instrument_data/harmonica.dm create mode 100644 code/modules/synthesized_instruments/real_instruments/Accordion/accordion.dm create mode 100644 code/modules/synthesized_instruments/real_instruments/Harmonica/harmonica.dm create mode 100644 code/modules/synthesized_instruments/real_instruments/Recorder/recorder.dm create mode 100644 code/modules/synthesized_instruments/real_instruments/Saxophone/saxophone.dm rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_accordian/c2.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_accordian/c3.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_accordian/c4.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_accordian/c5.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_tangaccordian/c2.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_tangaccordian/c3.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_tangaccordian/c4.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => accordion}/crisis_tangaccordian/c5.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => harmonica}/crisis_harmonica/c3.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => harmonica}/crisis_harmonica/c4.ogg (100%) rename code/modules/synthesized_instruments/samples/{organ => harmonica}/crisis_harmonica/c5.ogg (100%) diff --git a/baystation12.dme b/baystation12.dme index 703c1a526b4..270df40af48 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -2985,16 +2985,22 @@ #include "code\modules\synthesized_instruments\sound_player.dm" #include "code\modules\synthesized_instruments\sound_token.dm" #include "code\modules\synthesized_instruments\usage_info.dm" +#include "code\modules\synthesized_instruments\instrument_data\accordion.dm" #include "code\modules\synthesized_instruments\instrument_data\brass.dm" #include "code\modules\synthesized_instruments\instrument_data\chromatic_percussion.dm" #include "code\modules\synthesized_instruments\instrument_data\fun.dm" #include "code\modules\synthesized_instruments\instrument_data\guitar.dm" +#include "code\modules\synthesized_instruments\instrument_data\harmonica.dm" #include "code\modules\synthesized_instruments\instrument_data\impossible_instruments.dm" #include "code\modules\synthesized_instruments\instrument_data\obsolete.dm" #include "code\modules\synthesized_instruments\instrument_data\organ.dm" #include "code\modules\synthesized_instruments\instrument_data\piano.dm" +#include "code\modules\synthesized_instruments\real_instruments\Accordion\accordion.dm" #include "code\modules\synthesized_instruments\real_instruments\Guitar\guitar.dm" +#include "code\modules\synthesized_instruments\real_instruments\Harmonica\harmonica.dm" #include "code\modules\synthesized_instruments\real_instruments\Piano\piano.dm" +#include "code\modules\synthesized_instruments\real_instruments\Recorder\recorder.dm" +#include "code\modules\synthesized_instruments\real_instruments\Saxophone\saxophone.dm" #include "code\modules\synthesized_instruments\real_instruments\Synthesizer\synthesizer.dm" #include "code\modules\synthesized_instruments\real_instruments\Trumpet\trumpet.dm" #include "code\modules\synthesized_instruments\real_instruments\Violin\violin.dm" diff --git a/code/modules/synthesized_instruments/instrument_data/accordion.dm b/code/modules/synthesized_instruments/instrument_data/accordion.dm new file mode 100644 index 00000000000..d67c234fc9f --- /dev/null +++ b/code/modules/synthesized_instruments/instrument_data/accordion.dm @@ -0,0 +1,21 @@ +/datum/instrument/accordion + name = "Generic accordion" + category = "Accordion" + + +/datum/instrument/accordion/crisis_accordian + name = "Crisis Accordian" + id = "craccordian" + samples = list("36"='code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c2.ogg', + "48"='code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c3.ogg', + "60"='code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c4.ogg', + "72"='code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c5.ogg') + + +/datum/instrument/accordion/crisis_tango_accordian + name = "Crisis Tango Accordian" + id = "crtangaccordian" + samples = list("36"='code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c2.ogg', + "48"='code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c3.ogg', + "60"='code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c4.ogg', + "72"='code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c5.ogg') \ No newline at end of file diff --git a/code/modules/synthesized_instruments/instrument_data/harmonica.dm b/code/modules/synthesized_instruments/instrument_data/harmonica.dm new file mode 100644 index 00000000000..ced34becb22 --- /dev/null +++ b/code/modules/synthesized_instruments/instrument_data/harmonica.dm @@ -0,0 +1,11 @@ +/datum/instrument/harmonica + name = "Generic harmonica" + category = "Harmonica" + + +/datum/instrument/harmonica/crisis_harmonica + name = "Crisis Harmonica" + id = "crharmony" + samples = list("48"='code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c3.ogg', + "60"='code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c4.ogg', + "72"='code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c5.ogg') \ No newline at end of file diff --git a/code/modules/synthesized_instruments/instrument_data/organ.dm b/code/modules/synthesized_instruments/instrument_data/organ.dm index 929b0eaa1db..11603c78436 100644 --- a/code/modules/synthesized_instruments/instrument_data/organ.dm +++ b/code/modules/synthesized_instruments/instrument_data/organ.dm @@ -18,30 +18,4 @@ samples = list("36"='code/modules/synthesized_instruments/samples/organ/crisis_hammond/c2.ogg', "48"='code/modules/synthesized_instruments/samples/organ/crisis_hammond/c3.ogg', "60"='code/modules/synthesized_instruments/samples/organ/crisis_hammond/c4.ogg', - "72"='code/modules/synthesized_instruments/samples/organ/crisis_hammond/c5.ogg') - - -/datum/instrument/organ/crisis_accordian - name = "Crisis Accordian" - id = "crack" - samples = list("36"='code/modules/synthesized_instruments/samples/organ/crisis_accordian/c2.ogg', - "48"='code/modules/synthesized_instruments/samples/organ/crisis_accordian/c3.ogg', - "60"='code/modules/synthesized_instruments/samples/organ/crisis_accordian/c4.ogg', - "72"='code/modules/synthesized_instruments/samples/organ/crisis_accordian/c5.ogg') - - -/datum/instrument/organ/crisis_harmonica - name = "Crisis Harmonica" - id = "crharmony" - samples = list("48"='code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c3.ogg', - "60"='code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c4.ogg', - "72"='code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c5.ogg') - - -/datum/instrument/organ/crisis_tango_accordian - name = "Crisis Tango Accordian" - id = "crtango" - samples = list("36"='code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c2.ogg', - "48"='code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c3.ogg', - "60"='code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c4.ogg', - "72"='code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c5.ogg') + "72"='code/modules/synthesized_instruments/samples/organ/crisis_hammond/c5.ogg') \ No newline at end of file diff --git a/code/modules/synthesized_instruments/real_instruments/Accordion/accordion.dm b/code/modules/synthesized_instruments/real_instruments/Accordion/accordion.dm new file mode 100644 index 00000000000..4ed78af1cc2 --- /dev/null +++ b/code/modules/synthesized_instruments/real_instruments/Accordion/accordion.dm @@ -0,0 +1,15 @@ +/datum/sound_player/accordion + volume = 50 + range = 10 + +/obj/item/device/synthesized_instrument/accordion + name = "accordion" + desc = "Sretch and squeeze it to make music." + icon = 'icons/obj/musician.dmi' + icon_state = "accordion" + force = 3 + path = /datum/instrument/accordion + sound_player = /datum/sound_player/accordion + +/obj/structure/synthesized_instrument/synthesizer/shouldStopPlaying(mob/user) + return !(src && in_range(src, user)) diff --git a/code/modules/synthesized_instruments/real_instruments/Harmonica/harmonica.dm b/code/modules/synthesized_instruments/real_instruments/Harmonica/harmonica.dm new file mode 100644 index 00000000000..b4799a95249 --- /dev/null +++ b/code/modules/synthesized_instruments/real_instruments/Harmonica/harmonica.dm @@ -0,0 +1,15 @@ +/datum/sound_player/harmonica + volume = 50 + range = 10 + +/obj/item/device/synthesized_instrument/harmonica + name = "harmonica" + desc = "If you see this, you should be in the prison." + icon = 'icons/obj/musician.dmi' + icon_state = "harmonica" + force = 0 + path = /datum/instrument/harmonica + sound_player = /datum/sound_player/harmonica + +/obj/structure/synthesized_instrument/synthesizer/shouldStopPlaying(mob/user) + return !(src && in_range(src, user)) diff --git a/code/modules/synthesized_instruments/real_instruments/Recorder/recorder.dm b/code/modules/synthesized_instruments/real_instruments/Recorder/recorder.dm new file mode 100644 index 00000000000..cabb71a0124 --- /dev/null +++ b/code/modules/synthesized_instruments/real_instruments/Recorder/recorder.dm @@ -0,0 +1,15 @@ +/datum/sound_player/recorder + volume = 50 + range = 10 + +/obj/item/device/synthesized_instrument/recorder + name = "recorder" + desc = "Wooden stick with holes. Blow into it to make some music." + icon = 'icons/obj/musician.dmi' + icon_state = "recorder" + force = 0 + path = /datum/instrument + sound_player = /datum/sound_player/recorder + +/obj/structure/synthesized_instrument/synthesizer/shouldStopPlaying(mob/user) + return !(src && in_range(src, user)) diff --git a/code/modules/synthesized_instruments/real_instruments/Saxophone/saxophone.dm b/code/modules/synthesized_instruments/real_instruments/Saxophone/saxophone.dm new file mode 100644 index 00000000000..fdaafa812a2 --- /dev/null +++ b/code/modules/synthesized_instruments/real_instruments/Saxophone/saxophone.dm @@ -0,0 +1,15 @@ +/datum/sound_player/saxophone + volume = 50 + range = 10 + +/obj/item/device/synthesized_instrument/saxophone + name = "saxophone" + desc = "Curved metal stick with tube and multiple holes. Blow into it to make some music." + icon = 'icons/obj/musician.dmi' + icon_state = "saxophone" + force = 3 + path = /datum/instrument/brass + sound_player = /datum/sound_player/saxophone + +/obj/structure/synthesized_instrument/synthesizer/shouldStopPlaying(mob/user) + return !(src && in_range(src, user)) diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_accordian/c2.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c2.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_accordian/c2.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c2.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_accordian/c3.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c3.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_accordian/c3.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c3.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_accordian/c4.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c4.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_accordian/c4.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c4.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_accordian/c5.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c5.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_accordian/c5.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_accordian/c5.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c2.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c2.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c2.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c2.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c3.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c3.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c3.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c3.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c4.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c4.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c4.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c4.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c5.ogg b/code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c5.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_tangaccordian/c5.ogg rename to code/modules/synthesized_instruments/samples/accordion/crisis_tangaccordian/c5.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c3.ogg b/code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c3.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c3.ogg rename to code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c3.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c4.ogg b/code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c4.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c4.ogg rename to code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c4.ogg diff --git a/code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c5.ogg b/code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c5.ogg similarity index 100% rename from code/modules/synthesized_instruments/samples/organ/crisis_harmonica/c5.ogg rename to code/modules/synthesized_instruments/samples/harmonica/crisis_harmonica/c5.ogg