Browse Source

Merge branch 'Edited-TW' into SC-Master

Stephan Fuchs 4 months ago
parent
commit
7e5b6a78a2

+ 8 - 8
sugarcube/src/js/console.js

@@ -1,21 +1,21 @@
 //https://stackoverflow.com/a/30197438/7200161
 var console=(function(defaultConsole){
 	return {
-		log: function(text){
+		log: function(...text){
 			if(State.variables.DEBUGGING)
-				defaultConsole.log(text);
+				defaultConsole.log(...text);
 		},
-		info: function (text) {
+		info: function (...text) {
 			if(State.variables.DEBUGGING)
-				defaultConsole.info(text);
+				defaultConsole.info(...text);
 		},
-		warn: function (text) {
+		warn: function (...text) {
 			if(State.variables.DEBUGGING)
-				defaultConsole.warn(text);
+				defaultConsole.warn(...text);
 		},
-		error: function (text) {
+		error: function (...text) {
 			if(State.variables.DEBUGGING)
-				defaultConsole.error(text);
+				defaultConsole.error(...text);
 		}
 	};
 }(window.console));

+ 21 - 31
sugarcube/src/locations/home_parents/bedroomParents.tw

@@ -6,50 +6,40 @@
 		Their large bed, wardrobe and other closets take up most of the space.
 	</p>
 
-	<<set _sleepingNPCs = {}>>
-	<<set _locationNPCs = ['A28','A29']>>
+	<p>
+		<<set _sleepingNPCs = {}>>
+		<<set _locationNPCs = ['A28','A29']>>
+		<<set _locationData = {}>>
+		<<set _presentNPCCount = 0>>
 
-	<<for _locationNPC range _locationNPCs>>
-		<<set _locationData = $npcs.location(_locationNPC)>>
-		<<if _locationData.location == 'home' and  _locationData.activity.includes('asleep')>>
-			<<set _sleepingNPCs[_locationNPC] = {}>>
-		<</if>>
-	<</for>>
-	<<npcList _sleepingNPCs "# is sleeping on the bed." "# are sleeping on the bed.">>
+		<<for _locationNPC range _locationNPCs>>
+			<<set _locationData[_locationNPC] = $npcs.location(_locationNPC)>>
+			<<if _locationData[_locationNPC].location == 'home' and  _locationData[_locationNPC].activity.includes('asleep')>>
+				<<set _sleepingNPCs[_locationNPC] = {}>>
+				<<set _presentNPCCount += 1>>
+			<</if>>
+		<</for>>
+		<<npcList _sleepingNPCs "# is sleeping on the bed." "# are sleeping on the bed.">>
 
+		<<if _locationData['A28']>>
+			<<set _presentNPCCount += 1>>
+			<<npc 'A28'>><<gt 'father'>><</npc>> is busy putting on his clothes.
+		<</if>>
+	</p>
 
 
 	<<ConnectedLocationCode 'Hallway' 'locations/pavlovsk/resident/apartment/home/korrPar.webp' 1>>
 		<<gt 'korrPar'>>
 	<</ConnectedLocationCode>>
-	<<if Object.keys(_sleepingNPCs).length == 0>>
+
+
+	<<if _presentNPCCount == 0>>
 		You notice a book laying on the bed.
 		<<act "Open Book">><<gt 'parents_kamasutra'>><</act>>
 		<<act 'Open Wardrobe'>><<gt 'parents_wardrobe'>><</act>>
 		<<act 'Steal condoms' undefined `{repeatReset:{days:4}}`>>
 			<<gt 'parents_steal_condoms'>>
 		<</act>>
-		/*<<if $prezikday != $time.daystart>>
-			<<if getvar("$prezikProver") >= 3>>
-				<!--TODO: Redo Logic -->
-				<<set $prezikday = $time.daystart - 4>>
-				<<actCLA 'Steal condoms from your parents` stash'>>
-					<<set $menu_off = 1>>
-					<<set $time.minutes += rand(5,7)>>
-					<<if getvar("$preziktype") == 0>>
-
-
-					<</if>>
-					<<if getvar("$preziktype") == 1 or getvar("$preziktype") == 2>>
-						<<set $prezikcount += rand(1,3)>>
-
-					<</if>>
-					<<set $prezikday = $time.daystart>>
-					<<set $prezikProver = 0>>
-
-				<</actCLA>>
-			<</if>>
-		<</if>>*/
 	<</if>>
 :: parents_steal_condoms[event]
 	<<set _count = rand(1,3)>>

+ 3 - 3
sugarcube/src/locations/home_parents/kitchen.tw

@@ -55,7 +55,7 @@
 <<if _location_mum.location == 'home'>>
 	<<if _location_mum.activity.includes('breakfast')>>
 		<<if _location_mum.activity.includes('prepare')>>
-			<p><<npc 'A29' undefined 'Your mother'>><</npc>> is here, busy making breakfast.</p>
+			<p><<npc 'A29' undefined 'Your mother'>><<gt 'mother'>><</npc>> is here, busy making breakfast.</p>
 		<<elseif _location_mum.activity.includes('cleanup')>>
 			Your <<npc $npc_mother 'mother'>><<gt 'mother'>><</npc>> is here clearing away the breakfast dishes.
 		<<else>>
@@ -101,9 +101,9 @@
 /* ----- Anya ----- */
 <<if _location_anya.location == 'home'>>
 	<<if _location_anya.activity.includes('breakfast')>>
-		<<set _breakfastNPCs['A33'] = {contents:"<<gt 'sister_chat' 'sister_chat'>>"}>>
+		<<set _breakfastNPCs['A33'] = {contents:"<<gt 'sister'>>"}>>
 	<<elseif _location_anya.activity.includes('dinner')>>
-		<<set _dinnerNPCs['A33'] = {contents:"<<gt 'sister_chat' 'sister_chat'>>"}>>
+		<<set _dinnerNPCs['A33'] = {contents:"<<gt 'sister'>>"}>>
 	<</if>>
 <</if>>
 

+ 2 - 2
sugarcube/src/locations/pavlov/hotel/pav_hotel.tw

@@ -177,8 +177,8 @@ setup.npcs["pav_hotel_receptionist"] = {
 	<<actCLA '<b>Work as a maid</b>'>>
 		<<image 'locations/pavlovsk/hotel/resep.girl0,#.jpg' 0 10>>
 		You report in for work at the front desk
-		<<if !$q.hotel_maid.get("introduced")>>
-			<<run $q.hotel_maid.set('introduced',true)>>
+		<<if !$quest('hotel_maid').get("introduced")>>
+			<<run $quest('hotel_maid').set('introduced',true)>>
 			<<set $npc('pav_hotel_receptionist').nameknown = true>>
 			<p>
 				The brunette manning the desk quickly makes sure no customers will need her for a minute.

+ 5 - 5
sugarcube/src/locations/pavlov/hotel/pav_hotelAdmin.tw

@@ -2,13 +2,13 @@
 <h2>Administration room of the Pavlovsk hotel</h2>
 <<image "locations/pavlovsk/hotel/goteladmin.jpg">>
 Behind his desk, a man of about 30 is busy with some paperwork. He's dressed quite sharply, and you had never expected the hotel manager would be this young.
-<<if $q.questIsStarted('hotel_maid') and $q.hotel_maid.stage < 10>>
+<<if $q.questIsStarted('hotel_maid') and $quest('hotel_maid').stage < 10>>
 	<<actCLA 'Ask about the maid job'>>
 		<<image "locations/pavlovsk/hotel/goteladmin.jpg">>
 		<<set $time.minutes += 5>>
 		<p>You approach the man's desk, but he doesn't look up from his work. With a soft voice you carefully try to get his attention: "Umm... excuse me?"</p>
 		<p>He looks up from his desk: "Oh I'm sorry, I didn't hear you come in. Hello, I'm Herman Leonidovich, manager of this hotel. Is there a problem?"</p>
-		<<if $q.hotel_maid.stage == 0>>
+		<<if $quest('hotel_maid').stage == 0>>
 			<p>You smile and shake your head: "No, no problem. I am looking for a job, I hear you are often looking for maids?"</p>
 			<p>
 				You can feel his eyes exploring your body for a moment before he responds: "Yes, we are! We currently only have a part-time vacancy, for a maid.
@@ -18,11 +18,11 @@ Behind his desk, a man of about 30 is busy with some paperwork. He's dressed qui
 		<</if>>
 		<p>
 			You would be working between 16:00 and 19:00, give or take. Most of the hotel rooms are empty then, before the new guests come in.
-			You can work any day you like, no pressure. It would pay <<money $q.hotel_maid.get('salary')>> per shift. After your work, you can immediately go collect your salary at the reception, or you can save it up and collect it all at once later. Does that sound good to you?"
+			You can work any day you like, no pressure. It would pay <<money $quest('hotel_maid').get('salary')>> per shift. After your work, you can immediately go collect your salary at the reception, or you can save it up and collect it all at once later. Does that sound good to you?"
 		</p>
 		<<actCLA '"That sounds great!"'>>
 			<<set $time.minutes += 5>>
-			<<run $q.hotel_maid.setStage(10)>>
+			<<run $quest('hotel_maid').setStage(10)>>
 			<h2>Administration room of the Pavlovsk hotel</h2>
 			<<image "locations/pavlovsk/hotel/goteladmin.jpg">>
 			<p>You beam: "That sounds fantastic, thank you so much!"</p>
@@ -36,7 +36,7 @@ Behind his desk, a man of about 30 is busy with some paperwork. He's dressed qui
 			<</actCLA>>
 		<</actCLA>>
 		<<actCLA '"Sorry, not interested"'>>
-			<<run $q.hotel_maid.setStage(1)>>
+			<<run $quest('hotel_maid').setStage(1)>>
 			<h2>Administration room of the Pavlovsk hotel</h2>
 			<<image "locations/pavlovsk/hotel/goteladmin.jpg">>
 			You frown: "Sorry for wasting your time, but that's not something for me."

+ 4 - 4
sugarcube/src/locations/pavlov/hotel/pav_hotelReception.tw

@@ -22,14 +22,14 @@
 			<</actCLA>>
 		<</actCLA>>
 	<<else>>
-		<<if $q.hotel_maid.paymentsLeft > 0>>
+		<<if $quest('hotel_maid').paymentsLeft > 0>>
 			<<actCLA 'Collect your money'>>
 				<<image 'locations/pavlovsk/hotel/resep.girl0,#.jpg' 0 10>>
-				<<set _moneyEarned = $q.hotel_maid.paymentsLeft * $q.hotel_maid.get('salary')>>
-				<<set $q.hotel_maid.paymentsLeft = 0>>
+				<<set _moneyEarned = $quest('hotel_maid').paymentsLeft * $quest('hotel_maid').get('salary')>>
+				<<set $quest('hotel_maid').paymentsLeft = 0>>
 				<<set $finances.cash += _moneyEarned>>
 				<p>She quickly checks the computer and then gives you <<money _moneyEarned>> for all the shifts you worked in the hotel.</p>
-				<<if $q.hotel_maid.workTotal >= rand(8,10) and getvar("$nichHotelReferral") == 0>>
+				<<if $quest('hotel_maid').workTotal >= rand(8,10) and getvar("$nichHotelReferral") == 0>>
 					<p>"You are doing a good job as our maid. Did you ever think about working as a maid full-time? I know of a person who's living in the city and is looking for a live-in maid. The job also pays well."</p>
 					She hesitates for a second.
 					<p>"I could write you a referral. He wouldn't invite you for a job interview without one. But the boss wouldn't like me referring his maids to another employer. That's why I require you to pay me 5.000 <b>₽</b> for my troubles. Just look at it as a small fee. Just tell me if you want the job and have the money."</p>

+ 9 - 9
sugarcube/src/locations/pavlov/hotel/pav_hotelWork.tw

@@ -221,12 +221,12 @@
 	<</actCLA>>
 
 :: pav_hotelWork_maid_start[event gt]
-	<<set $q.hotel_maid.today = {}>>
+	<<set $quest('hotel_maid').today = {}>>
 	<<gs 'pav_hotelWork_maid'>>
 
 :: pav_hotelWork_maid_end[event gs]
-	<<run $q.hotel_maid.inc('workTotal')>>
-	<<run $q.hotel_maid.inc('paymentsLeft')>>
+	<<run $quest('hotel_maid').inc('workTotal')>>
+	<<run $quest('hotel_maid').inc('paymentsLeft')>>
 	<<run $wardrobe.wearLastWorn('hotel_maid_work',true)>>
 	<<addtime 5>>
 	<<image "locations/pavlovsk/hotel/maid.cloth6.jpg">>
@@ -508,8 +508,8 @@
 						<<gt 'pav_hotelWork_maid'>>
 					<</actCLA>>
 				<</if>>
-			<<or $q.hotel_maid.today.coupleEvent ? 0 : 5>>
-				<<set $q.hotel_maid.today.coupleEvent = true>>
+			<<or $quest('hotel_maid').today.coupleEvent ? 0 : 5>>
+				<<set $quest('hotel_maid').today.coupleEvent = true>>
 				<p>
 					While you are cleaning the room, a man, a woman and 2 young children enter the room.
 					When the man sees you he says: "Oh girl you are sent by the heavens, can you please take my children for a walk so my wife and I can spend some 'alone' time."
@@ -567,8 +567,8 @@
 				<<actCLA 'Continue'>>
 					<<gt 'pav_hotelWork_maid'>>
 				<</actCLA>>
-			<<or $q.hotel_maid.today.guyBoundEvent ? 0 : 5>>
-				<<set $q.hotel_maid.today.guyBoundEvent = true>>
+			<<or $quest('hotel_maid').today.guyBoundEvent ? 0 : 5>>
+				<<set $quest('hotel_maid').today.guyBoundEvent = true>>
 				<<set $time.minutes += 30>>
 				<<image "locations/pavlovsk/hotel/cuffed.jpg">>
 				You enter the room and to your surprise you can see a naked man handcuffed to the bed.
@@ -849,8 +849,8 @@
 						<</actCLA>>
 					<</actCLA>>
 				<</either>>
-			<<or ($npcs.get('A25','slutStatus',0) == 5 && !$q.hotel_maid.today.soniaSeen) ? 40 : 0>>
-				<<set $q.hotel_maid.today.soniaSeen = true>>
+			<<or ($npcs.get('A25','slutStatus',0) == 5 && !$quest('hotel_maid').today.soniaSeen) ? 40 : 0>>
+				<<set $quest('hotel_maid').today.soniaSeen = true>>
 				<<either 20>>
 					<<image 'characters/pavlovsk/school/girl/sonia/sex/hotel/sonia.hotel.boy0,#.jpg' 0 4>>
 					<p>You open the door to the next room, and immediately freeze in place when you hear gagging sounds coming from inside. Curious as you are, you decide to sneak a peek and see what's happening in the room. When you look around the corner, you see a girl giving a guy an enthusiastic blowjob, happily gagging on his cock while she tries to take it down her throat over and over. Wait a minute... that's Sonia, from your class!</p>

+ 3 - 3
sugarcube/src/locations/pavlov/hotel/quest_hotel_maid.tw

@@ -3,8 +3,8 @@
 	<<case 'title'>>
 		<<set $result ="Hotel Maid">>
 	<<case 'start'>>
-		<<set $q.hotel_maid.workTotal = 0>>
-		<<set $q.hotel_maid.paymentsLeft = 0>>
+		<<set $quest('hotel_maid').workTotal = 0>>
+		<<set $quest('hotel_maid').paymentsLeft = 0>>
     <<case 'stageDescription'>>
 		<<switch $location_var[$here][1]>>
 			<<case 0>>
@@ -23,7 +23,7 @@
     <<case 'vars'>>
 		<<switch $location_var[$here][1]>>
 			<<case 'isMaid'>>
-                <<set $result = ($q.questIsActive('hotel_maid') && $q.hotel_maid.stage >= 10)>>
+                <<set $result = ($q.questIsActive('hotel_maid') && $quest('hotel_maid').stage >= 10)>>
 			<<case 'salary'>>
                 <<set $result = 375>>
         <</switch>>

+ 0 - 1
sugarcube/src/npcs/_npcstatic/compiled/npcstatic1compiled.js

@@ -868,7 +868,6 @@ setup.npcs["A32"] = {
 setup.npcs["A33"] = {
 	dna:'1429755064 1545843327 1198040660 1962976090 1780199176 1936146603 2049979334',
 	firstname:'Anya',
-	nickname:'Sister',
 	lastname:'Incorrect Initialization: $pc.name_last',
 	notes:'Your older sister',
 	dob:19970816,

+ 19 - 3
sugarcube/src/npcs/_system/NPC.js

@@ -14,12 +14,16 @@ class NPC{
 		if(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(target), prop)?.get){
 			return target[prop];
 		}
+		if(typeof target[prop] === 'function')
+			return new Proxy(target[prop], {
+				apply: (functionName, thisArg, argumentsList) =>  Reflect.apply(functionName, target, argumentsList)
+			});
+			
 		return target.get(prop);
 	}
 
 	static handler = {
 		get(target, prop) {
-
 			if(prop.endsWith('_possessive')){
 				prop = prop.replace('_possessive','');
 				let value = NPC._getHandler(target,prop);
@@ -95,6 +99,11 @@ class NPC{
 		return Math.max(Math.ceil(ds_average / 5),0);
 	}
 	get fullname(){return this.get('firstname')+' '+this.get('lastname');}
+
+	get location(){
+		return NPC.DICT.location(this._npcID);
+	}
+
 	get title(){
 		switch (this.get('gender')) {
 			case 0:
@@ -107,12 +116,13 @@ class NPC{
 	}
 	get titlename(){return `${this.title} ${this.get('lastname')}`;}
 	get usedname(){
-		switch (this.get('nameScheme','firstname')) {
+		switch (this.get('nameScheme')) {
 			case 'title_lastname':
 				return this.titlename;
 			case 'firstname':
-			default:
 				return this.get('firstname');
+			default:
+				return this.get('nickname') || this.get('firstname');
 		}
 	}
 
@@ -127,6 +137,12 @@ class NPC{
 		return NPC.DICT.set(this._npcID,key,v);
 	}
 
+
+	endActivity(activity=undefined){
+		console.warn('endActivity',this);
+		return NPC.DICT.endActivity(this._npcID,activity);
+	}
+
 	constructor(npcId=undefined){
 		if(npcId)
 			this._npcID = npcId;

+ 11 - 2
sugarcube/src/npcs/_system/NPCsDict.js

@@ -639,6 +639,15 @@ class NPCsDict{
 		return locationInformation.activity.includes(activity);
 	}
 
+	endActivity(npcId,activity=undefined){
+		const currentLocationData = this.location(npcId);
+		if(activity && !this.atActivity(npcId,activity))
+			return;
+		const timeWhenNextActivityStarts = new Date(currentLocationData.end.getTime()+1);
+		this._updateLocation(npcId,timeWhenNextActivityStarts);
+		return this.location(npcId);
+	}
+
     location(npcId){
         let locationInformation = this.get(npcId,'location',{});
 
@@ -660,14 +669,14 @@ class NPCsDict{
         return locations;
     }
 
-    _updateLocation(npcId){
+    _updateLocation(npcId,dateTime=undefined){
 		const time = State.variables.time;
         const npcPassage = this.get(npcId,'passage');
 		if(Story.has(npcPassage)){
 			const timetable = func(npcPassage,'timetable');
 			if(!timetable)
 				console.error('NPC Passage does not feature a timetable',npcPassage);
-			const timetableLookupResult = time.timetableLookup(timetable);
+			const timetableLookupResult = time.timetableLookup(timetable,dateTime);
 			const locationObject = Object.assign({end:time.time(...timetableLookupResult.nextStartTime)},timetableLookupResult.current);
 			this.set(npcId,'location',locationObject);
 		}

+ 44 - 32
sugarcube/src/npcs/family/mother/mother.tw

@@ -6,47 +6,59 @@
 <!-- !! Saturday gone a couple of hours in the day to do laundry again, no scene just a time she won''t be home.-->
 <!-- !! Sunday after noon, gone to church for a couple of hours. I will write a scene where Sveta can run into her at the church.-->
 <!-- !! plus need to set the times where she goes to visit Sergey-->
-<<set $delin_beh ??= 0>> <!-- Counter for being send away over summer -->
+<!--<<set $delin_beh ??= 0>> <!-- Counter for being send away over summer -->
 
 <<set _motherAge = $npc($npc_mother).age>>
 <<set _motherRel = $npc('A29').rel>>
+<<set _location_mum = $npcs.location('A29')>>
 
 <h2>Your mother, <<=$npc('A29').firstname>> <<=$npc('A29').lastname>></h2>
-<<image "characters/pavlovsk/resident/mom/mother.jpg">>
-<p>Your mother <<=$npc('A29').firstname>> is still quite young and attractive. She's only _motherAge years. She works at the station cafe.</p>
-
-/*<p>
-	<<if _motherRel < 20>>
-		<<negative 2>>Your relationship with your mother is terrible.<</negative>>
-	<<elseif _motherRel < 40>>
-		<<negative>>Your relationship with your mother is tense.<</negative>>
-	<<elseif _motherRel < 60>>
-		You have a normal relationship with your mother.
-	<<elseif _motherRel < 80>>
-		<<positive>>You have a good relationship with your mother.<</positive>>
-	<<else>>
-		<<positive 2>>You have a great relationship with your mother.<</positive>>
-	<</if>>
-</p>*/
-<<act 'Chat' undefined `{time:15}`>>
-	<<gt 'mother_chat'>>
-<</act>>
-<<act 'Offer to help around the house' undefined `{time:60,mood:50}`>>
-	<<gt 'mother_help_in_house'>>
-<</act>>
-<<if $pc.isSchoolStudent>>
-	<<actCLA 'Ask for some money'>>
-		<<gt 'mother_ask_money'>>
-	<</actCLA>>
-	<<if $time.hour < 19>>
-		<<actCLA 'Ask to go shopping for some new clothes'>>
-			<<gt 'mother_ask_new_clothes'>>
-		<</actCLA>>
+
+<<if _location_mum.activity.includes('breakfast') and  _location_mum.activity.includes('prepare')>>
+	<<image "characters/pavlovsk/resident/mom/cooking.jpg">>
+	<p>
+		Your mother <<=$npc('A29').firstname>> is preparing breakfast. "Sorry, $pc.name_nick, I have no time to talk with you right now."
+	</p>
+<<else>>
+
+	<<image "characters/pavlovsk/resident/mom/mother.jpg">>
+	<p>Your mother <<=$npc('A29').firstname>> is still quite young and attractive. She's only _motherAge years. She works at the station cafe.</p>
+
+	/*<p>
+		<<if _motherRel < 20>>
+			<<negative 2>>Your relationship with your mother is terrible.<</negative>>
+		<<elseif _motherRel < 40>>
+			<<negative>>Your relationship with your mother is tense.<</negative>>
+		<<elseif _motherRel < 60>>
+			You have a normal relationship with your mother.
+		<<elseif _motherRel < 80>>
+			<<positive>>You have a good relationship with your mother.<</positive>>
+		<<else>>
+			<<positive 2>>You have a great relationship with your mother.<</positive>>
+		<</if>>
+	</p>*/
+	<<act 'Chat' undefined `{time:15}`>>
+		<<gt 'mother_chat'>>
+	<</act>>
+
+	<<if _location_mum.location == "home">>
+		<<act 'Offer to help around the house' undefined `{time:60,mood:50}`>>
+			<<gt 'mother_help_in_house'>>
+		<</act>>
+		<<if $pc.isSchoolStudent>>
+			<<actCLA 'Ask for some money'>>
+				<<gt 'mother_ask_money'>>
+			<</actCLA>>
+			<<if $time.hour < 19>>
+				<<actCLA 'Ask to go shopping for some new clothes'>>
+					<<gt 'mother_ask_new_clothes'>>
+				<</actCLA>>
+			<</if>>
+		<</if>>
 	<</if>>
 <</if>>
 
 
-
 <<ret>>
 
 :: mother_old

+ 35 - 2
sugarcube/src/npcs/family/sister/sister.tw

@@ -1,6 +1,39 @@
-:: sister
+:: sister[event]
 <!-- !!model Valentina Azarov - Megan Vale - Lupe Burnett-->
 
+<<set _location_sister ??= $npcs.location('A33')>>
+
+<<switch $location_var[$here][0]>>
+	<<case undefined>>
+		<<if _location_sister.activity.includes('breakfast')>>
+			<<gs 'sister' 'breakfast'>>
+		<<elseif _location_sister.activity.includes('cleanBreakfast')>>
+			<<gs 'sister' 'cleanBreakfast'>>
+		<<else>>
+			dressingUp
+			dinner
+			communityCenter - friends / workout
+			cleanDinner
+		<</if>>
+	<<case 'breakfast'>>
+		<h2><<=$npc('A33').firstname>></h2>
+		<<image 'locations/pavlovsk/resident/apartment/home/breakfasthome.jpg'>>
+		<<act 'Join Breakfast (0:20)'>>
+			<<gt 'breakfast_family'>>
+		<</act>>
+		<p>
+			<<npc 'A33'>><</npc>> is eating breakfast with the other members of the family. You could join them.
+		</p>
+		<<ret>>
+	<<case 'cleanBreakfast'>>
+		<h2><<=$npc('A33').firstname>></h2>
+		<<image 'locations/pavlovsk/resident/apartment/home/breakfastCleanup.jpg'>>
+		<p>
+			<<npc 'A33'>><</npc>> is budy cleaning the breakfast table.
+		</p>
+		<<ret>>
+<</switch>>
+/*
 <h2><<=$npc('A33').firstname>></h2>
 <<image "characters/pavlovsk/resident/anya/sister#.jpg" 1 3>>
 Your sister <<=$npc('A33').firstname>> is a bit older than you. She is <<=$npc($npc_sister).age>> years old. She graduated from school, but didn''t go to the university. She works at Pavlovsk''s local supermarket.
@@ -545,4 +578,4 @@ Your sister <<=$npc('A33').firstname>> is a bit older than you. She is <<=$npc($
 	<<actCLA 'Leave'>>
 		<<gt 'pav_commcenter'>>
 	<</actCLA>>
-<</if>>
+<</if>> */

+ 26 - 17
sugarcube/src/npcs/family/stepfather/father.tw

@@ -1,22 +1,31 @@
-:: father_header[include]
-	<h2>Your stepfather, <<=$npc('A28').firstname>> <<=$npc('A28').lastname>></h2>
-	<<image "characters/pavlovsk/resident/vladimir/father.jpg">>
-
 :: father[event]
-<!-- !! Model used - anton nilsson-->
+	<!-- !! Model used - anton nilsson-->
+	<<set _location_dad = $npcs.location('A28')>>
 	<<set $pc.fatherAge = $npc($npc_father).age>>
-	<<gs 'father_header'>>
-	
-	<<=$npc($npc_father).notes>> He is $pc.fatherAge years old.
-	<<fatherRep>>
-	<<ret 'Move away'>>
-
-	<<actCLA 'Ask for money'>>
-		<<addtime 2>>
-		<<gs 'father_header'>>
-		You ask your stepfather for some money, but he shakes his head in response: "I already gave my salary to your mother, go ask her."
-		<<ret 'Move away'>>
-	<</actCLA>>
+
+	<h2>Your stepfather, <<=$npc('A28').fullname>></h2>
+
+	<<if _location_dad.activity.includes('dressingUp')>>
+		<<image "characters/pavlovsk/resident/vladimir/dressSelect.jpg">>
+		<p>
+			<<npc 'A28'>><</npc>> is standing in front of the wardrobe, deciding what to wear today. "Not now, $pc.name_nick, I need to get dressed."
+		</p>
+	<<else>>
+		<<image "characters/pavlovsk/resident/vladimir/father.jpg">>
+		
+		<<=$npc($npc_father).notes>> He is $pc.fatherAge years old.
+		/*<<fatherRep>>*/
+
+		<<actCLA 'Ask for money'>>
+			<<addtime 1>>
+			<h2>Your stepfather, <<=$npc('A28').fullname>></h2>
+			<<image "characters/pavlovsk/resident/vladimir/father.jpg">>
+			You ask your stepfather for some money, but he shakes his head in response: "I already gave my salary to your mother, go ask her."
+			<<ret 'Move away'>>
+		<</actCLA>>
+	<</if>>
+
+	<<ret>>
 
 :: father_events
 /*