log when changing the falling snow setting and make the cache tables weak tables

This commit is contained in:
HybridDog
2016-04-29 17:58:13 +02:00
parent 9d2211b0b5
commit 049349360e
2 changed files with 11 additions and 1 deletions

View File

@ -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