Fix wind turbine and concentrator bugs
This commit is contained in:
parent
4570a10241
commit
54ed4e60c5
@ -65,6 +65,10 @@ local names = networks.register_junction("techage:concentrator", 2/8, Boxes, Tub
|
||||
end,
|
||||
}, 27)
|
||||
|
||||
for _, name in ipairs(names) do
|
||||
Tube:set_valid_sides(name, {"B", "R", "F", "L", "D", "U"})
|
||||
end
|
||||
|
||||
techage.register_node(names, {
|
||||
on_push_item = function(pos, in_dir, stack)
|
||||
local push_dir = M(pos):get_int("push_dir")
|
||||
@ -110,6 +114,10 @@ names = networks.register_junction("techage:ta4_concentrator", 2/8, Boxes, Tube,
|
||||
end,
|
||||
}, 27)
|
||||
|
||||
for _, name in ipairs(names) do
|
||||
Tube:set_valid_sides(name, {"B", "R", "F", "L", "D", "U"})
|
||||
end
|
||||
|
||||
techage.register_node(names, {
|
||||
on_push_item = function(pos, in_dir, stack)
|
||||
local push_dir = M(pos):get_int("push_dir")
|
||||
|
@ -117,9 +117,11 @@ local function stop_rotor(pos, nvm, state)
|
||||
end
|
||||
|
||||
local function can_start(pos, nvm)
|
||||
check_rotor(pos, nvm)
|
||||
if nvm.error then
|
||||
return nvm.error
|
||||
end
|
||||
add_rotor(pos, nvm)
|
||||
return true
|
||||
end
|
||||
|
||||
@ -308,6 +310,7 @@ techage.register_node({"techage:ta4_wind_turbine"}, {
|
||||
on_node_load = function(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
add_rotor(pos, nvm, true)
|
||||
start_rotor(pos, nvm)
|
||||
minetest.get_node_timer(pos):start(CYCLE_TIME)
|
||||
end,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user