Start machine timer on tubelib action, update README
This commit is contained in:
parent
1673aef090
commit
39dd987e7e
@ -23,5 +23,5 @@ Powered tools that you can simply recharge instead of crafting them again.
|
||||
### Farming
|
||||
Farming automation machines: automatic planting and harvesting of crops.
|
||||
|
||||
### (Planned) Nuclear
|
||||
Nuclear power. Both fission and fusion will be presented!
|
||||
### Nuclear
|
||||
Nuclear power. Both fission and fusion will (soon) be presented!
|
||||
|
@ -148,14 +148,17 @@ local tube = {
|
||||
local tubelib_tube = {
|
||||
on_pull_item = function(pos, side, player_name)
|
||||
local meta = minetest.get_meta(pos)
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
return tubelib.get_item(meta, "dst")
|
||||
end,
|
||||
on_push_item = function(pos, side, item, player_name)
|
||||
local meta = minetest.get_meta(pos)
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
return tubelib.put_item(meta, "src", item)
|
||||
end,
|
||||
on_unpull_item = function(pos, side, item, player_name)
|
||||
local meta = minetest.get_meta(pos)
|
||||
minetest.get_node_timer(pos):start(1.0)
|
||||
return tubelib.put_item(meta, "dst", item)
|
||||
end,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user