diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 2737871ca6f..e3fb415318e 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -154,6 +154,7 @@ // BUBBER EDIT ADDITION BEGIN #define ANNOUNCER_GRAVGENBLACKOUT "announcer_gravgenblackout" +#define ANNOUNCER_METEORWARNING "announcer_meteorwarning" // BUBBER EDIT ADDITION END @@ -203,6 +204,7 @@ GLOBAL_LIST_INIT(announcer_keys, list( //SKYRAT EDIT END // BUBBER EDIT ADDITION BEGIN ANNOUNCER_GRAVGENBLACKOUT, + ANNOUNCER_METEORWARNING, // BUBBER EDIT ADDITION END )) diff --git a/code/modules/events/meteors/meteor_wave_events.dm b/code/modules/events/meteors/meteor_wave_events.dm index 8a43af74601..42516c961aa 100644 --- a/code/modules/events/meteors/meteor_wave_events.dm +++ b/code/modules/events/meteors/meteor_wave_events.dm @@ -90,8 +90,10 @@ /datum/round_event/meteor_wave/meaty wave_name = "meaty" +/* BUBBER EDIT REMOVAL BEGIN - moved to modular_zubbers/code/modules/events/meteor_wave.dm /datum/round_event/meteor_wave/meaty/announce(fake) priority_announce("Meaty ores have been detected on collision course with the station.", "Oh crap, get the mop.", ANNOUNCER_METEORS) +*/// BUBBER EDIT REMOVAL FINISH /datum/round_event_control/meteor_wave/dust_storm name = "Major Space Dust" diff --git a/modular_skyrat/modules/alerts/code/alert_sound_to_playing.dm b/modular_skyrat/modules/alerts/code/alert_sound_to_playing.dm index 5e110cc2a93..4ec4ccd4443 100644 --- a/modular_skyrat/modules/alerts/code/alert_sound_to_playing.dm +++ b/modular_skyrat/modules/alerts/code/alert_sound_to_playing.dm @@ -14,6 +14,6 @@ else var/area/A = get_area(M) if(is_type_in_typecache(A, quiet_areas)) //These areas don't hear it as loudly - M.playsound_local(get_turf(M), S, 10, FALSE) + M.playsound_local(get_turf(M), S, 30, FALSE) else M.playsound_local(get_turf(M), S, 70, FALSE) diff --git a/modular_skyrat/modules/ices_events/code/events/ev_meteors.dm b/modular_skyrat/modules/ices_events/code/events/ev_meteors.dm index b11ccf795bd..52857ae15b7 100644 --- a/modular_skyrat/modules/ices_events/code/events/ev_meteors.dm +++ b/modular_skyrat/modules/ices_events/code/events/ev_meteors.dm @@ -48,6 +48,7 @@ log_game("EVENT: Meteor Wave: ICES requested intensity is [wave_name]") +/* BUBBER EDIT REMOVAL BEGIN - moved to modular_zubbers/code/modules/events/meteor_wave.dm /datum/round_event/meteor_wave/New() . = ..() start_when = rand(METEOR_WAVE_MIN_NOTICE, METEOR_WAVE_MAX_NOTICE) @@ -57,6 +58,8 @@ priority_announce("Meteors have been detected on collision course with the station. The energy field generator is disabled or missing. First collision in approximately [start_when * 2] seconds. Ensure all sensitive areas and equipment are shielded.", "Meteor Alert", ANNOUNCER_METEORS) if(wave_name == "threatening" || wave_name == "spooky") INVOKE_ASYNC(SSsecurity_level, TYPE_PROC_REF(/datum/controller/subsystem/security_level/, minimum_security_level), SEC_LEVEL_ORANGE, TRUE, FALSE) +*/// BUBBER EDIT REMOVAL END + /datum/round_event/meteor_wave/tick(seconds_between_ticks) if(ISMULTIPLE(activeFor, METEOR_TICKS_BETWEEN_WAVES)) diff --git a/modular_zubbers/code/modules/events/meteor_wave.dm b/modular_zubbers/code/modules/events/meteor_wave.dm new file mode 100644 index 00000000000..c5e64763849 --- /dev/null +++ b/modular_zubbers/code/modules/events/meteor_wave.dm @@ -0,0 +1,298 @@ +GLOBAL_LIST_INIT(meteors_candy_halloween, list( + /obj/effect/meteor/candy/party_popper = 6, + /obj/effect/meteor/candy/pumpkin = 16, + /obj/effect/meteor/candy/pumpking = 6, + /obj/effect/meteor/candy/corgi = 6, + /obj/effect/meteor/candy/syndie = 1, + /obj/effect/meteor/candy/bluespace = 2, + /obj/effect/meteor/candy/banana = 2, +)) + +/datum/round_event/meteor_wave + /// Time we give before the wave for cargo to order / engineering to set up meteor shields + var/warning_time = 30 EVENT_SECONDS + /// Number of SSevent ticks for the wave to last (TG original: 60) + var/wave_duration = 45 + /// Prefix for the announcement + var/announce_prefix = "Meteor Alert" + /// Description for the announcement + var/announce_desc = "Meteors" + /// Added to the announcement giving a preview of the wave intensity + var/announce_fluff = "Crew are advised to take shelter within the central areas of the station." + +/datum/round_event/meteor_wave/threatening + warning_time = 420 EVENT_SECONDS // smoke a joint and start your mindless repairs + announce_fluff = "Portable shield generators may be procured by the cargo department. Ensure all sensitive areas and equipment are shielded." + +/datum/round_event/meteor_wave/catastrophic + warning_time = 420 EVENT_SECONDS + announce_fluff = "Portable shield generators may be procured by the cargo department. Ensure all sensitive areas and equipment are shielded." + +/datum/round_event/meteor_wave/dust_storm + warning_time = 6 EVENT_SECONDS + +/datum/round_event/meteor_wave/meaty + announce_prefix = "Oh crap, get the mop." + announce_desc = "Meaty ores" + announce_fluff = "Please refrain from eating the space meat. We know it's tempting, but this is not the time to test your culinary curiosity." + +/datum/round_event/meteor_wave/candy + wave_name = "candy" + announce_prefix = "2SPOOKY DELIVERY INCOMING" + announce_desc = "Spooky packages" + announce_fluff = "We're not responsible for what happens if you try to stick fragments in your mouth. Why do we even have to tell you that?" + +/datum/round_event/meteor_wave/New() + . = ..() + start_when = rand(warning_time, warning_time * 1.5) + end_when = start_when + rand(wave_duration, wave_duration * 1.5) + +/datum/round_event/meteor_wave/determine_wave_type() + if(!wave_name) + wave_name = pick_weight(list( + "normal" = 50, + "threatening" = 40, + "catastrophic" = 10)) + + if(check_holidays(HALLOWEEN)) + if(prob(50)) + wave_name = "candy" + wave_type = GLOB.meteors_candy_halloween + warning_time = /datum/round_event/meteor_wave/candy::warning_time + announce_prefix = /datum/round_event/meteor_wave/candy::announce_prefix + announce_desc = /datum/round_event/meteor_wave/candy::announce_desc + announce_fluff = /datum/round_event/meteor_wave/candy::announce_fluff + return + + switch(wave_name) + if("normal") + wave_type = GLOB.meteors_normal + if("threatening") + wave_type = GLOB.meteors_threatening + if("catastrophic") + if(check_holidays(HALLOWEEN)) + wave_type = GLOB.meteorsSPOOKY + else + wave_type = GLOB.meteors_catastrophic + if("meaty") + wave_type = GLOB.meateors + if("space dust") + wave_type = GLOB.meteors_dust + if("halloween") + wave_type = GLOB.meteorsSPOOKY + if("candy") + wave_type = GLOB.meteors_candy_halloween + else + stack_trace("Wave name of [wave_name] not recognised.") + kill() + +/datum/round_event/meteor_wave/announce(fake) + priority_announce( + text = "[announce_desc] have been detected on collision course with the station. The energy field generator is disabled or missing. First collision in approximately [DisplayTimeText(start_when * 20, 10)]. [announce_fluff]", + title = announce_prefix, + sound = ANNOUNCER_METEORWARNING, + ) + + if(fake) + return + + if(warning_time > 180 EVENT_SECONDS) + addtimer(CALLBACK(src, PROC_REF(meteor_reminder)), ((start_when * 20) - 15 SECONDS)) + +/datum/round_event/meteor_wave/proc/meteor_reminder() + event_minimum_security_level(min_level = SEC_LEVEL_ORANGE, eng_access = TRUE, maint_access = FALSE) + priority_announce( + text = "[announce_desc] approaching, brace for impact. Long range scanners indicate a high density of meteors incoming, the kind of impact that makes you rethink your life choices. So, hold on tight and try not to fly into anything too important.", + title = announce_prefix, + sound = 'sound/items/radio/radio_important.ogg', // basically silent, since the securitylevel proc will make a sound + sender_override = "[command_name()] Engineering Division", + color_override = "orange", + ) + +/datum/round_event_control/meteor_wave/candy + name = "Meteor Wave: Candy" + typepath = /datum/round_event/meteor_wave/candy + weight = 0 + description = "A meteor wave for the holidays, filled with candy." + +/obj/effect/meteor + lifetime = 45 SECONDS + +/obj/effect/meteor/candy + name = "debug candy meteor" + desc = "if you see this, shove a twink bar into your nearest coder" + dropamt = 8 + meteordrop = list( + /obj/item/food/candy/hundred_credit_bar, + /obj/item/food/candy/coconut_joy, + /obj/item/food/candy/hurr_bar, + /obj/item/food/candy/laughter_bar, + /obj/item/food/candy/kit_catgirl_metaclique_bar, + /obj/item/food/candy/twink_bar, + /obj/item/food/candy/malf_way, + /obj/item/food/candy/triggerfinger, + /obj/item/food/sosjerky, + /obj/item/food/syndicake, + /obj/item/food/energybar, + /obj/item/food/cnds/random, + /obj/item/food/cornchips, + /obj/item/food/shok_roks/random, + /obj/item/food/cookie/sugar/spookyskull, + /obj/item/food/cookie/sugar/spookycoffin, + /obj/item/food/candy_corn, + ) + +/obj/effect/meteor/candy/get_hit() + hits-- + if(hits <= 0) + meteor_effect() + candy_effect() + qdel(src) + +/obj/effect/meteor/candy/proc/candy_effect() + var/list/scatter_locations = list() + var/turf/my_turf = get_turf(src) + for(var/turf/turf_in_view in view(2, my_turf)) + if(isclosedturf(turf_in_view)) + continue + + scatter_locations += turf_in_view + + for(var/throws = dropamt, throws > 0, throws--) + var/thing_to_spawn = pick(meteordrop) + var/turf/spawn_loc = pick(scatter_locations) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(make_fluff_debris), thing_to_spawn, spawn_loc), 1 SECONDS); + +/proc/make_fluff_debris(type_to_make, location) + new type_to_make(location) + new /obj/effect/decal/cleanable/confetti(location) + +/obj/effect/meteor/candy/ram_turf(turf/rammed_turf) + if(!isspaceturf(rammed_turf)) + new /obj/effect/decal/cleanable/confetti(rammed_turf) + +/obj/effect/meteor/candy/pumpkin + name = "cat-o-lantern" + desc = "A pumpkin-shaped meteor filled with candy. It's a bit spooky." + icon_state = "spooky" + threat = 5 + +/obj/effect/meteor/candy/pumpkin/meteor_effect() + ..() + explosion(src, heavy_impact_range = 1, light_impact_range = 2, flash_range = 3, adminlog = FALSE) + +/obj/effect/meteor/candy/pumpking + name = "PUMPKING" + desc = "THE PUMPKING'S COMING!" + icon_state = "spooky" + hits = 6 + heavy = TRUE + dropamt = 9 + threat = 10 + +/obj/effect/meteor/candy/pumpking/Initialize() + . = ..() + src.transform *= 2 + meteorsound = pick('sound/effects/hallucinations/im_here1.ogg', 'sound/effects/hallucinations/im_here2.ogg') + +/obj/effect/meteor/candy/pumpking/meteor_effect() + ..() + explosion(src, devastation_range = 1, heavy_impact_range = 2, light_impact_range = 3, flash_range = 4, adminlog = FALSE) + +/obj/effect/meteor/candy/party_popper + name = "party popper" + desc = "A small device used for celebrations and annoying the janitor." + icon = 'icons/obj/toys/toy.dmi' + icon_state = "party_popper" + pass_flags = PASSTABLE | PASSGRILLE + hitpwr = EXPLODE_LIGHT + hits = 3 + threat = 4 + meteorsound = 'sound/effects/snap.ogg' + +/obj/effect/meteor/candy/party_popper/meteor_effect() + ..() + new /obj/item/reagent_containers/spray/chemsprayer/party(get_turf(src)) + +/obj/effect/meteor/candy/corgi + name = "corgi pinata" + desc = "Who thought beating candy out of dogs was a fun activity anyways?" + icon = 'icons/obj/toys/toy.dmi' + icon_state = "pinata" + threat = 5 + +/obj/effect/meteor/candy/corgi/meteor_effect() + ..() + explosion(src, heavy_impact_range = 1, light_impact_range = 2, flash_range = 3, adminlog = FALSE) + +/obj/effect/meteor/candy/syndie + name = "syndie pinata" + desc = "The red ones go faster... Now you know why." + icon = 'icons/obj/toys/toy.dmi' + icon_state = "pinata_syndie" + hits = 12 + heavy = TRUE + threat = 30 + meteordrop = list(/obj/item/reagent_containers/cocaine) + meteorsound = 'sound/effects/bamf.ogg' + var/package_count = 8 + +/obj/effect/meteor/candy/syndie/meteor_effect() + ..() + var/start_turf = get_turf(src) + + while(package_count > 0) + var/startSide = pick(GLOB.cardinals) + var/turf/destination = spaceDebrisStartLoc(startSide, z) + new /obj/effect/meteor/cluster_fragment(start_turf, destination) + package_count-- + + explosion(src, heavy_impact_range = 2, light_impact_range = 3, flash_range = 4, adminlog = FALSE) + +/obj/effect/meteor/cocaine_brick + name = "cocaine brick fragment" + desc = "A fast-moving fragment of exploded... white powder." + icon = 'modular_skyrat/modules/morenarcotics/icons/crack.dmi' + icon_state = "cocainebrick" + dropamt = 7 + meteordrop = list(/obj/item/reagent_containers/cocaine) + meteorsound = 'sound/effects/bamf.ogg' + +/obj/effect/meteor/candy/bluespace + name = "bluespace chunk" + desc = "A large geode containing bluespace dust at its core, hurtling through space. That's the stuff the crew are here to research. How convenient for them." + icon_state = "bluespace" + dropamt = 9 + hits = 12 + threat = 12 + signature = "bluespace flux" + +/obj/effect/meteor/candy/bluespace/Bump() + ..() + if(prob(35)) + do_teleport(src, get_turf(src), 6, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE) + +/obj/effect/meteor/candy/banana + name = "bananium chunk" + desc = "Maybe it's a chunk blasted off of the legendary Clown Planet... How annoying." + icon_state = "bananium" + dropamt = 9 + hits = 175 //Honks everything, including space tiles. Depending on the angle/how much stuff it hits, there's a fair chance that it will spare the station from the actual explosion + meteordrop = list(/obj/item/stack/ore/bananium) + meteorsound = 'sound/items/bikehorn.ogg' + threat = 15 + movement_type = PHASING + signature = "comedy" + +/obj/effect/meteor/candy/banana/meteor_effect() + ..() + playsound(src, 'sound/items/airhorn/AirHorn.ogg', 100, TRUE, -1) + for(var/atom/movable/object in view(4, get_turf(src))) + var/turf/throwtarget = get_edge_target_turf(get_turf(src), get_dir(get_turf(src), get_step_away(object, get_turf(src)))) + object.safe_throw_at(throwtarget, 5, 1, force = MOVE_FORCE_STRONG) + +/obj/effect/meteor/banana/ram_turf(turf/bumped) + for(var/mob/living/slipped in get_turf(bumped)) + slipped.slip(100, slipped.loc,- GALOSHES_DONT_HELP|SLIDE, 0, FALSE) + slipped.visible_message(span_warning("[src] honks [slipped] to the floor!"), span_userdanger("[src] harmlessly passes through you, knocking you over.")) + get_hit() diff --git a/modular_zubbers/code/modules/storyteller/event_defines/mundane/mundane_overrides.dm b/modular_zubbers/code/modules/storyteller/event_defines/mundane/mundane_overrides.dm index 98acb917e67..5c2ca5b2171 100644 --- a/modular_zubbers/code/modules/storyteller/event_defines/mundane/mundane_overrides.dm +++ b/modular_zubbers/code/modules/storyteller/event_defines/mundane/mundane_overrides.dm @@ -89,6 +89,9 @@ /datum/round_event_control/easter track = EVENT_TRACK_MUNDANE + roundstart = TRUE + weight = 0 + max_occurrences = 0 tags = list(TAG_COMMUNAL, TAG_POSITIVE) /datum/round_event_control/rabbitrelease @@ -97,6 +100,9 @@ /datum/round_event_control/valentines track = EVENT_TRACK_MUNDANE + roundstart = TRUE + weight = 0 + max_occurrences = 0 tags = list(TAG_COMMUNAL, TAG_POSITIVE) /datum/round_event_control/santa @@ -105,4 +111,7 @@ /datum/round_event_control/spooky track = EVENT_TRACK_MUNDANE + roundstart = TRUE + weight = 0 + max_occurrences = 0 tags = list(TAG_COMMUNAL, TAG_POSITIVE, TAG_SPOOKY) diff --git a/modular_zubbers/master_files/code/datums/announcers/default_announcer.dm b/modular_zubbers/master_files/code/datums/announcers/default_announcer.dm index 54dfff6cdbc..be5a506d36e 100644 --- a/modular_zubbers/master_files/code/datums/announcers/default_announcer.dm +++ b/modular_zubbers/master_files/code/datums/announcers/default_announcer.dm @@ -4,5 +4,6 @@ /datum/centcom_announcer/default/New() event_sounds |= list( ANNOUNCER_GRAVGENBLACKOUT = 'modular_zubbers/sound/alerts/gravgen_blackout.ogg', + ANNOUNCER_METEORWARNING = 'modular_zubbers/sound/alerts/meteor_warning.ogg', ) . = ..() diff --git a/modular_zubbers/master_files/code/modules/holiday/holiday.dm b/modular_zubbers/master_files/code/modules/holiday/holiday.dm new file mode 100644 index 00000000000..1c03abec4ad --- /dev/null +++ b/modular_zubbers/master_files/code/modules/holiday/holiday.dm @@ -0,0 +1,113 @@ +#define PURPLE_LIGHT "#9F79F2" +#define PURPLE_DARK "#6141A6" +#define ORANGE_LIGHT "#F27F1B" +#define ORANGE_DARK "#F24F13" +#define GREY_LIGHT "#FFFFFF" +#define GREY_DARK "#292929" + +/datum/holiday/proc/queue_storyteller_celebration(datum/round_event/event, datum/round_event_control/control) + if(isnull(event) || isnull(control)) + stack_trace("Invalid holiday event passed to storyteller") + return + + if(locate(event) in SSevents.running) + return + + var/datum/round_event_control/holiday_event = locate(control) in SSevents.control + if(isnull(holiday_event)) + return + + holiday_event.run_event(admin_forced = TRUE) + +/datum/holiday/valentines/celebrate() + . = ..() + queue_storyteller_celebration(event = /datum/round_event/valentines, control = /datum/round_event_control/valentines) + +/datum/holiday/easter/celebrate() + . = ..() + queue_storyteller_celebration(event = /datum/round_event/easter, control = /datum/round_event_control/easter) + +/datum/holiday/halloween + name = HALLOWEEN + begin_day = 17 + holiday_colors = list() + +/datum/holiday/halloween/New() + . = ..() + var/palette = rand(1, 15) + switch(palette) + if(1, 2) + holiday_colors += list( + PURPLE_LIGHT, + PURPLE_DARK, + GREY_DARK, + ORANGE_DARK, + ORANGE_LIGHT, + GREY_LIGHT, + ) + if(3) + holiday_colors += list( + PURPLE_LIGHT, + ORANGE_LIGHT, + GREY_LIGHT, + ) + if(4) + holiday_colors += list( + PURPLE_DARK, + ORANGE_DARK, + GREY_DARK, + ) + if(5) + holiday_colors += list( + pick(GREY_LIGHT, GREY_DARK), + pick(PURPLE_LIGHT, PURPLE_DARK), + pick(ORANGE_LIGHT, ORANGE_DARK), + ) + if(6) + holiday_colors += list( + pick(GREY_LIGHT, GREY_DARK), + pick(PURPLE_LIGHT, PURPLE_DARK), + ) + if(7) + holiday_colors += list( + pick(GREY_LIGHT, GREY_DARK), + pick(ORANGE_LIGHT, ORANGE_DARK), + ) + if(8) + holiday_colors += list( + pick(PURPLE_LIGHT, PURPLE_DARK), + pick(ORANGE_LIGHT, ORANGE_DARK), + ) + if(9) + holiday_colors += list(PURPLE_LIGHT, ORANGE_LIGHT) + if(10) + holiday_colors += list(PURPLE_DARK, ORANGE_DARK) + if(11) + holiday_colors = list( + COLOR_PRIDE_PURPLE, + COLOR_PRIDE_BLUE, + COLOR_PRIDE_GREEN, + COLOR_PRIDE_YELLOW, + COLOR_PRIDE_ORANGE, + COLOR_PRIDE_RED, + ) + if(12) + holiday_colors += PURPLE_LIGHT + if(13) + holiday_colors += ORANGE_LIGHT + if(14) + holiday_colors += PURPLE_DARK + if(15) + holiday_colors += ORANGE_DARK + +/datum/holiday/halloween/celebrate() + . = ..() + queue_storyteller_celebration(event = /datum/round_event/spooky, control = /datum/round_event_control/spooky) + +#undef PURPLE_LIGHT +#undef PURPLE_DARK +#undef ORANGE_LIGHT +#undef ORANGE_DARK +#undef GREY_LIGHT +#undef GREY_DARK + diff --git a/modular_zubbers/sound/alerts/meteor_warning.ogg b/modular_zubbers/sound/alerts/meteor_warning.ogg new file mode 100644 index 00000000000..daf23e5d82c Binary files /dev/null and b/modular_zubbers/sound/alerts/meteor_warning.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 811f676312d..09c96240854 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8992,6 +8992,7 @@ #include "modular_zubbers\code\modules\emotes\species_screams.dm" #include "modular_zubbers\code\modules\emotes\synth_emotes.dm" #include "modular_zubbers\code\modules\events\ev_roleplay_check.dm" +#include "modular_zubbers\code\modules\events\meteor_wave.dm" #include "modular_zubbers\code\modules\events\scrubber_overflow.dm" #include "modular_zubbers\code\modules\events\ghost_role\blob.dm" #include "modular_zubbers\code\modules\experisci\handheld_scanner.dm" @@ -9345,6 +9346,7 @@ #include "modular_zubbers\master_files\code\modules\entombed_quirk\code\entombed_mod.dm" #include "modular_zubbers\master_files\code\modules\events\carp_migration.dm" #include "modular_zubbers\master_files\code\modules\events\gravity_generator_blackout.dm" +#include "modular_zubbers\master_files\code\modules\holiday\holiday.dm" #include "modular_zubbers\master_files\code\modules\mob\living\carbon\human\examine.dm" #include "modular_zubbers\master_files\code\modules\mob\living\carbon\human\species_types\abductors.dm" #include "modular_zubbers\master_files\code\modules\mob\living\carbon\human\species_types\ethereal.dm"