Skip to content

Commit

Permalink
feat(itemOrder): insert timestamps to objects from older saves
Browse files Browse the repository at this point in the history
  • Loading branch information
MotorcycleEnjoyer committed Mar 1, 2024
1 parent c45f878 commit 8ca26f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/Server/ProjectManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,12 @@ function ProjectManager:SaveProjectCoroutine(p_ProjectHeader)
-- TODO: get the GameObjectSaveDatas not from the transferdatas array, but from the GO array of the GOManager. (remove the GOTD array)
for _, l_GameObject in pairs(GameObjectManager.m_GameObjects) do
if l_GameObject:IsUserModified() == true or l_GameObject:HasOverrides() then
local s_Object = l_GameObject
if not s_Object.timeStamp then
s_Object.timeStamp = SharedUtils:GetTimeMS()
end
s_Count = s_Count + 1
table.insert(s_GameObjectSaveDatas, GameObjectSaveData(l_GameObject):GetAsTable())
table.insert(s_GameObjectSaveDatas, GameObjectSaveData(s_Object):GetAsTable())
end
end

Expand Down

0 comments on commit 8ca26f0

Please sign in to comment.