mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update base:drop component
This commit is contained in:
parent
bc17abc8b3
commit
81775f3304
2 changed files with 7 additions and 3 deletions
|
|
@ -1,9 +1,10 @@
|
|||
local base_entities = {}
|
||||
|
||||
function base_entities.drop(ppos, itemid, count)
|
||||
function base_entities.drop(ppos, itemid, count, ready)
|
||||
return entities.spawn("base:drop", ppos, {base__drop={
|
||||
id=itemid,
|
||||
count=count
|
||||
count=count,
|
||||
ready=ready
|
||||
}})
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,13 @@ local body = entity.rigidbody
|
|||
local rig = entity.skeleton
|
||||
|
||||
inair = true
|
||||
ready = false
|
||||
target = -1
|
||||
ready = false
|
||||
|
||||
local dropitem = ARGS
|
||||
if dropitem then
|
||||
ready = dropitem.ready
|
||||
end
|
||||
if SAVED_DATA.item then
|
||||
dropitem.id = item.index(SAVED_DATA.item)
|
||||
dropitem.count = SAVED_DATA.count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue