mobs-redo #2

Merged
SumianVoice merged 457 commits from VoxeLibre/VoxeLibre:mobs-redo into mobs-redo 2022-07-20 00:23:43 +02:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit d9e40d5223 - Show all commits

View File

@ -1362,17 +1362,17 @@ mcl_mobs:register_mob("mobs_mc:villager", {
end, end,
on_spawn = function(self) on_spawn = function(self)
if self._id then
set_textures(self)
return
end
self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random()))
if not self._profession then if not self._profession then
self._profession = "unemployed" self._profession = "unemployed"
if math.random(100) == 1 then if math.random(100) == 1 then
self._profession = "nitwit" self._profession = "nitwit"
end end
end end
if self._id then
set_textures(self)
return
end
self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random()))
set_textures(self) set_textures(self)
end, end,
on_die = function(self, pos) on_die = function(self, pos)