mirror of
https://github.com/APercy/airutils
synced 2025-09-11 13:56:23 +02:00
drop limmited
This commit is contained in:
parent
796b52b4e8
commit
6213cfaa71
@ -97,9 +97,12 @@ function airutils.remove_inventory(self)
|
|||||||
if inv_content then
|
if inv_content then
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
for k, v in pairs(inv_content) do
|
for k, v in pairs(inv_content) do
|
||||||
|
local count = 0
|
||||||
for i = 0,v:get_count()-1,1
|
for i = 0,v:get_count()-1,1
|
||||||
do
|
do
|
||||||
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},v:get_name())
|
minetest.add_item({x=pos.x+math.random()-0.5,y=pos.y,z=pos.z+math.random()-0.5},v:get_name())
|
||||||
|
count = count + 1
|
||||||
|
if count >= 5 then break end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user