mirror of
https://github.com/APercy/automobiles_pck
synced 2025-08-22 04:45:49 +02:00
drop limmited
This commit is contained in:
parent
87a5ae0e7f
commit
4904a7771d
@ -92,9 +92,12 @@ function automobiles_lib.remove_inventory(self)
|
||||
if inv_content then
|
||||
local pos = self.object:get_pos()
|
||||
for k, v in pairs(inv_content) do
|
||||
local count = 0
|
||||
for i = 0,v:get_count()-1,1
|
||||
do
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user