mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
settings: add tutorial settings to enable it
This commit is contained in:
parent
b50d626596
commit
ecad0d8ecd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user