h
This commit is contained in:
parent
1ff3cea4d6
commit
5422d52065
21 changed files with 21953 additions and 369 deletions
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,20 +1,26 @@
|
|||
trees = {
|
||||
vector.new(-261, 95, 119),
|
||||
vector.new(-258, 95, 124),
|
||||
vector.new(-264, 95, 124),
|
||||
vector.new(-265, 95, 121),
|
||||
vector.new(-263, 94, 116),
|
||||
vector.new(-265, 94, 107),
|
||||
vector.new(-263, 94, 104),
|
||||
vector.new(-261,94,94),
|
||||
vector.new(-259,94,100),
|
||||
vector.new(-257,94,103)
|
||||
vector.new(-12,193,174),
|
||||
vector.new(-6,191,165),
|
||||
vector.new(-5,194,172),
|
||||
vector.new(-11,189,162),
|
||||
vector.new(-16,187,161),
|
||||
vector.new(-9,188,156),
|
||||
vector.new(-17,185,154),
|
||||
vector.new(-9,186,149),
|
||||
vector.new(-13,183,146),
|
||||
vector.new(-7,183,143),
|
||||
vector.new(0,186,144),
|
||||
vector.new(-3,189,153),
|
||||
vector.new(0,191,161),
|
||||
vector.new(3,193,168),
|
||||
vector.new(4,190,155),
|
||||
vector.new(4,189,150)
|
||||
}
|
||||
pf = require("pathfinding")
|
||||
im = require("inventorymanager")
|
||||
function fell(index)
|
||||
im.select("techreborn:rubber_sapling")
|
||||
print("going towards tree")
|
||||
|
||||
pf.lookat(trees[index or math.random(#trees)])
|
||||
has, data = turtle.inspect()
|
||||
--print(has,data)
|
||||
|
@ -39,7 +45,8 @@ end
|
|||
|
||||
for i = 1,#trees do
|
||||
fell(i)
|
||||
end
|
||||
end
|
||||
pf.to(pf.home+vector.new(0,10,0))
|
||||
pf.returnHome()
|
||||
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ function returnhome()
|
|||
_G.position = position
|
||||
end
|
||||
function lookat(target)
|
||||
print("lookat")
|
||||
print("lookat"..target:tostring())
|
||||
while (position+facing).x ~= target.x
|
||||
or (position+facing).z ~= target.z do
|
||||
greedystep(target)
|
||||
|
|
|
@ -2,8 +2,8 @@ file = fs.open(arg[1],"r")
|
|||
line = file.readLine()
|
||||
while line do
|
||||
print(line)
|
||||
rednet.send(1,line)
|
||||
rednet.broadcast(line)
|
||||
line = file.readLine()
|
||||
end
|
||||
rednet.send(1,nil)
|
||||
rednet.broadcast(nil)
|
||||
file.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue