This commit is contained in:
Crispy 2025-07-03 01:23:46 +02:00
parent 491112768c
commit 68ec37f994
66 changed files with 6591 additions and 10096 deletions

View file

@ -67,9 +67,11 @@ function greedystep(target)
return true
end
greedystep = require("pathfinding2").greedystep
function to(target)
function to(target, func)
func = func or function() end
print(tostring(target))
while greedystep(target) do
func()
end
end
function returnhome()
@ -89,11 +91,12 @@ function returnhome()
_G.facing = facing
_G.position = position
end
function lookat(target)
function lookat(target, func)
print("lookat"..target:tostring())
while (position+facing).x ~= target.x
or (position+facing).z ~= target.z do
greedystep(target)
if func then func() end
end
print("temp")
temp = target.y-position.y