diff --git a/projects/nat-archive-tool/src/nat/ArchiveController.kiss b/projects/nat-archive-tool/src/nat/ArchiveController.kiss index 095d0c9b..3136a184 100644 --- a/projects/nat-archive-tool/src/nat/ArchiveController.kiss +++ b/projects/nat-archive-tool/src/nat/ArchiveController.kiss @@ -186,5 +186,5 @@ files (VarText null)] (doFor e entries (doFor file files - (withWritableEntry archive e (addFile archive e file)))) + (addFile archive e file))) entries)) diff --git a/projects/nat-archive-tool/src/nat/Lib.kiss b/projects/nat-archive-tool/src/nat/Lib.kiss index 01f71def..61789e1d 100644 --- a/projects/nat-archive-tool/src/nat/Lib.kiss +++ b/projects/nat-archive-tool/src/nat/Lib.kiss @@ -26,10 +26,10 @@ // TODO check not overwriting a component (defMacro addComponent [archive e componentType c] - `(let [componentId (Uuid.v4)] + `(withWritableEntry ,archive ,e (let [componentId (uuid.Uuid.v4)] (dictSet .components ,e ,(symbolName componentType) componentId) (writeComponent ,archive ,e ,componentType ,c) - ,e)) + ,e))) // Retrieve multiple components from an Entity with mutable access. // All components will be serialized after the block is done.