print when writing component
This commit is contained in:
@@ -19,10 +19,12 @@
|
|||||||
// Components have to be saved individually after writing because the Entity only knows their ids,
|
// 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...)
|
// not the data they contain. This is more ergonomically done by using (withWritableComponents...)
|
||||||
(defMacro writeComponent [archive e componentType c]
|
(defMacro writeComponent [archive e componentType c]
|
||||||
`(sys.io.File.saveContent
|
`{
|
||||||
(_componentPath ,archive ,e ,componentType)
|
(print (+ "saving " (the nat.components ,componentType ,c) " as " ,(symbolName componentType) " for " .id ,e))
|
||||||
(tink.Json.stringify
|
(sys.io.File.saveContent
|
||||||
(the nat.components ,componentType ,c))))
|
(_componentPath ,archive ,e ,componentType)
|
||||||
|
(tink.Json.stringify
|
||||||
|
(the nat.components ,componentType ,c)))})
|
||||||
|
|
||||||
// TODO check not overwriting a component
|
// TODO check not overwriting a component
|
||||||
(defMacro addComponent [archive e componentType c]
|
(defMacro addComponent [archive e componentType c]
|
||||||
|
|||||||
Reference in New Issue
Block a user