mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Adds Various Sounds, Looping Sound System
This commit is contained in:
@@ -121,7 +121,10 @@ var/datum/planet/sif/planet_sif = null
|
||||
WEATHER_RAIN = new /datum/weather/sif/rain(),
|
||||
WEATHER_STORM = new /datum/weather/sif/storm(),
|
||||
WEATHER_HAIL = new /datum/weather/sif/hail(),
|
||||
WEATHER_BLOOD_MOON = new /datum/weather/sif/blood_moon()
|
||||
WEATHER_BLOOD_MOON = new /datum/weather/sif/blood_moon(),
|
||||
WEATHER_EMBERFALL = new /datum/weather/sif/emberfall(),
|
||||
WEATHER_ASH_STORM = new /datum/weather/sif/ash_storm(),
|
||||
WEATHER_FALLOUT = new /datum/weather/sif/fallout()
|
||||
)
|
||||
roundstart_weather_chances = list(
|
||||
WEATHER_CLEAR = 30,
|
||||
@@ -208,6 +211,8 @@ var/datum/planet/sif/planet_sif = null
|
||||
"It's starting to snow.",
|
||||
"The air feels much colder as snowflakes fall from above."
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
|
||||
|
||||
/datum/weather/sif/snow/process_effects()
|
||||
..()
|
||||
@@ -237,6 +242,8 @@ var/datum/planet/sif/planet_sif = null
|
||||
"Strong winds howl around you as a blizzard appears.",
|
||||
"It starts snowing heavily, and it feels extremly cold now."
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
/datum/weather/sif/blizzard/process_effects()
|
||||
..()
|
||||
@@ -265,6 +272,8 @@ var/datum/planet/sif/planet_sif = null
|
||||
transition_messages = list(
|
||||
"The sky is dark, and rain falls down upon you."
|
||||
)
|
||||
// outdoor_sounds_type = /datum/looping_sound/weather/rain
|
||||
// indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
|
||||
|
||||
/datum/weather/sif/rain/process_effects()
|
||||
..()
|
||||
@@ -310,6 +319,8 @@ var/datum/planet/sif/planet_sif = null
|
||||
"Loud thunder is heard in the distance.",
|
||||
"A bright flash heralds the approach of a storm."
|
||||
)
|
||||
// outdoor_sounds_type = /datum/looping_sound/weather/rain
|
||||
// indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
|
||||
|
||||
|
||||
transition_chances = list(
|
||||
@@ -417,7 +428,7 @@ var/datum/planet/sif/planet_sif = null
|
||||
if(show_message)
|
||||
to_chat(H, "<span class='notice'>Hail patters onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
@@ -435,6 +446,10 @@ var/datum/planet/sif/planet_sif = null
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
|
||||
// These never happen naturally, and are for adminbuse.
|
||||
|
||||
// A culty weather.
|
||||
/datum/weather/sif/blood_moon
|
||||
name = "blood moon"
|
||||
light_modifier = 0.5
|
||||
@@ -446,4 +461,114 @@ var/datum/planet/sif/planet_sif = null
|
||||
observed_message = "Everything is red. Something really wrong is going on."
|
||||
transition_messages = list(
|
||||
"The sky turns blood red!"
|
||||
<<<<<<< refs/remotes/VOREStation/master
|
||||
)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
)
|
||||
=======
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/wind
|
||||
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
|
||||
|
||||
// Ash and embers fall forever, such as from a volcano or something.
|
||||
/datum/weather/sif/emberfall
|
||||
name = "emberfall"
|
||||
icon_state = "ashfall_light"
|
||||
light_modifier = 0.7
|
||||
light_color = "#880000"
|
||||
temp_high = 293.15 // 20c
|
||||
temp_low = 283.15 // 10c
|
||||
flight_failure_modifier = 20
|
||||
transition_chances = list(
|
||||
WEATHER_EMBERFALL = 100
|
||||
)
|
||||
observed_message = "Soot, ash, and embers float down from above."
|
||||
transition_messages = list(
|
||||
"Gentle embers waft down around you like grotesque snow."
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/wind
|
||||
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
|
||||
|
||||
// Like the above but a lot more harmful.
|
||||
/datum/weather/sif/ash_storm
|
||||
name = "ash storm"
|
||||
icon_state = "ashfall_heavy"
|
||||
light_modifier = 0.1
|
||||
light_color = "#FF0000"
|
||||
temp_high = 323.15 // 50c
|
||||
temp_low = 313.15 // 40c
|
||||
flight_failure_modifier = 50
|
||||
transition_chances = list(
|
||||
WEATHER_ASH_STORM = 100
|
||||
)
|
||||
observed_message = "All that can be seen is black smoldering ash."
|
||||
transition_messages = list(
|
||||
"Smoldering clouds of scorching ash billow down around you!"
|
||||
)
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
/datum/weather/sif/ash_storm/process_effects()
|
||||
..()
|
||||
for(var/thing in living_mob_list)
|
||||
var/mob/living/L = thing
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors)
|
||||
continue // They're indoors, so no need to burn them with ash.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
|
||||
|
||||
// Totally radical.
|
||||
/datum/weather/sif/fallout
|
||||
name = "fallout"
|
||||
icon_state = "fallout"
|
||||
light_modifier = 0.7
|
||||
light_color = "#CCFFCC"
|
||||
flight_failure_modifier = 30
|
||||
transition_chances = list(
|
||||
WEATHER_FALLOUT = 100
|
||||
)
|
||||
observed_message = "Radioactive soot and ash rains down from the heavens."
|
||||
transition_messages = list(
|
||||
"Radioactive soot and ash start to float down around you, contaminating whatever they touch."
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/wind
|
||||
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
|
||||
|
||||
// How much radiation a mob gets while on an outside tile.
|
||||
var/direct_rad_low = RAD_LEVEL_LOW
|
||||
var/direct_rad_high = RAD_LEVEL_MODERATE
|
||||
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
|
||||
/datum/weather/sif/fallout/process_effects()
|
||||
..()
|
||||
for(var/thing in living_mob_list)
|
||||
var/mob/living/L = thing
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors)
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
/datum/weather/sif/fallout/proc/irradiate_nearby_turf(mob/living/L)
|
||||
if(!istype(L))
|
||||
return
|
||||
var/list/turfs = RANGE_TURFS(world.view, L)
|
||||
var/turf/T = pick(turfs) // We get one try per tick.
|
||||
if(!istype(T))
|
||||
return
|
||||
if(T.outdoors)
|
||||
radiation_repository.radiate(T, rand(fallout_rad_low, fallout_rad_high))
|
||||
>>>>>>> 5fb77b3... Merge pull request #5791 from Neerti/looping_sounds
|
||||
>>>>>>> Adds Various Sounds, Looping Sound System
|
||||
|
||||
Reference in New Issue
Block a user