mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Adds a Debug command to stop all weather. (#80848)
Atomizing out of #78524 as a result of that PR being too big and this was quite easy to do. ## About The Pull Request This adds a debug (admin) command that allows you to stop all weather effects that are going on across the map in a given instance. This is useful for when you are testing something on lavaland and need the storm to stop, or if you otherwise had some other kind of weather effect interfering with testing something. It's worth noting this directly calls end() on the active weather effect, meaning that for more complicated weather that may have different side effects, it may need some extra finess, but as of current writing no weather does anything interesting in their wind_down() procs. ## Why It's Good For The Game God weather is so annoying while testing lavaland, plus this is just straight admin and testing tooling so there's no harm. ## Changelog 🆑 admin: Added a new admin verb that ends all active weather within the weather subsystem. /🆑
This commit is contained in:
@@ -85,3 +85,17 @@ SUBSYSTEM_DEF(weather)
|
||||
///Returns an active storm by its type
|
||||
/datum/controller/subsystem/weather/proc/get_weather_by_type(type)
|
||||
return locate(type) in processing
|
||||
|
||||
/**
|
||||
* Calls end() on all current weather effects that are currently processing in the weather subsystem.
|
||||
*/
|
||||
/client/proc/stop_weather()
|
||||
set category = "Debug"
|
||||
set name = "Stop All Active Weather"
|
||||
|
||||
log_admin("[key_name(src)] stopped all currently active weather.")
|
||||
message_admins("[key_name_admin(src)] stopped all currently active weather.")
|
||||
for(var/datum/weather/current_weather as anything in SSweather.processing)
|
||||
if(current_weather in SSweather.processing)
|
||||
current_weather.end()
|
||||
BLACKBOX_LOG_ADMIN_VERB("Stop All Active Weather")
|
||||
|
||||
@@ -233,6 +233,7 @@ GLOBAL_PROTECT(admin_verbs_debug)
|
||||
/client/proc/validate_puzzgrids,
|
||||
/client/proc/GeneratePipeSpritesheet,
|
||||
/client/proc/view_runtimes,
|
||||
/client/proc/stop_weather,
|
||||
)
|
||||
GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess, /proc/release))
|
||||
GLOBAL_PROTECT(admin_verbs_possess)
|
||||
|
||||
Reference in New Issue
Block a user