forked from VoxeLibre/VoxeLibre
additionally rate limit villager jobhunts
This commit is contained in:
parent
e630ea59c9
commit
cd43076ea3
|
@ -613,6 +613,8 @@ local function employ(self,jobsite_pos)
|
|||
end
|
||||
|
||||
local function look_for_job(self)
|
||||
if self.last_jobhunt and os.time() - self.last_jobhunt < 360 then return end
|
||||
self.last_jobhunt = os.time() + math.random(0,60)
|
||||
local p = self.object:get_pos()
|
||||
local nn = minetest.find_nodes_in_area(vector.offset(p,-48,-48,-48),vector.offset(p,48,48,48),jobsites)
|
||||
for _,n in pairs(nn) do
|
||||
|
|
Loading…
Reference in New Issue