Skip to content

Commit

Permalink
object.proc.context
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 4, 2021
1 parent aef72a5 commit 0b72f6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ public ObjectTagProcessor() {
}
ListTag definitions = new ListTag();
definitions.addObject(object);

// <--[tag]
// @attribute <ObjectTag.proc[<procedure_script_name>].context[<object>|...]>
// @returns ObjectTag
// @description
// Returns the 'determine' result of a procedure script, passing this object in as the first context value, with a list of additional context values.
// -->
if (attribute.startsWith("context", 2) && attribute.hasContext(2)) {
definitions.objectForms.addAll(attribute.contextAsType(2, ListTag.class).objectForms);
attribute.fulfill(1);
}
ScriptQueue queue = ScriptUtilities.createAndStartQueue(script.getContainer(), path, attribute.context.getScriptEntryData(), null, (q) -> {
q.procedural = true;
}, null, null, definitions, script.getContainer());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void procedureTag(ReplaceableTagEvent event) {
ListTag definitions = null;

// <--[tag]
// @attribute <proc[<procedure_script_name>].context[<element>|...]>
// @attribute <proc[<procedure_script_name>].context[<object>|...]>
// @returns ObjectTag
// @description
// Returns the 'determine' result of a procedure script with the given context.
Expand Down

0 comments on commit 0b72f6f

Please sign in to comment.