[nat] printComponent

This commit is contained in:
2021-06-29 14:23:21 -06:00
parent 30a98de38b
commit 4d38915ab4
2 changed files with 8 additions and 1 deletions

View File

@@ -36,12 +36,15 @@
(Path.join [archiveDir "entries" (e.id.withExtension "json")])
(Json.stringify e)))
(defmethod componentData [:Entry e :String componentType]
(haxe.Json.parse (File.getContent (haxe.io.Path.join [archiveDir "components" "$(dictGet e.components componentType).json"]))))
(defmethod fullData [:Entry e]
(object
id e.id
components
(for =>type id e.components
=>type (haxe.Json.parse (File.getContent (haxe.io.Path.join [archiveDir "components" "$(dictGet e.components type).json"]))))
=>type (componentData e type))
files
e.files))