Fix likely wrong comparison in villager.lua

negation happen before comparison so this probably always evaluated to
falsey since not $string == false
This commit is contained in:
cora 2023-10-07 18:49:07 +02:00
parent b48c864c12
commit 5e9dc358e0

View File

@ -1964,7 +1964,7 @@ mcl_mobs.register_mob("mobs_mc:villager", {
self.attack = nil
end
-- Don't do at night. Go to bed? Maybe do_activity needs it's own method
if validate_jobsite(self) and not self.order == WORK then
if validate_jobsite(self) and self.order ~= WORK then
minetest.log("warning","[mobs_mc] villager has jobsite but doesn't work")
--self:gopath(self._jobsite,function()
-- minetest.log("sent to jobsite")