[nat] printComponent
This commit is contained in:
@@ -36,12 +36,15 @@
|
|||||||
(Path.join [archiveDir "entries" (e.id.withExtension "json")])
|
(Path.join [archiveDir "entries" (e.id.withExtension "json")])
|
||||||
(Json.stringify e)))
|
(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]
|
(defmethod fullData [:Entry e]
|
||||||
(object
|
(object
|
||||||
id e.id
|
id e.id
|
||||||
components
|
components
|
||||||
(for =>type id e.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
|
files
|
||||||
e.files))
|
e.files))
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,10 @@
|
|||||||
|
|
||||||
(defcommand printSelectedEntries [entries (SelectedEntries null null)]
|
(defcommand printSelectedEntries [entries (SelectedEntries null null)]
|
||||||
(doFor e entries (ui.displayMessage (archive.fullString e))) [])
|
(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)]
|
(defcommand createEntry [name (Text null)]
|
||||||
[(archive.createEntry ->e
|
[(archive.createEntry ->e
|
||||||
|
|||||||
Reference in New Issue
Block a user