From dce02a99796406c579cfb46ee54421d4a7a34651 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 16 Jan 2017 13:24:38 +0100 Subject: [PATCH] Fix some global variable fuckups --- mods/builtin_item/init.lua | 4 ++-- mods/craftingpack/crafting/creative.lua | 2 ++ mods/throwing/init.lua | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mods/builtin_item/init.lua b/mods/builtin_item/init.lua index 919d6c8ce5..5782d9a9c6 100644 --- a/mods/builtin_item/init.lua +++ b/mods/builtin_item/init.lua @@ -30,7 +30,7 @@ minetest.register_entity(":__builtin:item", { item_texture = minetest.registered_items[itemname].inventory_image item_type = minetest.registered_items[itemname].type end - prop = { + local prop = { is_visible = true, visual = "sprite", textures = {"unknown_item.png"} @@ -108,7 +108,7 @@ minetest.register_entity(":__builtin:item", { --]] if minetest.registered_nodes[name] and minetest.registered_nodes[name].liquidtype == "flowing" then - get_flowing_dir = function(self) + local get_flowing_dir = function(self) local pos = self.object:getpos() local param2 = minetest.get_node(pos).param2 for i,d in ipairs({-1, 1, -1, 1}) do diff --git a/mods/craftingpack/crafting/creative.lua b/mods/craftingpack/crafting/creative.lua index 76e83d4b55..b431287928 100644 --- a/mods/craftingpack/crafting/creative.lua +++ b/mods/craftingpack/crafting/creative.lua @@ -118,6 +118,8 @@ minetest.after(0, init) local offset = {} local hoch = {} local bg = {} +-- TODO: Investigate what is going on with this weird variable +local start_i offset["blocks"] = "-0.29,-0.25" offset["deco"] = "0.98,-0.25" offset["redstone"] = "2.23,-0.25" diff --git a/mods/throwing/init.lua b/mods/throwing/init.lua index f618e28143..a92d53e7bf 100644 --- a/mods/throwing/init.lua +++ b/mods/throwing/init.lua @@ -37,7 +37,7 @@ minetest.register_tool("throwing:bow", { return itemstack end, on_use = function(itemstack, user, pointed_thing) - wear = itemstack:get_wear() + local wear = itemstack:get_wear() itemstack:add_wear(wear) if throwing_shoot_arrow(itemstack, user, pointed_thing) then if not minetest.setting_getbool("creative_mode") then