mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-25 06:07:22 +01:00
new instruments added, Changed snowoverlay to snow floor decal, Exploration ship jump submap done. Plains finished, Just needs teleporters setup. Tons of improvements to hallways. Floor colors! Remade engineering (again) Disposals finalized,
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
/datum/gm_action/planet_weather_shift
|
|
name = "sudden weather shift"
|
|
enabled = TRUE
|
|
departments = list(ROLE_EVERYONE)
|
|
reusable = TRUE
|
|
var/datum/planet/target_planet
|
|
|
|
var/list/banned_weathers = list(
|
|
/* //yawn Wider Edit - Borealis 2 Weather,
|
|
/datum/weather/borealis2/ash_storm,
|
|
/datum/weather/borealis2/emberfall,
|
|
/datum/weather/borealis2/blood_moon,
|
|
/datum/weather/borealis2/fallout*/)
|
|
//Yawn wider Edit End
|
|
var/list/possible_weathers = list()
|
|
|
|
/datum/gm_action/planet_weather_shift/set_up()
|
|
if(!target_planet || isnull(target_planet))
|
|
target_planet = pick(SSplanets.planets)
|
|
possible_weathers |= target_planet.weather_holder.allowed_weather_types
|
|
possible_weathers -= banned_weathers
|
|
return
|
|
|
|
/datum/gm_action/planet_weather_shift/get_weight()
|
|
return max(0, -15 + (metric.count_all_outdoor_mobs() * 20))
|
|
|
|
/datum/gm_action/planet_weather_shift/start()
|
|
..()
|
|
var/new_weather = pick(possible_weathers)
|
|
target_planet.weather_holder.change_weather(new_weather)
|
|
|
|
/datum/gm_action/planet_weather_shift/announce()
|
|
spawn(rand(3 SECONDS, 2 MINUTES))
|
|
command_announcement.Announce("Local weather patterns on [target_planet.name] suggest that a sudden atmospheric fluctuation has occurred. All groundside personnel should be wary of rapidly deteriorating conditions.", "Weather Alert")
|
|
return
|