mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-16 07:10:32 +01:00
fix remaining issues
This commit is contained in:
parent
87734f7ff0
commit
0bd8932721
|
@ -316,7 +316,7 @@ function mesecon.get_conductor_on(node_off, rulename)
|
|||
return conductor.states[tonumber(binstate,2)+1]
|
||||
end
|
||||
end
|
||||
return offstate
|
||||
return nil
|
||||
end
|
||||
|
||||
function mesecon.get_conductor_off(node_on, rulename)
|
||||
|
@ -332,7 +332,7 @@ function mesecon.get_conductor_off(node_on, rulename)
|
|||
return conductor.states[tonumber(binstate,2)+1]
|
||||
end
|
||||
end
|
||||
return onstate
|
||||
return nil
|
||||
end
|
||||
|
||||
function mesecon.conductor_get_rules(node)
|
||||
|
|
|
@ -30,7 +30,6 @@ minetest.register_node("mesecons_extrawires:corner_on", {
|
|||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
selection_box = corner_selectionbox,
|
||||
node_box = corner_nodebox,
|
||||
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "mesecons_extrawires:corner_off",
|
||||
sounds = default.node_sound_defaults(),
|
||||
|
@ -58,7 +57,6 @@ minetest.register_node("mesecons_extrawires:corner_off", {
|
|||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
selection_box = corner_selectionbox,
|
||||
node_box = corner_nodebox,
|
||||
groups = {dig_immediate = 3},
|
||||
sounds = default.node_sound_defaults(),
|
||||
mesecons = {conductor =
|
||||
|
|
|
@ -60,7 +60,7 @@ local function update_real_port_states(pos, rule_name, new_state)
|
|||
if rule_name.x == nil then
|
||||
for _, rname in ipairs(rule_name) do
|
||||
local port = pos_to_side[rname.x + (2 * rname.z) + 3]
|
||||
L[port] = (newstate == "on") and 1 or 0
|
||||
L[port] = (new_state == "on") and 1 or 0
|
||||
end
|
||||
else
|
||||
local port = pos_to_side[rule_name.x + (2 * rule_name.z) + 3]
|
||||
|
|
|
@ -469,8 +469,8 @@ yc.command_after_execute = function(params)
|
|||
if yc.parsecode(params.code, params.pos) == nil then
|
||||
meta:set_string("infotext", "Code in after() not valid!")
|
||||
else
|
||||
if code ~= nil then
|
||||
meta:set_string("infotext", "Working Microcontroller\n"..code)
|
||||
if params.code ~= nil then
|
||||
meta:set_string("infotext", "Working Microcontroller\n"..params.code)
|
||||
else
|
||||
meta:set_string("infotext", "Working Microcontroller")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user