Преглед изворни кода

[fixed] bug related to repeated stat display. Fix found in collaboration with Awesome and Felix

anjuna krokus пре 1 месец
родитељ
комит
1514ce71dc
2 измењених фајлова са 18 додато и 18 уклоњено
  1. 14 17
      locations/stat.qsrc
  2. 4 1
      locations/stat_display.qsrc

+ 14 - 17
locations/stat.qsrc

@@ -3,11 +3,8 @@
 !!This is error catching to prevent stat from running too early
 if opPRE > 0: exit
 
-if Enable_Android = 0:
-	clr
-	!only clear status and renew object in non-Android mode
-	gs 'obj_din', 'old'
-end
+if Enable_Android = 0: gs 'obj_din', 'old'
+
 
 if daystart_start < 100:
 	pl '<BR>Did you start at the <a href="exec:daystart_start = 239 & gs ''time'' & gs''stat''">end of August</a> or <a href="exec:daystart_start = 153 & gs ''time'' & gs''stat''">beginning of June</a>?'
@@ -18,7 +15,7 @@ $BACKIMAGE = ''
 
 view
 rand1 = rand(0,100)
-$stat_msg=''
+$stat_msg[1] = ''
 
 if daystage = 1:
 	$daystage['desc'] = 'dawn'
@@ -149,7 +146,7 @@ if $start_type[1] ! 'nomagic':
 	if pcs_magik > magikhigh:
 		magikhigh = pcs_magik
 		rikudo += pcs_magik * 100
-		$stat_msg += '<BR><b>You feel like a strength has been revealed within you, and you gush with magic, lifting you to a new energy level.</b>'
+		$stat_msg[1] += '<BR><b>You feel like a strength has been revealed within you, and you gush with magic, lifting you to a new energy level.</b>'
 !!		This will be replaced when a more advanced physical system is made
 		if (pcs_magik mod 2 ! 0) and pcs_eyesize < 2: pcs_eyesize += 1
 		if (pcs_magik mod 2 = 0) and pcs_lashes < 2: pcs_lashes += 1
@@ -592,7 +589,7 @@ else
 							sucabscum = 1
 							gs 'cum_cleanup', 'cleandeposit', suctemparr
 							cumloc[suctempi] = 0
-							!debug code $stat_msg += '<BR>Absorb ext <<sexnutrition>>'
+							!debug code $stat_msg[1] += '<BR>Absorb ext <<sexnutrition>>'
 						end
 					end
 					if suctempi < 17:jump 'SuccAbsorbLoop'
@@ -616,9 +613,9 @@ else
 						$sucabs1 = 'absorbed energy from the woman you had sex with'
 					else
 						!!Debug code
-						$stat_msg += '<BR>SOMETHING HAPPENED!'
+						$stat_msg[1] += '<BR>SOMETHING HAPPENED!'
 					end
-					$stat_msg += '<BR>You <<$sucabs1>><<$sucabs2>><<$sucabs3>>, gaining nourishment.'
+					$stat_msg[1] += '<BR>You <<$sucabs1>><<$sucabs2>><<$sucabs3>>, gaining nourishment.'
 					sucabslez = 0 & sucabscum = 0
 					$sucabs1 = '' & $sucabs2 = '' & $sucabs3 = ''
 					if (pcs_mood < 100): pcs_mood += ((pcs_mood / 100) * 5)
@@ -689,7 +686,7 @@ if pcs_energy < 0:
 		pcs_energy += 8
 	elseif pcs_mass['body'] = 0 and pcs_stren + pcs_vital <= 0:
 		gs 'gameover', 'check', 3
-		$stat_msg += '<br><font color=red><b>You starved to death, but Cheat Mode keeps you Alive.</b></font>'
+		$stat_msg[1] += '<br><font color=red><b>You starved to death, but Cheat Mode keeps you Alive.</b></font>'
 		fat = 1
 	elseif pcs_mass['body'] > 0:
 		if cheatVars['fat'] = 0: fat -= 1
@@ -712,7 +709,7 @@ end
 
 if pcs_health < 0:
 	gs 'gameover', 'check', 1
-	$stat_msg += '<br><font color=red><b>You died from injuries, but Cheat Mode keeps you Alive.</b></font>'
+	$stat_msg[1] += '<br><font color=red><b>You died from injuries, but Cheat Mode keeps you Alive.</b></font>'
 	pcs_health = 0
 end
 
@@ -720,7 +717,7 @@ if pcs_willpwr <= 0 :
 	!this will set willpower to 0 correctly; then check mana =1 for insane-gameover(pcs_willpwr=0&mana=1).
 	if pcs_mood <= 1:
 		gs 'gameover', 'check', 2
-		$stat_msg += '<br><font color=red><b>You are insane, but Cheat Mode keeps you Alive.</b></font>'
+		$stat_msg[1] += '<br><font color=red><b>You are insane, but Cheat Mode keeps you Alive.</b></font>'
 		!pcs_mood already checked for >=1 in line 1113 if pcs_mood <= 0, no need to set another one
 	end
 	pcs_willpwr = 0
@@ -866,9 +863,9 @@ end
 
 if hotelRoom['pav'] > 0:
 	if hotelRoomDays['pav'] - 1 = daystart:
-		$stat_msg += '<BR>You have 1 night left on your Pavlosk hotel booking.'
+		$stat_msg[1] += '<BR>You have 1 night left on your Pavlosk hotel booking.'
 	elseif hotelRoomDays['pav'] = daystart and hour < 11:
-		$stat_msg += '<BR>Your room at the Pavlosk hotel has check out today at '+func('time', 'get_time_string', 11, 0, cheatVars['time_format'])+''
+		$stat_msg[1] += '<BR>Your room at the Pavlosk hotel has check out today at '+func('time', 'get_time_string', 11, 0, cheatVars['time_format'])+''
 	elseif hotelRoomDays['pav'] = daystart:
 		hotelRoom['pav'] = 0
 	end
@@ -876,9 +873,9 @@ end
 
 if hotelRoom['city'] > 0:
 	if hotelRoomDays['city'] - 1 = daystart:
-		$stat_msg += '<BR>You have 1 night left on your St Petersburg hotel booking.'
+		$stat_msg[1] += '<BR>You have 1 night left on your St Petersburg hotel booking.'
 	elseif hotelRoomDays['city'] = daystart and hour < 11:
-		$stat_msg += '<BR>Your room at the St Petersburg hotel has check out today at '+func('time', 'get_time_string', 11, 0, cheatVars['time_format'])+''
+		$stat_msg[1] += '<BR>Your room at the St Petersburg hotel has check out today at '+func('time', 'get_time_string', 11, 0, cheatVars['time_format'])+''
 	elseif hotelRoomDays['city'] = daystart:
 		hotelRoom['city'] = 0
 	end

+ 4 - 1
locations/stat_display.qsrc

@@ -1,9 +1,12 @@
 # stat_display
 !!2021/04/04
 
+if Enable_Android = 0: clear
+
+$stat_msg = $stat_msg[1]
+
 !! --- CALL TRACE, when enabled (`debug['trace_shown'] = 1`) replaces stat_display
 if debug['trace_shown'] ! 0:
-	clear
 	p '<center>'
 	if $git_hash ! '': pl '<<$git_hash>>'
 	if debug['call_trace_selector'] = 0: