mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-05 01:40:38 +02:00
Fix countless bugs, implement chat commands
This commit is contained in:
@ -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
|
Reference in New Issue
Block a user