Weather: fix chatcommand
This commit is contained in:
parent
4a6fe58502
commit
d6f7b633b1
@ -1128,12 +1128,12 @@ core.register_chatcommand("weather", {
|
|||||||
description = "Set weather type",
|
description = "Set weather type",
|
||||||
privs = {weather = true},
|
privs = {weather = true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
if param and (weather_type.registered[param] or param == "none") then
|
if param and (weather.registered[param] or param == "none") then
|
||||||
weather.type = param
|
weather.type = param
|
||||||
core.chat_send_player(name, "Set weather type: " .. param)
|
core.chat_send_player(name, "Set weather type: " .. param)
|
||||||
else
|
else
|
||||||
local types = "none"
|
local types = "none"
|
||||||
for w, _ in pairs(weather_type.registered) do
|
for w, _ in pairs(weather.registered) do
|
||||||
types = types .. ", " .. w
|
types = types .. ", " .. w
|
||||||
end
|
end
|
||||||
core.chat_send_player(name, "Avalible weather types: " .. types)
|
core.chat_send_player(name, "Avalible weather types: " .. types)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user