NAT Playground use ui for log
This commit is contained in:
@@ -188,6 +188,17 @@
|
|||||||
(flatten (for name names
|
(flatten (for name names
|
||||||
(CreateEntry name))))
|
(CreateEntry name))))
|
||||||
|
|
||||||
|
(defCommand CreateMediaEntry [medium (Text null) name (Text null)]
|
||||||
|
[(archive.createEntry ->e {
|
||||||
|
(addComponent archive e Name name)
|
||||||
|
(addTags archive e ["media" medium])})])
|
||||||
|
|
||||||
|
(defCommand CreateMediaEntries [medium (Text null) names (VarText null)]
|
||||||
|
// createEntry returns a list, so these lists must be flattened
|
||||||
|
(flatten (for name names
|
||||||
|
(CreateEntry name))))
|
||||||
|
|
||||||
|
// TODO use Tag and VarTag arg types for AddTags and RemoveTags
|
||||||
(defCommand AddTags [entries (SelectedEntries 1 null)
|
(defCommand AddTags [entries (SelectedEntries 1 null)
|
||||||
tagsToAdd (VarText null)]
|
tagsToAdd (VarText null)]
|
||||||
(doFor e entries
|
(doFor e entries
|
||||||
|
@@ -21,10 +21,7 @@
|
|||||||
(.urlDecode (url.withoutDirectory))
|
(.urlDecode (url.withoutDirectory))
|
||||||
// Some symbols shouldn't be decoded because they're invalid in file systems!
|
// Some symbols shouldn't be decoded because they're invalid in file systems!
|
||||||
"\"" "%22"))]
|
"\"" "%22"))]
|
||||||
// TODO write a macro that either does both print and displayMessage if a ui is available
|
(log ui "Downloading $title image: $url")
|
||||||
(when ui
|
|
||||||
(ui.displayMessage "Downloading $title image: $url"))
|
|
||||||
(print url "downloading")
|
|
||||||
(assertProcess "curl" ["--output" filePath url])
|
(assertProcess "curl" ["--output" filePath url])
|
||||||
filePath)))
|
filePath)))
|
||||||
// Trigger the creation of a new Images component including the wikipedia images
|
// Trigger the creation of a new Images component including the wikipedia images
|
||||||
|
@@ -214,9 +214,9 @@
|
|||||||
(method handleChanges [:Archive archive :ChangeSet changeSet]
|
(method handleChanges [:Archive archive :ChangeSet changeSet]
|
||||||
(doFor e changeSet
|
(doFor e changeSet
|
||||||
// process the WikipediaImageSystem and run spriteSystem process on newly created entries that get one
|
// process the WikipediaImageSystem and run spriteSystem process on newly created entries that get one
|
||||||
(archive.processSystems)
|
(archive.processSystems this)
|
||||||
// Do a second loop through the systems, so Playground systems that trigger Core systems have their effects processed
|
// Do a second loop through the systems, so Playground systems that trigger Core systems have their effects processed
|
||||||
(archive.processSystems)
|
(archive.processSystems this)
|
||||||
|
|
||||||
// Entries whose data changed to remove them from the sprite pool will already have been removed
|
// Entries whose data changed to remove them from the sprite pool will already have been removed
|
||||||
// by refreshEntry()
|
// by refreshEntry()
|
||||||
|
Reference in New Issue
Block a user