mirror of
				https://github.com/sys4-fr/server-nalc.git
				synced 2025-11-04 05:55:28 +01:00 
			
		
		
		
	Fixed NPC counter
This commit is contained in:
		@@ -88,7 +88,7 @@ mobs:register_mob("mobs:npc", {
 | 
				
			|||||||
			pos.y = pos.y + 0.5
 | 
								pos.y = pos.y + 0.5
 | 
				
			||||||
			minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
 | 
								minetest.add_item(pos, {name = mobs.npc_drops[math.random(1,#mobs.npc_drops)]})
 | 
				
			||||||
		elseif item:get_name() == "default:diamond" then
 | 
							elseif item:get_name() == "default:diamond" then
 | 
				
			||||||
			self.diamond_count = (self.diamond_count or 0)
 | 
								self.diamond_count = (self.diamond_count or 0) + 1
 | 
				
			||||||
			if not minetest.setting_getbool("creative_mode") then
 | 
								if not minetest.setting_getbool("creative_mode") then
 | 
				
			||||||
				item:take_item()
 | 
									item:take_item()
 | 
				
			||||||
				clicker:set_wielded_item(item)
 | 
									clicker:set_wielded_item(item)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user