Merge pull request #14700 from Heroman3003/weather-fixes-changes

Various weather and firework related cleanup and adjustments
This commit is contained in:
Casey
2023-03-18 16:55:40 -04:00
committed by CHOMPStation2
parent b259cb47ef
commit 02ee5608f1
9 changed files with 221 additions and 30 deletions

View File

@@ -51,7 +51,7 @@
return
if(user.unEquip(O, 0, src))
loaded_star = O
to_chat(user, "<span class='notice'>You insert the firework star into the launcher.</span>")
to_chat(user, "<span class='notice'>You insert the firework star into \the [src].</span>")
add_fingerprint(user)
update_icon()
return
@@ -67,7 +67,7 @@
if(!user || user.stat != 0)
return
if(!loaded_star)
to_chat(user, "<span class='notice'>There is no firework star loaded in the launcher.</span>")
to_chat(user, "<span class='notice'>There is no firework star loaded in \the [src].</span>")
return
else
loaded_star.forceMove(get_turf(src))
@@ -81,25 +81,25 @@
return
if(!loaded_star)
to_chat(user, "<span class='notice'>There is no firework star loaded in the launcher.</span>")
to_chat(user, "<span class='notice'>There is no firework star loaded in \the [src].</span>")
return
if((world.time - last_launch) <= launch_cooldown)
to_chat(user, "<span class='notice'>The launcher is still re-priming for launch.</span>")
to_chat(user, "<span class='notice'>\The [src] is still re-priming for launch.</span>")
return
if(!anchored)
to_chat(user, "<span class='warning'>Launcher must be firmly secured to the ground before firework can be launched!</span>")
to_chat(user, "<span class='warning'>\The [src] must be firmly secured to the ground before firework can be launched!</span>")
return
var/datum/planet/P = get_planet()
if(!P || !(P.weather_holder)) // There are potential cases of being outside but not on planet. And checking whether planet has weather at all is more sanity thing than anything.
to_chat(user, "<span class='warning'>Launcher beeps as its safeties seem to prevent launch in the current location.</span>")
to_chat(user, "<span class='warning'>\The [src] beeps as its safeties seem to prevent launch in the current location.</span>")
return
var/datum/weather_holder/WH = P.weather_holder
if(WH.firework_override && istype(loaded_star, /obj/item/weapon/firework_star/weather)) // Enable weather-based events to not be ruined
to_chat(user, "<span class='warning'>Launcher beeps as it seems some interference is preventing launch of this type of firework.</span>")
to_chat(user, "<span class='warning'>\The [src] beeps as it seems some interference is preventing launch of this type of firework.</span>")
return
to_chat(user, "<span class='notice'>You launch the firework!</span>")

View File

@@ -24,9 +24,10 @@
if(w_holder.firework_override) // Make sure weather-based events can't be interfered with
return
if(weather_type && (weather_type in w_holder.allowed_weather_types))
w_holder.message_all_outdoor_players("Something seems to flash in the sky, as weather suddenly shifts!")
w_holder.change_weather(weather_type)
w_holder.rebuild_forecast()
w_holder.message_all_outdoor_players("Something seems to flash in the sky, as weather starts to rapidly shift!")
w_holder.queue_imminent_weather(weather_type)
var/datum/weather/our_weather = w_holder.allowed_weather_types[weather_type]
w_holder.message_all_outdoor_players(our_weather.imminent_transition_message)
/obj/item/weapon/firework_star/weather/clear
name = T_FIREWORK_WEATHER_STAR("CLEAR SKY")
@@ -38,6 +39,11 @@
weather_type = WEATHER_OVERCAST
icon_state = "cloudy"
/obj/item/weapon/firework_star/weather/fog
name = T_FIREWORK_WEATHER_STAR("FOG")
weather_type = WEATHER_FOG
icon_state = "cloudy"
/obj/item/weapon/firework_star/weather/rain
name = T_FIREWORK_WEATHER_STAR("RAIN")
weather_type = WEATHER_RAIN

View File

@@ -28,6 +28,11 @@
if(WH.current_weather.observed_message)
to_chat(usr, WH.current_weather.observed_message)
// Describe the current weather.
if(WH.imminent_weather)
var/datum/weather/coming_weather = WH.allowed_weather_types[WH.imminent_weather]
to_chat(usr, coming_weather.imminent_transition_message)
// If we can see the sky, we'll see things like sun position, phase of the moon, etc.
if(!WH.current_weather.sky_visible)
to_chat(usr, "You can't see the sky clearly due to the [WH.current_weather.name].")

View File

@@ -107,6 +107,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
WEATHER_RAIN = new /datum/weather/virgo3b/rain(),
WEATHER_STORM = new /datum/weather/virgo3b/storm(),
WEATHER_HAIL = new /datum/weather/virgo3b/hail(),
WEATHER_FOG = new /datum/weather/virgo3b/fog(),
WEATHER_BLOOD_MOON = new /datum/weather/virgo3b/blood_moon(),
WEATHER_EMBERFALL = new /datum/weather/virgo3b/emberfall(),
WEATHER_ASH_STORM = new /datum/weather/virgo3b/ash_storm(),
@@ -118,6 +119,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
roundstart_weather_chances = list(
WEATHER_CLEAR = 60,
WEATHER_OVERCAST = 60,
WEATHER_FOG = 40,
WEATHER_LIGHT_SNOW = 40,
WEATHER_SNOW = 10,
WEATHER_BLIZZARD = 10,
@@ -135,7 +137,8 @@ var/datum/planet/virgo3b/planet_virgo3b = null
name = "clear"
transition_chances = list(
WEATHER_CLEAR = 60,
WEATHER_OVERCAST = 40
WEATHER_OVERCAST = 40,
WEATHER_FOG = 20,
)
transition_messages = list(
"The sky clears up.",
@@ -144,6 +147,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
)
sky_visible = TRUE
observed_message = "The sky is clear."
imminent_transition_message = "The sky is rapidly clearing up."
/datum/weather/virgo3b/overcast
name = "overcast"
@@ -151,6 +155,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_chances = list(
WEATHER_CLEAR = 25,
WEATHER_OVERCAST = 50,
WEATHER_FOG = 10,
WEATHER_LIGHT_SNOW = 10,
WEATHER_SNOW = 5,
WEATHER_RAIN = 5,
@@ -162,6 +167,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
"Clouds cut off your view of the sky.",
"It's very cloudy."
)
imminent_transition_message = "Benign clouds are quickly gathering."
/datum/weather/virgo3b/light_snow
name = "light snow"
@@ -180,6 +186,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
"Small snowflakes begin to fall from above.",
"It begins to snow lightly.",
)
imminent_transition_message = "It appears a light snow is about to start."
/datum/weather/virgo3b/snow
name = "moderate snow"
@@ -202,6 +209,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
"It's starting to snow.",
"The air feels much colder as snowflakes fall from above."
)
imminent_transition_message = "A snowfall is starting."
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
@@ -230,13 +238,15 @@ var/datum/planet/virgo3b/planet_virgo3b = null
WEATHER_SNOW = 45,
WEATHER_BLIZZARD = 40,
WEATHER_HAIL = 10,
WEATHER_OVERCAST = 5
WEATHER_OVERCAST = 5,
WEATHER_FOG = 5
)
observed_message = "A blizzard blows snow everywhere."
transition_messages = list(
"Strong winds howl around you as a blizzard appears.",
"It starts snowing heavily, and it feels extremly cold now."
)
imminent_transition_message = "Wind is howling. Blizzard is coming."
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -262,6 +272,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_chances = list(
WEATHER_OVERCAST = 25,
WEATHER_FOG = 25,
WEATHER_LIGHT_SNOW = 10,
WEATHER_RAIN = 50,
WEATHER_STORM = 10,
@@ -271,6 +282,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"The sky is dark, and rain falls down upon you."
)
imminent_transition_message = "Light drips of water are starting to fall from the sky."
outdoor_sounds_type = /datum/looping_sound/weather/rain
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
@@ -314,6 +326,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
"Loud thunder is heard in the distance.",
"A bright flash heralds the approach of a storm."
)
imminent_transition_message = "You can hear distant thunder. Storm is coming."
outdoor_sounds_type = /datum/looping_sound/weather/rain
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
@@ -321,6 +334,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_chances = list(
WEATHER_RAIN = 45,
WEATHER_STORM = 40,
WEATHER_FOG = 25,
WEATHER_HAIL = 10,
WEATHER_OVERCAST = 5
)
@@ -371,6 +385,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_chances = list(
WEATHER_RAIN = 45,
WEATHER_STORM = 40,
WEATHER_FOG = 20,
WEATHER_HAIL = 10,
WEATHER_OVERCAST = 5
)
@@ -380,6 +395,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
"It begins to hail.",
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
)
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
/datum/weather/virgo3b/hail/process_effects()
..()
@@ -416,6 +432,32 @@ var/datum/planet/virgo3b/planet_virgo3b = null
if(show_message)
to_chat(H, effect_message)
/datum/weather/virgo3b/fog
name = "fog"
icon_state = "fog"
wind_high = 1
wind_low = 0
light_modifier = 0.7
temp_high = 235.15
temp_low = 225.15
transition_chances = list(
WEATHER_FOG = 70,
WEATHER_OVERCAST = 15,
WEATHER_LIGHT_SNOW = 10,
WEATHER_RAIN = 5
)
observed_message = "A fogbank has rolled over the region."
transition_messages = list(
"Fog rolls in.",
"Visibility falls as the air becomes dense.",
"The clouds drift lower, as if to smother the forests."
)
imminent_transition_message = "Clouds are drifting down as the area is getting foggy."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
/datum/weather/virgo3b/blood_moon
name = "blood moon"
light_modifier = 0.5
@@ -428,6 +470,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"The sky turns blood red!"
)
imminent_transition_message = "The sky is turning red. Blood Moon is starting."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -447,6 +490,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"Gentle embers waft down around you like grotesque snow."
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers start to rain down."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -468,6 +512,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"Smoldering clouds of scorching ash billow down around you!"
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers fill the air and wind is picking up too. Ashstorm is coming, get to cover!"
// Lets recycle.
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -499,6 +544,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"Smoldering clouds of scorching ash billow down around you!"
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers fill the air and wind is picking up too."
// Lets recycle.
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -518,6 +564,7 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"Radioactive soot and ash start to float down around you, contaminating whatever they touch."
)
imminent_transition_message = "Sky and clouds are growing sickly green... Radiation storm is approaching, get to cover!"
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -554,9 +601,12 @@ var/datum/planet/virgo3b/planet_virgo3b = null
/datum/weather/virgo3b/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
)
@@ -575,4 +625,5 @@ var/datum/planet/virgo3b/planet_virgo3b = null
transition_messages = list(
"Suddenly, colorful confetti starts raining from the sky."
)
imminent_transition_message = "A rain is starting... A rain of confetti...?"

View File

@@ -127,6 +127,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
WEATHER_RAIN = new /datum/weather/virgo3c/rain(),
WEATHER_STORM = new /datum/weather/virgo3c/storm(),
WEATHER_HAIL = new /datum/weather/virgo3c/hail(),
WEATHER_FOG = new /datum/weather/virgo3c/fog(),
WEATHER_BLOOD_MOON = new /datum/weather/virgo3c/blood_moon(),
WEATHER_EMBERFALL = new /datum/weather/virgo3c/emberfall(),
WEATHER_ASH_STORM = new /datum/weather/virgo3c/ash_storm(),
@@ -162,6 +163,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
)
sky_visible = TRUE
observed_message = "The sky is clear."
imminent_transition_message = "The sky is rapidly clearing up."
/datum/weather/virgo3c/overcast
name = "overcast"
@@ -171,6 +173,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_chances = list(
WEATHER_CLEAR = 50,
WEATHER_OVERCAST = 50,
WEATHER_FOG = 5,
WEATHER_RAIN = 5,
WEATHER_LIGHT_SNOW = 5
)
@@ -180,6 +183,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
"Clouds cut off your view of the sky.",
"It's very cloudy."
)
imminent_transition_message = "Benign clouds are quickly gathering."
/datum/weather/virgo3c/light_snow
name = "light snow"
@@ -190,6 +194,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_chances = list(
WEATHER_LIGHT_SNOW = 25,
WEATHER_OVERCAST = 25,
WEATHER_FOG = 10,
WEATHER_SNOW = 10,
WEATHER_RAIN = 5
)
@@ -198,6 +203,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
"Small snowflakes begin to fall from above.",
"It begins to snow lightly.",
)
imminent_transition_message = "It appears a light snow is about to start."
/datum/weather/virgo3c/snow
name = "moderate snow"
@@ -218,6 +224,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
"It's starting to snow.",
"The air feels much colder as snowflakes fall from above."
)
imminent_transition_message = "A snowfall is starting."
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
@@ -239,6 +246,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
"Strong winds howl around you as a blizzard appears.",
"It starts snowing heavily, and it feels extremly cold now."
)
imminent_transition_message = "Wind is howling. Blizzard is coming."
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -251,10 +259,13 @@ var/datum/planet/virgo3c/planet_virgo3c = null
wind_low = 1
light_modifier = 0.5
effect_message = "<span class='warning'>Rain falls on you.</span>"
outdoor_sounds_type = /datum/looping_sound/weather/rain
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
transition_chances = list(
WEATHER_OVERCAST = 25,
WEATHER_RAIN = 25,
WEATHER_FOG = 10,
WEATHER_STORM = 5,
WEATHER_LIGHT_SNOW = 5
)
@@ -262,6 +273,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_messages = list(
"The sky is dark, and rain falls down upon you."
)
imminent_transition_message = "Light drips of water are starting to fall from the sky."
/datum/weather/virgo3c/rain/process_effects()
..()
@@ -305,6 +317,9 @@ var/datum/planet/virgo3c/planet_virgo3c = null
"Loud thunder is heard in the distance.",
"A bright flash heralds the approach of a storm."
)
imminent_transition_message = "You can hear distant thunder. Storm is coming."
outdoor_sounds_type = /datum/looping_sound/weather/rain
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
transition_chances = list(
@@ -360,6 +375,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
effect_message = "<span class='warning'>The hail smacks into you!</span>"
transition_chances = list(
WEATHER_FOG = 5,
WEATHER_HAIL = 25,
WEATHER_RAIN = 75
)
@@ -369,6 +385,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
"It begins to hail.",
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
)
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
/datum/weather/virgo3c/hail/process_effects()
..()
@@ -405,6 +422,31 @@ var/datum/planet/virgo3c/planet_virgo3c = null
if(show_message)
to_chat(H, effect_message)
/datum/weather/virgo3c/fog
name = "fog"
icon_state = "fog"
wind_high = 1
wind_low = 0
light_modifier = 0.7
temp_high = 273.15 // 0c
temp_low = 263.15 // -10c
transition_chances = list(
WEATHER_FOG = 50,
WEATHER_OVERCAST = 45,
WEATHER_LIGHT_SNOW = 5
)
observed_message = "A fogbank has rolled over the region."
transition_messages = list(
"Fog rolls in.",
"Visibility falls as the air becomes dense.",
"The clouds drift lower, as if to smother the forests."
)
imminent_transition_message = "Clouds are drifting down as the area is getting foggy."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
/datum/weather/virgo3c/blood_moon
name = "blood moon"
light_modifier = 0.5
@@ -412,6 +454,8 @@ var/datum/planet/virgo3c/planet_virgo3c = null
temp_high = 283.15 // 10c
temp_low = 273.15 // 0c
flight_failure_modifier = 25
timer_low_bound = 10
timer_high_bound = 15
transition_chances = list(
WEATHER_BLOOD_MOON = 25,
WEATHER_CLEAR = 75
@@ -420,6 +464,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_messages = list(
"The sky turns blood red!"
)
imminent_transition_message = "The sky is turning red. Blood Moon is starting."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -432,6 +477,8 @@ var/datum/planet/virgo3c/planet_virgo3c = null
temp_high = 293.15 // 20c
temp_low = 283.15 // 10c
flight_failure_modifier = 20
timer_low_bound = 8
timer_high_bound = 10
transition_chances = list(
WEATHER_ASH_STORM = 100
)
@@ -439,6 +486,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_messages = list(
"Gentle embers waft down around you like black snow. A wall of dark, glowing ash approaches in the distance..."
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers start to rain down."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -453,14 +501,17 @@ var/datum/planet/virgo3c/planet_virgo3c = null
wind_high = 6
wind_low = 3
flight_failure_modifier = 50
timer_low_bound = 4
timer_high_bound = 6
transition_chances = list(
WEATHER_ASH_STORM = 5,
WEATHER_CLEAR = 95
WEATHER_ASH_STORM = 20,
WEATHER_CLEAR = 80
)
observed_message = "All that can be seen is black smoldering ash."
transition_messages = list(
"Smoldering clouds of scorching ash billow down around you!"
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers fill the air and wind is picking up too. Ashstorm is coming, get to cover!"
// Lets recycle.
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -498,6 +549,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_messages = list(
"Smoldering clouds of scorching ash billow down around you!"
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers fill the air and wind is picking up too."
// Lets recycle.
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -516,6 +568,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_messages = list(
"Radioactive soot and ash start to float down around you, contaminating whatever they touch."
)
imminent_transition_message = "Sky and clouds are growing sickly green... Radiation storm is approaching, get to cover!"
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -552,9 +605,12 @@ var/datum/planet/virgo3c/planet_virgo3c = null
/datum/weather/virgo3c/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
)
@@ -573,6 +629,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
transition_messages = list(
"Suddenly, colorful confetti starts raining from the sky."
)
imminent_transition_message = "A rain is starting... A rain of confetti...?"
/turf/unsimulated/wall/planetary/virgo3c
name = "impassable rock"

View File

@@ -106,6 +106,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
WEATHER_RAIN = new /datum/weather/virgo4/rain(),
WEATHER_STORM = new /datum/weather/virgo4/storm(),
WEATHER_HAIL = new /datum/weather/virgo4/hail(),
WEATHER_FOG = new /datum/weather/virgo4/fog(),
WEATHER_BLOOD_MOON = new /datum/weather/virgo4/blood_moon(),
WEATHER_EMBERFALL = new /datum/weather/virgo4/emberfall(),
WEATHER_ASH_STORM = new /datum/weather/virgo4/ash_storm(),
@@ -137,6 +138,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
)
sky_visible = TRUE
observed_message = "The sky is clear."
imminent_transition_message = "The sky is rapidly clearing up."
/datum/weather/virgo4/overcast
name = "overcast"
@@ -154,6 +156,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
"Clouds cut off your view of the sky.",
"It's very cloudy."
)
imminent_transition_message = "Benign clouds are quickly gathering."
/datum/weather/virgo4/light_snow
name = "light snow"
@@ -170,6 +173,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
"Small snowflakes begin to fall from above.",
"It begins to snow lightly.",
)
imminent_transition_message = "It appears a light snow is about to start."
/datum/weather/virgo4/snow
name = "moderate snow"
@@ -189,6 +193,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
"It's starting to snow.",
"The air feels much colder as snowflakes fall from above."
)
imminent_transition_message = "A snowfall is starting."
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
@@ -222,6 +227,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
"Strong winds howl around you as a blizzard appears.",
"It starts snowing heavily, and it feels extremly cold now."
)
imminent_transition_message = "Wind is howling. Blizzard is coming."
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -255,6 +261,9 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"The sky is dark, and rain falls down upon you."
)
imminent_transition_message = "Light drips of water are starting to fall from the sky."
outdoor_sounds_type = /datum/looping_sound/weather/rain
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
/datum/weather/virgo4/rain/process_effects()
..()
@@ -296,6 +305,9 @@ var/datum/planet/virgo4/planet_virgo4 = null
"Loud thunder is heard in the distance.",
"A bright flash heralds the approach of a storm."
)
imminent_transition_message = "You can hear distant thunder. Storm is coming."
outdoor_sounds_type = /datum/looping_sound/weather/rain
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
transition_chances = list(
@@ -357,6 +369,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
"It begins to hail.",
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
)
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
/datum/weather/virgo4/hail/process_effects()
..()
@@ -393,6 +406,30 @@ var/datum/planet/virgo4/planet_virgo4 = null
if(show_message)
to_chat(H, effect_message)
/datum/weather/virgo4/fog
name = "fog"
icon_state = "fog"
wind_high = 1
wind_low = 0
light_modifier = 0.7
temp_high = 283.15 // 10c
temp_low = 273.15 // 0c
transition_chances = list(
WEATHER_FOG = 10,
WEATHER_OVERCAST = 15
)
observed_message = "A fogbank has rolled over the region."
transition_messages = list(
"Fog rolls in.",
"Visibility falls as the air becomes dense.",
"The clouds drift lower, as if to smother the forests."
)
imminent_transition_message = "Clouds are drifting down as the area is getting foggy."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
/datum/weather/virgo4/blood_moon
name = "blood moon"
light_modifier = 0.5
@@ -407,6 +444,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"The sky turns blood red!"
)
imminent_transition_message = "The sky is turning red. Blood Moon is starting."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -426,6 +464,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"Gentle embers waft down around you like grotesque snow."
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers start to rain down."
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -447,6 +486,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"Smoldering clouds of scorching ash billow down around you!"
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers fill the air and wind is picking up too. Ashstorm is coming, get to cover!"
// Lets recycle.
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -479,6 +519,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"Smoldering clouds of scorching ash billow down around you!"
)
imminent_transition_message = "Dark smoke is filling the sky, as ash and embers fill the air and wind is picking up too."
// Lets recycle.
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
@@ -498,6 +539,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"Radioactive soot and ash start to float down around you, contaminating whatever they touch."
)
imminent_transition_message = "Sky and clouds are growing sickly green... Radiation storm is approaching, get to cover!"
outdoor_sounds_type = /datum/looping_sound/weather/wind
indoor_sounds_type = /datum/looping_sound/weather/wind/indoors
@@ -534,9 +576,12 @@ var/datum/planet/virgo4/planet_virgo4 = null
/datum/weather/virgo4/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
)
@@ -555,6 +600,7 @@ var/datum/planet/virgo4/planet_virgo4 = null
transition_messages = list(
"Suddenly, colorful confetti starts raining from the sky."
)
imminent_transition_message = "A rain is starting... A rain of confetti...?"
/turf/unsimulated/wall/planetary/normal/virgo4
name = "deep ocean"

View File

@@ -1,12 +1,14 @@
/datum/weather_holder
var/datum/planet/our_planet = null // Reference to the planet datum that holds this datum.
var/datum/weather/current_weather = null // The current weather that is affecting the planet.
var/imminent_weather = null // The current weather that is affecting the planet.
var/temperature = T20C // The temperature to set planetary walls to.
var/wind_dir = 0 // The direction the wind is blowing. Moving against the wind slows you down, while moving with it speeds you up.
var/wind_speed = 0 // How fast or slow a mob can be due to wind acting on them.
var/list/allowed_weather_types = list() // Assoc list of weather identifiers, containing the actual weather datum.
var/list/roundstart_weather_chances = list() // Assoc list of weather identifiers and their odds of being picked to happen at roundstart.
var/next_weather_shift = null // world.time when the weather subsystem will advance the forecast.
var/imminent_weather_shift = null // world.time when weather will shift towards pre-set imminent weather type.
var/list/forecast = list() // A list of what the weather will be in the future. This allows it to be pre-determined and planned around.
// Holds the weather icon, using vis_contents. Documentation says an /atom/movable is required for placing inside another atom's vis_contents.
@@ -62,7 +64,9 @@
log_debug("[our_planet.name]'s weather is now [new_weather], with a temperature of [temperature]&deg;K ([temperature - T0C]&deg;C | [temperature * 1.8 - 459.67]&deg;F).")
/datum/weather_holder/process()
if(world.time >= next_weather_shift)
if(imminent_weather && world.time >= imminent_weather_shift)
proceed_to_imminent_weather()
else if(!imminent_weather && world.time >= next_weather_shift)
if(!current_weather) // Roundstart (hopefully).
initialize_weather()
else
@@ -91,6 +95,19 @@
change_weather(new_weather)
build_forecast() // To fill the forecast to the desired length.
/datum/weather_holder/proc/queue_imminent_weather(weather_to_queue)
if(!(weather_to_queue in allowed_weather_types))
return
imminent_weather = weather_to_queue
imminent_weather_shift = world.time + 90 SECONDS
/datum/weather_holder/proc/proceed_to_imminent_weather()
var/new_weather = imminent_weather
imminent_weather = null
forecast.Cut() // Clear the forecast, since we're force-changing the weather.
change_weather(new_weather)
build_forecast() // To fill the forecast.
// Creates a list of future weather shifts, that the planet will undergo at some point in the future.
// Determining it ahead of time allows for attentive players to plan further ahead, if they can see the forecast.
/datum/weather_holder/proc/build_forecast()
@@ -144,7 +161,6 @@
/datum/weather_holder/proc/get_weather_datum(desired_type)
return allowed_weather_types[desired_type]
/datum/weather_holder/proc/show_transition_message()
if(!current_weather.transition_messages.len)
return
@@ -175,6 +191,7 @@
var/show_message = FALSE // Is set to TRUE and plays the messsage every [message_delay]
var/list/transition_messages = list()// List of messages shown to all outdoor mobs when this weather is transitioned to, for flavor. Not shown if already this weather.
var/imminent_transition_message = null
var/observed_message = null // What is shown to a player 'examining' the weather.
// Looping sound datums for weather sounds, both inside and outside.

View File

@@ -39,6 +39,15 @@
build_path = /obj/item/weapon/firework_star/weather/overcast
sort_string = "IFABB"
/datum/design/item/firework_star/weather_fog
name = "weather - FOG"
desc = "A firework star, designed for use with launcher. Modifies current planetary weather effects. This one creates fog."
id = "fireworkfog"
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 2000)
build_path = /obj/item/weapon/firework_star/weather/fog
sort_string = "IFABC"
/datum/design/item/firework_star/weather_rain
name = "weather - RAIN"
desc = "A firework star, designed for use with launcher. Modifies current planetary weather effects. This one creates rain."
@@ -46,7 +55,7 @@
req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 4000)
build_path = /obj/item/weapon/firework_star/weather/rain
sort_string = "IFABC"
sort_string = "IFABD"
/datum/design/item/firework_star/weather_storm
name = "weather - STORM"
@@ -55,7 +64,7 @@
req_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 5)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 3000, MAT_GOLD = 1000)
build_path = /obj/item/weapon/firework_star/weather/storm
sort_string = "IFABD"
sort_string = "IFABE"
/datum/design/item/firework_star/weather_light_snow
name = "weather - LIGHT SNOW"
@@ -64,7 +73,7 @@
req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_LEAD = 2000)
build_path = /obj/item/weapon/firework_star/weather/light_snow
sort_string = "IFABE"
sort_string = "IFABF"
/datum/design/item/firework_star/weather_snow
name = "weather - MODERATE SNOW"
@@ -73,7 +82,7 @@
req_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 3000, MAT_LEAD = 2000)
build_path = /obj/item/weapon/firework_star/weather/snow
sort_string = "IFABF"
sort_string = "IFABG"
/datum/design/item/firework_star/weather_blizzard
name = "weather - HEAVY SNOW"
@@ -82,7 +91,7 @@
req_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 5)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 3000, MAT_LEAD = 3000)
build_path = /obj/item/weapon/firework_star/weather/blizzard
sort_string = "IFABG"
sort_string = "IFABH"
/datum/design/item/firework_star/weather_hail
name = "weather - HAIL"
@@ -91,15 +100,6 @@
req_tech = list(TECH_MATERIAL = 6, TECH_ENGINEERING = 5, TECH_ILLEGAL = 2)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_SILVER = 3000, MAT_LEAD = 3000, MAT_PLASTEEL = 4000)
build_path = /obj/item/weapon/firework_star/weather/hail
sort_string = "IFABH"
/datum/design/item/firework_star/weather_fallout
name = "weather - NUCLEAR"
desc = "A firework star, designed for use with launcher. Modifies current planetary weather effects. This one creates a heavy cloud of nuclear fallout. DANGEROUS."
id = "fireworkfallout"
req_tech = list(TECH_MATERIAL = 8, TECH_ENGINEERING = 6, TECH_ILLEGAL = 7)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_URANIUM = 12000)
build_path = /obj/item/weapon/firework_star/weather/fallout
sort_string = "IFABI"
/datum/design/item/firework_star/weather_confetti
@@ -110,3 +110,12 @@
materials = list(MAT_PLASTIC = 10000, MAT_GLASS = 10000)
build_path = /obj/item/weapon/firework_star/weather/confetti
sort_string = "IFABJ"
/datum/design/item/firework_star/weather_fallout
name = "weather - NUCLEAR"
desc = "A firework star, designed for use with launcher. Modifies current planetary weather effects. This one creates a heavy cloud of nuclear fallout. DANGEROUS."
id = "fireworkfallout"
req_tech = list(TECH_MATERIAL = 8, TECH_ENGINEERING = 6, TECH_ILLEGAL = 7)
materials = list(MAT_PLASTIC = 2000, MAT_GLASS = 2000, MAT_URANIUM = 12000)
build_path = /obj/item/weapon/firework_star/weather/fallout
sort_string = "IFABK"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB