code:
:: Shopping Centre Top
<<set $outside to 0>><<set $location to "shopping_centre">><<effects>>
<<if $daystate is "day">>
	You are on the top level of the shopping centre. It's not so busy up here, but you can hear a throng on the level below.
<<elseif $daystate is "dusk">>You are on the top level of the shopping centre. The shops are still open, but there are fewer people around as it nears closing time.

<<elseif $daystate is "dawn">>
	You are on the top level of the shopping centre. The shops are opening but it's not yet busy.
<<elseif $daystate is "night">>
	The building is closed for the night and seemingly deserted. It's probably illegal to be here right now.
<</if>>

<<if $shop_phase is 1>>
	<<unset $shop_phase>>
	You search through the cart. The only thing that might help is a small waist apron.

	<<link [[Take it|Shopping Centre Top]]>><<lowerwear 4>><</link>>

	<<link [[Leave it|Shopping Centre Top]]>><</link>>

<<else>>
	<<if $stress gte $stressmax>>
		<<passoutshop>>
	<<else>>
		<<if $arousal gte $arousalmax>>
			<<orgasmLocation "shoppingCentre">>
		<</if>>
		<<if $hour is 21>>
			It's closing time. Security is herding everyone outside. <<if $exposed gte 1>>Panic swells within you as you realise how exposed you'll be should security find you in this state of dress.<</if>>

			<<if $exposed lte 0>>
				<<link [[Go outside|High Street]]>><</link>>

			<<else>>
				<<link [[Hide until it's over (1:00)|Shopping Centre Top]]>><<pass 1 hour>><</link>>
			<</if>>
		<<else>>
			<<if $exposed gte 2>>
				You feel so vulnerable with your privates exposed.
				<<if $leftarm is "bound" and $rightarm is "bound">>
					With your arms bound you can't even cover yourself.
				<</if>>
				<<if $daystate is "night">>
					You must admit though that standing unclad in this often-crowded space is exhilarating. Still, you must find a way to fix your predicament.

					<<if $clothingShop.ban gt 0 and $clothingShop.banExtension is true>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Sneak Guard]]>><<pass 1>><</link>>
					<<else>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Sneak]]>><<pass 1>><</link>>
					<</if>>

					<<tailoricon>><<link [[Tailor shop (0:01)|Tailor Shop Sneak]]>><<pass 1>><</link>>

					<<cosmeticsicon>><<link [[Cosmetics shop (0:01)|Cosmetics Lock]]>><<pass 1>><</link>>

					/*ToDo: Pregnancy, remove check to properly enable, check for any need for the empty shop to show*/
					<<if $pregnancyTesting>>
						<<toyshopicon>><<link [[Toy shop (0:01)|Toy Shop Lock]]>><<pass 1>><</link>>

					<</if>>

					<<stairsdownicon>><<link [[Main floor (0:02)|Shopping Centre]]>><<pass 2>><</link>>

					<<stairsupicon>><<link [[Roof (0:02)|Commercial rooftops]]>><<pass 2>><</link>>

				<<else>>
					You cower behind a maintenance door away from prying eyes. There's a staircase here leading to the roof. There's also a cart full of cleaning tools, perhaps you could find something to cover yourself in there?

					<<ind>><<link [[Search cart (0:01)|Shopping Centre Top]]>><<pass 1>><<set $shop_phase to 1>><</link>>

					<<stairsupicon>><<link [[Roof (0:02)|Commercial rooftops]]>><<pass 2>><</link>>
				<</if>>
			<<elseif $exposed gte 1>>
				You are dressed really inappropriately for public!
				<<if $leftarm is "bound" and $rightarm is "bound">>
				With your arms bound you can't even cover yourself.
				<</if>>
				<<if $daystate is "night">>
					Fortunately there's no one around to see you in this state. Still, you must find a way to fix your predicament.

					<<if $clothingShop.ban gt 0 and $clothingShop.banExtension is true>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Sneak Guard]]>><<pass 1>><</link>>
					<<else>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Sneak]]>><<pass 1>><</link>>
					<</if>>

					<<tailoricon>><<link [[Tailor shop (0:01)|Tailor Shop Sneak]]>><<pass 1>><</link>>

					<<cosmeticsicon>><<link [[Cosmetics shop (0:01)|Cosmetics Store]]>><<pass 1>><</link>>

					/*ToDo: Pregnancy, remove check to properly enable, check for any need for the empty shop to show*/
					<<if $pregnancyTesting>>
						<<toyshopicon>><<link [[Toy shop (0:01)|Toy Shop]]>><<pass 1>><</link>>

					<</if>>
					/*<<closedstoreicon>><<link [[Empty shop (0:01)|EmptyStore]]>><<pass 1>><<set $shopFloor to "top">><</link>>

*/

					<<stairsdownicon>><<link [[Main floor (0:02)|Shopping Centre]]>><<pass 2>><</link>>

					<<stairsupicon>><<link [[Roof (0:02)|Commercial rooftops]]>><<pass 2>><</link>>

				<<else>>
					<<if $clothingShop.ban gt 0>>
						You are hiding behind a maintenance door. You're still banned from the clothing shop, and you think
						you can hear the security guard inside. Your only option is to run to the rooftop.

					<<else>>
						You are hiding behind an ajar maintenance door. You know there's a clothing shop nearby.
						You could make a run for it, but you're bound to be seen. There's also a staircase to the roof.

						<<clothingshopicon>><<link [[Dash to the clothing shop (0:01)|Clothing Shop]]>><<pass 1>><<trauma 6>><<stress 6>><</link>><<gtrauma>><<gstress>>
					<</if>>

					<<stairsupicon>><<link [[Roof (0:02)|Commercial rooftops]]>><<pass 2>><</link>>

				<</if>>

			<<else>>
				<<if $daystate is "night">>
					<<if $clothingShop.ban gt 0 and $clothingShop.banExtension is true>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Sneak Guard]]>><<pass 1>><</link>>
					<<else>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Sneak]]>><<pass 1>><</link>>
					<</if>>

					<<tailoricon>><<link [[Tailor shop (0:01)|Tailor Shop Sneak]]>><<pass 1>><</link>>

					<<cosmeticsicon>><<link [[Cosmetics shop (0:01)|Cosmetics Lock]]>><<pass 1>><</link>>

					/*ToDo: Pregnancy, remove check to properly enable, check for any need for the empty shop to show*/
					<<if $pregnancyTesting>>
						<<toyshopicon>><<link [[Toy shop (0:01)|Toy Shop Lock]]>><<pass 1>><</link>>

					<</if>>
					/*<<closedstoreicon>><<link [[Empty shop (0:01)|EmptyStore]]>><<pass 1>><<set $shopFloor to "top">><</link>>

*/
				<<else>>
					<<if $clothingShop.ban gt 0>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop Guard]]>><<pass 1>><</link>>
					<<else>>
						<<clothingshopicon>><<link [[Clothing shop (0:01)|Clothing Shop]]>><<pass 1>><</link>>
					<</if>>

					<<tailoricon>><<link [[Tailor (0:01)|Tailor Shop]]>><<pass 1>><</link>>

					<<cosmeticsicon>><<link [[Cosmetics shop (0:01)|Cosmetics Store]]>><<pass 1>><</link>>

					/*ToDo: Pregnancy, remove check to properly enable, check for any need for the empty shop to show*/
					<<if $pregnancyTesting>>
						<<toyshopicon>><<link [[Toy shop (0:01)|Toy Shop]]>><<pass 1>><</link>>

					<</if>>
					/*Comment out when a new shop is added in its place, uncomment when required*/
					/*Used to keep the `Go onto the roof` and `Go downstair` in lines with the lower floor*/
					/*<<closedstoreicon>><<link [[Empty shop (0:01)|EmptyStore]]>><<pass 1>><<set $shopFloor to "top">><</link>>

*/
				<</if>>

				<<stairsupicon>><<link [[Go onto the roof (0:02)|Commercial rooftops]]>><<pass 2>><</link>>

				<<stairsdownicon>><<link [[Go downstairs (0:02)|Shopping Centre]]>><<pass 2>><</link>>

			<</if>>
		<</if>>
	<</if>>
<</if>>

:: Widgets Passout Shop [widget]
<<widget "passoutshop">>
/*ToDo: Pregnancy, remove $pregnancyTesting to properly enable*/
<<if $sexStats.vagina.pregnancy.waterBreaking is true and $pregnancyTesting>>
	<<pregnancyWatersBrokenPassout "shop">>
<<else>>
	[[Everything fades to black...|Passout Shop]]
<</if>>
<</widget>>

:: Passout Shop
You've pushed yourself too much.

<<passout>>
<<set $dangershop to 0>>
<<set $safeshop to 0>>
<<set $danger to random(1, 10000)>>

<<if $danger gte (9900 - $allure)>><<set $dangershop to random(1, 2)>><</if>>

<<if $danger lt (9900 - $allure)>><<set $safeshop to 1>><</if>>

<<if $dangershop is 1>>
[[Wake up|Abduction Shop]]
<<elseif $dangershop is 2>>
<<link [[Wake up|Molestation Shop]]>><<set $molestationstart to 1>><</link>>
<</if>>

<<if $safeshop is 1>><<ambulance>><</if>>

<<pass 1 hour>>

<<trauma 6>><<set $stress -= 2000>>

:: Abduction Shop
<<set $outside to 0>><<effects>>

<<if $phase is 0>><<set $phase to 1>>
<<drugs 180>>
<<lowerruined>>
<<upperruined>>
<<underruined>>

<<underupperwear 1>>
<<underlowerwear 2>>

<<generate1>><<generate2>>
You feel light-headed as you regain consciousness. Your vision clears, and you find yourself facing out a window onto the High Street. You cannot move an inch, but you're stood upright. You feel straps against your skin, they must be holding you steady. They're also contorting your limbs into a specific pose; your hands are resting on your hips and your head is cocked to one side.

Once your bewilderment subsides, you notice you are wearing nothing but a string bikini. The implication suddenly dawns on you when a young blond woman stops in front of the window and stares. You feel blood rush to your face at the humiliation, but she moves on without a flicker of realisation on her face.

<<link [[Next|Abduction Shop]]>><<pass 1 hour>><<trauma 9>><</link>>

<<elseif $phase is 1>>

An hour passes without event. More people look at you through the window but none realise you aren't a mannequin. Most people just pass you by without a glance.

You feel less groggy now, and can even twitch a bit. You'll regain control of your body soon, but that still leaves the straps.

Your musing is interrupted by a gentle prod on your backside. A <<person1>><<person>> walks in front of you. <<His>> eyes explore up and down your body, lingering on your bikini bottoms. <<He>> reaches a hand out.

<<link [[Try to say stop|Abduction Shop]]>><<trauma 9>><<set $phase to 2>><</link>>

<<link [[Remain silent|Abduction Shop]]>><<trauma 9>><<set $phase to 3>><</link>>

<<elseif $phase is 2>>

You can barely murmur, but it's enough. Startled, the <<person>> cries out and runs away. A moment later you hear another voice<<person2>> laugh. "A mannequin spoke?" <<he>> says. "You have an overactive imagination." A pair of hands clasp round your shoulders and spin you to face the inside of the shop. You see the <<person1>><<person>> along with a <<person2>><<person>> watching you.

"Hey sexy doll," the <<person>> prods your waist. Prods a little too hard; the force upsets your balance and you fall to the ground. The <<person1>><<person>> bursts into laughter.

Looking somewhat sheepish, the <<person2>><<person>> picks you up and tries to put you back into position. It's not an easy job to get you stable. Thinking you an object, <<he>> callously manhandles you, gripping you by whichever part of your body <<he>> thinks will help until <<he>> gets you to stay upright.

<<set _arousal to 200 * $breastsensitivity>><<arousal _arousal>>

Satisfied, <<he>> and the <<person1>><<person>> leave you be.

<<link [[Next|Abduction Shop]]>><<pass 2 hours>><<trauma 18>><<set $phase to 4>><</link>>

<<elseif $phase is 3>>
<<lowerstrip>>

<<He>> prods your <<genitals>> through the thin fabric of the bikini. Curiosity unsated, <<he>> yanks the bikini bottoms, which easily come loose and fall to the ground. With your <<genitals>> exposed for all to see, <<he>> recommences <<his>> investigation into your private area. Before <<he>> becomes too confident a voice calls out, "What are you doing to that mannequin," it says. "You're such a pervert." Startled, the <<person>> ceases <<his>> adventure and moves away from you.

<<set _arousal to 400 * $genitalsensitivity>><<arousal _arousal>>

<<link [[Next|Abduction Shop]]>><<pass 2 hours>><<trauma 18>><<set $phase to 5>><</link>>

<<elseif $phase is 5>>
<<set $phase to 0>>

You continue waiting, only now with your <<genitals>> on display. People react much the same way as before, only eyes now linger on your exposed <<genitals>>. A few people giggle.

After two hours you feel your focus has returned, but the tight straps and forced position have made you physically sore. You are considering trying to loosen your bonds when you are lifted from behind and carried into a back room.

<<endevent>><<generate1>><<person1>>
As you are placed on the ground your bearer is revealed to be a <<person>> in <<his>> thirties. <<He>> talks while undoing your bindings. "Sorry for the short notice! The missing mannequin has shown up, so your services are no longer needed. You did a fine job though! Your payment is on the table there. You can keep the bikini too, it looks good on you." After removing your bindings <<he>> leaves the room, shutting the door behind <<him>>.

True to <<his>> word, there's £15 on the table, along with a bottle of water, a muffin with some sort of fruit in it, and the bottoms that were stripped from you.

<<set $hunger -= 500>><<set $thirst -= 500>><<clotheson>><<endevent>>

<<commercialquick>>

[[Go into the shop|Clothing Shop]]

<<elseif $phase is 4>>
<<set $phase to 0>>

After two hours you feel your focus has returned, but the tight straps and forced position have made you physically sore. You are considering trying to surreptitiously loosen your bonds when you are lifted from behind and carried into a back room.

<<endevent>><<generate1>><<person1>>
As you are placed on the ground your bearer is revealed to be a <<person>> in <<his>> thirties. <<He>> talks while undoing your bindings. "Sorry for the short notice! The missing mannequin has shown up, so your services are no longer needed. You did a fine job though! Your payment is on the table there. You can keep the bikini too, it looks good on you." After removing your bindings <<he>> leaves the room, shutting the door behind <<him>>.

True to <<his>> word, there's £15 on the table, along with a bottle of water, a muffin with some sort of fruit in it, and the bottoms that were stripped from you.

<<set $hunger -= 500>><<set $thirst -= 500>><<endevent>>

<<commercialquick>>

<<if $daystate isnot "night">>
[[Go into the shop|Clothing Shop]]

<</if>>

<</if>>

:: Molestation Shop
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<generate1>><<generate2>><<tailorinit>>
	<<upperruined>>
	<<lowerruined>>
	<<underruined>>
	You awaken to find yourself suspended and naked in a small room. Your wrists are tied together by a thin rope which hangs on a hook attached to the ceiling. <<person1>>A <<person>> holds a tape measure up to your chest while<<person2>> a <<person>> fondles your <<bottom>>.
	<<set $phase to 1>>
<</if>>
<<if $phase is 1>>
"Be still now dear." <<person1>><<He>> wraps the tape around your torso just beneath your armpits.
<<set $phase to 2>>
<<elseif $phase is 2>>
<<person1>><<He>> shifts the tape down your chest until it presses against your <<nipples>>.
<<set _arousal to 50 * $breastsensitivity>><<set $phase to 3>><<arousal _arousal>>
<<elseif $phase is 3>>
<<person1>><<He>> shifts the tape further down and takes a measurement of your midriff.
<<set $phase to 4>>
<<elseif $phase is 4>>
<<person1>><<He>> measures your <<bottom>>.
<<set $phase to 5>>
<<elseif $phase is 5>>
<<person1>><<He>> prods your <<genitals>> with one end of the tape. You jerk in response to the sensation of metal touching such a sensitive area. <<He>> starts measuring your legs.
<<set _arousal to 50 * $genitalsensitivity>><<set $phase to 6>><<arousal _arousal>>
<<elseif $phase is 6>>
<<person1>>Satisfied, <<he>> drops the tape. "We have just the thing!"
<<set $phase to 7>>
<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $alarm is 1>>
	<<if $rescue is 1>>
		<<link [[Next->Molestation Shop Alarm]]>><</link>><<nexttext>>
	<<else>>
		No one comes to your aid.
		<<set $alarm to 0>>
		<<if $drugged gte 1>>The drugs inhibit you, you couldn't cry very convincingly.<</if>>

		<<if $enemyarousal gte $enemyarousalmax>>
			<<link [[Next->Molestation Shop Ejaculation]]>><</link>><<nexttext>>
		<<elseif $enemyhealth lte 0>>
			<<link [[Next->Molestation Shop Escape]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next->Molestation Shop]]>><</link>><<nexttext>>
		<</if>>
	<</if>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next->Molestation Shop Ejaculation]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next->Molestation Shop Escape]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next->Molestation Shop]]>><</link>><<nexttext>>
<</if>>

:: Molestation Shop Alarm
Double-click this passage to edit it.

:: Molestation Shop Ejaculation
<<effects>>

Their bodies shudder in unison as they reach orgasm.

<<if $enemyanger gte ($enemyangermax / 5) * 3>>
<<person2>>The <<person>> drops to <<his>> knees and leans against the wall, a rapturous look on <<his>> face.<<person1>> The <<person>> recovers quickly however. <<He>> speaks in a mocking tone as <<he>> unties you. "We were going to give you something nice to wear, but I don't see why we should if you're going to be so disrespectful." With that, <<he>> shoves you outside, slamming the door behind you.

<<elseif $enemyanger gte 1>>
<<person2>>The <<person>> drops to <<his>> knees and leans against the wall, a rapturous look on <<his>> face. <<person1>> The <<person>> recovers quickly however. <<He>> throws a couple of towels at you then shoves you out outside, slamming the door behind you.

<<upperwear 3>>
<<lowerwear 3>>
<<else>>
<<person2>>The <<person>> drops to <<his>> knees and leans against the wall, a rapturous look on <<his>> face.<<person1>> The <<person>> recovers quickly however. <<He>> smiles. "We have just the thing." After a brief rummage through an assortment of garments <<he>> produces a sundress. <<He>> cuts your bonds and throws the dress over your head before shoving you through the door.

<<unbind>>

<<upperwear 1>>

<</if>>

<<tearful>> you struggle to your feet. You know you're not out of danger yet.

<<endcombat>>
<<set $stress -= 1000>>
<<commercialquick>>

:: Molestation Shop Escape
<<effects>>

"You ungrateful little trollop!" Angry, they lower you off the hook and shove you outside, slamming the door behind you. <<tearful>> you struggle to your feet.

<<stealclothes>>

<<clotheson>>
<<endcombat>><<set $stress -= 1000>>

<<commercialquick>>

:: Shopping Centre
<<set $outside to 0>><<set $location to "shopping_centre">><<effects>>
<<if $daystate is "day">>
	You are on the main floor of the shopping centre. It's crowded with shoppers.
<<elseif $daystate is "dusk">>
	You are on the main floor of the shopping centre. The shops are still open, but there are fewer people around as it nears closing time.
<<elseif $daystate is "dawn">>
	You are on the main floor of the shopping centre. The shops are opening but it's not yet busy.
<<elseif $daystate is "night">>
	You are on the main floor of the shopping centre. It's probably illegal to be here right now.
<</if>>

<<if $days is 0 and $NPCName[$NPCNameList.indexOf("Robin")].init is 0 and $exposed lte 0 and $hour gte 17 and $hour lte 19>>
		<<set $robindebt to 0>><<set $robindebtlimit to 5>>
		<<npc Robin>><<initnpc Robin>><<person1>>

		You see a familiar figure leaving one of the shops with a large box. <<He>> notices you at the same time. "Hey!" <<He>> shouts. It's Robin. <<Hes>> another resident at the orphanage. <<Hes>> always looked up to you, despite being about the same age. <<He>> quickly fumbles around with the box, stuffing it in an oversized bag before approaching you. "I didn't expect to see you today," <<he>> says, <<his>> eyes shifting between you and the box.

		"Don't peek! I wanted to surprise you with this when I got home. Remember, you can visit me in my room anytime you want. I can't wait to show you, I'm so excited!" <<He>> puts the box down and hugs you, then runs off with it before you can respond.

		<<endevent>>
		<<link [[Next|Shopping Centre]]>><<set $eventskip to 1>><</link>>

<<elseif $stress gte $stressmax>>
	<<passoutshop>>
<<else>>
	<<if $arousal gte $arousalmax>>
		<<orgasmLocation "shoppingCentre">>
	<</if>>
	<<if $hour is 21>>
		It's closing time. Security is herding everyone outside. <<if $exposed gte 1>>Panic swells within you as you realise how exposed you'll be should security find you in this state of dress.<</if>>

		<<if $exposed lte 0>>
			<<link [[Go outside|High Street]]>><</link>>

		<<else>>
			<<link [[Hide until it's over (1:00)|Shopping Centre]]>><<pass 1 hour>><</link>>
		<</if>>
	<<else>>
		<<if $exposed gte 2>>
			You feel so vulnerable with your privates exposed.
			<<if $leftarm is "bound" and $rightarm is "bound">>
				With your arms bound you can't even cover yourself.
			<</if>>
			<<if $daystate is "night">>
				You must admit though that standing unclad in this often-crowded space is exhilarating. Still, you must find a way to fix your predicament.

			<<else>>
				<<trauma 9>>
				Your face aflame with embarrassment, you run into the women's restroom.

			<</if>>
		<<elseif $exposed gte 1>>
			You are dressed really inappropriately for public!
			<<if $leftarm is "bound" and $rightarm is "bound">>
				With your arms bound you can't even cover yourself.
			<</if>>
			<<if $daystate is "night">>
				Fortunately there's no one around to see you in this state. Still, you must find a way to fix your predicament.

			<<else>>
				<<trauma 9>>
				Your face aflame with embarrassment, you run into the women's restroom.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>>

			<</if>>
		<</if>>

		<<if $daystate is "night">>
			<<hairdressericon>><<link [[Hairdressers (0:01)|Hairdressers Lock]]>><<pass 1>><</link>>

			<<petshopicon>><<link [[Pet shop (0:01)|Pet Shop Lock]]>><<pass 1>><</link>>

			<<tattooicon>><<link [[Tattoo parlour (0:01)|Tattoo Parlour Lock]]>><<pass 1>><</link>>

			/*<<closedstoreicon>><<link [[Empty shop (0:01)|EmptyStore]]>><<pass 1>><<set $shopFloor to "top">><</link>>

*/

			<<stairsupicon>><<link [[Go upstairs (0:02)|Shopping Centre Top]]>><<pass 2>><</link>>

			<<highicon>><<link [[Go outside (0:02)|Shopping Centre Entrance Sneak]]>><<pass 2>><</link>>

		<<elseif $exposed gte 1>>
			<<link [[Restroom|Shopping Centre Restroom]]>><</link>>

		<<else>>
			<<if $edenshopping is 0 and $money gte 5000>>
				<<link [[Buy Eden's supplies (0:30 £50)|Eden Supplies]]>><<pass 30>><<set $money -= 5000>><</link>>

			<</if>>
			<<if $edenfurniture is 1 and $edenpillow isnot 1>>
				<<link [[Buy a rug and some pillows (0:10)|Shop Eden Pillows]]>><<pass 10>><</link>>

			<</if>>
			<<if $edenfurniture is 2 and $edencurtains isnot 1>>
				<<link [[Buy some curtains (0:10)|Shop Eden Curtains]]>><<pass 10>><</link>>

			<</if>>
			<<if $edenfurniture is 3 and $edenloveseat is 7 and !$edencushions>>
				<<link [[Buy some cushion materials (0:10)|Shop Eden Cushions]]>><<pass 10>><</link>>

			<</if>>
			<<if $valentines_eden is 1 and !$valentines_eden_bought>>
				<<link [[Find a Valentine's day gift for Eden (0:10)|Shop Eden Valentines]]>><<pass 10>><</link>>

			<</if>>
			<<if $halloween_eden is 1 and !$halloween_eden_bought>>
				<<link [[Buy sweets for Eden (0:10)|Shop Eden Sweets]]>><<pass 10>><</link>>

			<</if>>
			<<if $christmas_gift_eden is undefined and $christmas is 1 and $syndromeeden gte 1>>
				<<link [[Find a gift for Eden (0:10)|Shop Eden Gift]]>><<pass 10>><</link>>

			<</if>>
			<<if $christmas_gift is undefined and $christmas is 1>>
				<<if $money gte 10000>>
					<<link [[Buy gifts for the orphans (0:40 £100)|Shop Gifts]]>><<pass 40>><<set $money -= 10000>><<set $christmas_gift to "clothes_unwrapped">><</link>>

				<<else>>
					You could buy gifts for the orphans here, if you had more money.

				<</if>>
			<</if>>
			<<if $christmas_gift_robin is undefined and $christmas is 1 and $NPCName[$NPCNameList.indexOf("Robin")].init is 1>>
				<<link [[Find a gift for Robin (0:10)|Shop Robin Gift]]>><<pass 10>><</link>>

			<</if>>
			<<if ($christmas_gift_robin isnot undefined or $christmas_gift isnot undefined) and $christmas_wrap is undefined>>
				<<if $money gte 1000>>
				<<link [[Buy wrapping paper (0:10 £10)|Shop Paper]]>><<pass 10>><<set $money -= 1000>><<set $christmas_wrap to 1>><</link>>

				<<else>>

					You'll need £10 for wrapping paper.

				<</if>>
			<</if>>
			<<hairdressericon>><<link [[Hairdressers (0:01)|Hairdressers]]>><<pass 1>><</link>>

			<<petshopicon>><<link [[Pet shop (0:01)|Pet Shop]]>><<pass 1>><</link>>

			<<tattooicon>><<link [[Tattoo parlour (0:01)|Tattoo Parlour]]>><<pass 1>><</link>>

			/*Comment out when a new shop is added in its place, uncomment when required*/
			/*Used to keep the `Go Upstairs` and High Street` in lines with the top floor*/
			/*<<closedstoreicon>><<link [[Empty shop (0:01)|EmptyStore]]>><<pass 1>><<set $shopFloor to "bottom">><</link>>

*/

			<<stairsupicon>><<link [[Go upstairs (0:02)|Shopping Centre Top]]>><<pass 2>><</link>>

			<<highicon>><<link [[High Street (0:02)|High Street]]>><<pass 2>><</link>>

		<</if>>
	<</if>>
<</if>>

:: Shop Eden Cushions
<<effects>>

You walk around a few DIY shops, finding some foam cushions, cloth and batting for your project.

<<if $money gte 2000>>
	<<link [[Buy them (£20)|Shop Eden Cushions Buy]]>><<set $edencushions to 1>><<set $money -= 2000>><</link>>

	<<link [[Don't buy them|Shopping Centre]]>><</link>>
<<else>>
	Unfortunately, you can't seem to afford them.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Eden Cushions Buy
<<effects>>

You decide to make your purchase.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Eden Curtains
<<effects>>

You once again find yourself walking around the furniture shops. You look over their selection of curtains and window decorations.
Most are too gaudy and you're sure Eden would use them as fuel for the fireplace instead. Finally, you settle on a humble, practical pair of curtains at the end of the aisle.

<<if $money gte 2000>>
	<<link [[Buy them (£20)|Shop Eden Curtains Buy]]>><<set $edencurtains to 1>><<set $money -= 2000>><</link>>

	<<link [[Don't buy them|Shopping Centre]]>><</link>>
<<else>>
	Unfortunately, you can't seem to afford them.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Eden Curtains Buy
<<effects>>

You decide to make your purchase.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Eden Pillows
<<effects>>

You walk around in a few furniture shops, browsing for the pillows and rug. Most of the designs are too modern and gaudy, and it's hard to find something you know Eden would like.
Eventually, you settle on something plain and practical you find in one of the stores.

<<if $money gte 4000>>
	<<link [[Buy them (£40)|Shop Eden Pillows Buy]]>><<set $edenpillow to 1>><<set $money -= 4000>><</link>>

	<<link [[Don't buy them|Shopping Centre]]>><</link>>
<<else>>
	Unfortunately, you can't seem to afford them.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Eden Pillows Buy
<<effects>>

You decide to make your purchase.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Eden Valentines
<<effects>>

You walk around, trying to find something that Eden might like. Eventually, you narrow down your possibilities to set of bath oils and a romance book.

<<if $money gte 3500>>
	<<link [[Buy them (£35)|Shop Eden Valentines Buy]]>><<set $valentines_eden_bought to 1>><<set $money -= 3500>><</link>>

	<<link [[Don't buy them|Shopping Centre]]>><</link>>
<<else>>
	Unfortunately, you can't seem to afford them.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Eden Valentines Buy
<<effects>>

You decide to buy romance book and bath oil set. Maybe you could prepare a bath for Eden on Valentine's day.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Eden Sweets
<<effects>>

You see a small hamper of sweets sitting on one of the shelves. It looks light enough to bring back to the cabin.

<<if $money gte 2000>>
	<<link [[Buy it (£20)|Shop Eden Halloween]]>><<set $halloween_eden_bought to 1>><<set $money -= 2000>><</link>>

	<<link [[Don't buy it|Shopping Centre]]>><</link>>
<<else>>
	Unfortunately, you can't seem to afford it.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Eden Halloween
<<effects>>

You decide to buy the hamper.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Eden Gift
<<effects>>

You walk around in the shopping centre, looking for something you think Eden would like. Your eyes are drawn to a cozy hunting jacket.

<<if $money gte 3000>>
	<<link [[Buy it (£30)|Shop Eden Christmas]]>><<set $christmas_gift_eden to 1>><<set $money -= 3000>><</link>>

	<<link [[Don't buy it|Shopping Centre]]>><</link>>

<<else>>
	Unfortunately, you can't seem to afford it.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Gifts
<<effects>>

You pass a sweet shop. You know the orphans would love that, but Bailey wouldn't allow it. Instead, you enter a clothing shop and gather garments in various sizes. You'll work out who's getting what later. You bring them to the register.

"My!" the clerk says. "Are you donating these?"

<<if $submissive gte 1150>>
	"Y-yes," you say. "Kind of." You pay the required amount.
<<elseif $submissive lte 850>>
	"No," you say. "Well, yeah. Kinda." You pay the required amount.
<<else>>
	"Something like that," you smile. You pay the required amount.
<</if>>

The clerk thanks you. You leave the shop with several full bags. <<if $christmas_wrap is undefined>>Now you just need wrapping paper.<<else>>You can wrap it in your room.<</if>>

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Paper
<<effects>>

You buy several tubes of wrapping paper. That should cover everything. You can wrap your gifts in your bedroom.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Robin Gift
<<effects>>

You walk between shops, looking for something Robin would like. You find a few items you think would work.

<<if $money gte 1500>>
	<<link [[Shirt and shorts (Sensible £15)|Shop Robin Christmas]]>><<set $christmas_gift_robin to "shirt_unwrapped">><<set $money -= 1500>><</link>> <<if $NPCName[$NPCNameList.indexOf("Robin")].pronoun is "f">>Robin might need some convincing to wear this.<</if>>

	<<link [[Sundress (Sensible £15)|Shop Robin Christmas]]>><<set $christmas_gift_robin to "sundress_unwrapped">><<set $money -= 1500>><</link>> <<if $NPCName[$NPCNameList.indexOf("Robin")].pronoun is "m">>Robin might need some convincing to wear this.<</if>>

	<<if $money gte 14000>>
		<<link [[Kimono (Exotic £140)|Shop Robin Christmas]]>><<set $christmas_gift_robin to "kimono_unwrapped">><<set $money -= 14000>><</link>>

	<<else>>
		<<set _moreExotic to true>>
	<</if>>
	<<if $money gte 42000>>
		<<link [[Tuxedo set (Exotic £420)|Shop Robin Christmas]]>><<set $christmas_gift_robin to "tuxedo_set_unwrapped">><<set $money -= 42000>><</link>> <<if $NPCName[$NPCNameList.indexOf("Robin")].pronoun is "f">>Robin might need some convincing to wear this.<</if>>

	<<else>>
		<<set _moreExotic to true>>
	<</if>>
	<<if $money gte 42000>>
		<<link [[Gothic gown (Exotic £420)|Shop Robin Christmas]]>><<set $christmas_gift_robin to "gothic_gown_unwrapped">><<set $money -= 42000>><</link>> <<if $NPCName[$NPCNameList.indexOf("Robin")].pronoun is "m">>Robin might need some convincing to wear this.<</if>>

	<<else>>
		<<set _moreExotic to true>>
	<</if>>
	<<if _moreExotic>>

		There are other, more exotic, items for sale, but you can't afford them right now.

	<</if>>

	<<link [[Leave|Shopping Centre]]>><</link>>

<<else>>
	Unfortunately, you can't afford anything right now.

	<<link [[Next|Shopping Centre]]>><</link>>

<</if>>

:: Shop Robin Christmas
<<effects>>
<<switch $christmas_gift_robin>>
	<<case "shirt_unwrapped">>You buy the shirt and baggy shorts. You think Robin will like them.
	<<case "sundress_unwrapped">>You buy the sundress. You think Robin will like it.
	<<case "kimono_unwrapped">>You buy the kimono. You think Robin will like it.
	<<case "tuxedo_set_unwrapped">>You buy the tuxedo set. You think Robin will like it.
	<<case "gothic_gown_unwrapped">>You buy the gothic gown. You think Robin will like it.
<</switch>>
<<if $christmas_wrap is undefined>>Now you just need wrapping paper.<<else>>You can wrap it in your room.<</if>>

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Eden Christmas
<<effects>>
You decide to buy the hunting jacket. Hopefully it fits.

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Robin Sundress
<<effects>>

You buy the sundress. You think Robin will like it. <<if $christmas_wrap is undefined>>Now you just need wrapping paper.<<else>>You can wrap it in your room.<</if>>

<<link [[Next|Shopping Centre]]>><</link>>

:: Shop Robin Kimono
<<effects>>

You buy the kimono. You think Robin will like it. <<if $christmas_wrap is undefined>>Now you just need wrapping paper.<<else>>You can wrap it in your room.<</if>>

<<link [[Next|Shopping Centre]]>><</link>>

:: Shopping Centre Entrance Sneak
<<set $outside to 0>><<effects>><<set $lock to 100>>

	<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Pick it (0:10)|High Street]]>><<pass 10>><<crimeup 1>><</link>><<crime>>

	<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

	<</if>>

<<link [[Leave|Shopping Centre]]>><</link>>

:: Shopping Centre Restroom
You are alone in the women's restroom.

<<towelup>>
You find some towels. They make a poor substitute for actual clothing but it'll keep you covered. You need to find something more solid as soon as you can.

[[Leave through main door|Shopping Centre]]

<<link [[Leave through escape door|Commercial alleyways]]>><<set $eventskip to 1>><</link>>

:: Shopping Centre Sneak
<<set $outside to 0>><<effects>><<set $lock to 100>>

	<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Pick it (0:10)|Shopping Centre]]>><<pass 10>><<crimeup 1>><</link>><<crime>>

	<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

	<</if>>

<<link [[Leave|High Street]]>><</link>>

:: EmptyStore
<<set $outside to 0>>

You try to peek behind the shutters but can't make anything out in the dark shop.

<<if $shopFloor is "bottom">>
	[[Leave|Shopping Centre]]
<<elseif $shopFloor is "top">>
	[[Leave|Shopping Centre Top]]
<</if>>
<<unset $shopFloor>>


code:
:: Pet Shop Lock

<<set $outside to 0>><<set $location to "shopping_centre">><<effects>><<set $lock to 200>>
<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Pick it (0:10)|Pet Shop]]>><<pass 10>><<crimeup 20>><</link>><<crime>>

<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

<</if>>
<<link [[Leave|Shopping Centre]]>><</link>>

:: Pet Shop

<<set $outside to 0>><<set $location to "shopping_centre">><<effects>>
<<set _container to $container.home>><<set _pregnancy to $sexStats.anus.pregnancy>>
You are in the pet shop. <<if $daystate is "night">>Most of the animals are sleeping at the moment<<else>>A handful of the small animals turn to look in your direction<</if>>. They all look cute but you doubt Bailey will let you keep any.

<<if $seenPets isnot true and $daystate isnot "night" and $famebestiality gte 200 and $bestialitydisable is "f" and ($monsterchance lt 100 or $monsterhallucinations is "t")>>
	<<set $seenPets to true>><<generate1>><<person1>>
	<<if $famebestiality gte 600>>
		A <<person>> confronts you as you walk into the store. <<He>>'s wearing a nametag and the uniform of the place. <<His>> tone is polite, but firm.
		"Those animals are under my responsibility, and I don't want you to touch them in any way. If you're not here to buy something, please leave." <<stress 12>><<ggstress>>

	<<elseif $famebestiality gte 400>>
		One of the workers has taken to following your every step. You can't evade <<his>> wary gaze. <<stress 6>><<gstress>>

	<<else>>
		The shopkeepers keep a close eye on you every time you get close to the animals. You're not sure why.

	<</if>>
	<<endevent>>
<<elseif $seenPets isnot true and $daystate isnot "night">>
	<<set $seenPets to true>><<stress -10>>

	You have a look around the shop, and pet some of the cats and dogs.
	<<lstress>>

<</if>>
<<if $daystate is "night" and $hour isnot $closinghour and $petshoptheft isnot 1>>
	<<link [[Examine the cash register|Pet Shop Register]]>><</link>>

<</if>>
<<if $pregnancyStats.wolfToysUnlocked and $daystate isnot "night">>
	<<toySelection>>
	<<link [[Wolf toys|Pet Shop Item]]>><<set $selectedToy to clone(_toySelection["chewToy"])>><</link>>

<</if>>
<<if _pregnancy.seenDoctor gte 2 and $daystate isnot "night">>
	<<set _container to $container.home>>
	<<if $boughtItem isnot undefined>>

		<<generate1>><<person1>>You ask shop owner for the <<print $boughtItem>>. "Certainly <<if $player.gender_appearance is "m">>sir<<else>>madam<</if>>" <<he>> says with a smile. "I will have it delivered to your home as soon as I can."<<endevent>>

		<<PetShopBoughtItem>>
	<</if>>

	Capacity Upgrades:

	<<if (_pregnancy.motherStatus is 0 and _container.upgrades.capacity lt 1) or (_pregnancy.motherStatus gt 0 and _container.upgrades.capacity lt 4)>>

		<<if _pregnancy.motherStatus gte 0 and _container.upgrades.capacity is 0>>
			<<if $money gte 20000>>

<<link [[Buy small fish tank £200|$passage]]>><<set $boughtItem to "Small Fish Tank">><</link>>

			<<elseif _container.upgrades.capacity lt 1>>

You don't have £200 for the Small Fish Tank.

			<</if>>
		<</if>>
		<<if _pregnancy.motherStatus gte 1>>
			<<if $money gte 50000 and _container.upgrades.capacity lt 2>>

<<link [[Buy fish tank £500|$passage]]>><<set $boughtItem to "Fish Tank">><</link>>

			<<elseif _container.upgrades.capacity lt 2>>

You don't have £500 for the Fish Tank.

			<</if>>
			<<if $money gte 100000 and _container.upgrades.capacity lt 3>>

<<link [[Buy large fish tank £1,000|$passage]]>><<set $boughtItem to "Large Fish Tank">><</link>>

			<<elseif _container.upgrades.capacity lt 3>>

You don't have £1,000 for the Large Fish Tank.

			<</if>>
			<<if $money gte 500000 and _container.upgrades.capacity lt 4>>

<<link [[Buy huge fish tank £5,000|$passage]]>><<set $boughtItem to "Huge Fish Tank">><</link>>

			<<elseif _container.upgrades.capacity lt 4>>

You don't have £5,000 for the Huge Fish Tank.

			<</if>>
		<</if>>

	<<else>>
		You have the best tank available.

	<</if>>
	<<if _pregnancy.motherStatus gte 1 and _container.upgrades.capacity gt 1>>

		Food Upgrades:

		<<if _container.upgrades.foodStorage lt 3>>

			<<if $money gte 50000 and _container.upgrades.foodStorage lt 1>>

<<link [[Buy small automatic feeder £500|$passage]]>><<set $boughtItem to "Small Automatic Feeder">><</link>>

			<<elseif _container.upgrades.foodStorage lt 1>>

You don't have £500 for the Small Automatic Feeder.

			<</if>>
			<<if $money gte 150000 and _container.upgrades.foodStorage lt 2>>

<<link [[Buy automatic feeder £1,500|$passage]]>><<set $boughtItem to "Automatic Feeder">><</link>>

			<<elseif _container.upgrades.foodStorage lt 2>>

You don't have £1,500 for the Automatic Feeder.

			<</if>>
			<<if $money gte 750000 and _container.upgrades.foodStorage lt 3>>

<<link [[Buy large automatic feeder £7,500|$passage]]>><<set $boughtItem to "Large Automatic Feeder">><</link>>

			<<elseif _container.upgrades.foodStorage lt 3>>

You don't have £7,500 for the Large Automatic Feeder.

			<</if>>

		<<elseif _pregnancy.motherStatus gte 1>>
			You have the best feeder available.

		<</if>>
	<</if>>
	<<if _container.upgrades.capacity gt 2>>

		Decoration Upgrades:

		<<if _container.upgrades.luxury lt 1 or (_container.upgrades.capacity gt 3 and _container.upgrades.luxury lt 2)>>

			<<if $money gte 500000 and _container.upgrades.luxury lt 1>>

<<link [[Buy standard decorations £5,000|$passage]]>><<set $boughtItem to "Standard Decorations">><</link>>

			<<elseif _container.upgrades.luxury lt 1>>

You don't have £5,000 for the Standard Decorations.

			<</if>>
			<<if $money gte 1500000 and _container.upgrades.luxury lt 2 and _container.upgrades.capacity gt 3>>

<<link [[Buy exotic decorations £15,000|$passage]]>><<set $boughtItem to "Exotic Decorations">><</link>>

			<<elseif _container.upgrades.luxury lt 2 and _container.upgrades.capacity gt 3>>

You don't have £15,000 for the Exotic Decorations.

			<</if>>

		<<else>>
			You have the best decorations available.

		<</if>>
	<</if>>
<</if>>

<<if $farm_stage gte 7 and $daystate isnot "night">>

	<<link [[Dog treats (£1 each)|Pet Shop Treats]]>><</link>>

<</if>>
<<link [[Leave|Shopping Centre]]>><</link>>

:: Pet Shop Treats
<<effects>>

You examine the range of dog treats on display.

<<if $kennel_treats is undefined>>
	<<set $kennel_treats to 0>>
<</if>>

<<if $money gte 100>>
	<<link [[Buy 1|Pet Shop Treats Buy]]>><<set $money -= 100>><<set $kennel_treats += 1>><</link>>

<<else>>
	You can't afford any.

<</if>>
<<if $money gte 1000>>
	<<link [[Buy 10 (£10)|Pet Shop Treats Buy]]>><<set $money -= 1000>><<set $kennel_treats += 10>><</link>>

<</if>>
<<if $money gte 5000>>
	<<link [[Buy 50 (£50)|Pet Shop Treats Buy]]>><<set $money -= 5000>><<set $kennel_treats += 50>><</link>>

<</if>>
<<if $money gte 10000>>
	<<link [[Buy 100 (£100)|Pet Shop Treats Buy]]>><<set $money -= 10000>><<set $kennel_treats += 100>><</link>>

<</if>>
<<if $money gte 20000>>
	<<link [[Buy 200 (£200)|Pet Shop Treats Buy]]>><<set $money -= 20000>><<set $kennel_treats += 200>><</link>>

<</if>>
<<if $money gte 50000>>
	<<link [[Buy 500 (£500)|Pet Shop Treats Buy]]>><<set $money -= 50000>><<set $kennel_treats += 500>><</link>>

<</if>>
<<if $money gte 100000>>
	<<link [[Buy 1000 (£1000)|Pet Shop Treats Buy]]>><<set $money -= 100000>><<set $kennel_treats += 1000>><</link>>

<</if>>

<<link [[Don't buy any|Pet Shop]]>><</link>>

:: Pet Shop Treats Buy
<<effects>>

You buy the treats, and have them sent to the farm. You have $kennel_treats in total.

<<link [[Next|Pet Shop]]>><</link>>

:: Widgets PetShopBoughtItem [widget]

<<widget "PetShopBoughtItem">>
	<<if $boughtItem isnot undefined>>
		<<set _container to $container.home>>
		<<switch $boughtItem>>
		<<case "Small Fish Tank">>
			<<set $money -= 20000>><<set _container.upgrades.capacity to 1>><<set _container.maxCount to 2>><<set _container.name to "Small Fish Tank">>
		<<case "Fish Tank">>
			<<set $money -= 50000>><<set _container.upgrades.capacity to 2>><<set _container.maxCount to 3>><<set _container.name to "Fish Tank">>
		<<case "Large Fish Tank">>
			<<set $money -= 100000>><<set _container.upgrades.capacity to 3>><<set _container.maxCount to 4>><<set _container.name to "Large Fish Tank">>
		<<case "Huge Fish Tank">>
			<<set $money -= 500000>><<set _container.upgrades.capacity to 4>><<set _container.maxCount to 5>><<set _container.name to "Huge Fish Tank">>
		<<case "Small Automatic Feeder">>
			<<set $money -= 50000>><<set _container.upgrades.foodStorage to 1>><<set _container.maxDaysWithoutFood to 7>><<set _container.feederName to "Small Automatic Feeder">>
		<<case "Automatic Feeder">>
			<<set $money -= 150000>><<set _container.upgrades.foodStorage to 2>><<set _container.maxDaysWithoutFood to 14>><<set _container.feederName to "Automatic Feeder">>
		<<case "Large Automatic Feeder">>
			<<set $money -= 750000>><<set _container.upgrades.foodStorage to 3>><<set _container.maxDaysWithoutFood to 30>><<set _container.feederName to "Large Automatic Feeder">>
		<<case "Standard Decorations">>
			<<set $money -= 500000>><<set _container.upgrades.luxury to 1>><<set _container.decorations to "Standard Decorations">>
		<<case "Exotic Decorations">>
			<<set $money -= 1500000>><<set _container.upgrades.luxury to 2>><<set _container.decorations to "Exotic Decorations">>
		<</switch>>
		<<unset $boughtItem>>
	<</if>>
<</widget>>

:: Pet Shop Item

You take a look at the collection of <<print $selectedToy.set>>. They cost <<print $selectedToy.costDisplay>> each.

<<if $selectedToy.options>>
	<<for _i to 0; _i lt $selectedToy.options.length; _i++>>

			<<radiobutton "$selectedToy.selectedOption" _i autocheck>>
			<<print $selectedToy.options[_i].optionsName>>
		 |
	<</for>>

<</if>>

<<if $currentToys.length gte 5>>
	You can't have more than 5 toys with you at a time.
<<elseif $selectedToy.cost lte $money>>
	<<link [[Buy|Pet Shop]]>><<buyToy>><</link>>

<<else>>
	You can't afford this toy.
<</if>>

<<link [[Don't buy|Pet Shop]]>><<unset $selectedToy>><</link>>

repo_name: Area/degrees

license: mit


code:
:: Stolen Clothing Shop Result
<<effects>>
<<ShowUnderEquip "over">>
<<ShowUnderEquip "normal">>
<<if $skulduggery lt 100>>
	A security guard watches the entrance. There's no other way out, so you put everything back before leaving.
	<<clothingReset>>
<<else>>
	<<set $rng to random(0,100)>>
	<<if $crime gte 50000 or ($crime gte 40000 and $rng * 20 gte $skulduggery) or ($crime gte 25000 and $rng * 10 gte $skulduggery)
	or ($crime gte 10000 and $rng * 5 gte $skulduggery)>>
		<<generate1>><<person1>>
		A security guard watches the entrance, and as you try to stroll by, <<he>> stops you.

		"So. I've been keeping an eye on you," <<he>> continues, "I'm letting you go this time, but you're going to be
		banned from the premises for a while. Hopefully this will help you learn why you shouldn't steal clothes."
		<<if $clothingShop.banCount lt 4>>
			<<set $clothingShop.ban to 7>>
		<<elseif $clothingShop.banCount lt 8>>
			<<set $clothingShop.ban to 10>>
		<<else>>
			<<set $clothingShop.ban to 14>>
		<</if>>
		<<crime>>
		<<set $clothingShop.banCount++>>
	<<else>>
		A security guard watches the entrance, but you stroll by without arousing suspicion.
		<<crime>>
	<</if>>
	<<set _crime to ($tryOn.value / 100)>>
	<<crimeup _crime>>
<</if>>

<<link [[Next|Shopping Centre Top]]>><<set $tryOn.autoReset to true>><<endevent>><</link>>

:: Clothing Shop Guard
<<effects>>
<<generate1>><<person1>>
A security guard watches the entrance and spots you. <<He>> says a few words to someone you can't see, then approaches you.

"Sorry, can't let you pass," <<he>> says. "You still have <<if $clothingShop.ban gt 1>><<number $clothingShop.ban>> days<<else>>another day<</if>>
till your ban is lifted."

<<link [[Next|Shopping Centre Top]]>><<endevent>><</link>>

:: Clothing Shop Sneak Guard
<<effects>>
You spot a guard right by the entrance. It doesn't look like you'll be able to sneak past.

<<link [[Next|Shopping Centre Top]]>><</link>>

:: Clothing Shop Night Guard Found
<<effects>>
<<generate1>><<person1>>
<<set $clothingShop.banCount++>>
<<set $clothingShop.spotted to false>>
After making sure that you close the shop's door as quietly as you can, you turn around and are shocked to
find a security guard face to face with you. <<He>> places a hand on your shoulder before you can even think of running.

"What do we have here? A little rat thief, trying to make off with some fine embroidery?" <<he>> says with a
disapproving expression, "I'll be informing the owners of this situation."

<<He>> pulls out <<his>> phone and seems to call the shop owners.
<<if $clothingShop.ban gt 0>>
	<<set $clothingShop.banExtension to true>>
	<<set $clothingShop.ban += 7>>
	"Aha! So you already have a ban in place," <<he>> continues, "They do have a rather strict banning policy,
	so it's going to be a good while before you're going to be able to shop here."
<<else>>
	<<if $clothingShop.banCount lt 4>>
		<<set $clothingShop.ban to 7>>
	<<elseif $clothingShop.banCount lt 8>>
		<<set $clothingShop.ban to 10>>
	<<else>>
		<<set $clothingShop.ban to 14>>
	<</if>>
	"That should do it," <<he>> continues, "Well. You won't be entering this establishment for quite some time.
	Hopefully this will teach you a lesson."
<</if>>

"Now follow me, I'll be escorting you out of here. You're lucky that I don't just take you straight to the pillory."

<<link [[Run|Clothing Shop Night Guard Found Run]]>><</link>><<athleticsdifficulty 500>>

<<link [[Follow the guard|Clothing Shop Night Guard Found Follow]]>><</link>>

:: Clothing Shop Night Guard Found Run
<<effects>>
You decide to run and hide.
<<if $athleticsSuccess>>
	The security guard attempts to fully grab you, but you're able to avoid <<him>> just enough to get away.
	You run to the rooftop with <<him>> shouting in the distance.

	<<link [[Roof|Commercial rooftops]]>><<endevent>><</link>>
<<else>>
	However, before being able to get past the security guard, <<he>> pulls on you hard enough for you to fall right on your ass.

	"You'll regret trying to run from me," <<he>> says with a grin on <<his>> face. "There aren't any cameras here."

	<<link [[Next|Clothing Shop Night Guard Molestation]]>><<set $molestationstart to 1>><</link>>
<</if>>

:: Clothing Shop Night Guard Found Follow
<<effects>>
<<He>> directs you towards the exit.
<<if random(0,100) gte 50>>
	"You know what?" <<he>> questions, "There aren't any cameras in this spot."

	You look at <<him>> with a worried expression just before <<he>> grabs hold of you.

	<<link [[Next|Clothing Shop Night Guard Molestation]]>><<set $molestationstart to 1>><</link>>
<<else>>
	You walk down the stairs in silence and as you reach the main entrance to the Shopping Centre,
	the guard opens the door for you.

	"I hope this is a good lesson for you," <<He>> smiles, "You should look for more honest ways of
	earning money. Less trouble that way for everyone."

	<<He>> locks the door as you leave.

	<<link [[Leave|High Street]]>><<endevent>><</link>>
<</if>>

:: Clothing Shop Night Guard Molestation

<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>

	<<maninit>>
	<<set $enemytrust -= 40>>
	<<set $enemyanger += 40>>
	<<set $NPCList[0].lefthand to "arms">>
	<<set $leftarm to "grappled">>
	<<set $rightarm to "grappled">>
<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Clothing Shop Night Guard Molestation Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next|Clothing Shop Night Guard Molestation Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Clothing Shop Night Guard Molestation]]>><</link>><<nexttext>>
<</if>>

:: Clothing Shop Night Guard Molestation Finish

<<if $enemyhealth lte 0>>
	You're able to hurt <<him>> enough to get away. <<tearful>> you flee the shop.
	<<clotheson>>
	<<endcombat>>
	<<link [[Roof|Commercial rooftops]]>><<endevent>><</link>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	"Well, that was fun," <<he>> says, "But I it's time for you to leave."
	<<clotheson>>
	<<endcombat>>
	<<link [[Leave|High Street]]>><<endevent>><</link>>
<</if>>


code:
:: Tailor Shop
<<set $outside to 0>><<set $location to "shopping_centre">><<effects>>

You are in the tailor shop. It has cloth of various colours hanging on racks.

<<if $sewingKit isnot 1 and $dev is 1>>
	Looks like the shop has a new machine for sale in the display.

<</if>>
<<if $sewingBought is 1>>
	"Thank you for your purchase. I'll have this delivered to your room by the time you get back."

	<<set $sewingBought to 0>>
<</if>>

<<set $tailor_cost to 0>>
<<set _time to 0>>
<<set _outfitTime to 0>>

<<for _active_clothes range Object.keys($worn)>>
	<<if _active_clothes is "lower" or _active_clothes is "under_lower">>
		<<if $worn[_active_clothes].one_piece is 1>>
			<<if $worn[_active_clothes].integrity lt clothingData(_active_clothes,$worn[_active_clothes],'integrity_max')>>
				<<set _outfitTime += 5>>
			<</if>>
			<<continue>>
		<</if>>
	<</if>>
	<<if $worn[_active_clothes].integrity lt clothingData(_active_clothes,$worn[_active_clothes],'integrity_max') and $worn[_active_clothes].integrity gt 0 and clothingData(_active_clothes,$worn[_active_clothes],'integrity_max') gt 0>>
		<<set $tailor_cost += Math.trunc(getClothingCost($worn[_active_clothes],_active_clothes) * (1 - $worn[_active_clothes].integrity / clothingData(_active_clothes,$worn[_active_clothes],'integrity_max')))>>
		<<set _time += 5>>
	<</if>>
<</for>>

<<if $stress gte $stressmax>>
	<<passoutshop>>
<<else>>
	<<if $hour is 21>>
	It's closing time. Security is herding everyone outside. <<if $exposed gte 1>>Panic swells within you as you realise how exposed you'll be should security find you in this state of dress.<</if>>

		<<if $exposed lte 0>>
			<<link [[Go outside|High Street]]>><<endevent>><</link>>

		<<else>>
			<<link [[Hide until it's over (1:00)|Tailor Shop]]>><<pass 1 hour>><<endevent>><</link>>
		<</if>>
	<<else>>
		<<if $daystate is "night">>
			You are alone in the darkness.

			<<if $hour isnot $closinghour and $tailortheft isnot 1>>
			<<link [[Examine the cash register|Tailor Register]]>><</link>>

			<</if>>

		<<elseif $exposed gte 1>>

			You are hiding behind bolts of cloth to protect your dignity.

		<<else>>
			<<generate1>><<person1>>"Welcome," the tailor says. "What services are you looking for today?
			We offer repairs on clothes. We also offer a monthly service to repair by delivery."

			<<if $tailor_cost gte 1 and $money gte $tailor_cost>>
				<<He>> offers to fix what you're currently wearing for <<printmoney `Math.trunc($tailor_cost)`>>.

				<<print'<<link [[Fix clothes (0:'+(_time lt 10 ? "0":"")+_time+')|Fix Clothes]]>><<set $money -= $tailor_cost>><<pass _time>><</link>>'>>

				<<set _options to true>>
			<<elseif $money lt $tailor_cost>>
				You don't have enough cash to repair your current clothes. (<<printmoney `Math.trunc($tailor_cost)` true>>.)

				<<set _options to true>>
			<</if>>

			<<if ($worn.upper.set is $worn.lower.set and $worn.lower.integrity lt clothingData('lower',$worn.lower,'integrity_max')) or ($worn.under_upper.set is $worn.under_lower.set and $worn.under_lower.integrity lt clothingData('under_lower',$worn.under_lower,'integrity_max'))>>
				The tailor will repair the lower halves of outfits for free.

				<<print '<<link [[Fix clothes (0:'+(_outfitTime lt 10 ? "0":"")+_outfitTime+')|Fix Lower]]>><<pass _outfitTime>><</link>>'>>

				<<set _options to true>>
			<</if>>

			<<if _options isnot true>>
				Your currently worn clothes are fully repaired already.

			<</if>>

			<<if $wardrobeRepair isnot undefined>>
				You need to visit your wardrobe to collect your repaired clothes.
			<<elseif $tailorMonthlyService is undefined>>
				The tailor catches you looking at the small crate beside <<him>>. "Ah, you're in luck if you need our monthly service. We have a spot free as long as it's somewhere local."

				/*<<link [[Ask how much they offer for old clothes|Tailor Monthly Discard]]>><</link>>*/

				<<link [[Ask how much they charge to repair all clothes|Tailor Monthly Repair]]>><</link>>
			<<elseif $tailorMonthlyService is "repair">>
				You have a crate waiting to receive clothing for repair.
			<<elseif $tailorMonthlyService is "discard">>
				You have a crate waiting to receive clothing you want to sell.
			<<elseif $tailorMonthlyService gt 0>>
				You recently made use of this service and have to wait $tailorMonthlyService days before you can do so again.
			<</if>>

			<<if $sewingKit isnot 1 and $dev is 1>>
				<<link [[Approach the display cabinet|Tailor Shop Sewing Machine]]>><</link>>

			<</if>>
		<</if>>
		<<link [[Leave|Shopping Centre Top]]>><<endevent>><</link>>
	<</if>>
<</if>>

:: Fix Clothes

Your clothes have been fixed.

<<set _equip to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower","over_head","head", "face", "neck", "hands", "legs", "feet"]>>
<<for _i to 0; _i lt _equip.length; _i++>>
	<<set $worn[_equip[_i]].integrity = clothingData(_equip[_i],$worn[_equip[_i]],'integrity_max')>>
<</for>>

<<link [[Back|Tailor Shop]]>><<endevent>><</link>>

:: Fix Lower

Your lower clothes have been fixed.

<<if $worn.upper.set is $worn.lower.set>>
	<<set $worn.lower.integrity = clothingData('lower',$worn.lower,'integrity_max')>>
<</if>>

<<if $worn.under_upper.set is $worn.under_lower.set>>
	<<set $worn.under_lower.integrity = clothingData('under_lower',$worn.under_lower,'integrity_max')>>
<</if>>

<<link [[Back|Tailor Shop]]>><<endevent>><</link>>

:: Tailor Shop Sneak
<<set $outside to 0>><<effects>><<set $lock to 0>>

	<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Pick it (0:10)|Tailor Shop]]>><<pass 10>><<crimeup 1>><</link>><<crime>>

	<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

	<</if>>

<<link [[Leave|Shopping Centre Top]]>><<endevent>><</link>>

:: Tailor Shop Sewing Machine
<<effects>>
	You approach the display, inside it lies a sewing machine. An advertisement poster hangs beside the display, it reads:

	THE SEWINATOR-9000 tm

	- Dog Chewed Your Undies? ~Tentacles~ Tore Your Clothes? No Problem!

	- Can Fix Any Piece of Clothing in One minute!

	- Requires No Skill! Even Bailey Could Use It!

	- Comes With a Lifetime Supply of Cloth For Repairs!

	- Only £1000.00!

	<<if $money gte 100000>>
		<<link [[Purchase sewing machine - Repair your clothes in your room! £1000|Tailor Shop]]>><<set $money -= 100000>><<set $sewingKit to 1>><<set $sewingBought to 1>><<endevent>><</link>>

	<</if>>
	<<link [[Go back|Tailor Shop]]>><<endevent>><</link>>

:: Tailor Monthly Discard
"Certainly <<if $player.gender_appearance is "m">>sir<<else>>madam<</if>>. We'll have the crate delivered. Fill it as soon as you're ready to sell them. Please bear in mind that we are not allowed to return any items. We will also only take items we can repair and resell."

<<set _value to 0>>
<<for _label, _items range $wardrobe>>
	<<for _i to 0; _i lt _items.length; _i++>>
		<<if setup.clothes[_label][clothesIndex(_label,_items[_i])].shop.length is 0>>
			<<continue>>
		<</if>>
		<<if _items[_i].outfitSecondary isnot undefined>>
			<<continue>>
		<</if>>
		<<set _value += Math.floor(getClothingCost(_items[_i]) * (_items[_i].integrity / clothingData(_label,_items[_i],'integrity_max')) / 3,_label)>>
	<</for>>
<</for>>
You think it will earn you <<printmoney `_value + 5000`>> currently after getting the deposit back.

<<if $money gte 5000>>
	<<link [[Confirm the sale and pay the £50 deposit|Tailor Monthly Driver]]>>
		<<set $money -= 5000>>
		<<set $tailorMonthlyService to "discard">>
	<</link>>
<<else>>
	You can't afford the deposit.

<</if>>

<<link [[Back out of the sale|Tailor Shop]]>><<endevent>><</link>>

:: Tailor Monthly Repair
"Certainly <<if $player.gender_appearance is "m">>sir<<else>>madam<</if>>. We'll have the crate delivered. Fill it as soon as you're ready for repairs. Please bear in mind that it will take a day before we get them back to you.
Please make sure you don't buy too many new clothes once you send them to us, or our driver will have to take them back as a donation."

<<set _value to 0>>
<<for _label, _items range $wardrobe>>
	<<for _i to 0; _i lt _items.length; _i++>>
		<<if _items[_i].outfitSecondary isnot undefined>>
			<<continue>>
		<</if>>
		<<set _value += Math.floor(getClothingCost(_items[_i],_label) * (1 - (_items[_i].integrity / clothingData(_label,_items[_i],'integrity_max'))) * 1.25,_label)>>
	<</for>>
<</for>>
You think it will cost you
<<if _value gt 5000>>
	<<printmoney `_value - 5000`>>
<<else>>
	nothing
<</if>>
currently with the deposit reducing the cost.

<<if $money gte 5000>>
	<<link [[Confirm the repair and pay the £50 deposit|Tailor Monthly Driver]]>>
		<<set $money -= 5000>>
		<<set $tailorMonthlyService to "repair">>
	<</link>>
<<else>>
	Unable to pay the deposit.
<</if>>

<<link [[Back out of the repair|Tailor Shop]]>><<endevent>><</link>>

:: Tailor Monthly Driver
The tailor picks up the crate and carries it into the back of the shop.

<<link [[Next|Tailor Shop]]>><<endevent>><</link>>


code:
:: Tattoo Parlour Lock

<<set $outside to 0>><<effects>><<set $lock to 0>>

<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Pick it (0:10)|Tattoo Parlour]]>><<pass 10>><<crimeup 1>><</link>><<crime>>

<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

<</if>>

<<link [[Leave|Shopping Centre]]>><</link>>

:: Tattoo Parlour

<<set $outside to 0>><<effects>><<set $lock to 0>>

You are in the tattoo parlour. The artists here can turn anything drawn on you into a tattoo. They also have a selection of tattoo designs available. Costs £500.

<<if $daystate is "night">>
	You are alone in the darkness.
<<elseif $exposed gte 1>>
	You hide in a cupboard to protect your dignity.
<<else>>

<</if>>

<<if $stress gte $stressmax>>
	<<passoutshop>>
<<else>>
	<<if $hour is 21>>
		It's closing time. Security is herding everyone outside. <<if $exposed gte 1>>Panic swells within you as you realise how exposed you'll be should security find you in this state of dress.<</if>>

		<<if $exposed lte 0>>
			<<link [[Go outside|High Street]]>><</link>>

		<<else>>
			<<link [[Hide until it's over (1:00)|Tattoo Parlour]]>><<pass 1 hour>><</link>>
		<</if>>
	<<else>>

		<<if $daystate is "night" and $hour isnot $closinghour and $tattooparlourtheft isnot 1>>
			<<link [[Examine the cash register|Tattoo Parlour Register]]>><</link>>

		<</if>>

		<<if $exposed lte 1 and $daystate isnot "night" and $hour isnot 21>>
			<<if $money lt 50000>>
				You cannot afford a tattoo.

			<<else>>
				<<link [[Get a tattoo|Tattoo Choice]]>><</link>>

				<<link [[Turn bodywriting into tattoo|Tattoo Bodywriting Choice]]>><</link>>

			<</if>>
		<</if>>

		<<link [[Leave|Shopping Centre]]>><</link>>

	<</if>>
<</if>>

:: Tattoo Bodywriting Choice
<<effects>>

<<for _active_bodypart range setup.bodyparts>>
	<<if $skin[_active_bodypart].pen is "pen" or $skin[_active_bodypart].pen is "marker">>
		<<if $money gte 50000>>
		You have <<if $skin[_active_bodypart].type is "text">>"<<print $skin[_active_bodypart].writing>>" written<<else>>a $skin[_active_bodypart].writing drawn<</if>> on your <<bodypart _active_bodypart>>.
			<<if ($skin[_active_bodypart].special is "bestiality" or $skin[_active_bodypart].special is "Black Wolf" or $skin[_active_bodypart].special is "Great Hawk") and $deviancy lte 34>>
				<<if (_active_bodypart is "left_bottom" or _active_bodypart is "right_bottom" or _active_bodypart is "pubic" or _active_bodypart is "breasts") and $exhibitionism lte 34>>
					You can't bear to show your <<bodypart _active_bodypart>> to the tattoo artist, and you're not deviant enough to have such a thing made into a tattoo anyway.
				<<else>>
					You're not deviant enough to have such a thing made into a tattoo.
				<</if>>
			<<elseif $skin[_active_bodypart].lewd is 1 and $skin[_active_bodypart].special isnot "bestiality" and $promiscuity lte 34>>
				<<if (_active_bodypart is "left_bottom" or _active_bodypart is "right_bottom" or _active_bodypart is "pubic" or _active_bodypart is "breasts") and $exhibitionism lte 34>>
					You can't bear to show your <<bodypart _active_bodypart>> to the tattoo artist, and you're not lewd enough to have such a thing made into a tattoo anyway.
				<<else>>
					You're not lewd enough to have such a thing made into a tattoo.
				<</if>>
			<<elseif (_active_bodypart is "left_bottom" or _active_bodypart is "right_bottom" or _active_bodypart is "pubic" or _active_bodypart is "breasts") and $exhibitionism lte 34>>
				You can't bear to show your <<bodypart _active_bodypart>> to the tattoo artist.
			<<else>>
			<<capture _active_bodypart>> | <<link [[Turn into tattoo (£500 1:00)|Tattoo Bodywriting]]>><<pass 60>><<set $money -= 50000>><<set $tattoo_bodypart to _active_bodypart>><<set $tattoo_parlour to clone($skin[_active_bodypart])>><<if $skin[_active_bodypart].lewd is 1 or $skin[_active_bodypart].special is "bestiality" or $skin[_active_bodypart].special is "Black Wolf" or $skin[_active_bodypart].special is "Great Hawk">><<control 50>><<else>><<control 25>><</if>><<set $skin[_active_bodypart].pen to "tattoo">><<pain 6>><</link>><</capture>> <<if $skin[_active_bodypart].lewd is 1 or $skin[_active_bodypart].special is "bestiality" or $skin[_active_bodypart].special is "Black Wolf" or $skin[_active_bodypart].special is "Great Hawk">><<gggcontrol>><<else>><<ggcontrol>><</if>>
			<</if>><<gpain>>

		<</if>>
	<<elseif $skin[_active_bodypart].pen is "tattoo">>
		Your <<bodypart _active_bodypart>> is already tattooed.

	<<elseif $skin[_active_bodypart].pen is "brand">>
		Your <<bodypart _active_bodypart>> is branded.

	<<elseif $skin[_active_bodypart].pen is "magic">>
		Your <<bodypart _active_bodypart>> has a magical seal.

	<<elseif !$skin[_active_bodypart].pen>>
		Nothing is written on your <<bodypart _active_bodypart>>.

	<</if>>
<</for>>

<<link [[Back|Tattoo Parlour]]>><</link>>

:: Tattoo Choice
<<effects>>

They have a board displaying a number of tattoo designs.

Location:

<<for _active_bodypart range setup.bodyparts>>
	<<if $skin[_active_bodypart].writing>>

	<<else>><<set _bodypart_detected to 1>>
		Your <<bodypart _active_bodypart>> <<capture _active_bodypart>><<radiobutton "$tattoo_bodypart" _active_bodypart>><</capture>>

	<</if>>
<</for>>
<<if _bodypart_detected isnot 1>>
	There's no room on your skin.

<</if>>

Girly tattoos:

Unicorn ♀ <<radiobutton "$tattoo_choice" "unicorn">> |
Heart ♀ <<radiobutton "$tattoo_choice" "heart">> |
Flower ♀ <<radiobutton "$tattoo_choice" "flower">> |
Butterfly ♀ <<radiobutton "$tattoo_choice" "butterfly">> |
Star ♀ <<radiobutton "$tattoo_choice" "star">> |

Boyish tattoos:

Skull ♂ <<radiobutton "$tattoo_choice" "skull">> |
Flame ♂ <<radiobutton "$tattoo_choice" "flame">> |

Holy tattoos:

Cross <<radiobutton "$tattoo_choice" "cross">> |

Deviant tattoos:

<<if $deviancy gte 35>>
	Paw print <<radiobutton "$tattoo_choice" "paw_print">> |
<<else>>
	You're not deviant enough.
<</if>>

<<link [[Get tattoo (£500 1:00)|Tattoo Get]]>><</link>><<gpain>>

<<link [[Back|Tattoo Parlour]]>><<unset $tattoo_bodypart>><<unset $writebodyaction>><</link>>

:: Tattoo Get

<<effects>>
<<if $tattoo_bodypart and $tattoo_choice>>
	<<set $tattoo_parlour to clone(setup.bodywriting[$tattoo_choice])>>
	<<add_bodywriting $tattoo_bodypart $tattoo_choice tattoo>><<pass 60>><<set $money -= 50000>>
	<<pain 6>>

	<<tattoo_parlour>>

	<<link [[Next|Tattoo Parlour]]>><</link>>

<<elseif $tattoo_choice>>
	You must choose a body part to tattoo on.

	<<unset $tattoo_choice>>

	<<link [[Next|Tattoo Choice]]>><</link>>

<<elseif $tattoo_bodypart>>
	You must choose what you want tattooed.

	<<unset $tattoo_bodypart>>

	<<link [[Next|Tattoo Choice]]>><</link>>

<<else>>
	You must choose a bodypart and image.

	<<link [[Next|Tattoo Choice]]>><</link>>

<</if>>

:: Tattoo Bodywriting

<<effects>>
<<tattoo_parlour>>
<<link [[Next|Tattoo Parlour]]>><</link>>


code:
:: Toy Shop Lock
<<set $outside to 0>><<effects>><<set $lock to 200>>

<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Pick it (0:10)|Toy Shop]]>><<pass 10>><<crimeup 1>><</link>><<crime>>

<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

<</if>>

<<link [[Leave|Shopping Centre Top]]>><</link>>

:: Toy Shop
<<set $outside to 0>><<effects>><<set $lock to 0>>

You are in the toy store. From floor to ceiling stand before you toys of all kinds, many in their own boxes, others ready to be played with.
<<if $pregnancyStats.humanToysUnlocked>>
	You can't help but think about your children when being in here.
<</if>>
<<if random(0,200) gte 199 and $daystate isnot "night">>You spot a kid zooming around in a vrelcar.<</if>>

<<if $daystate is "night">>
	You are alone in the darkness.

<<elseif $exposed gte 1>>
	You hide in a cupboard to protect your dignity.

<</if>>

<<if $stress gte 10000>>
	<<passoutshop>>
<<else>>
	<<if $hour is 21>>
		It's closing time. Security is herding everyone outside. <<if $exposed gte 1>>Panic swells within you as you realise how exposed you'll be should security find you in this state of dress.<</if>>

		<<if $exposed lte 0>>
			<<link [[Go outside|Shopping Centre Top]]>><</link>>

		<<else>>
			<<link [[Hide until it's over (1:00)|Toy Shop]]>><<pass 1 hour>><</link>>
		<</if>>
	<<else>>

		<<if $daystate is "night" and $hour isnot $closinghour and $toyshoptheft isnot 1>>
			<<link [[Examine the cash register|Toy Shop Register]]>><</link>>

		<</if>>

		/*ToDo: Pregnancy, remove check to properly enable*/
		<<if $pregnancyTesting>>
			<<toySelection>>
			<<if $exposed lte 1 and $daystate isnot "night" and $hour isnot 21>>
				<<if $pregnancyStats.humanToysUnlocked>>
					/*Baby Toys*/
					<<link [[Baby rattle|Toy Shop Item]]>><<set $selectedToy to clone(_toySelection["babyRattle"])>><</link>>

					<<link [[Toy cars|Toy Shop Item]]>><<set $selectedToy to clone(_toySelection["toyCar"])>><</link>>

					<<link [[Dummies|Toy Shop Item]]>><<set $selectedToy to clone(_toySelection["dummy"])>><</link>>

					<<link [[Teddy bears|Toy Shop Item]]>><<set $selectedToy to clone(_toySelection["teddyBear"])>><</link>>

				<</if>>
			<</if>>
		<</if>>
		<<link [[Leave|Shopping Centre Top]]>><</link>>

	<</if>>
<</if>>

:: Toy Shop Item

You take a look at the collection of <<print $selectedToy.set>>. They cost <<print $selectedToy.costDisplay>> each.

<<if $selectedToy.options>>
	<<set _numberOnHand to {}>>
	<<for _i to 0; _i lt $currentToys.length; _i++>>
		<<if $currentToys[_i].set is $selectedToy.set>>
			<<if _numberOnHand[$currentToys[_i].name] is undefined>>
				<<set _numberOnHand[$currentToys[_i].name] to 1>>
			<<else>>
				<<set _numberOnHand[$currentToys[_i].name]++>>
			<</if>>
		<</if>>
	<</for>>
	<<for _i to 0; _i lt $selectedToy.options.length; _i++>>

			<<radiobutton "$selectedToy.selectedOption" _i autocheck>>

				<<print $selectedToy.options[_i].optionsName>>
				(<<print (_numberOnHand[$selectedToy.options[_i].name] is undefined ? 0 : _numberOnHand[$selectedToy.options[_i].name])>>)

		 |
	<</for>>

<</if>>

<<if $currentToys.length gte 5>>
	You can't have more than 5 toys with you at a time.
<<elseif $selectedToy.cost lte $money>>
	<<link [[Buy|Toy Shop]]>><<buyToy>><</link>>

<<else>>
	You can't afford this toy.
<</if>>

<<link [[Don't buy|Toy Shop]]>><<unset $selectedToy>><</link>>

:: Toy Shop Widgets [widget]
<<widget "toySelection">>
	<<set _toySelection to {
		"babyRattle":
			{
				set:"baby rattles", name:"baby rattle", cost:1000, costDisplay:"£10", selectedOption: 0, type:"human",
				options: [
					{"colour":"pink","name":"Pink baby rattle","name_lower":"pink baby rattle","optionsName":"Pink"},
					{"colour":"blue","name":"Blue baby rattle","name_lower":"blue baby rattle","optionsName":"Blue"},
					{"colour":"green","name":"Green baby rattle","name_lower":"green baby rattle","optionsName":"Green"},
					{"colour":"red","name":"Red baby rattle","name_lower":"red baby rattle","optionsName":"Red"},
					{"colour":"gold","name":"Yellow baby rattle","name_lower":"yellow baby rattle","optionsName":"Yellow"},
				],

			},
		"teddyBear":
			{
				set:"teddy bears", name:"Teddy bear", name_lower: "teddy bear", cost:4000, costDisplay:"£40", selectedOption: 0, type:"human",
				options: [
					{"colour":"white","name":"Teddy bear","name_lower":"teddy bear","optionsName":"Teddy bear"},
					{"colour":"blue","name":"Mr Teddy","name_lower":"Mr Teddy","optionsName":"Mr Teddy"},
					{"colour":"pink","name":"Mrs Teddy","name_lower":"Mrs Teddy","optionsName":"Mrs Teddy"},
					{"colour":"gold","name":"Clown","name_lower":"clown","optionsName":"Clown"},
					{"colour":"green","name":"Green Robot","name_lower":"green robot","optionsName":"Green Robot"},
					{"colour":"red","name":"Red Robot","name_lower":"red robot","optionsName":"Red Robot"},
					{"colour":"light-pink","name":"Baby Doll","name_lower":"baby doll","optionsName":"Baby Doll"},
				],

			},
		"toyCar":
			{
				set:"toy cars", name:"Toy car", name_lower: "toy car", cost:1500, costDisplay:"£15", selectedOption: 0, type:"human",
				options: [
					{"colour":"pink","name":"Pink mini toy car","name_lower":"pink mini toy car","optionsName":"Pink mini"},
					{"colour":"blue","name":"Blue race toy car","name_lower":"blue race toy car","optionsName":"Blue race car"},
					{"colour":"green","name":"Green race toy car","name_lower":"green race toy car","optionsName":"Green race car"},
					{"colour":"red","name":"Hot rod toy car","name_lower":"hot rod toy car","optionsName":"Hot rod"},
					{"colour":"white","name":"Limousine toy car","name_lower":"limousine toy car","optionsName":"Limousine"},
				],

			},
		"chewToy":
			{
				set:"chew toys", name:"chew toy", cost:1500, costDisplay:"£15", selectedOption: 0, type:"wolf",
				options: [
					{"colour":"grey","name":"Chew Bone","name_lower":"chew bone","optionsName":"Chew Bone"},
					{"colour":"blue","name":"Chew Ball","name_lower":"chew ball","optionsName":"Chew Ball"},
					{"colour":"white","name":"Squeaky Sheep","name_lower":"squeaky sheep","optionsName":"Squeaky Sheep"},
					{"colour":"gold","name":"Squeaky Chicken","name_lower":"squeaky chicken","optionsName":"Squeaky Chicken"},
					{"colour":"softbrown","name":"Rope","name_lower":"rope","optionsName":"Rope"},
				],

			},
		"dummy":
			{
				set:"dummies", name:"dummy", cost:500, costDisplay:"£5", selectedOption: 0, type:"human",
				options: [
					{"colour":"pink","name":"Pink dummy","name_lower":"pink dummy","optionsName":"Pink"},
					{"colour":"blue","name":"Blue dummy","name_lower":"blue dummy","optionsName":"Blue"},
					{"colour":"green","name":"Green dummy","name_lower":"green dummy","optionsName":"Green"},
					{"colour":"red","name":"Red dummy","name_lower":"red dummy","optionsName":"Red"},
					{"colour":"gold","name":"Yellow dummy","name_lower":"yellow dummy","optionsName":"Yellow"},
					{"colour":"white","name":"White dummy","name_lower":"white dummy","optionsName":"White"},
					{"colour":"white","name":"See through dummy","name_lower":"see through dummy","optionsName":"See through"},
				],

			},
	}>>
<</widget>>

<<widget "buyToy">>
<<set $money -= $selectedToy.cost>>
<<if $selectedToy.options>>
	<<set _selectedOption to $selectedToy.selectedOption>>
	<<if $selectedToy.options[_selectedOption].name>>
		<<set $selectedToy.name to clone($selectedToy.options[_selectedOption].name)>>
		<<set $selectedToy.name_lower to clone($selectedToy.options[_selectedOption].name_lower)>>
	<</if>>
	<<if $selectedToy.options[_selectedOption].colour>>
		<<set $selectedToy.colour to clone($selectedToy.options[_selectedOption].colour)>>
	<</if>>
	<<run delete $selectedToy.selectedOption>>
	<<run delete $selectedToy.options>>
<</if>>
<<set $currentToys.push(clone($selectedToy))>>
<<unset $selectedToy>>
<</widget>>


code:
:: Widgets tryOnClothes [widget]
<<widget "tryOnInit">>
<<set $tryOn to {
	"autoReset":true,
	"value":0,
	"showEquip": {"over_head": null, "over_upper": null, "over_lower": null},
	"showUnderEquip": {"upper": null, "lower": null}
}>>
<</widget>>

<<widget "tryOnReset">>
<<set $tryOn to {
	"autoReset":false,
	"value":0,
	"ownedStored":{
		"face":clone($worn.face),
		"feet":clone($worn.feet),
		"over_head":clone($worn.over_head),
		"head":clone($worn.head),
		"hands":clone($worn.hands),
		"legs":clone($worn.legs),
		"lower":clone($worn.lower),
		"over_lower":clone($worn.over_lower),
		"neck":clone($worn.neck),
		"under_lower":clone($worn.under_lower),
		"under_upper":clone($worn.under_upper),
		"upper":clone($worn.upper),
		"over_upper":clone($worn.over_upper)
	},
	"tryingOn":{
		"face":null,
		"feet":null,
		"head":null,
		"over_head":null,
		"hands":null,
		"legs":null,
		"lower":null,
		"over_lower":null,
		"neck":null,
		"under_lower":null,
		"under_upper":null,
		"upper":null,
		"over_upper":null
	},
	"type": {},
	"showEquip": {"over_head": null, "over_upper":null, "over_lower": null},
	"showUnderEquip": {"upper": null, "lower": null}
}>>
<</widget>>

<<widget "tryOnStats">>
<<if $debug is 1>>
	<<if $tryOn.showEquip.over_head is null and $tryOn.showEquip.over_upper is null and $tryOn.showEquip.over_lower is null
	and $worn.over_head.name isnot "naked" and $worn.over_upper.name isnot "naked" and $worn.over_lower.name isnot "naked">>
		<<link "Show Normal Clothes">><<ShowUnderEquip "over" "hide">><<updatesidebarimg>><<updatetryonstats>><</link>>

	<<elseif $tryOn.showEquip.over_head isnot null or $tryOn.showEquip.over_upper isnot null or $tryOn.showEquip.over_lower isnot null>>
		<<link "Re-equip Over Clothes">><<ShowUnderEquip "over">><<updatesidebarimg>><<updatetryonstats>><</link>>

	<</if>>
<</if>>
<<if $tryOn.showUnderEquip.upper is null and $tryOn.showUnderEquip.lower is null>>
	<<link "Show Under Clothes">><<ShowUnderEquip "normal" "hide">><<if $shopName is "school">><<set $schoolShopAction.push("under")>><</if>><<updatesidebarimg>><<updatetryonstats>><</link>>

<<elseif $tryOn.showUnderEquip.upper isnot null and $tryOn.showUnderEquip.lower isnot null>>
	<<link "Re-equip Upper Clothes">><<ShowUnderEquip "normal">><<updatesidebarimg>><<updatetryonstats>><</link>>

<</if>>
<<set _slots to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower","over_head","head", "face", "neck", "hands", "legs", "feet"]>>
<<if _slots.map(x => $tryOn.tryingOn[x]).some(x => x != null)>>
	Clothes you are trying on total to <<printmoney $tryOn.value>>. This includes:

	<<if $passage is "Clothing Shop" or $passage is "School Library Shop" or $passage is "Forest Shop">>
		<<set _slots to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower","over_head","head", "face", "neck", "hands", "legs", "feet"]>>

		<<for _tryon range _slots.map(x => [x, $tryOn.tryingOn[x]]).filter(x => x[1] != null && x[1].outfitSecondary is undefined)>>

				<<if _tryon[1].colour isnot 0>>
					<<set _colour = (new Wikifier(null, "<<clothescolour _tryon[0]>>")).output.textContent.trim()>>
					<<set _custom_style = _tryon[1].colour == "custom" ? "color:" + _customRGB : "">>
					(<<print _colour>>)
				<</if>>
				<<print setup.clothes[_tryon[0]][clothesIndex(_tryon[0],_tryon[1])].name_cap>> with a price tag of <<printmoney `getClothingCost(_tryon[1],_tryon[0])`>>
				<<capture _tryon[0]>>
					| <<link "Remove">><<clothingReset _tryon[0]>>
						<<updatesidebarimg>>
						<<updatesidebardescription>>
						<<updateallure>>
						<<updatewarmthscale>>
						<<updatewarmthdescription>>
						<<updatetryonstats>>
						<<goto $passage>>
					<</link>>
				<</capture>>

		<</for>>

	<</if>>
<</if>>
<</widget>>

<<widget "updatetryonstats">>
	<<replace "#tryonstats-div">><<tryOnStats>><</replace>>
<</widget>>

<<widget "buyTryOnClothes">>
<<if $args[0]>>
	<<ShowUnderEquip "normal">>
	<<ShowUnderEquip "over">>
	<<set _equip to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower","over_head","head", "face", "neck", "hands", "legs", "feet"]>>
	<<set _itemTypes to ["face","feet","head", "hands","legs","upper","lower","neck","under_upper","under_lower"]>>
	<<set _towels to ["towel top","large towel","towel skirt"]>>
	<<set $money -= $tryOn.value>>
	<<switch $args[0]>>
		<<case "wear">>
			<<for _i to 0; _i lt _equip.length; _i++>>
				<<if $tryOn.ownedStored[_equip[_i]] isnot null and $tryOn.tryingOn[_equip[_i]] isnot null and $tryOn.ownedStored[_equip[_i]].name isnot "naked" and !_towels.includes($tryOn.ownedStored[_equip[_i]].name)>>
					/*Send previously equipped clothes to wardrobe*/
					<<wardrobeSend _equip[_i] $tryOn.ownedStored[_equip[_i]]>>
				<</if>>
			<</for>>
		<<case "wardrobe">>
			<<for _i to 0; _i lt _equip.length; _i++>>
				<<if $tryOn.tryingOn[_equip[_i]] isnot null>>
					<<if $tryOn.tryingOn[_equip[_i]].name is $worn[_equip[_i]].name>>
						<<wardrobeSend _equip[_i] $tryOn.tryingOn[_equip[_i]]>>
					<</if>>
				<</if>>
			<</for>>
			<<clothingReset>>
	<</switch>>
	<<set $tryOn.autoReset to true>>
<</if>>
<</widget>>

<<widget "clothingReset">>
<<if $args[0]>>
	<<if $tryOn.ownedStored[$args[0]] isnot null>>
		<<if Object.keys($tryOn.showUnderEquip).includes($args[0]) and $tryOn.showUnderEquip[$args[0]] isnot null>>
			<<ShowUnderEquip "normal">>
		<<elseif Object.keys($tryOn.showEquip).includes($args[0]) and $tryOn.showEquip[$args[0]] isnot null>>
			<<ShowUnderEquip "over">>
		<</if>>
		<<if $worn[$args[0]].outfitSecondary isnot undefined and $worn[$args[0]].outfitSecondary[1] isnot "broken">>
			<<set _resetSlot to $worn[$args[0]].outfitSecondary[0]>>
		<<else>>
			<<set _resetSlot to $args[0]>>
		<</if>>
		<<unset _outfitPrimaryCR>>
		<<set _outfitPrimaryCR to $worn[_resetSlot].outfitPrimary>>
		<<if _outfitPrimaryCR isnot undefined>>
			<<for _labelCR, _valueCR range _outfitPrimaryCR>>
				<<if $worn[_labelCR].name is _valueCR>>
					<<clothingResetOwnedReset _labelCR>>
				<</if>>
			<</for>>
		<</if>>
		<<clothingResetOwnedReset _resetSlot>>
	<</if>>
<<else>>
	<<set _equip to ["over_upper","over_lower","upper", "lower", "under_upper", "under_lower","over_head","head", "face", "neck", "hands", "legs", "feet"]>>
	<<for _i to 0; _i lt _equip.length; _i++>>
		<<if $tryOn.ownedStored[_equip[_i]] isnot null>>
			<<set $worn[_equip[_i]] to clone($tryOn.ownedStored[_equip[_i]])>>
		<</if>>
	<</for>>
	<<set $tryOn.autoReset to true>>
<</if>>
<</widget>>

<<widget "clothingResetOwnedReset">>
<<if $tryOn.ownedStored[$args[0]]>>
	<<set $_.outfitSecondary to $tryOn.ownedStored[$args[0]].outfitSecondary>>
	<<set $_.slot to false>>
	<<set _wearStored to true>>
	<<if $_.outfitSecondary isnot undefined>>
		<<if $_.outfitSecondary[1] is $tryOn.ownedStored[$_.outfitSecondary[0]].name>>
			<<set $_.slot to $_.outfitSecondary[0]>>
		<</if>>
	<</if>>
	<<if $_.slot is false>>
		<<set $_.slot to $args[0]>>
	<<elseif $tryOn.tryingOn[$_.slot] isnot null>>
		<<set _wearStored to false>>
	<</if>>
	<<if _wearStored>>
		<<set $_.outfitPrimary to $tryOn.ownedStored[$_.slot].outfitPrimary>>
		<<if $_.outfitPrimary isnot undefined>>
			<<for _labelOCR, _valueOCR range $_.outfitPrimary>>
				<<if _labelOCR isnot $args[0] and $tryOn.tryingOn[_labelOCR] isnot null>>
					<<set _wearStored to false>>
				<</if>>
			<</for>>
		<</if>>
	<</if>>

	<<if _wearStored>>
		<<if $_.outfitPrimary isnot undefined>>
			<<for _labelOCR, _valueOCR range $_.outfitPrimary>>
				<<if $tryOn.ownedStored[_labelOCR].name is _valueOCR>>
					<<set $worn[_labelOCR] to clone($tryOn.ownedStored[_labelOCR])>>
					<<removeTryingOn _labelOCR>>
				<</if>>
			<</for>>
		<</if>>

		<<set $worn[$_.slot] to clone($tryOn.ownedStored[$_.slot])>>
		<<removeTryingOn $_.slot>>
	<<else>>
		<<set $worn[$args[0]] to clone(setup.clothes[$args[0]][0])>>
		<<removeTryingOn $args[0]>>
	<</if>>
<</if>>
<</widget>>

<<widget "tryOnWear">>
<<set _slotTO = $args[0]>>
<<set _choice_indexTO = $args[1]>>
<<if _slotTO and _choice_indexTO>>
	<<set _items to {}>>

	/*Finds the main piece of clothing and sets it colours*/
	<<set _items[_slotTO] to clone(setup.clothes[_slotTO][_choice_indexTO])>>
	<<if $colouraction2 isnot undefined and _items[_slotTO].colour_options.includes($colouraction2)>>
		<<set _items[_slotTO].colour to $colouraction2>>
		<<if _items[_slotTO].colour is "custom">>
			<<set _items[_slotTO].colourCustom to customColour($customColors.color.primary, $customColors.saturation.primary, $customColors.brightness.primary, $customColors.contrast.primary, $customColors.sepia.primary)>>
		<</if>>
	<</if>>
	<<if $accessorycolouraction2 isnot undefined and _items[_slotTO].accessory_colour_options.includes($accessorycolouraction2)>>
		<<set _items[_slotTO].accessory_colour to $accessorycolouraction2>>
		<<if _items[_slotTO].accessory_colour is "custom">>
			<<set _items[_slotTO].accessory_colourCustom to customColour($customColors.color.secondary, $customColors.saturation.secondary, $customColors.brightness.secondary, $customColors.contrast.secondary, $customColors.sepia.secondary)>>
		<</if>>
	<</if>>

	/*Finds the secondary pieces of clothing and sets their colours*/
	<<unset _outfitPrimaryTO>>
	<<set _outfitPrimaryTO to _items[_slotTO].outfitPrimary>>
	<<if _outfitPrimaryTO isnot undefined>>
		<<for _labelTO, _valueTO range _outfitPrimaryTO>>
			<<for _i to 0; _i lt setup.clothes[_labelTO].length; _i++>>
				<<if setup.clothes[_labelTO][_i].name is _valueTO>>
					<<set _items[_labelTO] to clone(setup.clothes[_labelTO][_i])>>
					<<if $colouraction2 isnot undefined and _items[_labelTO].colour_options.includes($colouraction2)>>
						<<set _items[_labelTO].colour to $colouraction2>>
						<<if _items[_labelTO].colour is "custom">>
							<<set _items[_labelTO].colourCustom to customColour($customColors.color.primary, $customColors.saturation.primary, $customColors.brightness.primary, $customColors.contrast.primary, $customColors.sepia.primary)>>
						<</if>>
					<</if>>
					<<if $accessorycolouraction2 isnot undefined and _items[_labelTO].accessory_colour_options.includes($accessorycolouraction2)>>
						<<set _items[_labelTO].accessory_colour to $accessorycolouraction2>>
						<<if _items[_labelTO].accessory_colour is "custom">>
							<<set _items[_labelTO].accessory_colourCustom to customColour($customColors.color.secondary, $customColors.saturation.secondary, $customColors.brightness.secondary, $customColors.contrast.secondary, $customColors.sepia.secondary)>>
						<</if>>
					<</if>>
					<<break>>
				<</if>>
			<</for>>
		<</for>>
	<</if>>

	/*Unequips the required slots*/
	<<set _returnSlots to []>>
	<<unset _unequipSlot>>
	<<for _labelTO, _valueTO range _items>>
		<<if $worn[_labelTO].name is "naked">>
			<<continue>>
		<</if>>
		<<if $worn[_labelTO].outfitSecondary isnot undefined>>
			<<if $worn[_labelTO].outfitSecondary[1] isnot "broken">>
				<<set _unequipSlot to $worn[_labelTO].outfitSecondary[0]>>
			<</if>>
		<</if>>
		<<if _unequipSlot is undefined>>
			<<set _unequipSlot to _labelTO>>
		<</if>>
		<<set _returnSlots.push(_unequipSlot)>>

		<<unset _outfitPrimaryTO>>
		<<set _outfitPrimaryTO to $worn[_unequipSlot].outfitPrimary>>
		<<if _outfitPrimaryTO isnot undefined>>
			<<for _labelTO2, _valueTO2 range _outfitPrimaryTO>>
				<<if _valueTO2 isnot "broken">>
					<<set $worn[_labelTO2] to clone(setup.clothes[_labelTO2][0])>>
					<<removeTryingOn _labelTO2>>
					<<set _returnSlots.push(_labelTO2)>>
				<</if>>
			<</for>>
		<</if>>
		<<set $worn[_unequipSlot] to clone(setup.clothes[_unequipSlot][0])>>
		<<removeTryingOn _unequipSlot>>
	<</for>>

	/*Equip items*/
	<<for _labelTO, _valueTO range _items>>
		<<set $worn[_labelTO] to clone(_valueTO)>>
		<<set $tryOn.tryingOn[_labelTO] to clone(_valueTO)>>
		<<set $tryOn.value += getClothingCost($tryOn.tryingOn[_labelTO],_labelTO)>>
		<<run clothesDataTrimmer($worn[_labelTO])>>
		<<run clothesDataTrimmer($tryOn.tryingOn[_labelTO])>>
	<</for>>

	/*re-equip original clothes where needed*/
	<<for _returnSlot range _returnSlots>>
		<<if $worn[_returnSlot].name is "naked" and $tryOn.ownedStored[_returnSlot].name isnot "naked">>
			<<if $tryOn.ownedStored[_returnSlot].outfitSecondary is undefined>>
				<<set _reequip to true>>
				<<unset _outfitPrimaryTO>>
				<<set _outfitPrimaryTO to $tryOn.ownedStored[_returnSlot].outfitPrimary>>
				<<if _outfitPrimaryTO isnot undefined>>
					<<for _labelTO, _valueTO range _outfitPrimaryTO>>
						<<if $worn[_labelTO].name isnot "naked">>
							<<set _reequip to false>>
						<</if>>
					<</for>>
				<</if>>
				<<if _reequip>>
					<<clothingReset _returnSlot>>
				<</if>>
			<</if>>
		<</if>>
	<</for>>
<</if>>
<</widget>>

<<widget "updateOwned">>
<<if $args[0]>>
	<<if $worn[$args[0]].outfitSecondary is undefined>>
		<<unset _outfitPrimaryUO>>
		<<set _outfitPrimaryUO to $worn[$args[0]].outfitPrimary>>
		<<if _outfitPrimaryUO isnot undefined>>
			<<for _labelUO, _valueUO range _outfitPrimaryUO>>
				<<if $worn[_labelUO].name is _valueUO>>
					<<updateStoredSlot _labelUO>>
				<</if>>
			<</for>>
		<</if>>
		<<updateStoredSlot $args[0]>>
	<</if>>
<</if>>
<</widget>>

<<widget "updateStoredSlot">>
	<<if $tryOn.ownedStored[$args[0]].outfitSecondary isnot undefined and $tryOn.ownedStored[$args[0]].outfitSecondary[1] isnot "broken">>
		<<set _updateSlot to $tryOn.ownedStored[$args[0]].outfitSecondary[0]>>
	<<else>>
		<<set _updateSlot to $args[0]>>
	<</if>>
	<<unset _outfitPrimaryUSS>>
	<<set _outfitPrimaryUSS to $tryOn.ownedStored[_updateSlot].outfitPrimary>>
	<<if _outfitPrimaryUSS isnot undefined>>
		<<for _labelUSS, _valueUSS range _outfitPrimaryUSS>>
			<<if _valueUSS isnot "broken">>
				<<set $tryOn.ownedStored[_labelUSS] to clone($worn[_labelUSS])>>
			<</if>>
		<</for>>
	<</if>>
	<<set $tryOn.ownedStored[_updateSlot] to clone($worn[_updateSlot])>>
<</widget>>

<<widget "removeTryingOn">>
<<if $tryOn.tryingOn[$args[0]] isnot null>>
	<<set $tryOn.value -= getClothingCost($tryOn.tryingOn[$args[0]],$args[0])>>
	<<set $tryOn.tryingOn[$args[0]] to null>>
<</if>>
<</widget>>

<<widget "wardrobeSend">>
<<if $args[0] and $args[1]>>
	<<if $wardrobes.shopReturn is "wardrobe" or $wardrobes[$wardrobes.shopReturn] is undefined>>
		<<set $_selectedWardrobe to $wardrobe>>
	<<else>>
		<<set $_selectedWardrobe to $wardrobes[$wardrobes.shopReturn]>>
	<</if>>
	<<if $args[1].name isnot "naked">>
		<<set $_selectedWardrobe[$args[0]].push(clone($args[1]))>>
	<</if>>
<</if>>
<</widget>>

<<widget "ShowUnderEquip">>
<<if $args[0] is "over">>
	<<set _slots to ["over_head", "over_upper", "over_lower"]>>
	<<set _type to "showEquip">>
<<else>>
	<<set _slots to ["upper", "lower"]>>
	<<set _type to "showUnderEquip">>
<</if>>

<<if _slots>>
	<<for _i to 0; _i lt _slots.length; _i++>>
		<<if $args[1] is "hide" and $worn[_slots[_i]].cursed isnot 1 and $tryOn[_type][_slots[_i]] is null>>
			<<unset _preventHide>><<unset _outfitPrimarySUE>>
			<<set _outfitPrimarySUE to $worn[_slots[_i]].outfitPrimary>>
			<<if _outfitPrimarySUE isnot undefined>>
				<<for _labelSUE, _valueSUE range _outfitPrimarySUE>>
					<<if $worn[_labelSUE].cursed is 1 or $tryOn[_type][_slots[_i]] isnot null and _valueSUE is $worn[_labelSUE].name>>
						<<set _preventHide to true>>
					<</if>>
				<</for>>
			<</if>>
			<<if _preventHide isnot true>>
				<<if _outfitPrimarySUE isnot undefined>>
					<<for _labelSUE, _valueSUE range _outfitPrimarySUE>>
						<<if _valueSUE is $worn[_labelSUE].name>>
							<<set $tryOn[_type][_labelSUE] to clone($worn[_labelSUE])>>
							<<set $worn[_labelSUE] to clone(setup.clothes[_labelSUE][0])>>
						<</if>>
					<</for>>
				<</if>>
				<<set $tryOn[_type][_slots[_i]] to clone($worn[_slots[_i]])>>
				<<set $worn[_slots[_i]] to clone(setup.clothes[_slots[_i]][0])>>
				<<if $args[0] is "normal">>
					<<set $dontHide to true>>
				<</if>>
			<</if>>
		<<elseif $args[1] is undefined>>
			<<if $tryOn[_type][_slots[_i]] is null>>
				<<continue>>
			<</if>>
			<<unset _outfitPrimarySUE>>
			<<set _outfitPrimarySUE to $tryOn[_type][_slots[_i]].outfitPrimary>>
			<<if _outfitPrimarySUE isnot undefined>>
				<<for _labelSUE, _valueSUE range _outfitPrimarySUE>>
					<<if _valueSUE is $tryOn[_type][_labelSUE].name>>
						<<set $worn[_labelSUE] to clone($tryOn[_type][_labelSUE])>>
						<<set $tryOn[_type][_labelSUE] to null>>
					<</if>>
				<</for>>
			<</if>>
			<<set $worn[_slots[_i]] to clone($tryOn[_type][_slots[_i]])>>
			<<set $tryOn[_type][_slots[_i]] to null>>
			<<if $args[0] is "normal">>
				<<set $dontHide to false>>
			<</if>>
		<</if>>
	<</for>>
<</if>>
<</widget>>