<<map_disable true>>
<<loc 'masterbed'>>
<<p>>
The bright light of the afternoon sun shines through the window like the gentle scream of a lover's soft anxiety
'Wake up,' it whispers.
"Just five more minutes," I say to no one in particular. Across the room, the //alarm of last resort// goes off — a recent gift from my sister. It fills the room with a wonderfully rancorous bleating. Ahhhh goats — nature's most resiliently annoying animal.
I do the sensible thing of course and simply pull the sheets over my head — I've slept through worse, like my mother's nagging, or that one time we played dodgeball in 8th grade. Now //that// was a worthy challenge for my slacker's artifice.
Unfortunately, a dull pain radiates from my empty stomach. I once asked dearest sibling if she could feed me since it would let me eat while laying in bed — I even offered to pay her. She didn't accept the promising career opportunity I presented — though she did take my money. Perhaps there's a lesson to be learned here.
<</p>>
<<xlink
linkText 'Get out of bed'
newContent 'intro_1'
>>
<<run $p.ev.push('got up')>>
<<calHandler adjust -5>>
<</xlink>><<p>>
The digital goat across the room continues to the sing — and a symphony of jackhammers & car horns joins the ensemble. That sister of mine, really likes to keep things interesting. Reluctantly, I stand — and then fall.
My legs! They're broken! ——Oh wait, they're just asleep. Unfair that my legs get to sleep longer than I.
I handle the clock for a moment — I could learn how to operate it — but that would require so much //doing// of //things// — like //reading// and //pressing buttons//.
<</p>>
<<xlink
linkText 'Wrap it in the blanket to drown out the noise'
newContent 'intro_1a'
group 'alarm'
>>
<<calHandler adjust -2>>
<</xlink>>
<<xlink
linkText 'Hurl it out the window'
newContent 'intro_1b'
group 'alarm'
>>
<<calHandler adjust -4>>
<</xlink>>
/* <<xlink 'Wrap it in the blanket to drown out the noise'
'intro_1a'
'alarm'
>><</xlink>>
<<xlink 'Hurl it out the window'
'intro_1b'
'alarm'
>><</xlink>> */<<run $p.ev.push('alarm in blanket')>>
<<p>>
I hold the loud monstrosity at arms length, head back to my bed, and wrap it in the comfy blanket — I even suceed in //not// going back to bed. Congratulations me.
Though I can still hear the orchestra of offending noises through the duvet covers, it'll have to suffice. Time to eat. //To eat is to live, and to live is to sleep.//
<</p>>
<<xlink
linkText 'Journey forth!'
newContent 'intro_2'
forward true
>>
<<calHandler adjust -3>>
<</xlink>><<run $p.ev.push('alarm in shrub')>>
<<p>>
Thankfully, the window is already open. I carefully aim for a soft-looking shrub in the backyard — I want to stop it from ringing, not break it. It //is// a gift after all.
Unfortunately, the orchestra of offending noises doesn't stop, despite the alarm clock performing a good imitation of a rocket. The sound is far enough away that i'll have to suffice though. Time to eat. //'To eat is to live, and to live is to sleep.'//
<</p>>
<<xlink
linkText 'Journey forth!'
newContent 'intro_2'
forward true
>>
<<calHandler adjust -3>>
<</xlink>><<map_disable true>>
<<loc 'living'>>
<<p>>
The first leg of the kitchen voyage is the most difficult: //the hallway of doom//, where dreams die. Then, across the clouded Shangri-La of the living — it's called a 'living' room, but I have seen more suffering in here room than any other combined.
Is to live to suffer then?
"No, it is //to sleep.//" Right, right.
Just beyond is the gateway to... ''//the outside//'' — a dangerous place fraught with perils to the humble individual.
I offer a silent prayer to the future self who must brave those perils on Monday morning.
<</p>>
<<xlink
linkText 'Step into the kitchen'
newContent 'intro_3'
forward true
>>
<<calHandler adjust -3>>
<</xlink>><<map_disable true>>
<<loc 'kitchen'>>
<<p>>
Ah the kitchen, a paradise for gluttony — the second most important sin. It's a pity that the process of creating food is so tedious. Why can't 3 Michellin star meals be made with a microwave? A shame — but maybe there's a business opportunity there.
Well, one might not be able to //make// award winning meals with the microwave, but a microwaved pizza deserves its own reward. I open the fridge — and dread grips my innards with an ironhand vice.
The pizza — it's not there. Ellie! You devil, my own blood! How could you eat the last slice! In my own home, even!
"Mark my words — vengeance will find you, oh sister of mine!"
My stomach complains from the exertion required to utter my vow aloud for the gods to hear. Eat first, then vengeance. That pizza was the last //food// item in the fridge. My heart sinks, the freezer is filled with naught but useless savours — nothing filling.
<</p>>
<<xlink
linkText 'Check the pantry'
newContent 'intro_4'
>><</xlink>><<p>>
Desperately, I claw towards the pantry with expectation on my fingertips — but the empty shelves dash my hopes onto the barren floor.
Already, I can feel the hydrochloric acid violently sloshing against my bowels, threatening to devour me from within. How many calories does a person need to survive? How many do I have left? Can I even make it to the store with what little energy I have left?
Could it be... am I doomed? Fated to suffer a horrific death via starvation?
<</p>>
<<xlink
linkText 'Steel thy will, harden thy resolve...'
newContent 'intro_5'
forward true
>><</xlink>><<run $p.ev.push('unlocked meter')>>
<<run setup.calHandler.load()>>
<<map_disable true>>
<<p>>
No! I will have my vengeance! For that, I must survive — by any means necessary. I'll even operate //the stove// — as horrible as that sounds — but desperate times calls for desperate measures.
There //must// be things in my home with which I can make a decent meal.
<</p>>
<<xlink
linkText 'Onward!'
>>
<<run
Dialog.setup('Tutorial','tutorial');
Dialog.wiki("<<include 'tutorial'>>");
Dialog.open(null, function() {
State.variables.p.ev.push('began adventure');
setPageElement('sideBar','sideBar');
setup.calHandler.adjust(-1);
setup.map_disable(false);
Engine.play('kitchen');
Save.autosave.save();
});
>>
<</xlink>><<p>>
Welcome to Lazy Starvation Simulator!
Move around by clicking on the map and find ingredients around the home. You'll need at least five to perform some dreadful //cooking//. The side bar on the left tracks the ingredients you've collected.
Be careful, ''//every action consumes calories//'' and running out means starvation. More strenuous actions consume more calories. Take risks, judge nutritional values, collect ingredients, and cook a Michellin starred meal!
Good luck!
<</p>><p class='loc_prefix'>The kitchen, the paradise of gluttony — usually, but not today.</p>
<<av_actions>><p class='loc_prefix'>The backyard, //''the outside's''// tamer, less exciting cousin.</p>
<<av_actions>><p class='loc_prefix'>The study, we don't speak of what happens in here.</p>
<<av_actions>><p class='loc_prefix'>The laundry room, a lavatory for apparel — and other things on occasion.</p>
<<av_actions>><p class='loc_prefix'>The dining room, an equidistant hub to all rooms — except to the rooms that are farther away.</p>
<<av_actions>><p class='loc_prefix'>The Shangri-La of the living, where one greets travelers from ''//the outside//''. </p>
/* <<av_actions>> */<p class='loc_prefix'>My bedroom, I would lie in that comfy bed all day if I could.</p>
/* <<av_actions>> */<p class='loc_prefix'>My bathroom, contains a shower and tub, a perfectly reasonable alternative to the bed on some days.</p>
/* <<av_actions>> */<p class='loc_prefix'>The garage, stores a mysterious machine which converts //''the outside''// into bite-sized manageable chunks.</p>
/* <<av_actions>> */<p class='loc_prefix'>The guest bedroom where denizens of ''//the outside//'' seek temporary refuge — mostly used by the devil who answers to 'Ellie'.</p>
/* <<av_actions>> */<p class='loc_prefix'>The extra bathroom — which I sometimes need to clean even when no one uses it.</p>
/* <<av_actions>> */<p class='loc_prefix'>The hallway of doom, where dreams die — literally. Coming out here means I'm not sleeping.</p>
/* <<av_actions>> */<<p>>
<<if $pot.length > 0>>The pot of boiling water simmers with what I've put in<<else>>The pot of boiling water simmers in front of me<</if>> — it's no use. Cooking is too difficult.
Hunger gnaws at mt insides relentlessly and a demon whispers in my ears: //'Do it.'//
"No." My voice is weak and flaccid — a faint murmur against the effervescent desires bubbling forth. An invisible hand presses against my skull and forces my hand to reach for my phone. No! The cost is too great!
//'It's not even that bad,'// the demon coaxes.
"Lies! Delivery costs twice as much!" — and that's not including tip! I can //still// salvage this pot.
//'HA! It's too late.'//
"No it's——" I look down, my thumb has already pressed ''Confirm Order''
''//"NOOOOOOOO!!"//''
<</p>>
<div class='game_over'>THIRTY DOLLAR DELIVERY FEE</div>
<<run setup.ends.unlock('cook')>><<p>>
Lightning seizes my chest — is it a heart attack? No, it's something more, something... //existential//.
I look up at the sky, "You!"
No one answers, but I continue, "You who watches my every move, do you command me every action? Tell me, are you a god?"
Again, it doesn't reply — but I can //feel// their eyes on me. "I don't care what your aims are, I don't even care if dealing with you means giving up my soul — but please! Bless me with pizza!"
The divine, delicious triangle I hope for fails to materialize. Ah — I am forsaken.
<</p>>
<div class='game_over'>EXISTENTIAL CRISIS</div>
<<run setup.ends.unlock('menu')>><<p>>
It's futile — effort is meaningless. Come Monday, I will have to enter ''//the outside//'' once more. Inevitable. Inescapable.
And thus, the right thing to do is just to sleep. Yes, why suffer when I have the opportunity to indulge? Pain is temporary.
I curl up, right on the floor where I stand and close my eyes.
<</p>>
<div class='game_over'>MENTAL HEALTH ZERO</div>
<<run setup.ends.unlock('danger')>><<p>>
The lights overhead dim as strength leaves my form. No... not like this...
Pain gnaws at my bowels. If I close my eyes, I can still taste the mozarella of last night's pizza. Oh, my forgotten dream — my muse — why has thou forsaken me?
Thy exquisite skin, stretchy and succulent. Thy red lips, full of vigor and charming taste. Nothing on this earth has a bold enough form to compare. Pizza — I yearn for you.
I close my eyes and reach for the dream.
<</p>>
<div class='game_over'>STARVATION</div>
<<run setup.ends.unlock('generic')>><<p>>
I always wanted to be a star — but not quite like this. I barely have to time utter a handful of words before I'm engulged in flames.
"ELLIE! MY PIZZA——"
<</p>>
<div class='game_over'>FIRE BAD</div>
<<run setup.ends.unlock('explosion')>><<p>>
I take a deep breath and sit on the floor, my eyes begin to droop. This smell — one gets used to it after a while. That screeching though... well, it's not too bad if I imagine I compare it to Ellie's cacophony of goats, car horns, and jackhammers.
Everything is good, life is good — and life is sleep.
"What doesn't make sense? I'm not following." I say to the talking refrigerator. I strain my ears.
"You're hallucinating. Natural gas, you doofus." The way the freezer drawers rattle when it makes an 'F' sound is hilarious.
"Master, master! Don't beat yourself up, making toast counts as cooking!" The toaster chimes in.
"Thank you, Ms. Toaster."
It begins to sing — and the cutlery joins it. It's a soft sweet lullaby and drowns out that awful screeching from the angry stove who glares at me with its knobs turned up.
"Well you're mean Mr. Stove, so I'm going to sleep. Good night!"
<</p>>
<div class='game_over'>HAPPY SINGING DREAMS</div>
<<run setup.ends.unlock('gas')>><<map_disable true>>
<<p>>
Let's see... I turn the knob on the stove and a sharp hiss screeches from the circular apparatus before me — but no flame. Of course, the long clicky stick is required... there should be one somewhere...
<</p>>
<<xlink
linkText 'Look for the clicky stick'
newContent 'finale_1'
>>
<<calHandler adjust -5>>
<</xlink>><<if $p.cal <= 0>>
<<run setup.dieHandler.die('gas')>>
<<else>>
<<p>>
It takes a minute but I eventually find the designated apparatus — a lighter, I believe they're called. I pinch my nose, is cooking supposed to smell this bad? I haven't even started yet — all I've done is turned the knob — that awful screeching hasn't stopped either.
No wonder people pay exorbitant amounts for tiny slices at a Michellin restaurant.
<</p>>
<<xlink
linkText 'Shrug and light the stove'
group 'stove'
>>
<<run setup.dieHandler.die('explosion')>>
<</xlink>>
<<xlink
linkText 'Pause for a moment to contemplate'
newContent 'finale_2'
group 'stove'
forward true
>>
<<calHandler adjust -10>>
<</xlink>>
<</if>><<map_disable true>>
<<if $p.cal <= 0>>
<<run setup.dieHandler.die('gas')>>
<<else>>
<<p>>
I stop for a moment to consider what I'm about to do: I'm about to cook. Cooking is done with stoves. Electric stoves have buttons. This one has a knob. Ergo, this must be a not-electric stove — a //gas// stove.
I quickly turn off the stove and open windows. Phew, that would've been embarassing to explain at the gates to Hell.
<</p>>
<<xlink
linkText 'Actually begin cooking'
newContent 'finale_3'
forward true
>>
<<calHandler adjust -1>>
<<run $p.ev.push('began cooking')>>
<</xlink>>
<</if>><<if $p.cal <= 0>>
<<run setup.dieHandler.die('cook')>>
<<else>>
<<set $turns = 0>>
<<p>>
The pot of water in front of me bubbles visciously. I picked the largest pot available — one almost as wide as my chest — because a larger pot meant more food, and more food meant less cooking — which also meant more sleeping. And we already established that sleeping is living. QED having a large pot is living the good life.
"I bet I could give Socrates a run for his money"
<</p>>
<<xlink
linkText 'Select an item to put in'
newContent 'finale_4'
group `"cook_" + $turns`
>>
<<run $('.passage').html('')>>
<<cook_select>>
<</xlink>>
<</if>><div id='cook_select'>
<<for _item range $p.ingredients>>
<button class='ingredient' @data-id='_item'>
<div class='bullet'>-</div>
<div class='name'><<print setup.items[_item].desc>></div>
</button>
<</for>>
</div><<set _list = ''>>
<<for _item range $pot>>
<<run _list = _list + setup.items[_item].cooking + ", ">>
<</for>>
<<run _list = _list + "and a lot of water">>
<p class='cook_check'>
Honestly it doesn't even look that bad. The stew has got _list
</p><<set _unsafe to 0>>
<<set _energy to 0>>
<<for _item range $pot>>
<<set _unsafe += setup.items[_item].unsafe>>
<<set _energy += setup.items[_item].energy>>
<</for>>
<<include 'end_bad'>>
/* <<if _unsafe > 30>>
<<include 'end_bad'>>
<<elseif _unsafe < 10 && _energy > 20>>
<<include 'end_tasty'>>
<<else>>
<<include 'end_unsavory'>>
<</if>> */<<p>>
I must say, cooking wasn't so difficult. The pot of stew in front of me has a rather unique smell and appeal — an inexplicable quality that makes me nostalgic of the past and reminiscent of the future.
Oh, my life is flashing before my eyes — that's what this is. The ingredients have congealed into an unrecognizable pitch — a good thing because I'm not sure I would be able to eat it if I could identify the individual elements.
I fill a bowl.
<</p>>
<<xlink
linkText 'Enjoy the results of hard work and eat'
group 'eat'
>>
<<run
Dialog.setup(null,'fin');
Dialog.wiki("<<include 'hospital'>>");
Dialog.open('', function() {
Engine.restart();
setTimeout(() => setup.splashHandler.show(), 100)
});
>>
<</xlink>>
<<xlink
linkText 'Give up and succumb'
group 'eat'
>>
<<run
Dialog.setup('null','fin');
Dialog.wiki("<<include 'gaveup'>>");
Dialog.open('', function() {
Engine.restart();
setTimeout(() => setup.splashHandler.show(), 100)
});
>>
<</xlink>><div class='finC'>
<<p>>
I can't — not this. It's taking every ounce of my mental fortitude to suppress the urge to hurl my organs out through my mouth. I set the spoon down and walk to the sink to dry heave — nothing comes out except my pride and little bits of my soul.
I slump against the floor exhausted mentally, physically, and spiritually. So it's come to this: this is how I die. I close my eyes to accept my fate.
Hell is a rather cosy place, contrary to popular opinion — a bit warm, but I've always preferred that over cold. Sure, there are murderers and whatnot, but the vast majority of sinners mean others no //direct// harm — perhaps they're prideful or maybe they're workaholics or hedonists — and when you gather lots of those, things become nice and efficient.
A horned fellow with a cheery grin tips his hat at me, "Enjoying your short reprieve, friend?"
"Short reprieve?" I frown.
He laughs, "Did you think you could get away that easily? It's time to wake up."
"No! No, it can't be!"
"Oh yes — it's Monday." He gives a dutiful bow and wave just as the dream sublimes into the cold hard kitchen floor I had been sleeping on all night.
My stomach ''//really//'' complains now. The pot of //something// I made yesterday is still simmering on a low flame, but I ignore it and check the time.
Shit. I'm late for work.
<</p>>
<div class='game_fin'>McDonalds — not the best, but I might really die if I didn't eat.</div>
</div>
<<run setup.ends.unlock('gaveup')>><div class='finC'>
<<p>>
The first bite fills me with joy — food at last! My stomach roars in response and saliva production doubles. The black tar coats my tongue with an oily sheen. The second bite is piquant and spicy, speckled with zesty bitterness. The third...
I can't remember the third bite.
"Your memory will be hazy for a couple days, that's normal." A man in a white coat pens a quick note on his clipboard, examines my expression, and nods to himself. "Any questions?"
I frown, "Yes, several. But first — who are you?"
The doctor sighs, "Nevermind. I'll just let your sister explain."
"I have a sister?"
He silently looks up at the ceiling for several moments, then simply walks out.
A young brunette woman nervously peeks in, then shuffles over and props herself agaisnt the bed I happen to be sitting in, "...are you okay?"
These cables are awfully uncomfortable. How did I get here? I tilt my head at the woman, "And who are //you?//"
She sits up, gapes at me, then smiles. "Oh this is going to be fun."
<</p>>
<div class='game_fin'>I made her pay for pizza after I remembered who she was.</div>
</div>
<<run setup.ends.unlock('hospital')>><div id='story'>
<div id='topBar' class='menu'></div>
<div id='sideBar'></div>
<div id='blanket'></div>
<div id='mapC'></div>
<div id='calBar'></div>
<div id='passagesC'>
<div id='passages'></div>
<div id='actions'></div>
</div>
</div>
<div id='splash'></div>/* create player object */
<<set
$p = {
cal: setup.calMax,
loc: 'masterbed',
ingredients: [],
ev: [],
}
$autosaves = 0;
$pot = [];
>>
<<run setup.search.init()>><div id='map'>
<img id='mapImg' src="./assets/map.png">
<div class='map_button kitchen'></div>
<div class='map_button backyard'></div>
<div class='map_button study'></div>
<div class='map_button laundry'></div>
<div class='map_button dining'></div>
<div class='map_button masterbed'></div>
<div class='map_button masterwash'></div>
<div class='map_button garage'></div>
<div class='map_button living'></div>
<div class='map_button hall'></div>
<div class='map_button guestbed'></div>
<div class='map_button wash'></div>
<div class='map_button danger'></div>
<img class='mapCircle kitchen' src="./assets/kitchen.png">
<img class='mapCircle backyard' src="./assets/backyard.png">
<img class='mapCircle study' src="./assets/study.png">
<img class='mapCircle laundry' src="./assets/laundry.png">
<img class='mapCircle dining' src="./assets/dining.png">
<img class='mapCircle masterbed' src="./assets/masterbed.png">
<img class='mapCircle masterwash' src="./assets/masterwash.png">
<img class='mapCircle garage' src="./assets/garage.png">
<img class='mapCircle living' src="./assets/living.png">
<img class='mapCircle hall' src="./assets/hall.png">
<img class='mapCircle guestbed' src="./assets/guestbed.png">
<img class='mapCircle wash' src="./assets/wash.png">
</div><<if $p.ev.includes('began adventure')>>
<div class='menu_button sideBar'>Ingredients</div>
<</if>>
<div class='spacer'></div>
<div class='menu_button titleScreen'>Title</div>
<div class='menu_button saves'>Saves</div>
<<if $p.ev.includes('got up')>>
<div class='menu_button restart'>Restart</div>
<</if>><<if $p.ev.includes('unlocked meter')>>
<div class='back'>
<div class='front front1'></div>
<div class='front front2'></div>
</div>
<div class='number'>$p.cal</div>
<div class='label'>Calories</div>
<</if>><<if $p.ev.includes('began adventure')>>
<div class='menu'>
<div class='menu_button sideBar'></div>
</div>
<div class='title'>Ingredients List</div>
<div id='ingredients'>
<<include 'ingredients'>>
</div>
<</if>><<for _i range $p.ingredients>>
<div class='ingredient'>
<div class='bullet'>-</div>
<div class='name'><<print setup.items[_i].desc>></div>
</div>
<</for>><div class='selector'></div>
<div class='title'>Lazy Starvation Simulator</div>
<<if $p.ev.includes('got up')>>
<div class='subtitle'>Click to Continue</div>
<<else>>
<div class='subtitle'>Click to Begin</div>
<</if>>
<button class='splash_button saves'>Saves</button>
<<if $p.ev.includes('got up')>>
<button class='splash_button restart'>Restart</button>
<</if>>
<<set _count = setup.ends.count()>>
<<if _count>>
<div id='ends_count'>Unlocked _count of 8</div>
<</if>><<run
$('#actions').html('');
$('#actions').css({'opacity':0});
>><<run
$('#actions').animate({'opacity':1},400);
setPageElement('topBar','topBar');
>>
<<if
(($p.cal / setup.calMax) < 0.5) && ($autosaves < 1)
>>
<<run $autosaves++>>
<<run Save.autosave.save()>>
<</if>>/* update locaation */
<<widget 'loc'>>
<<run
$p.loc = _args[0];
$('#map').attr('data-loc',_args[0]);
>>
<</widget>>
/* macro alias for function w/ same name */
<<widget 'map_disable'>>
<<run setup.map_disable(_args[0])>>
<</widget>>
<<widget 'calHandler'>>
<<run setup.calHandler[_args[0]](_args[1])>>
<</widget>>
/* <<widget 'actions'>>
<<xlink
linkText 'Search the room for something edible'
newContent $p.loc
>>
<<remove '.loc_prefix'>>
<<calHandler adjust -5>>
<</xlink>>
<</widget>> */
<<widget 'search'>>
<<capture _item>>
/* search cost */
<<calHandler adjust -5>>
/* if not dead */
<<if $p.cal <= 0>>
<<run setup.dieHandler.die('search')>>
<<else>>
/* get rid of old dividers */
<<run
$('.divider').animate({
'margin-top': '0rem',
'margin-bottom': '0rem',
'border-top': '0px',
},400);
>>
/* 40% chance of search fail */
<<if random(1,10) <= 4>>
<<search_fail>>
<<else>>
/* run search */
<<set _item = setup.search.run()>>
/* if nothing returned */
<<if ndef _item>>
<<search_fail>>
<<else>>
/* append search result */
<<append '.passage' t8n>>
<hr class='divider'>
<p class='searchResult'><<print setup.items[_item].found>></p>
<</append>>
/* add pick up link */
<<xlink
linkText setup.items[_item].linkText
>>
<<set $rooms[$p.loc][_item] = 2>>
<<run $p.ingredients.push(_item)>>
<<run setPageElement('sideBar','sideBar')>>
<<calHandler adjust `-1 * setup.items[_item].cost`>>
<<if $p.cal <= 0>>
<<run setup.dieHandler.die('search')>>
<</if>>
/* if enough ingredients and at kitchen */
<<if
($p.ingredients.length >= 5) &&
($p.loc === 'kitchen') &&
(! _cook_pinged)
>>
<<set _cook_pinged to true>>
<<xlink
linkText 'Begin "cooking"'
newContent 'finale_0'
forward true
>>
<<run Save.autosave.save()>>
<</xlink>>
<</if>>
<</xlink>>
<</if>>
<</if>>
/* add search again link */
<<search_link false>>
<</if>>
<</capture>>
<</widget>>
/* failed search result */
<<widget 'search_fail'>>
<<append '.passage' t8n>>
<hr class='divider'>
<p class='searchResult'><<print setup.search.fail.random()>></p>
<</append>>
<</widget>>
/* generate link to search */
<<widget 'search_link'>>
<<set
_first = _args[0];
_linkText = _first ? 'Search the room' : 'Keep searching';
>>
<<xlink
linkText _linkText
>>
<<search>>
<</xlink>>
<</widget>>
/* available actions */
<<widget 'av_actions'>>
<<if
($p.ingredients.length >= 5) &&
($p.loc === 'kitchen')
>>
<<xlink
linkText 'Begin "cooking"'
newContent 'finale_0'
forward true
>>
<<run Save.autosave.save()>>
<</xlink>>
<</if>>
<<capture _item>>
/* grab item list */
<<set _list = Object.keys($rooms[$p.loc])>>
<<run console.log(_list)>>
<<for _i = 0; _i < _list.length; _i++>>
<<set _item = _list[_i]>>
<<if $rooms[$p.loc][_item] === 1>>
<<xlink
linkText setup.items[_item].linkText
>>
<<set $rooms[$p.loc][_item] = 2>>
<<run $p.ingredients.push(_item)>>
<<run setPageElement('sideBar','sideBar')>>
<</xlink>>
<</if>>
<</for>>
<</capture>>
<<search_link true>>
<</widget>>
<<widget 'cook_select'>>
<<run
$turns++;
Dialog.setup('Cooking','cooking');
Dialog.wiki("<<include 'cooking'>>");
Dialog.open(null, function() {
$('.passage').wiki("<<cook_selected>>");
});
>>
<</widget>>
<<widget 'cook_check'>>
<<run
$turns++;
Dialog.setup('Cooking','cooking');
Dialog.wiki("<<include 'checking'>>");
Dialog.open(null, function() {
$('.passage').wiki("<<cook_selected>>");
});
>>
<</widget>>
<<widget 'cook_selected'>>
<<if $p.ingredients.length > 0>>
<<xlink
linkText 'Select an item to put in'
group `"cook_" + $turns`
>>
<<cook_select>>
<</xlink>>
<</if>>
<<if $pot.length > 1>>
<<xlink
linkText "Check what's already in the pot"
group `"cook_" + $turns`
>>
<<cook_check>>
<</xlink>>
<</if>>
<<if $pot.length >= 5>>
<<xlink
linkText 'Finish cooking'
group `"cook_" + $turns`
newContent 'finale_cooked'
forward true
>><</xlink>>
<</if>>
<</widget>>