settings: add tutorial settings to enable it

This commit is contained in:
Liam Fitzgerald 2021-02-19 13:29:49 +10:00
parent b50d626596
commit ecad0d8ecd
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -1,16 +1,23 @@
/- *settings
/+ verb, dbug, default-agent
/+ verb, dbug, default-agent, agentio
|%
+$ card card:agent:gall
+$ versioned-state
$% state-0
state-1
==
+$ state-0
$: %0
=settings
==
::
+$ state-1
$: %1
=settings
==
--
=| state-0
=| state-1
=* state -
::
%- agent:dbug
@ -21,10 +28,14 @@
+* this .
do ~(. +> bol)
def ~(. (default-agent this %|) bol)
io ~(. agentio bol)
::
++ on-init
^- (quip card _this)
`this
=^ cards state
(put-entry:do %tutorial %seen b+|)
[cards this]
::
++ on-save !>(state)
::
@ -32,8 +43,19 @@
|= =old=vase
^- (quip card _this)
=/ old !<(versioned-state old-vase)
=| cards=(list card)
|-
?- -.old
%0 [~ this(state old)]
%1 [cards this(state old)]
::
%0
%_ $
-.old %1
::
cards
:_ cards
(poke-self:pass:io settngs-event+!>([%put-entry %tutorial %seen b+|]))
==
==
::
++ on-poke