This commit is contained in:
2025-07-30 15:00:20 +02:00
parent 9fd551e0f7
commit 66757c52d7
85 changed files with 117 additions and 499 deletions

View File

@@ -3,20 +3,8 @@ module doctree
import freeflowuniverse.herolib.core.playbook { PlayBook }
// import freeflowuniverse.herolib.ui.console
@[params]
pub struct PlayArgs {
pub mut:
heroscript string
heroscript_path string
plbook ?PlayBook
reset bool
}
pub fn play(args_ PlayArgs) !PlayBook {
mut args := args_
mut plbook := args.plbook or {
playbook.new(text: args.heroscript, path: args.heroscript_path)!
}
pub fn play(mut plbook PlayBook) ! {
mut doctrees := map[string]&Tree{}

View File

@@ -13,7 +13,7 @@ pub mut:
name string
}
// adds all action elements to a playbook, calls playmacros.play on the playbook,
// adds all action elements to a playbook, calls playmacros.play on the plbook,
// which processes the macros, then reprocesses every page with the actions' new content
pub fn (mut tree Tree) process_actions_and_macros() ! {
console.print_green('Processing actions and macros')