mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add gfx.weather library & add weather.set command
This commit is contained in:
parent
02d8d8d6bf
commit
4d5b450145
8 changed files with 44 additions and 18 deletions
|
|
@ -264,6 +264,20 @@ console.add_command(
|
|||
end
|
||||
)
|
||||
|
||||
console.add_command(
|
||||
"weather.set name:str time:num=1",
|
||||
"Change weather",
|
||||
function (args, kwargs)
|
||||
local filename = file.find("presets/weather/"..args[1]..".json")
|
||||
if not filename then
|
||||
return "weather preset not found"
|
||||
end
|
||||
local preset = json.parse(file.read(filename))
|
||||
gfx.weather.change(preset, args[2])
|
||||
return "weather set to "..filename.." preset ("..tostring(args[2]).." s)"
|
||||
end
|
||||
)
|
||||
|
||||
console.cheats = {
|
||||
"blocks.fill",
|
||||
"tp",
|
||||
|
|
@ -271,5 +285,6 @@ console.cheats = {
|
|||
"time.set",
|
||||
"time.daycycle",
|
||||
"entity.despawn",
|
||||
"player.respawn"
|
||||
"player.respawn",
|
||||
"weather.set",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue