diff --git a/power/power.lua b/power/power.lua index 1ec63c2..77c77ea 100644 --- a/power/power.lua +++ b/power/power.lua @@ -363,7 +363,7 @@ local function trigger_nodes(mst_pos, mst_mem, dec) mem.pwr_node_alive_cnt = (mem.pwr_node_alive_cnt or 1) - dec mem.pwr_power_provided_cnt = 2 if D.pwr then D.dbg("trigger_nodes", minetest.get_node(pos).name, mem.pwr_node_alive_cnt, mem.pwr_available2 or mem.pwr_available or mem.pwr_needed) end - if mem.pwr_node_alive_cnt >= 0 then + if mem.pwr_node_alive_cnt >= 0 or mem.pwr_state == NOPOWER then if mem.pwr_available then handle_generator(mst_mem, mem, pos, mem.pwr_available) elseif mem.pwr_needed then diff --git a/power/powerswitch.lua b/power/powerswitch.lua index 6683960..364db93 100644 --- a/power/powerswitch.lua +++ b/power/powerswitch.lua @@ -266,16 +266,16 @@ techage.register_node({"techage:powerswitch", "techage:powerswitch_on"}, { on_recv_message = function(pos, src, topic, payload) local node = minetest.get_node(pos) if topic == "on" and node.name == "techage:powerswitch" then - switch_on(pos, node, "techage:powerswitch_on") + switch_on(pos, node, nil, "techage:powerswitch_on") return true elseif topic == "on" and node.name == "techage:powerswitchsmall" then - switch_on(pos, node, "techage:powerswitchsmall_on") + switch_on(pos, node, nil, "techage:powerswitchsmall_on") return true elseif topic == "off" and node.name == "techage:powerswitch_on" then - switch_off(pos, node, "techage:powerswitch") + switch_off(pos, node, nil, "techage:powerswitch") return true elseif topic == "off" and node.name == "techage:powerswitchsmall_on" then - switch_off(pos, node, "techage:powerswitchsmall") + switch_off(pos, node, nil, "techage:powerswitchsmall") return true elseif topic == "state" then if node.name == "techage:powerswitch_on" or node.name == "techage:powerswitchsmall_on"then diff --git a/wind_turbine/rotor.lua b/wind_turbine/rotor.lua index 7558f22..596ed49 100644 --- a/wind_turbine/rotor.lua +++ b/wind_turbine/rotor.lua @@ -52,8 +52,8 @@ local function add_rotor(pos, mem, player_name) mem.error = false -- Check for next wind turbine - local pos1 = {x=pos.x-14, y=pos.y-9, z=pos.z-14} - local pos2 = {x=pos.x+14, y=pos.y+10, z=pos.z+14} + local pos1 = {x=pos.x-13, y=pos.y-9, z=pos.z-13} + local pos2 = {x=pos.x+13, y=pos.y+10, z=pos.z+13} local num = #minetest.find_nodes_in_area(pos1, pos2, {"techage:ta4_wind_turbine"}) if num > 1 then if player_name then