[nat] printComponent
This commit is contained in:
@@ -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))
|
||||
|
||||
|
@@ -148,6 +148,10 @@
|
||||
|
||||
(defcommand printSelectedEntries [entries (SelectedEntries null null)]
|
||||
(doFor e entries (ui.displayMessage (archive.fullString e))) [])
|
||||
|
||||
(defcommand printComponent [entries (SelectedEntries null null)
|
||||
componentType (Text null)]
|
||||
(doFor e entries (ui.displayMessage (archive.componentData e componentType))) [])
|
||||
|
||||
(defcommand createEntry [name (Text null)]
|
||||
[(archive.createEntry ->e
|
||||
|
Reference in New Issue
Block a user