Cuberite Forum
Weather control - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Requests (https://forum.cuberite.org/forum-3.html)
+--- Thread: Weather control (/thread-1279.html)



Weather control - xoft - 12-11-2013

It'd be nice to have a plugin providing a more thorough weather control. Currently, the core can change weather, and that's it. However, some people might want their weather never to change, or change on command. Thus, I'm proposing a new set of weather commands, either in a separate plugin, or as part of the Core:

- /weather <weather> - sets current weather to the one specified, regular weather-cycling is enabled
- /weather keep <weather> - sets current weather to the one specified, weather-cycling disabled (the weather stays forever)
- /weather change - changes the current weather to a different one, doesn't affect weather-cycling
- /weather interval <weather> <interval> - sets the interval used for regular weather-cycling for the specified weather.
- /weather intervals <sunny-int> <rainy-int> <thunder-int> - sets the intervals used for regular weather-cycling.


RE: Weather control - NiLSPACE - 12-11-2013

I could work on this, but maybe we need a cWorld::SetWeatherInterval(number) function for this? I can add it if you want. Also do you want the /weather keep etc for every world or only for the world the player is in?


RE: Weather control - xoft - 12-11-2013

Just the player's world, it wouldn't make much sense to be global.
If the interval-setting functions aren't there already, do make and export them. You should probably add the getters, too, in such a case, just so that the API is orthogonal.


RE: Weather control - NiLSPACE - 12-11-2013

Just noticed that there they already exist. They just have a different name: GetTicksUntilWeatherChange and SetTicksUntilWeatherChange


RE: Weather control - xoft - 12-11-2013

That's not exactly what this plugin needs - those set the current delay, which, once the weather changes, gets reset to a default value, based on the new weather. We need access to those default values. Alternatively, the plugin may change the interval after each change in the OnWeatherChanged hook.


RE: Weather control - NiLSPACE - 03-09-2014

I started working on this as part of my new WorldUtilities plugin. (Even though I finished it already. It has all the features I want it to have for the weather command.)