forked from mtcontrib/minetest-mod-snow
log when changing the falling snow setting and make the cache tables weak tables
This commit is contained in:
@ -59,6 +59,8 @@ local function get_ws_value(a, x)
|
||||
end
|
||||
else
|
||||
ws_values[a] = {}
|
||||
-- weak table, see https://www.lua.org/pil/17.1.html
|
||||
setmetatable(ws_values[a], {__mode = "v"})
|
||||
end
|
||||
v = do_ws_func(a, x)
|
||||
ws_values[a][x] = v
|
||||
|
Reference in New Issue
Block a user