From 8bc606552c3174f28c0faa5f84ab7727404408d2 Mon Sep 17 00:00:00 2001 From: Purity <purityguydol@gmail.com> Date: Mon, 22 Aug 2022 12:37:59 -0400 Subject: [PATCH] Sydney Science preparations Some code prep for implementing Sydney in Science class. Also causes Pure Sydney to be more strict on the player skipping class to talk to them, and gives Sydney a cameo when the player interrupts Sirris' second period Science class. This is my first real MR in a while, so sorry if there's any jank. --- game/base-system/time.twee | 8 +- .../loc-school/classes/science.twee | 54 ++++++++++--- .../overworld-town/special-sydney/temple.twee | 2 +- game/overworld-town/special-sydney/walk.twee | 18 +---- .../special-sydney/widgets.twee | 78 +++++++++++-------- 5 files changed, 99 insertions(+), 61 deletions(-) diff --git a/game/base-system/time.twee b/game/base-system/time.twee index 581e775cba..3e7f07fef5 100644 --- a/game/base-system/time.twee +++ b/game/base-system/time.twee @@ -1123,7 +1123,7 @@ <<unset $averyDismissalSceneWait>> <</if>> - <<if $sydneyScience isnot 1 and $days gte random(7, 12)>> + <<if $sydneyScience isnot 1 and $days gte random(14, 21)>> /*<<set $sydneyLate to 1>><<set $sydneyScience to 1>>*/ <!-- Uncomment this when Sydney can show up in Science Class --> <</if>> @@ -1148,7 +1148,9 @@ <<else>> <<set $NPCName[$NPCNameList.indexOf("Sydney")].title to "faithful">> <</if>> - <<unset $sydneyLate>> <!-- Remove this line when Sydney can show up in Science Class --> + <<if $sydneyScience isnot 1 or $sydneySeen.includes("science")>> + <<unset $sydneyLate>> + <</if>> <<if $schoolday is 1 and random(1, 4) is 1>> <<set $sydneyLate to 1>> <</if>> @@ -1172,6 +1174,8 @@ <<set $sydneyDaily to {}>> <<set $sydneyDaily.sex to 0>> <<unset $sydneyScienceWarn>> + <<unset $sydneyClassWarn>> + <<unset $sydneyScienceWalk>> <<unset $sydneyPunish>> <<unset $sydneyTempleSkip>> diff --git a/game/overworld-town/loc-school/classes/science.twee b/game/overworld-town/loc-school/classes/science.twee index b88a6177bb..97485ca153 100644 --- a/game/overworld-town/loc-school/classes/science.twee +++ b/game/overworld-town/loc-school/classes/science.twee @@ -33,7 +33,12 @@ <br> <<elseif $time lte ($hour * 60 + 5)>> - You enter the science classroom. + <<if $sydneyScienceWalk>> + <<unset $sydneyScienceWalk>> + You enter the science classroom with Sydney. + <<else>> + You enter the science classroom. + <</if>> <<npc Sirris>><<person1>> Sirris is preparing at the front of the room while the seats fill. <<if $worn.over_upper.name isnot "naked" or $worn.over_lower.name isnot "naked" or $worn.over_head.name isnot "naked">> @@ -46,17 +51,33 @@ <br> <<else>> - You enter the science classroom. - <<npc Sirris>><<person1>> - <<if $scienceExcused is true>> - <<unset $scienceExcused>> - Sirris cuts off mid-sentence to regard you. "Excused tardiness, please take a seat." <<He>> smiles at you. + <<if $sydneyScienceWalk>> + <<unset $sydneyScienceWalk>> + You enter the science classroom with Sydney. + <<npc Sirris>><<person1>> + <<if $scienceExcused is true>> + <<unset $scienceExcused>> + Sirris cuts off mid-sentence to regard you. "Excused tardiness, for both of you. Please take a seat." <<He>> smiles at you. + <<else>> + Sirris cuts off mid-sentence to regard you. "I'm sorry, but I'll have to record your tardiness. Both of you." Sydney looks ashamed. + <<gdelinquency>><<lspurity>> + <br><br> + <<detention 1>> + <</if>> <<else>> - Sirris cuts off mid-sentence to regard you. "I'm sorry, but I'll have to record your tardiness." - <<gdelinquency>> - <br><br> - <<detention 1>> + You enter the science classroom. + <<npc Sirris>><<person1>> + <<if $scienceExcused is true>> + <<unset $scienceExcused>> + Sirris cuts off mid-sentence to regard you. "Excused tardiness, please take a seat." <<He>> smiles at you. + <<else>> + Sirris cuts off mid-sentence to regard you. "I'm sorry, but I'll have to record your tardiness." + <<gdelinquency>> + <br><br> + <<detention 1>> + <</if>> <</if>> + You <<if $worn.over_upper.name isnot "naked" or $worn.over_lower.name isnot "naked" or $worn.over_head.name isnot "naked">> hang your coat at the back of the class and @@ -113,6 +134,10 @@ <<npc Sirris>><<person1>>You open the door to the science classroom. Sirris cuts off mid-sentence as you enter, looking surprised. "Can I help you?" It seems you've interrupted the lesson. <br><br> + <<if $NPCName[$NPCNameList.indexOf("Sydney")].init is 1 and $schoolstate is "second" and $sydneyScience isnot 1>> + You spot Sydney right at the front of the class. <<nnpc_He "Sydney">> looks to you with confusion. + <br><br> + <</if>> <<set $scienceinterrupted to 1>> <<link [[Apologise|Science Classroom Apology]]>><<trauma 1>><<stress 1>><</link>><<gstress>><<gtrauma>> @@ -153,6 +178,15 @@ Embarrassed, you apologise and leave. <<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>> You mock the teacher. "A white lab coat is a good idea <<sir>>, it'll hide the stains." Laughter erupts among the seated students. +<<if $NPCName[$NPCNameList.indexOf("Sydney")].init is 1 and $schoolstate is "second" and $sydneyScience isnot 1>> + <<run statusCheck("Sydney")>> + <<if _sydneyStatus.includes("corrupt")>> + Even Sydney struggles to not burst into laughter. + <<else>> + Sydney's eyes widen in shock. + <</if>> + <<lspurity>> +<</if>> <br><br> Sirris looks exasperated. "Right. I'll have to inform the head of your behaviour, you know. Please, just go." diff --git a/game/overworld-town/special-sydney/temple.twee b/game/overworld-town/special-sydney/temple.twee index 0c44a27716..555f7af8a2 100644 --- a/game/overworld-town/special-sydney/temple.twee +++ b/game/overworld-town/special-sydney/temple.twee @@ -1552,7 +1552,7 @@ You creep up to the door. <br> "I'm sorry, that must have been traumatising. I'm glad you've come this far with <<phim>>." <<case "science">> - "We met in our shared science class." + "We met in our shared science class. I was late that day, and showed up in my robes." <br> "Noted." <<case "shop">> diff --git a/game/overworld-town/special-sydney/walk.twee b/game/overworld-town/special-sydney/walk.twee index a8bf42c095..98dc9a2508 100644 --- a/game/overworld-town/special-sydney/walk.twee +++ b/game/overworld-town/special-sydney/walk.twee @@ -1332,13 +1332,13 @@ You shake your head, and Sydney frowns. "Suit yourself, I guess." <<He>> turns o <<set $location to "park">> You and Sydney cut across the park again. <<He>> bursts through the front doors of the school, and heads straight for Sirris' classroom with you in tow. <br><br> - <<link [[Next|Sydney Science Walk Late]]>><</link>> + <<link [[Next|Science Classroom]]>><<endevent>><<set $sydneyScienceWalk to 1>><</link>> <br> <<elseif $schoolday is 1 and $sydneyScience and (($hour is 8 and $minute gte 44) or $hour is 9)>> <<set $location to "park">> - You and Sydney cut across the park again. You think you'll make it in time. + You and Sydney cut across the park again. You think you'll make it in time. You hurry through the front gate, through the halls, and towards Sirris' classroom. <br><br> - <<link [[Next|Sydney Science Walk]]>><</link>> + <<link [[Next|Science Classroom]]>><<endevent>><<set $sydneyScienceWalk to 1>><</link>> <br> <<elseif _sydney_location is "shop" or _sydney_location is "home">> You exit the shopping centre with Sydney. <<if $sydneyromance is 1>><<if _sydneyStatus.includes("corrupt")>><<He>> takes your hands in <<hers>><<else>>You take <<his>> hands in yours<</if>>. <<takeHandholdingVirginity "Sydney" "romantic">><</if>> @@ -1381,7 +1381,7 @@ You shake your head, and Sydney frowns. "Suit yourself, I guess." <<He>> turns o <br><br> Sydney bursts through the front doors of the school, and heads straight for Sirris' classroom with you in tow. <br><br> - <<link [[Next|Sydney Science Walk Late]]>><</link>> + <<link [[Next|Science Classroom]]>><<endevent>><<set $sydneyScienceWalk to 1>><</link>> <br> <<else>> Sydney walks up to <<if $NPCName[$NPCNameList.indexOf("Jordan")].init is 1>>Jordan<<else>>the figure<</if>>, and they talk for a brief moment. <<nnpc_He "Jordan">> smiles at you as Sydney runs back to your side, and you both leave the temple. @@ -2275,13 +2275,3 @@ You chat with <<him>> on the way. You reach the Elk Street without incident. Sydney waves you goodbye as <<he>> enters Sirris's shop. <br><br> <<link [[Next|Elk Street]]>><<endevent>><<set $eventskip to 1>><</link>> - -:: Sydney Science Walk -This passage should be unreachable. If you're seeing this, you've found a bug. Please report it to Vrelnir, and take this convenient portal to Starfish Street to escape. -<<link [[Next|Starfish Street]]>><<endevent>><<set $eventskip to 1>><</link>> -<br> - -:: Sydney Science Walk Late -This passage should be unreachable. If you're seeing this, you've found a bug. Please report it to Vrelnir, and take this convenient portal to Starfish Street to escape. -<<link [[Next|Starfish Street]]>><<endevent>><<set $eventskip to 1>><</link>> -<br> diff --git a/game/overworld-town/special-sydney/widgets.twee b/game/overworld-town/special-sydney/widgets.twee index 8374f4951a..68964e3a0e 100644 --- a/game/overworld-town/special-sydney/widgets.twee +++ b/game/overworld-town/special-sydney/widgets.twee @@ -108,28 +108,11 @@ <<unset $schoolShopAction>> <br><br> <<sydneyOptions>> -<<elseif $hour is 9 and $sydneyScience isnot 1 and $sydneyScienceWarn isnot 2>> - <<if !$sydneyScienceWarn>> - <<set $sydneyScienceWarn to 0>> - <</if>> - <<set $sydneyScienceWarn++>> - <<if $sydneyScienceWarn is 1>> - Sydney looks up at you. "Classes usually start around now. Aren't you going to be late?" - <br><br> - <<sydneyOptions>> - <<elseif $sydneyScienceWarn is 2>> - Sydney looks up at you. "Are you... skipping class just to see me?" - <br><br> - <<sydneyOptions>> - <<elseif $sydneyScienceWarn gte 3 and $sydneyromance isnot 1>> - Sydney shoos you away from the rental counter. "If the <<nnpc_Title "Leighton">> catches you skipping class, we'll both be in big trouble!" - <br><br> - <<link [[Leave|School Library]]>><<endevent>><<set $eventskip to 1>><</link>> - <br> - <<else>> - <br><br> - <<sydneyOptions>> - <</if>> +<<elseif $sydneyClassWarn and $sydneyClassWarn gte 3 and !_sydneyStatus.includes("corrupt")>> + Sydney shoos you away. "If the <<nnpc_Title "Leighton">> catches you skipping class, we'll both be in big trouble!" + <br><br> + <<link [[Leave|School Library]]>><<endevent>><<set $eventskip to 1>><</link>> + <br> <<elseif _counterApproach is 1>> <<if $sydneyChastityRemoveIntro is 1>> Sydney looks eager to talk to you about something. @@ -223,20 +206,47 @@ <<if $bus is "schoollibrary" or $location is "school">> <<switch _sydney_location>> <<case "library">> - <<sydneyOptionsTalk>> - <br> - <<bookRentalOptions>> - <br> - You can purchase any school-sanctioned clothing here. - <br> - <<link [[Buy clothes|School Library Shop]]>><</link>> - <br> - <<link [[Leave|School Library]]>><<endevent>><<set $eventskip to 1>><</link>> - <br> + <<if ($sydneyScience isnot 1 and $schoolstate is "first") or ["fourth", "fifth"].includes($schoolstate)>> + <<if !$sydneyClassWarn>> + <<set $sydneyClassWarn to 0>> + <</if>> + <<set $sydneyClassWarn++>> + <</if>> + <<if $sydneyClassWarn and $sydneyClassWarn gte 3 and !_sydneyStatus.includes("corrupt")>> + <<He>> shoos you away from the rental counter. "If the <<nnpc_Title "Leighton">> catches you skipping class, we'll both be in big trouble!" + <br><br> + <<link [[Leave|School Library]]>><<endevent>><<set $eventskip to 1>><</link>> + <br> + <<else>> + <<if $sydneyClassWarn is 1>> + <<if $schoolstate is "first">> + <<He>> looks up at you. "Classes usually start around now. Aren't you going to be late?" + <<else>> + <<He>> checks the time. "You're going to be late for your next class." + <</if>> + <br><br> + <<elseif $sydneyClassWarn is 2>> + <<He>> looks up at you. "Are you... skipping class just to see me?" + <br><br> + <<elseif $sydneyClassWarn is 3 and _sydneyStatus.includes("corrupt")>> + <<He>> checks the time. "Screw it, you can stay. Just don't blame me if you get detention." + <br><br> + <</if>> + <<sydneyOptionsTalk>> + <br> + <<bookRentalOptions>> + <br> + You can purchase any school-sanctioned clothing here. + <br> + <<link [[Buy clothes|School Library Shop]]>><</link>> + <br> + <<link [[Leave|School Library]]>><<endevent>><<set $eventskip to 1>><</link>> + <br> + <</if>> <<case "science">> Sydney's eyes grow wide. "Sh<<if _sydneyStatus.includes("corrupt")>>i<<else>>oo<</if>>t! We're late for science class!" <<He>> begins to pack up <<his>> things. "<<sydneyMum>>'s gonna kill me..." <br><br> - <<scienceicon>><<link [[Go with Sydney|Sydney Science Walk Late]]>><<set $eventskip to 1>><</link>> + <<scienceicon>><<link [[Go with Sydney|Science Classroom]]>><<endevent>><<set $sydneyScienceWalk to 1>><</link>> <br> <<link [[Leave|School Library]]>><<endevent>><<set $eventskip to 1>><</link>> <br> @@ -437,7 +447,7 @@ <br> <</if>> <<if $location is "school" and $sydneySeen.includes("science") and $hour is 8 and $minute gte 45>> - <<scienceicon>><<link [[Walk to science class (0:05)|Sydney Science Walk]]>><<pass 5>><<npcincr Sydney love 1>><</link>><<glove>> + <<scienceicon>><<link [[Walk to science class with Sydney (0:05)|Science Classroom]]>><<pass 5>><<npcincr Sydney love 1>><<endevent>><<set $sydneyScienceWalk to 1>><</link>><<glove>> <br> <</if>> <<if $location is "adult_shop">> /*Placeholder. Unfinished.*/ -- GitLab