Files
CHOMPStation2/code/modules/gamemaster/actions/planet_weather_change.dm
T
RadiantFlash7 2aac0c0171 Map Overhaul+instruments
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,
2019-11-23 22:06:21 -05:00

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