From e18f294b971f099d8460ea1f4cd16888b73da6c6 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 27 Sep 2021 19:48:39 -0600 Subject: [PATCH] print when writing component --- src/nat/Lib.kiss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nat/Lib.kiss b/src/nat/Lib.kiss index 6aa25a1..f504015 100644 --- a/src/nat/Lib.kiss +++ b/src/nat/Lib.kiss @@ -19,10 +19,12 @@ // Components have to be saved individually after writing because the Entity only knows their ids, // not the data they contain. This is more ergonomically done by using (withWritableComponents...) (defMacro writeComponent [archive e componentType c] - `(sys.io.File.saveContent - (_componentPath ,archive ,e ,componentType) - (tink.Json.stringify - (the nat.components ,componentType ,c)))) + `{ + (print (+ "saving " (the nat.components ,componentType ,c) " as " ,(symbolName componentType) " for " .id ,e)) + (sys.io.File.saveContent + (_componentPath ,archive ,e ,componentType) + (tink.Json.stringify + (the nat.components ,componentType ,c)))}) // TODO check not overwriting a component (defMacro addComponent [archive e componentType c]