Fix type error in PrintComponent
This commit is contained in:
@@ -31,8 +31,9 @@
|
|||||||
|
|
||||||
// After modifying an entry, this must be called. If you are writing in a createEntry
|
// After modifying an entry, this must be called. If you are writing in a createEntry
|
||||||
// initializer or a system's processEntry function, this will happen automatically.
|
// initializer or a system's processEntry function, this will happen automatically.
|
||||||
// Otherwise, you can guarantee it happens automatically by using the (withWritableEntry)
|
// Also most functions that only affect the Entry, not its components' contents,
|
||||||
// and (withWritableComponents) macros in Lib.kiss
|
// will call this automatically though (withWritableEntry).
|
||||||
|
// When changing components, use the (withWritableComponents) macro in Lib.kiss
|
||||||
(method refreshEntry [:Entry e]
|
(method refreshEntry [:Entry e]
|
||||||
(_saveEntry e)
|
(_saveEntry e)
|
||||||
(doFor system systems
|
(doFor system systems
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
(joinPath archiveDir "entries" (e.id.withExtension "json"))
|
(joinPath archiveDir "entries" (e.id.withExtension "json"))
|
||||||
(Json.stringify e)))
|
(Json.stringify e)))
|
||||||
|
|
||||||
(method componentData [:Entry e :String componentType]
|
(method :Dynamic componentData [:Entry e :String componentType]
|
||||||
(haxe.Json.parse (File.getContent (joinPath archiveDir "components" "$(dictGet e.components componentType).json"))))
|
(haxe.Json.parse (File.getContent (joinPath archiveDir "components" "$(dictGet e.components componentType).json"))))
|
||||||
|
|
||||||
(method fullData [:Entry e]
|
(method fullData [:Entry e]
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
(defCommand PrintComponent [entries (SelectedEntries null null)
|
(defCommand PrintComponent [entries (SelectedEntries null null)
|
||||||
componentType (Text null)]
|
componentType (Text null)]
|
||||||
(doFor e entries (ui.displayMessage (archive.componentData e componentType))) [])
|
(doFor e entries (ui.displayMessage (Std.string (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