feat: loading entities (WIP)
This commit is contained in:
@@ -6,15 +6,21 @@ inair = true
|
||||
ready = false
|
||||
target = -1
|
||||
|
||||
local dropitem = ARGS.item
|
||||
ARGS = ARGS or {}
|
||||
local dropitem = ARGS.item or {}
|
||||
if SAVED_DATA.item then
|
||||
dropitem.id = item.index(SAVED_DATA.item)
|
||||
dropitem.count = SAVED_DATA.count
|
||||
end
|
||||
|
||||
local scale = {1, 1, 1}
|
||||
local rotation = mat4.rotate({
|
||||
math.random(), math.random(), math.random()
|
||||
}, 360)
|
||||
|
||||
function on_save()
|
||||
SAVED_DATA.test = 5
|
||||
print("SAVE ENTITY")
|
||||
SAVED_DATA.item = item.name(dropitem.id)
|
||||
SAVED_DATA.count = dropitem.count
|
||||
end
|
||||
|
||||
do -- setup visuals
|
||||
|
||||
Reference in New Issue
Block a user