From 7c32a42cc54f7886a0938cda3a83c9eade6f1fa5 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 28 Feb 2025 18:50:35 +0300 Subject: [PATCH] add 'weather' command --- res/scripts/stdcmd.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/res/scripts/stdcmd.lua b/res/scripts/stdcmd.lua index d3b632f6..c06f059a 100644 --- a/res/scripts/stdcmd.lua +++ b/res/scripts/stdcmd.lua @@ -278,6 +278,19 @@ console.add_command( end ) +console.add_command( + "weather", + "Display current weather preset name", + function (args, kwargs) + local name = gfx.weather.get_current() + if name == "" then + return "unnamed " .. json.tostring(gfx.weather.get_current_data(), true) + else + return name + end + end +) + console.cheats = { "blocks.fill", "tp",