feat: loading entities (WIP)

This commit is contained in:
MihailRis
2024-07-05 22:51:03 +03:00
parent 08cc78289d
commit c8666910ce
16 changed files with 129 additions and 38 deletions
+9 -3
View File
@@ -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