Explorar o código

Merge branch 'Edited-TW' into SC-Master

Stephan Fuchs hai 5 meses
pai
achega
400b11bcf4

+ 1 - 1
sugarcube/src/activities/school/events/class.tw

@@ -275,7 +275,7 @@ setup.schoolEventWeight = function(eventId,factor=10){
 	<<set _numberOfNoAttentionEvents = 4>>
 	<<set _chanceForEachNoAttentionEvent = _chanceOfNoAttentionEvent / _numberOfNoAttentionEvents>>
 	<<set _chanceOfNoAttentionEventNotFiring = 100 - _chanceOfNoAttentionEvent>>
-	<<either _chanceOfNoAttentionEventNotFiring * 10000 * 0>>
+	<<either _chanceOfNoAttentionEventNotFiring * 10000>>
 		<<event setup.schoolEventPriority('class_envy') setup.schoolEventWeight('class_envy')>>
 			<<set $quest('school').eventDays.class_envy = $time.daystart>>
 			<<image "locations/pavlovsk/school/events/scoolrand_9.jpg">>

+ 1 - 0
sugarcube/src/js/func.js

@@ -20,6 +20,7 @@ window.func = function(dest,arg0=undefined,arg1=undefined,arg2=undefined,arg3=un
     State.variables.here = dest;
 
     let cached_result = State.variables.result;
+    //State.variables.result = undefined;
     $.wiki(`<<include "${dest}">>`);
     let result = State.variables.result;
 

+ 0 - 1
sugarcube/src/npcs/_system/NPC.js

@@ -27,7 +27,6 @@ class NPC{
 					return value+"'"; //https://dictionary.cambridge.org/grammar/british-grammar/possession-john-s-car-a-friend-of-mine
 				return value + "'s";
 			}
-
 			return NPC._getHandler(target,prop);
 			
 		},

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

@@ -68,10 +68,10 @@ class NPCsDict{
 	 *
 	 * @param {string} npcId
 	 * @param {string} field
-	 * @param {*} [def='']
+	 * @param {*} [def=undefined]
 	 * @returns {*}
 	 */
-	get(npcId,field,def=''){
+	get(npcId,field,def=undefined){
 		let data = this.npcData(npcId);
 
 		if(field in data)

+ 1 - 1
sugarcube/src/quests/_system/quest.js

@@ -45,7 +45,7 @@ class Quest{
 		return resultFromPassage
 	}
 
-	get(field,def=0){
+	get(field,def=undefined){
 		if(field in this)
 			return this[field];
 		let resultFromPassage = func(this.passage,'vars',field);

+ 1 - 1
sugarcube/src/quests/quests.js → sugarcube/src/quests/_system/quests.js

@@ -50,7 +50,7 @@ class QuestsDict{
 	 * @param {string} field
 	 * @param {*} def
 	 */
-	get(questId,field,def=0){
+	get(questId,field,def=undefined){
 		if(!this.questIsActive(questId))
 			return def;
 		return this._quests[questId].get(field,def);