Last active
December 21, 2015 19:20
-
-
Save HybridDog/45ddedf3cb33db330815 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local current_pos | |
local actual_node_get = minetest.get_node_or_nil | |
local function temp_node_get(pos, ...) | |
current_pos = pos | |
return actual_node_get(pos, ...) | |
end | |
local actual_turnon = mesecon.turnon | |
function mesecon.turnon(...) | |
minetest.get_node_or_nil = temp_node_get | |
--local v = actual_turnon(pos, ...) commented because mesecon.turnon now doesn't return sth | |
actual_turnon(...) | |
minetest.get_node_or_nil = actual_node_get | |
current_pos = nil | |
--return v | |
end | |
local actual_is_conductor_off = mesecon.is_conductor_off | |
function mesecon.is_conductor_off(...) | |
if current_pos | |
and is_jammed(current_pos) then | |
return | |
end | |
return actual_is_conductor_off(...) | |
end | |
local actual_is_effector = mesecon.is_effector | |
function mesecon.is_effector(...) | |
if current_pos | |
and is_jammed(current_pos) then | |
return | |
end | |
return actual_is_effector(...) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment