move weather back to gfx & add world:client/environment.json file
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "api_lua.hpp"
|
||||
#include "libhud.hpp"
|
||||
|
||||
#include "world/Level.hpp"
|
||||
#include "world/World.hpp"
|
||||
|
||||
@@ -8,7 +9,7 @@ static Weather& require_weather() {
|
||||
if (level == nullptr) {
|
||||
throw std::runtime_error("world is not open");
|
||||
}
|
||||
return level->getWorld()->getInfo().weather;
|
||||
return renderer->getWeather();
|
||||
}
|
||||
|
||||
static int l_change(lua::State* L) {
|
||||
|
||||
@@ -73,7 +73,6 @@ static void create_libs(State* L, StateType stateType) {
|
||||
openlib(L, "player", playerlib);
|
||||
openlib(L, "time", timelib);
|
||||
openlib(L, "world", worldlib);
|
||||
openlib(L, "weather", weatherlib);
|
||||
|
||||
openlib(L, "entities", entitylib);
|
||||
openlib(L, "cameras", cameralib);
|
||||
|
||||
@@ -35,6 +35,7 @@ void scripting::on_frontend_init(Hud* hud, WorldRenderer* renderer) {
|
||||
lua::openlib(L, "hud", hudlib);
|
||||
lua::openlib(L, "gfx", "blockwraps", blockwrapslib);
|
||||
lua::openlib(L, "gfx", "particles", particleslib);
|
||||
lua::openlib(L, "gfx", "weather", weatherlib);
|
||||
lua::openlib(L, "gfx", "text3d", text3dlib);
|
||||
|
||||
load_script("hud_classes.lua");
|
||||
|
||||
Reference in New Issue
Block a user