From 26bd6915502c1cf6c4f375606619950b4b374bbb Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Fri, 27 Mar 2015 19:03:47 +0100 Subject: [PATCH] Updated fail mod - Updated fail with files closed - Fixed crash with malformed list for pyramids.fill_chests --- mods/fail/cookie.lua | 3 ++- mods/fail/init.lua | 3 ++- mods/tsm_pyramids/init.lua | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mods/fail/cookie.lua b/mods/fail/cookie.lua index 3f57d7c1..2e6f831c 100644 --- a/mods/fail/cookie.lua +++ b/mods/fail/cookie.lua @@ -31,7 +31,8 @@ minetest.register_on_shutdown(function() if v ~= 0 then pntf:write(i.." "..v.."\n") end - end + end + io.close(pntf) end) minetest.register_chatcommand("cookie", { diff --git a/mods/fail/init.lua b/mods/fail/init.lua index 50fc001a..29f1046b 100644 --- a/mods/fail/init.lua +++ b/mods/fail/init.lua @@ -75,7 +75,8 @@ minetest.register_on_shutdown(function() if v ~= 0 then pntf:write(i.." "..v.."\n") end - end + end + io.close(pntf) end) minetest.register_chatcommand("fail", { diff --git a/mods/tsm_pyramids/init.lua b/mods/tsm_pyramids/init.lua index 2c49b71b..e25b322d 100644 --- a/mods/tsm_pyramids/init.lua +++ b/mods/tsm_pyramids/init.lua @@ -22,7 +22,12 @@ function pyramids.fill_chest(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() inv:set_size("main", 8*4) - inv:set_list("main",{[1] = "", [32] = ""}) + inv:set_list("main", + { + [1] = "", + [32] = "" + } + ) if math.random(1,10) < 7 then return end local stacks = {} if minetest.get_modpath("treasurer") ~= nil then