mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
New weather: Extreme Monsoon (#8704)
This commit is contained in:
@@ -16,6 +16,14 @@
|
|||||||
#define WEATHER_FALLOUT "fallout" // Modified emberfall, actually harmful. Admin only.
|
#define WEATHER_FALLOUT "fallout" // Modified emberfall, actually harmful. Admin only.
|
||||||
#define WEATHER_FALLOUT_TEMP "short-term fallout" // Nuclear fallout that actually ends. Firework-only
|
#define WEATHER_FALLOUT_TEMP "short-term fallout" // Nuclear fallout that actually ends. Firework-only
|
||||||
#define WEATHER_CONFETTI "confetti" // Firework-only
|
#define WEATHER_CONFETTI "confetti" // Firework-only
|
||||||
|
#define WEATHER_EERIE_WIND "breezy winds"
|
||||||
|
#define WEATHER_SANDSTORM "sandstorm"
|
||||||
|
#define WEATHER_TOXIN_RAIN "toxic rain"
|
||||||
|
#define WEATHER_STARRY_RIFT "starry skies"
|
||||||
|
#define WEATHER_MIDNIGHT_FOG "heavy fog"
|
||||||
|
#define WEATHER_DOWNPOURWARNING "early extreme monsoon"
|
||||||
|
#define WEATHER_DOWNPOUR "extreme monsoon"
|
||||||
|
#define WEATHER_DOWNPOURFATAL "lethal monsoon"
|
||||||
|
|
||||||
#define MOON_PHASE_NEW_MOON "new moon"
|
#define MOON_PHASE_NEW_MOON "new moon"
|
||||||
#define MOON_PHASE_WAXING_CRESCENT "waxing crescent"
|
#define MOON_PHASE_WAXING_CRESCENT "waxing crescent"
|
||||||
|
|||||||
@@ -100,3 +100,27 @@
|
|||||||
|
|
||||||
/datum/looping_sound/weather/storm/indoors
|
/datum/looping_sound/weather/storm/indoors
|
||||||
volume = 20
|
volume = 20
|
||||||
|
//CHOMPEDIT start
|
||||||
|
/datum/looping_sound/weather/rainrumble
|
||||||
|
mid_sounds = 'sound/effects/weather/downpour/rainrumble.ogg'
|
||||||
|
mid_length = 35 SECONDS
|
||||||
|
|
||||||
|
/datum/looping_sound/weather/rainrumble/indoors
|
||||||
|
volume = 30
|
||||||
|
|
||||||
|
/datum/looping_sound/weather/rainheavy
|
||||||
|
mid_sounds = list(
|
||||||
|
'sound/effects/weather/downpour/rainheavy.ogg' = 1,
|
||||||
|
'sound/effects/weather/downpour/rainheavy2.ogg' = 1
|
||||||
|
)
|
||||||
|
mid_length = 35 SECONDS
|
||||||
|
|
||||||
|
/datum/looping_sound/weather/rainextreme
|
||||||
|
mid_sounds = 'sound/effects/weather/downpour/rainextreme.ogg'
|
||||||
|
mid_length = 37 SECONDS
|
||||||
|
volume = 80
|
||||||
|
|
||||||
|
/datum/looping_sound/weather/rainindoors
|
||||||
|
mid_sounds = 'sound/effects/weather/downpour/rainindoors.ogg'
|
||||||
|
mid_length = 24 SECONDS
|
||||||
|
//CHOMPEDIT end
|
||||||
|
|||||||
@@ -123,8 +123,11 @@ var/datum/planet/sif/planet_sif = null
|
|||||||
WEATHER_EMBERFALL = new /datum/weather/sif/emberfall(),
|
WEATHER_EMBERFALL = new /datum/weather/sif/emberfall(),
|
||||||
WEATHER_ASH_STORM = new /datum/weather/sif/ash_storm(),
|
WEATHER_ASH_STORM = new /datum/weather/sif/ash_storm(),
|
||||||
WEATHER_FALLOUT = new /datum/weather/sif/fallout(),
|
WEATHER_FALLOUT = new /datum/weather/sif/fallout(),
|
||||||
WEATHER_FALLOUT_TEMP = new /datum/weather/sif/fallout/temp(), //CHOMPedit
|
WEATHER_FALLOUT_TEMP = new /datum/weather/sif/fallout/temp(), //CHOMPedit begin
|
||||||
WEATHER_CONFETTI = new /datum/weather/sif/confetti() //CHOMPedit
|
WEATHER_CONFETTI = new /datum/weather/sif/confetti(),
|
||||||
|
WEATHER_DOWNPOURWARNING = new /datum/weather/sif/downpourwarning(),
|
||||||
|
WEATHER_DOWNPOUR = new /datum/weather/sif/downpour(),
|
||||||
|
WEATHER_DOWNPOURFATAL = new /datum/weather/sif/downpourfatal() //CHOMPedit end
|
||||||
)
|
)
|
||||||
roundstart_weather_chances = list(
|
roundstart_weather_chances = list(
|
||||||
WEATHER_CLEAR = 30,
|
WEATHER_CLEAR = 30,
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
WEATHER_ASH_STORM_SAFE = new /datum/weather/thor/ash_storm_safe(),
|
WEATHER_ASH_STORM_SAFE = new /datum/weather/thor/ash_storm_safe(),
|
||||||
WEATHER_FALLOUT = new /datum/weather/thor/fallout(),
|
WEATHER_FALLOUT = new /datum/weather/thor/fallout(),
|
||||||
WEATHER_FALLOUT_TEMP = new /datum/weather/thor/fallout/temp(),
|
WEATHER_FALLOUT_TEMP = new /datum/weather/thor/fallout/temp(),
|
||||||
WEATHER_CONFETTI = new /datum/weather/thor/confetti()
|
WEATHER_CONFETTI = new /datum/weather/thor/confetti(),
|
||||||
|
WEATHER_DOWNPOURWARNING = new /datum/weather/thor/downpourwarning(),
|
||||||
|
WEATHER_DOWNPOUR = new /datum/weather/thor/downpour(),
|
||||||
|
WEATHER_DOWNPOURFATAL = new /datum/weather/thor/downpourfatal()
|
||||||
)
|
)
|
||||||
roundstart_weather_chances = list(
|
roundstart_weather_chances = list(
|
||||||
WEATHER_CLEAR = 20,
|
WEATHER_CLEAR = 20,
|
||||||
@@ -252,7 +255,7 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
wind_high = 2
|
wind_high = 2
|
||||||
wind_low = 1
|
wind_low = 1
|
||||||
light_modifier = 0.5
|
light_modifier = 0.5
|
||||||
effect_message = "<span class='warning'>Rain falls on you.</span>"
|
effect_message = span_warning("Rain falls on you.")
|
||||||
|
|
||||||
transition_chances = list(
|
transition_chances = list(
|
||||||
WEATHER_OVERCAST = 25,
|
WEATHER_OVERCAST = 25,
|
||||||
@@ -281,7 +284,7 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
|
|
||||||
if(istype(U) && U.open)
|
if(istype(U) && U.open)
|
||||||
if(show_message)
|
if(show_message)
|
||||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
to_chat(L, span_notice("Rain patters softly onto your umbrella."))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
L.water_act(1)
|
L.water_act(1)
|
||||||
@@ -295,7 +298,7 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
wind_low = 2
|
wind_low = 2
|
||||||
light_modifier = 0.3
|
light_modifier = 0.3
|
||||||
flight_failure_modifier = 10
|
flight_failure_modifier = 10
|
||||||
effect_message = "<span class='warning'>Rain falls on you, drenching you in water.</span>"
|
effect_message = span_warning("Rain falls on you, drenching you in water.")
|
||||||
|
|
||||||
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||||
var/min_lightning_cooldown = 5 SECONDS
|
var/min_lightning_cooldown = 5 SECONDS
|
||||||
@@ -331,7 +334,7 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
|
|
||||||
if(istype(U) && U.open)
|
if(istype(U) && U.open)
|
||||||
if(show_message)
|
if(show_message)
|
||||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
to_chat(L, span_notice("Rain showers loudly onto your umbrella!"))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
@@ -357,7 +360,7 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
flight_failure_modifier = 15
|
flight_failure_modifier = 15
|
||||||
timer_low_bound = 2
|
timer_low_bound = 2
|
||||||
timer_high_bound = 5
|
timer_high_bound = 5
|
||||||
effect_message = "<span class='warning'>The hail smacks into you!</span>"
|
effect_message = span_warning("The hail smacks into you!")
|
||||||
|
|
||||||
transition_chances = list(
|
transition_chances = list(
|
||||||
WEATHER_HAIL = 10,
|
WEATHER_HAIL = 10,
|
||||||
@@ -387,7 +390,7 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
|
|
||||||
if(istype(U) && U.open)
|
if(istype(U) && U.open)
|
||||||
if(show_message)
|
if(show_message)
|
||||||
to_chat(H, "<span class='notice'>Hail patters onto your umbrella.</span>")
|
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
var/target_zone = pick(BP_ALL)
|
var/target_zone = pick(BP_ALL)
|
||||||
@@ -602,6 +605,158 @@ var/datum/planet/thor/planet_thor = null
|
|||||||
)
|
)
|
||||||
imminent_transition_message = "A rain is starting... A rain of confetti...?"
|
imminent_transition_message = "A rain is starting... A rain of confetti...?"
|
||||||
|
|
||||||
|
/datum/weather/thor/downpourwarning
|
||||||
|
name = "early extreme monsoon"
|
||||||
|
light_modifier = 0.4
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 2
|
||||||
|
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_DOWNPOUR = 100
|
||||||
|
)
|
||||||
|
observed_message = "It looks like a very bad storm is about to approach."
|
||||||
|
transition_messages = list(
|
||||||
|
span_danger("Inky black clouds cover the sky in a eerie rumble, get to cover!")
|
||||||
|
)
|
||||||
|
outdoor_sounds_type = /datum/looping_sound/weather/rainrumble
|
||||||
|
indoor_sounds_type = /datum/looping_sound/weather/rainrumble/indoors
|
||||||
|
|
||||||
|
/datum/weather/thor/downpour
|
||||||
|
name = "extreme monsoon"
|
||||||
|
icon_state = "downpour"
|
||||||
|
light_modifier = 0.3
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 1
|
||||||
|
wind_high = 4
|
||||||
|
wind_low = 2
|
||||||
|
flight_failure_modifier = 100
|
||||||
|
effect_message = span_warning("Extreme rain is knocking you down!")
|
||||||
|
|
||||||
|
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||||
|
var/min_lightning_cooldown = 5 SECONDS
|
||||||
|
var/max_lightning_cooldown = 15 SECONDS
|
||||||
|
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_DOWNPOURFATAL = 90,
|
||||||
|
WEATHER_STORM = 10
|
||||||
|
)
|
||||||
|
observed_message = "Extreme rain is crushing you, get to cover!"
|
||||||
|
transition_messages = list(
|
||||||
|
span_danger("An immense downpour of falls on top of of the planet crushing anything in its path!")
|
||||||
|
)
|
||||||
|
outdoor_sounds_type = /datum/looping_sound/weather/rainheavy
|
||||||
|
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||||
|
|
||||||
|
/datum/weather/thor/downpour/process_effects()
|
||||||
|
..()
|
||||||
|
for(var/mob/living/L as anything in living_mob_list)
|
||||||
|
if(L.z in holder.our_planet.expected_z_levels)
|
||||||
|
var/turf/T = get_turf(L)
|
||||||
|
if(!T.is_outdoors())
|
||||||
|
continue // They're indoors, so no need to rain on them.
|
||||||
|
|
||||||
|
// If they have an open umbrella, knock it off
|
||||||
|
if(ishuman(L))
|
||||||
|
var/mob/living/carbon/human/H = L
|
||||||
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
|
if(!istype(U) || !U.open)
|
||||||
|
U = L.get_inactive_hand()
|
||||||
|
|
||||||
|
if(istype(U) && U.open)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, span_notice("The rain pushes the umbrella off your hands!"))
|
||||||
|
H.drop_both_hands()
|
||||||
|
|
||||||
|
L.water_act(2)
|
||||||
|
L.Weaken(3)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, effect_message)
|
||||||
|
|
||||||
|
handle_lightning()
|
||||||
|
|
||||||
|
// This gets called to do lightning periodically.
|
||||||
|
// There is a seperate function to do the actual lightning strike, so that badmins can play with it.
|
||||||
|
/datum/weather/thor/downpour/proc/handle_lightning()
|
||||||
|
if(world.time < next_lightning_strike)
|
||||||
|
return // It's too soon to strike again.
|
||||||
|
next_lightning_strike = world.time + rand(min_lightning_cooldown, max_lightning_cooldown)
|
||||||
|
var/turf/T = pick(holder.our_planet.planet_floors) // This has the chance to 'strike' the sky, but that might be a good thing, to scare reckless pilots.
|
||||||
|
lightning_strike(T)
|
||||||
|
|
||||||
|
/datum/weather/thor/downpourfatal
|
||||||
|
name = "fatal monsoon"
|
||||||
|
icon_state = "downpourfatal"
|
||||||
|
light_modifier = 0.15
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 3
|
||||||
|
wind_high = 6
|
||||||
|
wind_low = 4
|
||||||
|
flight_failure_modifier = 100
|
||||||
|
effect_message = span_warning("Extreme rain is crushing you!")
|
||||||
|
|
||||||
|
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||||
|
var/min_lightning_cooldown = 1 SECONDS
|
||||||
|
var/max_lightning_cooldown = 3 SECONDS
|
||||||
|
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_RAIN = 90,
|
||||||
|
WEATHER_STORM = 10
|
||||||
|
)
|
||||||
|
observed_message = "Extreme rain is crushing you, get to cover!"
|
||||||
|
//No transition message, supposed to be the 'actual' rain
|
||||||
|
outdoor_sounds_type = /datum/looping_sound/weather/rainextreme
|
||||||
|
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||||
|
|
||||||
|
/datum/weather/thor/downpourfatal/process_effects()
|
||||||
|
..()
|
||||||
|
for(var/mob/living/L as anything in living_mob_list)
|
||||||
|
if(L.z in holder.our_planet.expected_z_levels)
|
||||||
|
var/turf/T = get_turf(L)
|
||||||
|
if(!T.is_outdoors())
|
||||||
|
continue // They're indoors, so no need to rain on them.
|
||||||
|
|
||||||
|
// Knock the umbrella off your hands, aint protecting you c:
|
||||||
|
if(ishuman(L))
|
||||||
|
var/mob/living/carbon/human/H = L
|
||||||
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
|
if(!istype(U) || !U.open)
|
||||||
|
U = L.get_inactive_hand()
|
||||||
|
|
||||||
|
if(istype(U) && U.open)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, span_notice("The rain pushes the umbrella off your hands!"))
|
||||||
|
H.drop_both_hands()
|
||||||
|
|
||||||
|
var/target_zone = pick(BP_ALL)
|
||||||
|
var/amount_blocked = L.run_armor_check(target_zone, "melee")
|
||||||
|
var/amount_soaked = L.get_armor_soak(target_zone, "melee")
|
||||||
|
|
||||||
|
var/damage = rand(10,30) //Ow
|
||||||
|
|
||||||
|
if(amount_blocked >= 30)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if(amount_soaked >= damage)
|
||||||
|
continue // No need to apply damage.
|
||||||
|
|
||||||
|
L.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "rain bludgoning")
|
||||||
|
L.Weaken(3)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, effect_message)
|
||||||
|
|
||||||
|
|
||||||
|
handle_lightning()
|
||||||
|
|
||||||
|
// This gets called to do lightning periodically.
|
||||||
|
// There is a seperate function to do the actual lightning strike, so that badmins can play with it.
|
||||||
|
/datum/weather/thor/downpourfatal/proc/handle_lightning()
|
||||||
|
if(world.time < next_lightning_strike)
|
||||||
|
return // It's too soon to strike again.
|
||||||
|
next_lightning_strike = world.time + rand(min_lightning_cooldown, max_lightning_cooldown)
|
||||||
|
var/turf/T = pick(holder.our_planet.planet_floors) // This has the chance to 'strike' the sky, but that might be a good thing, to scare reckless pilots.
|
||||||
|
lightning_strike(T)
|
||||||
|
|
||||||
|
|
||||||
/turf/unsimulated/wall/planetary/normal/thor
|
/turf/unsimulated/wall/planetary/normal/thor
|
||||||
name = "deep ocean"
|
name = "deep ocean"
|
||||||
alpha = 0
|
alpha = 0
|
||||||
|
|||||||
@@ -21,7 +21,10 @@
|
|||||||
WEATHER_SANDSTORM = new /datum/weather/sif/sandstorm(),
|
WEATHER_SANDSTORM = new /datum/weather/sif/sandstorm(),
|
||||||
WEATHER_TOXIN_RAIN = new /datum/weather/sif/toxinrain(),
|
WEATHER_TOXIN_RAIN = new /datum/weather/sif/toxinrain(),
|
||||||
WEATHER_STARRY_RIFT = new /datum/weather/sif/starryrift(),
|
WEATHER_STARRY_RIFT = new /datum/weather/sif/starryrift(),
|
||||||
WEATHER_MIDNIGHT_FOG = new /datum/weather/sif/midnightfog()
|
WEATHER_MIDNIGHT_FOG = new /datum/weather/sif/midnightfog(),
|
||||||
|
WEATHER_DOWNPOURWARNING = new /datum/weather/sif/downpourwarning(),
|
||||||
|
WEATHER_DOWNPOUR = new /datum/weather/sif/downpour(),
|
||||||
|
WEATHER_DOWNPOURFATAL = new /datum/weather/sif/downpourfatal() //CHOMPedit end
|
||||||
)
|
)
|
||||||
//Weather
|
//Weather
|
||||||
/datum/weather/sif/fog
|
/datum/weather/sif/fog
|
||||||
@@ -124,7 +127,7 @@
|
|||||||
|
|
||||||
if(istype(U) && U.open)
|
if(istype(U) && U.open)
|
||||||
if(show_message)
|
if(show_message)
|
||||||
to_chat(H, "<span class='notice'>Rain patters onto your umbrella.</span>")
|
to_chat(H, span_notice("Rain patters onto your umbrella."))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
var/target_zone = pick(BP_ALL)
|
var/target_zone = pick(BP_ALL)
|
||||||
@@ -246,3 +249,165 @@
|
|||||||
if(!T.is_outdoors())
|
if(!T.is_outdoors())
|
||||||
continue
|
continue
|
||||||
H.add_modifier(/datum/modifier/midnightfog_boon, 1 SECONDS, src)
|
H.add_modifier(/datum/modifier/midnightfog_boon, 1 SECONDS, src)
|
||||||
|
|
||||||
|
/datum/weather/sif/fallout/temp
|
||||||
|
name = "short-term fallout"
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 3
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_FALLOUT = 10,
|
||||||
|
WEATHER_RAIN = 50,
|
||||||
|
WEATHER_FOG = 35,
|
||||||
|
WEATHER_STORM = 20,
|
||||||
|
WEATHER_OVERCAST = 5
|
||||||
|
)
|
||||||
|
/datum/weather/sif/downpourwarning
|
||||||
|
name = "early extreme monsoon"
|
||||||
|
light_modifier = 0.4
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 2
|
||||||
|
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_DOWNPOUR = 100
|
||||||
|
)
|
||||||
|
observed_message = "It looks like a very bad storm is about to approach."
|
||||||
|
transition_messages = list(
|
||||||
|
span_danger("Inky black clouds cover the sky in a eerie rumble, get to cover!")
|
||||||
|
)
|
||||||
|
outdoor_sounds_type = /datum/looping_sound/weather/rainrumble
|
||||||
|
indoor_sounds_type = /datum/looping_sound/weather/rainrumble/indoors
|
||||||
|
|
||||||
|
/datum/weather/sif/downpour
|
||||||
|
name = "extreme monsoon"
|
||||||
|
icon_state = "downpour"
|
||||||
|
light_modifier = 0.3
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 1
|
||||||
|
wind_high = 4
|
||||||
|
wind_low = 2
|
||||||
|
flight_failure_modifier = 100
|
||||||
|
effect_message = span_warning("Extreme rain is knocking you down!")
|
||||||
|
|
||||||
|
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||||
|
var/min_lightning_cooldown = 5 SECONDS
|
||||||
|
var/max_lightning_cooldown = 15 SECONDS
|
||||||
|
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_DOWNPOURFATAL = 90,
|
||||||
|
WEATHER_STORM = 10
|
||||||
|
)
|
||||||
|
observed_message = "Extreme rain is crushing you, get to cover!"
|
||||||
|
transition_messages = list(
|
||||||
|
span_danger("An immense downpour of falls on top of of the planet crushing anything in its path!")
|
||||||
|
)
|
||||||
|
outdoor_sounds_type = /datum/looping_sound/weather/rainheavy
|
||||||
|
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||||
|
|
||||||
|
/datum/weather/sif/downpour/process_effects()
|
||||||
|
..()
|
||||||
|
for(var/mob/living/L as anything in living_mob_list)
|
||||||
|
if(L.z in holder.our_planet.expected_z_levels)
|
||||||
|
var/turf/T = get_turf(L)
|
||||||
|
if(!T.is_outdoors())
|
||||||
|
continue // They're indoors, so no need to rain on them.
|
||||||
|
|
||||||
|
// If they have an open umbrella, knock it off, this is more then an umbrella
|
||||||
|
if(ishuman(L))
|
||||||
|
var/mob/living/carbon/human/H = L
|
||||||
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
|
if(!istype(U) || !U.open)
|
||||||
|
U = L.get_inactive_hand()
|
||||||
|
|
||||||
|
if(istype(U) && U.open)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, span_notice("The rain pushes the umbrella off your hands!"))
|
||||||
|
H.drop_both_hands()
|
||||||
|
|
||||||
|
L.water_act(2)
|
||||||
|
L.Weaken(3)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, effect_message)
|
||||||
|
|
||||||
|
handle_lightning()
|
||||||
|
|
||||||
|
// This gets called to do lightning periodically.
|
||||||
|
// There is a seperate function to do the actual lightning strike, so that badmins can play with it.
|
||||||
|
/datum/weather/sif/downpour/proc/handle_lightning()
|
||||||
|
if(world.time < next_lightning_strike)
|
||||||
|
return // It's too soon to strike again.
|
||||||
|
next_lightning_strike = world.time + rand(min_lightning_cooldown, max_lightning_cooldown)
|
||||||
|
var/turf/T = pick(holder.our_planet.planet_floors) // This has the chance to 'strike' the sky, but that might be a good thing, to scare reckless pilots.
|
||||||
|
lightning_strike(T)
|
||||||
|
|
||||||
|
/datum/weather/sif/downpourfatal
|
||||||
|
name = "fatal monsoon"
|
||||||
|
icon_state = "downpourfatal"
|
||||||
|
light_modifier = 0.15
|
||||||
|
timer_low_bound = 1
|
||||||
|
timer_high_bound = 3
|
||||||
|
wind_high = 6
|
||||||
|
wind_low = 4
|
||||||
|
flight_failure_modifier = 100
|
||||||
|
effect_message = span_warning("Extreme rain is crushing you!")
|
||||||
|
|
||||||
|
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||||
|
var/min_lightning_cooldown = 1 SECONDS
|
||||||
|
var/max_lightning_cooldown = 3 SECONDS
|
||||||
|
|
||||||
|
transition_chances = list(
|
||||||
|
WEATHER_RAIN = 90,
|
||||||
|
WEATHER_STORM = 10
|
||||||
|
)
|
||||||
|
observed_message = "Extreme rain is crushing you, get to cover!"
|
||||||
|
//No transition message, supposed to be the 'actual' rain
|
||||||
|
outdoor_sounds_type = /datum/looping_sound/weather/rainextreme
|
||||||
|
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||||
|
|
||||||
|
/datum/weather/sif/downpourfatal/process_effects()
|
||||||
|
..()
|
||||||
|
for(var/mob/living/L as anything in living_mob_list)
|
||||||
|
if(L.z in holder.our_planet.expected_z_levels)
|
||||||
|
var/turf/T = get_turf(L)
|
||||||
|
if(!T.is_outdoors())
|
||||||
|
continue // They're indoors, so no need to rain on them.
|
||||||
|
|
||||||
|
// Knock the umbrella off your hands, aint protecting you c:
|
||||||
|
if(ishuman(L))
|
||||||
|
var/mob/living/carbon/human/H = L
|
||||||
|
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||||
|
if(!istype(U) || !U.open)
|
||||||
|
U = L.get_inactive_hand()
|
||||||
|
|
||||||
|
if(istype(U) && U.open)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, span_notice("The rain pushes the umbrella off your hands!"))
|
||||||
|
H.drop_both_hands()
|
||||||
|
|
||||||
|
var/target_zone = pick(BP_ALL)
|
||||||
|
var/amount_blocked = L.run_armor_check(target_zone, "melee")
|
||||||
|
var/amount_soaked = L.get_armor_soak(target_zone, "melee")
|
||||||
|
|
||||||
|
var/damage = rand(10,30) //Ow
|
||||||
|
|
||||||
|
if(amount_blocked >= 30)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if(amount_soaked >= damage)
|
||||||
|
continue // No need to apply damage.
|
||||||
|
|
||||||
|
L.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "rain bludgoning")
|
||||||
|
L.Weaken(3)
|
||||||
|
if(show_message)
|
||||||
|
to_chat(L, effect_message)
|
||||||
|
|
||||||
|
|
||||||
|
handle_lightning()
|
||||||
|
|
||||||
|
// This gets called to do lightning periodically.
|
||||||
|
// There is a seperate function to do the actual lightning strike, so that badmins can play with it.
|
||||||
|
/datum/weather/sif/downpourfatal/proc/handle_lightning()
|
||||||
|
if(world.time < next_lightning_strike)
|
||||||
|
return // It's too soon to strike again.
|
||||||
|
next_lightning_strike = world.time + rand(min_lightning_cooldown, max_lightning_cooldown)
|
||||||
|
var/turf/T = pick(holder.our_planet.planet_floors) // This has the chance to 'strike' the sky, but that might be a good thing, to scare reckless pilots.
|
||||||
|
lightning_strike(T)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 45 KiB |
BIN
sound/effects/weather/downpour/rainextreme.ogg
Normal file
BIN
sound/effects/weather/downpour/rainextreme.ogg
Normal file
Binary file not shown.
BIN
sound/effects/weather/downpour/rainheavy.ogg
Normal file
BIN
sound/effects/weather/downpour/rainheavy.ogg
Normal file
Binary file not shown.
BIN
sound/effects/weather/downpour/rainheavy2.ogg
Normal file
BIN
sound/effects/weather/downpour/rainheavy2.ogg
Normal file
Binary file not shown.
BIN
sound/effects/weather/downpour/rainindoors.ogg
Normal file
BIN
sound/effects/weather/downpour/rainindoors.ogg
Normal file
Binary file not shown.
BIN
sound/effects/weather/downpour/rainrumble.ogg
Normal file
BIN
sound/effects/weather/downpour/rainrumble.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user