Fix countless bugs, implement chat commands

This commit is contained in:
Till Affeldt
2020-04-14 05:44:46 +02:00
parent fdc457bd09
commit 2090aff6bd
12 changed files with 169 additions and 27 deletions

View File

@ -41,4 +41,22 @@ function environment.get_humidity(pos)
return (base + biome * 0.7 + random_base * 0.3) * random
end
function environment.get_weather_presets(player)
local pname = player:get_player_name()
local weathers = climate_mod.current_weather[pname]
if type(weathers) == "nil" then weathers = {} end
return weathers
end
function environment.get_effects(player)
local pname = player:get_player_name()
local effects = {}
for effect, players in pairs(climate_mod.current_effects) do
if type(players[pname]) ~= "nil" then
table.insert(effects, effect)
end
end
return effects
end
return environment