-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtutorial-2.tw
More file actions
132 lines (102 loc) · 3.71 KB
/
Copy pathtutorial-2.tw
File metadata and controls
132 lines (102 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
::StoryTitle
Localvore: TinyQBN Tutorial 2
::StoryData
{
"ifid": "14D72AF9-9789-4C26-9795-246CBD490C54",
"start": "Home"
}
::StoryInit
<<set $month to 1>>
<<set setup.monthnames to ["",
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
]>>
::nextmonth [widget]
<<widget "nextmonth">><<silently>>
<<if $month is 12>>
<<set $month to 1>>
<<else>>
<<set $month to $month + 1>>
<</if>>
<</silently>><</widget>>
::Home [sticky-card req-driving req-location-ne-home]
!Home (<<= setup.monthnames[$month]>>)
<<set $location to "home">>\
[[Drive->Car]] | <<link "Next Month" "Home">><<nextmonth>><</link>>
::Fairweather Farm [sticky-card req-driving req-location-ne-fairweather]
!Fairweather Farm
<<set $location to "fairweather">>\
<<range "$month" 4 "egg" 11>>\
<<range "$month" 4 "cool" 6 "hot" 9 "cool" 11>>\
<<range "$month" "potato" 3 6 "potato">>\
<<include "current products">>
[[Drive->Car]]
::Anderson Farm [sticky-card req-driving req-location-ne-anderson]
!Anderson Farm
<<set $location to "anderson">>\
<<include "current products">>
[[Drive->Car]]
::Docks [sticky-card req-driving req-location-ne-docks]
!Docks
<<set $location to "docks">>\
<<range "$month" 5 "mackerel" 7 10 "mackerel">>\
<<range "$month" "shrimp" 4 12 "shrimp">>\
<<include "current products">>
[[Drive->Car]]
::Car
<<set _driving to true>>\
<<cardrow `QBN.cards().sort(QBN.alphabetically)` "linkbox">>\
<<unset _driving>>
<<return "Exit Car">>
::current products
<<nobr>>
<<set _product to true>>
<<set _products to QBN.cards()>>
<<unset _product>> /% so it won't mess up other (hypothetical) selections on the same page %/
<<if _products.length eq 0>>
There is nothing for sale here.
<<else>>
There are <<cardlist _products>> for sale here.
<</if>>
<</nobr>>
::Strawberries [sticky-card req-product req-location-eq-fairweather req-month-ge-5 req-month-le-9]
ripe red strawberries
::Plentiful Eggs [sticky-card req-product req-location-eq-fairweather req-egg_month]
eggs from happy hens
::Limited Eggs [sticky-card req-product req-location-eq-fairweather req-not-egg_month req-random-67]
eggs from happy hens
::Broccoli [sticky-card req-product req-location-eq-fairweather req-cool_month]
heads of broccoli
::Spinach [sticky-card req-product req-location-eq-fairweather req-cool_month]
bunches of spinach
::Potatoes [sticky-card req-product req-location-eq-fairweather req-potato_month]
russet potatoes
::Kale [sticky-card req-product req-location-eq-fairweather req-month-ge-4 req-month-le-11]
bunches of kale
::Pork Chops [sticky-card req-product req-location-eq-anderson req-random-90]
pork chops
::Ground Beef [sticky-card req-product req-location-eq-anderson req-random-90]
trays of ground beef
::Beef Roast [sticky-card req-product req-location-eq-anderson req-random-90]
beef roasts
::Steaks [sticky-card req-product req-location-eq-anderson req-random-90]
steaks
::Milk [sticky-card req-product req-location-eq-anderson req-random-90]
jugs of milk
::Mozzarella [sticky-card req-product req-location-eq-anderson req-random-90]
bags of shredded mozzarella
::Sharp Cheddar [sticky-card req-product req-location-eq-anderson req-random-90]
blocks of sharp cheddar
::Cod [sticky-card req-product req-location-eq-docks req-month-ge-3 req-month-le-10]
cod fillets
::Mackerel [sticky-card req-product req-location-eq-docks req-mackerel_month]
mackerel
::Lobster [sticky-card req-product req-location-eq-docks req-month-ge-5 req-month-le-10]
lobsters
::Mussels [sticky-card req-product req-location-eq-docks req-month-ge-3]
mussels
::Shrimp [sticky-card req-product req-location-eq-docks req-shrimp_month]
shrimp
::Swordfish [sticky-card req-product req-location-eq-docks req-month-ge-6 req-month-le-8]
swordfish steaks