mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Rename checkpoint variable, add reached variable for checkpoints
This commit is contained in:
parent
0171d92352
commit
17751c5c59
8 changed files with 102 additions and 22 deletions
|
|
@ -107,7 +107,7 @@ else
|
|||
local namespace = filebase:match("([^/]*)$")
|
||||
math.randomseed(0)
|
||||
local vm = anselme()
|
||||
vm:setaliases("seen", "checkpoint")
|
||||
vm:setaliases("seen", "checkpoint", "reached")
|
||||
vm:loadfunction {
|
||||
-- custom event test
|
||||
["wait"] = {
|
||||
|
|
|
|||
8
test/tests/checkpoint reached seen.ans
Normal file
8
test/tests/checkpoint reached seen.ans
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
§ p
|
||||
seen!
|
||||
|
||||
Seen: {p.seen}
|
||||
|
||||
Reached: {p.reached}
|
||||
|
||||
@p ~ !p.seen
|
||||
46
test/tests/checkpoint reached seen.lua
Normal file
46
test/tests/checkpoint reached seen.lua
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
local _={}
|
||||
_[21]={}
|
||||
_[20]={}
|
||||
_[19]={}
|
||||
_[18]={}
|
||||
_[17]={}
|
||||
_[16]={data="Reached: 2",tags=_[21]}
|
||||
_[15]={data="Seen: 1",tags=_[20]}
|
||||
_[14]={data="seen!",tags=_[19]}
|
||||
_[13]={data="Reached: 1",tags=_[18]}
|
||||
_[12]={data="Seen: 0",tags=_[17]}
|
||||
_[11]={_[16]}
|
||||
_[10]={_[15]}
|
||||
_[9]={_[14]}
|
||||
_[8]={_[13]}
|
||||
_[7]={_[12]}
|
||||
_[6]={"return"}
|
||||
_[5]={"text",_[11]}
|
||||
_[4]={"text",_[10]}
|
||||
_[3]={"text",_[9]}
|
||||
_[2]={"text",_[8]}
|
||||
_[1]={"text",_[7]}
|
||||
return {_[1],_[2],_[3],_[4],_[5],_[6]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "Seen: 0",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Reached: 1",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "seen!",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Seen: 1",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "Reached: 2",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue