mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
1f855eb9ff
Introducing more weather types! And yes, you can now have rain be reagent based! <details> <summary>Regular Rain</summary>  </details> <details> <summary>Blood Rain</summary>  </details> <details> <summary>Acid Rain</summary>  </details> You can even make it rain ants, plasma, or drugs. All of their effects get applied to turfs, objects, and mobs depending on the weather options you select. Did I mention... there is thunder? <details> <summary>Thunder Strikes</summary>  </details> <details> <summary>Sand Storms</summary>  </details> Despite all this new stuff, none of it has been directly added to the game but the code can be used in the future for: - Wizard event - Similar to lava on floor, but this time make the reagent random or picked from a list and give wizard immunity - Chaplain ability - Maybe make this a benefit or ability once enough favor has been obtained - Admin events - I have added a BUNCH of admin tooling to run customized weather events that let you control a lot of options - New station maps/biomes for downstreams (Jungle Station, etc.) - Change Ion storms to use the new weather system that triggers EMP/thunder effects across the station - IceBox could get plasma rain - Lavaland could get thunder effects applied to ash storms Relevant PRs that removed/added some of the weather stuff I used: - #60303 - #25222 --- - Rain sprites were added via [novaepee](https://github.com/novaepee) in https://github.com/tgstation/TerraGov-Marine-Corps/pull/9675 - Sand sprites were added via [TiviPlus](https://github.com/TiviPlus) (who commissioned them from bimmer) in https://github.com/tgstation/TerraGov-Marine-Corps/pull/4645 - Rain sounds [already existed on tg](https://github.com/tgstation/tgstation/pull/25222#discussion_r106794579) and were provided by provided by Cuboos, using Royalty Free sounds, presumed under default tg sound license - Creative Commons 3.0 BY-SA - Siren sound is from siren.wav by IFartInUrGeneralDirection -- [Freesound](https://freesound.org/s/46092/) -- License: Attribution 4.0 The original `siren.ogg` sound used on a lot of SS13 servers doesn't seem to have any attribution that I could locate. The sound was added about 15 years ago. So I just looked for a somewhat similar sounding siren noise on Freesound. More weather customization! 🆑 add: Added new weather types for rain and sandstorms. Rain now uses a reagent that gets exposed to the turfs, mobs, and objects. There is also a thunder strike setting you can apply to any weather. add: Hydro trays and soil will now add reagents to their trays when exposed to a chemical reaction. (weather, shower, chem spills, foam grenades, etc.) add: Weather temperature now affects weather reagents and mobs body temperature. bal: Snowstorm temperature calculations were tweaked to allow universal weather temperature effects. sound: Added weather sounds from TGMC for rain and sirens (attributed to Cuboos and IFartInUrGeneralDirection ) image: Added weather images from TGMC for rain and sand storms (attributed to Novaepee and Bimmer) refactor: Refactored a lot of the weather code to be more robust admin: Admins can now control more weather related options when running weather events. The weather admin verbs have been moved to their own "Weather" category under the Admin tab. /🆑 --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
117 lines
4.5 KiB
Plaintext
117 lines
4.5 KiB
Plaintext
/datum/looping_sound/active_outside_ashstorm
|
|
mid_sounds = list(
|
|
'sound/ambience/weather/ashstorm/outside/active_mid1.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/outside/active_mid1.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/outside/active_mid1.ogg'=1
|
|
)
|
|
mid_length = 80 SECONDS
|
|
start_sound = 'modular_zubbers/sound/ambiance/bangle-ash-and-fire.ogg' // Bubber edit. Credit: Bangle
|
|
start_length = 13 SECONDS
|
|
end_sound = 'sound/ambience/weather/ashstorm/outside/active_end.ogg'
|
|
volume = 80
|
|
|
|
/datum/looping_sound/active_inside_ashstorm
|
|
mid_sounds = list(
|
|
'sound/ambience/weather/ashstorm/inside/active_mid1.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/inside/active_mid2.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/inside/active_mid3.ogg'=1
|
|
)
|
|
mid_length = 8 SECONDS
|
|
start_sound = 'sound/ambience/weather/ashstorm/inside/active_start.ogg'
|
|
start_length = 13 SECONDS
|
|
end_sound = 'sound/ambience/weather/ashstorm/inside/active_end.ogg'
|
|
volume = 60
|
|
|
|
/datum/looping_sound/weak_outside_ashstorm
|
|
mid_sounds = list(
|
|
'sound/ambience/weather/ashstorm/outside/weak_mid1.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/outside/weak_mid2.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/outside/weak_mid3.ogg'=1
|
|
)
|
|
mid_length = 8 SECONDS
|
|
start_sound = 'sound/ambience/weather/ashstorm/outside/weak_start.ogg'
|
|
start_length = 13 SECONDS
|
|
end_sound = 'sound/ambience/weather/ashstorm/outside/weak_end.ogg'
|
|
volume = 50
|
|
|
|
/datum/looping_sound/weak_inside_ashstorm
|
|
mid_sounds = list(
|
|
'sound/ambience/weather/ashstorm/inside/weak_mid1.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/inside/weak_mid2.ogg'=1,
|
|
'sound/ambience/weather/ashstorm/inside/weak_mid3.ogg'=1
|
|
)
|
|
mid_length = 8 SECONDS
|
|
start_sound = 'sound/ambience/weather/ashstorm/inside/weak_start.ogg'
|
|
start_length = 13 SECONDS
|
|
end_sound = 'sound/ambience/weather/ashstorm/inside/weak_end.ogg'
|
|
volume = 30
|
|
|
|
/datum/looping_sound/void_loop
|
|
mid_sounds = list('sound/music/antag/heretic/VoidsEmbrace.ogg'=1)
|
|
mid_length = 166.9 SECONDS // exact length of the music in ticks
|
|
volume = 100
|
|
extra_range = 30
|
|
|
|
/datum/looping_sound/snowstorm
|
|
mid_sounds = list(
|
|
'sound/ambience/weather/snowstorm/snow1.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow2.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow3.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow4.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow5.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow6.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow7.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow8.ogg' = 1,
|
|
'sound/ambience/weather/snowstorm/snow9.ogg' = 1,
|
|
)
|
|
mid_length = 10 SECONDS
|
|
volume = 30
|
|
sound_channel = CHANNEL_WEATHER
|
|
/// Dynamically adjust the length of the sound to appropriate values
|
|
var/list/sound_to_length = list(
|
|
'sound/ambience/weather/snowstorm/snow1.ogg' = 11.3 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow2.ogg' = 9.7 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow3.ogg' = 9.7 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow4.ogg' = 7.3 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow5.ogg' = 7.3 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow6.ogg' = 8.8 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow7.ogg' = 11.6 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow8.ogg' = 11.6 SECONDS,
|
|
'sound/ambience/weather/snowstorm/snow9.ogg' = 7.3 SECONDS,
|
|
)
|
|
|
|
// hijacking sound loop code to run loops of varying length
|
|
// doing this because set_mid_length can't run DURING a soundloop, which means we can't variably adjust the length of the sound
|
|
/datum/looping_sound/snowstorm/start_sound_loop()
|
|
loop_started = TRUE
|
|
sound_loop()
|
|
|
|
/datum/looping_sound/snowstorm/sound_loop(start_time)
|
|
if(!loop_started)
|
|
return
|
|
var/picked_sound = get_sound()
|
|
play(picked_sound)
|
|
if(sound_to_length[picked_sound])
|
|
timer_id = addtimer(CALLBACK(src, PROC_REF(sound_loop)), sound_to_length[picked_sound], TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_DELETE_ME, SSsound_loops)
|
|
|
|
/datum/looping_sound/rain
|
|
start_sound = 'sound/ambience/weather/rain/rain_start.ogg'
|
|
start_length = 12.5 SECONDS
|
|
mid_sounds = 'sound/ambience/weather/rain/rain_mid.ogg'
|
|
mid_length = 15 SECONDS
|
|
end_sound = 'sound/ambience/weather/rain/rain_end.ogg'
|
|
volume = 70
|
|
sound_channel = CHANNEL_WEATHER
|
|
|
|
/datum/looping_sound/rain/start
|
|
mid_sounds = 'sound/ambience/weather/rain/rain_start.ogg'
|
|
mid_length = 12.5 SECONDS
|
|
|
|
/datum/looping_sound/rain/middle
|
|
mid_sounds = 'sound/ambience/weather/rain/rain_mid.ogg'
|
|
mid_length = 15 SECONDS
|
|
|
|
/datum/looping_sound/rain/end
|
|
mid_sounds = 'sound/ambience/weather/rain/rain_end.ogg'
|
|
mid_length = 17 SECONDS
|