1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 16:20:38 +01:00

NPCs now tamed with 4 diamonds

This commit is contained in:
LeMagnesium 2015-04-11 18:18:41 +02:00
parent a0f14f35f8
commit bad22d432c

View File

@ -83,7 +83,9 @@ mobs:register_mob("mobs:npc", {
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
else
elseif item:get_name() == "default:diamond" then
self.diamond_count = (self.diamond_count or 0) + 1
if self.diamond_count < 4 then return end
if self.owner == "" then
self.owner = clicker:get_player_name()
else