much simpler component handling in NAT

This commit is contained in:
2021-09-27 22:44:52 -06:00
parent c458290574
commit c21e9e98d2
3 changed files with 11 additions and 36 deletions

View File

@@ -47,20 +47,8 @@
(joinPath archiveDir "entries" (e.id.withExtension "json"))
(Json.stringify e)))
(method :Dynamic componentData [:Entry e :String componentType]
(haxe.Json.parse (File.getContent (joinPath archiveDir "components" "$(dictGet e.components componentType).json"))))
(method fullData [:Entry e]
(object
id e.id
components
(for =>type id e.components
=>type (componentData e type))
files
e.files))
(method fullString [:Entry e]
(haxe.Json.stringify (fullData e) null "\t"))
(haxe.Json.stringify e null "\t"))
(function :Entry _newEntry []
(object