mirror of
https://github.com/APercy/airutils.git
synced 2025-04-30 08:41:41 -04:00
drop limmited
This commit is contained in:
parent
796b52b4e8
commit
6213cfaa71
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue