1
0
Fork 0

change function name go_wplist -> gopath

This commit is contained in:
cora 2022-05-19 00:50:46 +02:00
parent e3bb7fe4be
commit 98231f15ae
2 changed files with 4 additions and 4 deletions

View File

@ -2919,7 +2919,7 @@ local do_states = function(self, dtime)
end
end
function mobs:go_wplist(self,target,callback_arrived)
function mobs:gopath(self,target,callback_arrived)
local p = self.object:get_pos()
local t = vector.offset(target,0,1,0)
if not target or not p then return end

View File

@ -575,7 +575,7 @@ local function go_home(entity)
entity.state = "go_home"
local b=entity.bed
if not b then return end
mobs:go_wplist(entity,b,function(entity,b)
mobs:gopath(entity,b,function(entity,b)
if vector.distance(entity.object:get_pos(),b) < 2 then
entity.state = "stand"
set_velocity(entity,0)
@ -618,7 +618,7 @@ local function look_for_job(self)
if m:get_string("villager") == "" then
--minetest.log("goingt to jobsite "..minetest.pos_to_string(n) )
minetest.after(0,function()
mobs:go_wplist(self,n,function()
mobs:gopath(self,n,function()
--minetest.log("arrived jobsite "..minetest.pos_to_string(n) )
end)
end)
@ -1242,7 +1242,7 @@ mobs:register_mob("mobs_mc:villager", {
on_rightclick = function(self, clicker)
local trg=vector.new(0,9,0)
if self._jobsite then
mobs:go_wplist(self,self._jobsite,function()
mobs:gopath(self,self._jobsite,function()
--minetest.log("arrived at jobsite")
end)
end