Enable the use as elevator winch
This commit is contained in:
parent
af5038387a
commit
780b39d23c
@ -140,6 +140,8 @@ minetest.register_node("techage:ta2_winch", {
|
|||||||
remove_chest(pos)
|
remove_chest(pos)
|
||||||
nvm.running = true
|
nvm.running = true
|
||||||
power.start_storage_calc(pos, Axle, outdir)
|
power.start_storage_calc(pos, Axle, outdir)
|
||||||
|
elseif not nvm.running then
|
||||||
|
techage.renew_rope(pos, 50)
|
||||||
elseif nvm.running and nvm.load == 0 and not power.power_available(pos, Axle, outdir) then
|
elseif nvm.running and nvm.load == 0 and not power.power_available(pos, Axle, outdir) then
|
||||||
add_chest(pos)
|
add_chest(pos)
|
||||||
nvm.running = false
|
nvm.running = false
|
||||||
@ -185,7 +187,9 @@ techage.register_node({"techage:ta2_winch"}, {
|
|||||||
on_node_load = function(pos, node)
|
on_node_load = function(pos, node)
|
||||||
minetest.get_node_timer(pos):start(CYCLE_TIME)
|
minetest.get_node_timer(pos):start(CYCLE_TIME)
|
||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if nvm.running then
|
||||||
add_chest_entity(pos, nvm)
|
add_chest_entity(pos, nvm)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user