mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 19:27:31 +01:00
Merge pull request 'Make "old" villagers keep their job' (#2325) from fix_old_villagers_profession into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2325 Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
commit
08d677d788
@ -1367,10 +1367,12 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random()))
|
self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random()))
|
||||||
|
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
|
||||||
set_textures(self)
|
set_textures(self)
|
||||||
end,
|
end,
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user