Skip to content

Commit

Permalink
Fix #184, Fix #186, Fix #187
Browse files Browse the repository at this point in the history
Just some minor issues like dead code.
  • Loading branch information
Jeija committed Nov 21, 2014
1 parent d325292 commit dcf1f79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion mesecons/actionqueue.lua
Expand Up @@ -44,7 +44,8 @@ end
-- However, even that does not work in some cases, that's why we delay the time the globalsteps
-- start to be execute by 5 seconds
local get_highest_priority = function (actions)
local highestp = -1, highesti
local highestp = -1
local highesti
for i, ac in ipairs(actions) do
if ac.priority > highestp then
highestp = ac.priority
Expand Down
1 change: 0 additions & 1 deletion mesecons_luacontroller/init.lua
Expand Up @@ -477,7 +477,6 @@ minetest.register_node(nodename, {
reset_meta(pos, fields.code, err)
end
end,
on_timer = handle_timer,
sounds = default.node_sound_stone_defaults(),
mesecons = mesecons,
digiline = digiline,
Expand Down
9 changes: 5 additions & 4 deletions mesecons_pistons/init.lua
Expand Up @@ -56,14 +56,15 @@ end

local piston_remove_pusher = function(pos, node)
pistonspec = minetest.registered_nodes[node.name].mesecons_piston
if pushername == pistonspec.pusher then --make sure there actually is a pusher (for compatibility reasons mainly)
return
end

dir = piston_get_direction(pistonspec.dir, node)
local pusherpos = mesecon:addPosRule(pos, dir)
local pushername = minetest.get_node(pusherpos).name

-- make sure there actually is a pusher (for compatibility reasons mainly)
if pushername ~= pistonspec.pusher then
return
end

minetest.remove_node(pusherpos)
minetest.sound_play("piston_retract", {
pos = pos,
Expand Down

0 comments on commit dcf1f79

Please sign in to comment.