From 823c20bd1b507e60dcd03347bede1222b535d19c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 10 Jun 2017 17:52:21 +0200 Subject: [PATCH] Fix some global variable warnings --- mods/CORE/mcl_util/init.lua | 2 +- mods/HUD/mcl_inventory/init.lua | 2 +- mods/ITEMS/REDSTONE/mesecons_pistons/init.lua | 4 ++-- mods/ITEMS/mcl_throwing/throwable.lua | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index d919d93e67..79fe633f94 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -267,7 +267,7 @@ function mcl_util.generate_on_place_plant_function(condition) if success then if idef.sounds and idef.sounds.place then - minetest.sound_play(idef.sounds.place, {pos=above, gain=1}) + minetest.sound_play(idef.sounds.place, {pos=pointed_thing.above, gain=1}) end end itemstack = new_itemstack diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index c0573ab380..0b7149104d 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -141,7 +141,7 @@ minetest.register_on_joinplayer(function(player) set_inventory(player, true) end armor:set_player_armor(player) - update_inventory_original(self, player) + armor:update_inventory(player) end -- In Creative Mode, the initial inventory setup is handled in creative.lua diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua index dadd7b394f..d0bd95f007 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua @@ -55,9 +55,9 @@ piston_get_direction = function (dir, node) end local piston_remove_pusher = function (pos, node) - pistonspec = minetest.registered_nodes[node.name].mesecons_piston + local pistonspec = minetest.registered_nodes[node.name].mesecons_piston - dir = piston_get_direction(pistonspec.dir, node) + local dir = piston_get_direction(pistonspec.dir, node) local pusherpos = mesecon:addPosRule(pos, dir) local pushername = minetest.get_node(pusherpos).name diff --git a/mods/ITEMS/mcl_throwing/throwable.lua b/mods/ITEMS/mcl_throwing/throwable.lua index 9ba6bd83f0..7dea73ecda 100644 --- a/mods/ITEMS/mcl_throwing/throwable.lua +++ b/mods/ITEMS/mcl_throwing/throwable.lua @@ -18,7 +18,7 @@ local velocities = { mcl_throwing.throw = function(throw_item, pos, dir, velocity) if velocity == nil then - velocity = velocities[entity_name] + velocity = velocities[throw_item] end if velocity == nil then velocity = 22