cleanup
This commit is contained in:
parent
760729ee4b
commit
7694798ad0
6 changed files with 45 additions and 73 deletions
|
@ -1,8 +1,23 @@
|
|||
require("inventory")
|
||||
require("pathfinding")
|
||||
|
||||
press_pos = vector.new(1,0,0)
|
||||
deployer_pos = vector.new(2,0,0)
|
||||
furnace_pos = vector.new(3,0,0)
|
||||
mill_pos = vector.new(4,0,0)
|
||||
mixer_pos = vector.new(-1,0,0)
|
||||
compactor_pos = vector.new(-2,0,0)
|
||||
spout_pos = vector.new(-3,0,0)
|
||||
melter_pos = vector.new(-4,1,-3)
|
||||
casting_table_pos = vector.new(-3,0,-3)
|
||||
|
||||
-- fluid_tanks = {
|
||||
-- water = vector.new(0,0,-1),
|
||||
-- lava = vector.new(0,0,-1)
|
||||
-- }
|
||||
|
||||
function mill(extra_items)
|
||||
go_to(vector.new(-4,0,0),"south")
|
||||
goTo(mill_pos,"south")
|
||||
item_count = 0
|
||||
if turtle.getItemCount() ~= 0 then
|
||||
item_count = 1
|
||||
|
@ -23,7 +38,7 @@ function mill(extra_items)
|
|||
end
|
||||
function deploy(extra_items, nbt)
|
||||
-- extra_items should only be one item
|
||||
go_to(vector.new(2,0,0), "south")
|
||||
goTo(deployer_pos, "south")
|
||||
insertDepot(1)
|
||||
goUp()
|
||||
goUp()
|
||||
|
@ -43,7 +58,7 @@ function deploy_tool(extra_items)
|
|||
turtle.suckUp()
|
||||
end
|
||||
function furnace(extra_items)
|
||||
go_to(vector.new(1,0,0), "south")
|
||||
goTo(furnace_pos, "south")
|
||||
item_count = 0
|
||||
if turtle.getItemCount() ~= 0 then
|
||||
item_count = 1
|
||||
|
@ -60,14 +75,17 @@ function furnace(extra_items)
|
|||
takeForward(3)
|
||||
end
|
||||
function press(_)
|
||||
go_to(vector.new(-1,0,0), "south")
|
||||
goTo(press_pos, "south")
|
||||
insertDepot(1)
|
||||
sleep(1)
|
||||
takeDepot()
|
||||
end
|
||||
function compact(extra_items) end
|
||||
function compact(extra_items)
|
||||
printError("unimplemented :3")
|
||||
fail()
|
||||
end
|
||||
function mix(extra_items)
|
||||
go_to(vector.new(-3,0,0), "south")
|
||||
goTo(mixer_pos, "south")
|
||||
insertForward(1, 1)
|
||||
for _, item in pairs(extra_items) do
|
||||
selectItem(item.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue