1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Preserve tags in choices children

This commit is contained in:
Étienne Fildadut 2021-04-12 01:58:10 +02:00
parent b9c6d1d704
commit 5c3e9d2c5d
5 changed files with 134 additions and 30 deletions

View file

@ -337,21 +337,22 @@ local vm_mt = {
functions = self.state.functions,
variables = setmetatable({}, { __index = self.state.variables }),
interpreter = {
-- constant
global_state = self.state,
coroutine = coroutine.create(function() return "return", interpreter:run(expr, namespace) end),
-- status
running_line = nil,
-- events
event_type = nil,
event_buffer = nil,
-- skip next choices until next event change (to skip currently running choice block when resuming from a paragraph)
skip_choices_until_flush = nil,
-- status
running_line = nil,
-- choice
-- choice event
choice_selected = nil,
choice_available = {},
-- skip next choices until next event change (to skip currently running choice block when resuming from a paragraph)
skip_choices_until_flush = nil,
-- interrupt
interrupt = nil,
-- tags
-- tag stack
tags = tags or {},
}
},