diff --git a/code/__defines/dcs/helpers.dm b/code/__defines/dcs/helpers.dm index 144e94f1fe..c5c7e3c42d 100644 --- a/code/__defines/dcs/helpers.dm +++ b/code/__defines/dcs/helpers.dm @@ -6,6 +6,10 @@ #define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) ) +/// Signifies that this proc is used to handle signals. +/// Every proc you pass to RegisterSignal must have this. +#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE) + /// A wrapper for _AddElement that allows us to pretend we're using normal named arguments #define AddElement(arguments...) _AddElement(list(##arguments)) /// A wrapper for _RemoveElement that allows us to pretend we're using normal named arguments diff --git a/code/datums/supplypacks/musical.dm b/code/datums/supplypacks/musical.dm new file mode 100644 index 0000000000..61401863bf --- /dev/null +++ b/code/datums/supplypacks/musical.dm @@ -0,0 +1,39 @@ +/datum/supply_pack/musical/strings + contains = list( + /obj/item/instrument/violin, + /obj/item/instrument/banjo, + /obj/item/instrument/guitar, + /obj/item/instrument/eguitar, + ) + name = "string instruments" + cost = 50 + containertype = /obj/structure/closet/crate + containername = "string instrument crate" + +/datum/supply_pack/musical/wind + contains = list( + /obj/item/instrument/accordion, + /obj/item/instrument/trumpet, + /obj/item/instrument/saxophone, + /obj/item/instrument/trombone, + /obj/item/instrument/recorder, + /obj/item/instrument/harmonica, + /obj/item/instrument/bikehorn, + ) + name = "wind instruments" + cost = 50 + containertype = /obj/structure/closet/crate + containername = "wind instrument crate" + +/datum/supply_pack/musical/keys + contains = list( + /obj/item/instrument/piano_synth, + /obj/item/instrument/glockenspiel, // cough + /obj/item/instrument/musicalmoth + ) + name = "keyed instruments" + cost = 50 + containertype = /obj/structure/closet/crate + containername = "keyed instruments crate" + +// /obj/item/instrument/piano_synth/headphones \ No newline at end of file diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index 7318fe7898..455c10e5cb 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -69,24 +69,17 @@ . = ..() song.allowed_instrument_ids = SSinstruments.synthesizer_instrument_ids -/* I'll come back to you... /obj/item/instrument/piano_synth/headphones name = "headphones" desc = "Unce unce unce unce. Boop!" - icon = 'icons/obj/clothing/accessories.dmi' - lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi' - righthand_file = 'icons/mob/inhands/clothing_righthand.dmi' icon_state = "headphones" - inhand_icon_state = "headphones" - slot_flags = ITEM_SLOT_EARS | ITEM_SLOT_HEAD + slot_flags = SLOT_EARS | SLOT_HEAD force = 0 - w_class = WEIGHT_CLASS_SMALL - custom_price = PAYCHECK_ASSISTANT * 2.5 + w_class = ITEMSIZE_SMALL instrument_range = 1 -/obj/item/instrument/piano_synth/headphones/ComponentInitialize() +/obj/item/instrument/piano_synth/headphones/Initialize() . = ..() - AddElement(/datum/element/update_icon_updates_onmob) RegisterSignal(src, COMSIG_SONG_START, .proc/start_playing) RegisterSignal(src, COMSIG_SONG_END, .proc/stop_playing) @@ -95,27 +88,37 @@ */ /obj/item/instrument/piano_synth/headphones/proc/start_playing() SIGNAL_HANDLER + icon_state = "[initial(icon_state)]_on" - update_appearance() + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + if(H.l_ear == src || H.r_ear == src) + H.update_inv_ears() + else if(H.head == src) + H.update_inv_head() /** * Called by a component signal when our song stops playing. */ /obj/item/instrument/piano_synth/headphones/proc/stop_playing() SIGNAL_HANDLER + icon_state = "[initial(icon_state)]" - update_appearance() + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + if(H.l_ear == src || H.r_ear == src) + H.update_inv_ears() + else if(H.head == src) + H.update_inv_head() + /obj/item/instrument/piano_synth/headphones/spacepods name = "\improper Nanotrasen space pods" desc = "Flex your money, AND ignore what everyone else says, all at once!" icon_state = "spacepods" - inhand_icon_state = "spacepods" - slot_flags = ITEM_SLOT_EARS - strip_delay = 100 //air pods don't fall out + slot_flags = SLOT_EARS + //strip_delay = 100 //air pods don't fall out instrument_range = 0 //you're paying for quality here - custom_premium_price = PAYCHECK_ASSISTANT * 36 //Save up 5 shifts worth of pay just to lose it down a drainpipe on the sidewalk -*/ /obj/item/instrument/banjo name = "banjo" diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index a61d7e9173..08bf51b4fd 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/items/lefthand_instruments.dmi b/icons/mob/items/lefthand_instruments.dmi index edd78927aa..54f8b47b2f 100644 Binary files a/icons/mob/items/lefthand_instruments.dmi and b/icons/mob/items/lefthand_instruments.dmi differ diff --git a/icons/mob/items/righthand_instruments.dmi b/icons/mob/items/righthand_instruments.dmi index 7cc8568b90..725b4de636 100644 Binary files a/icons/mob/items/righthand_instruments.dmi and b/icons/mob/items/righthand_instruments.dmi differ diff --git a/icons/obj/musician.dmi b/icons/obj/musician.dmi index c3e0f21f05..0db7d4c33f 100644 Binary files a/icons/obj/musician.dmi and b/icons/obj/musician.dmi differ diff --git a/vorestation.dme b/vorestation.dme index f28c1ac91e..30901d484d 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -453,6 +453,7 @@ #include "code\datums\supplypacks\misc_vr.dm" #include "code\datums\supplypacks\munitions.dm" #include "code\datums\supplypacks\munitions_vr.dm" +#include "code\datums\supplypacks\musical.dm" #include "code\datums\supplypacks\recreation.dm" #include "code\datums\supplypacks\recreation_vr.dm" #include "code\datums\supplypacks\robotics.dm" @@ -4016,6 +4017,6 @@ #include "maps\submaps\surface_submaps\plains\plains_areas.dm" #include "maps\submaps\surface_submaps\wilderness\wilderness.dm" #include "maps\submaps\surface_submaps\wilderness\wilderness_areas.dm" -#include "maps\virgo_minitest\virgo_minitest.dm" +#include "maps\tether\tether.dm" #include "maps\~map_system\maps.dm" // END_INCLUDE