Browse Source

Merge branch 'Edited-TW' into SC-Master

Stephan Fuchs 10 months ago
parent
commit
d9118bb19c

+ 24 - 0
sugarcube/src/js/console.js

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

+ 8 - 2
sugarcube/src/locations/home_parents/hallway.tw

@@ -6,11 +6,17 @@
 	A mirror hangs on the wall near the front door.
 	A mirror hangs on the wall near the front door.
 
 
 	<<set _familyLocations = $npcs.locationGroup(['A28','A29','A33','A34'])>>
 	<<set _familyLocations = $npcs.locationGroup(['A28','A29','A33','A34'])>>
+	<<npcList _familyLocations.beach "# may be at the lake." "# may be at the lake.">>
+	<<npcList _familyLocations.communityCenter "# is at the community center." "# are at the community center.">>
+	<<npcList _familyLocations.garage "# is at the garage." "# are at the garage.">>
 	<<npcList _familyLocations.home "# should be somewhere in the apartment." "# should be somewhere in the apartment.">>
 	<<npcList _familyLocations.home "# should be somewhere in the apartment." "# should be somewhere in the apartment.">>
-	<<npcList _familyLocations.work "# is at work." "# are at work.">>
-	<<npcList _familyLocations.school "# is at school." "# are at school.">>
+	<<npcList _familyLocations.luda "# is visiting your aunt." "# are visiting your aunt.">>
 	<<npcList _familyLocations.outdoors "# is somewhere outside." "# are somewhere outside.">>
 	<<npcList _familyLocations.outdoors "# is somewhere outside." "# are somewhere outside.">>
+	<<npcList _familyLocations.party "# is at a party." "# are at a party.">>
+	<<npcList _familyLocations.school "# is at school." "# are at school.">>
+	<<npcList _familyLocations.supermarket "# is buying groceries." "# are buying groceries.">>
 	<<npcList _familyLocations.trackfield "# is at the football field." "# are at the football field.">>
 	<<npcList _familyLocations.trackfield "# is at the football field." "# are at the football field.">>
+	<<npcList _familyLocations.work "# is at work." "# are at work.">>
 	<<npcList _familyLocations.undefined "You don't know, where # is." "You don't know, where # are.">>
 	<<npcList _familyLocations.undefined "You don't know, where # is." "You don't know, where # are.">>
 
 
 	/*<<if getvar("$locat['Fam_inGad']") == 1>>
 	/*<<if getvar("$locat['Fam_inGad']") == 1>>

+ 7 - 0
sugarcube/src/notes/notes.tw

@@ -6,6 +6,13 @@
 		<<=$quest(_questId).title>>
 		<<=$quest(_questId).title>>
 	</h3>
 	</h3>
 	<<=$quest(_questId).stageDescription>>
 	<<=$quest(_questId).stageDescription>>
+	<<debug>>
+		<<capture _questId>>
+		<p>
+			Set stage: <<numberbox "$quest(_questId).stage" $quest(_questId).stage>><<button 'Confirm'>><<refresh>><</button>>
+		</p>
+		<</capture>>
+	<</debug>>
 <</for>>
 <</for>>
 
 
 <<set _failedQuests = $q.failedQuests()>>
 <<set _failedQuests = $q.failedQuests()>>

File diff suppressed because it is too large
+ 1397 - 1441
sugarcube/src/npcs/family/brother/brother_voyeur.tw


+ 5 - 1
sugarcube/src/npcs/family/brother/quest_brother_sex.tw

@@ -33,8 +33,12 @@
 				<<set $result =`You showed your pussy to your brother while you "helped" him with his homework.`>>
 				<<set $result =`You showed your pussy to your brother while you "helped" him with his homework.`>>
 			<<case 40>>
 			<<case 40>>
 				<<set $result =`You almost got caught naked while you "helped" your brother with his homework.`>>
 				<<set $result =`You almost got caught naked while you "helped" your brother with his homework.`>>
+			<<case 50>>
+				<<set $result =`You invited your brother in for a talk while showering in your parents bathroom.`>>
 			<<case 8000>>
 			<<case 8000>>
 			<<case 8000>>
 			<<case 8000>>
             <<case 10000>>
             <<case 10000>>
-	<</switch>>
+		<</switch>>
+	<<case 'stageEOC'>>
+		<<set $result = 50>>
 <</switch>>
 <</switch>>

+ 5 - 0
sugarcube/src/quests/_system/quest.css

@@ -6,6 +6,11 @@
 	position: relative;
 	position: relative;
 }
 }
 
 
+.questUpdate.endOfContent{
+	border-color:yellow;
+	background-color: rebeccapurple;
+}
+
 .questUpdate .title {
 .questUpdate .title {
 	font-size: 1.2em;
 	font-size: 1.2em;
 	font-weight: bold;
 	font-weight: bold;

+ 16 - 0
sugarcube/src/quests/_system/quest.js

@@ -108,10 +108,26 @@ class Quest{
 		this.stageHistory.push(stage);
 		this.stageHistory.push(stage);
 	}
 	}
 
 
+	
+	/**
+	 * A description of the current stage of the quest.
+	 * @readonly
+	 * @type {string}
+	 */
 	get stageDescription(){
 	get stageDescription(){
 		return func(this.passage,'stageDescription',this.stage);
 		return func(this.passage,'stageDescription',this.stage);
 	}
 	}
 
 
+	
+	/**
+	 * The last stage of the quest that has content.
+	 * @readonly
+	 * @type {number}
+	 */
+	get stageEOC(){
+		return func(this.passage,'stageEOC') || Infinity;
+	}
+
 	start(){
 	start(){
 		if(this.passageExists){
 		if(this.passageExists){
 			$.wiki("<<gs '"+this.passage+"' 'start'>>");
 			$.wiki("<<gs '"+this.passage+"' 'start'>>");

+ 18 - 3
sugarcube/src/quests/_system/questWidgets.tw

@@ -8,10 +8,25 @@
 
 
 	<<if _questToUpdate.stage <= _questStage>>
 	<<if _questToUpdate.stage <= _questStage>>
 
 
-	<<run _questToUpdate.setStage(_questStage)>>
-		<div class="questUpdate">
+		<<run _questToUpdate.setStage(_questStage)>>
+
+		
+		<<set _questStyleClass = 'questUpdate'>>
+		<<if _questStage >= _questToUpdate.stageEOC>>
+			<<set _questStyleClass += ' endOfContent'>>
+		<</if>>
+
+		<div @class="_questStyleClass">
 			<span class="title"><<=_questToUpdate.title>></span>
 			<span class="title"><<=_questToUpdate.title>></span>
-			<span class="description"><<=_questToUpdate.stageDescription>></span>
+			<span class="description">
+				<<=_questToUpdate.stageDescription>>
+				<<if _questStage >= _questToUpdate.stageEOC>>
+					<hr/>
+					This point has been marked as the end of existing content.
+					Existing events might repeat themselves, but won't push the story further.
+					The story will likely be extended in future update.
+				<</if>>
+			</span>
 			<span class="symbols">
 			<span class="symbols">
 				<<textWithTooltip "📖">>
 				<<textWithTooltip "📖">>
 					<h3>Quest Update</h3>
 					<h3>Quest Update</h3>

Some files were not shown because too many files changed in this diff