add entity on_save event and SAVED_DATA variable

This commit is contained in:
MihailRis
2024-07-05 18:35:46 +03:00
parent e301dbe164
commit 08cc78289d
6 changed files with 36 additions and 4 deletions
@@ -12,6 +12,11 @@ local rotation = mat4.rotate({
math.random(), math.random(), math.random()
}, 360)
function on_save()
SAVED_DATA.test = 5
print("SAVE ENTITY")
end
do -- setup visuals
local matrix = mat4.idt()
local icon = item.icon(dropitem.id)