Jelajahi Sumber

[changed/fixed] cheatVars['time_format'] follows the same format as the other cheatVars. This fixes the issue that the cheatmenu wouldn't set/display the time_format correctly at the start and after the first click

anjuna krokus 3 bulan lalu
induk
melakukan
43f444b05b
2 mengubah file dengan 12 tambahan dan 11 penghapusan
  1. 1 1
      locations/Cheatmenu_din.qsrc
  2. 11 10
      locations/time.qsrc

+ 1 - 1
locations/Cheatmenu_din.qsrc

@@ -56,7 +56,7 @@ if $ARGS[0] = 'setting':
 	'Peeing: <a href="exec:										cheatVars[''pee'']					= iif(cheatVars[''pee''], 0, 1)					& dynamic $cheatmenu[$cheatmenu[''this_menu'']]"><<iif(cheatVars[''pee'']					, ''Disabled'', ''Enabled'')>></a>'
 	*nl
 	'Renaming porn movies you star in: <a href="exec:			cheatVars[''rename_porn'']			= iif(cheatVars[''rename_porn''], 0, 1)			& dynamic $cheatmenu[$cheatmenu[''this_menu'']]"><<iif(cheatVars[''rename_porn'']			, ''Enabled'', ''Disabled'')>></a>'
-	'Time format: <a href="exec: 								cheatVars[''time_format''] 			= iif(cheatVars[''time_format''] = 24, 12, 24) 	& dynamic $cheatmenu[$cheatmenu[''this_menu'']]"><<iif(cheatVars[''time_format''] = 24		, ''24 Hour'', ''12 Hour'')>></a>'
+	'Time format: <a href="exec: 								cheatVars[''time_format''] 			= iif(cheatVars[''time_format''], 0, 1) 		& dynamic $cheatmenu[$cheatmenu[''this_menu'']]"><<iif(cheatVars[''time_format'']			, ''12 Hour'', ''24 Hour'')>></a>'
 	'Remove "once a week" therapist limit: <a href="exec:		cheatVars[''therapist_schedule'']	= iif(cheatVars[''therapist_schedule''], 0, 1)	& dynamic $cheatmenu[$cheatmenu[''this_menu'']]"><<iif(cheatVars[''therapist_schedule'']	, ''Enabled'', ''Disabled'')>></a>'
 	*nl
 

+ 11 - 10
locations/time.qsrc

@@ -200,22 +200,23 @@ if $ARGS[0] = 'get_time_string':
 	if arrsize('$ARGS') = 1: ARGS[1] = hour
 	if arrsize('$ARGS') = 2: ARGS[2] = minut
 	if arrsize('$ARGS') = 3: ARGS[3] = cheatVars['time_format']
-	if ARGS[3] ! 12 and ARGS[3] ! 24: ARGS[3] = 24
-	if ARGS[3] = 12:
-		$period = 'AM'
+
+	if ARGS[3] = 0:
+		$result = '<<$mid(100 + ARGS[1], 2, 2)>>:<<$mid(100 + ARGS[2], 2, 2)>>'
+	else
+		$dateVars['period']
+		$dateVars['period'] = 'AM'
 		if ARGS[1] >= 12:
-			$period = 'PM'
-			if ARGS[1] > 12:ARGS[1] = ARGS[1] - 12
+			$dateVars['period'] = 'PM'
+			if ARGS[1] > 12: ARGS[1] -= 12
 		elseif ARGS[1] = 0:
 			ARGS[1] = 12
 		end
 		if ARGS[2] = 0:
-			$result = '<<ARGS[1]>> <<$period>>'
-		else	
-			$result = '<<$mid(100 + ARGS[1], 2, 2)>>:<<$mid(100 + ARGS[2], 2, 2)>> <<$period>>'
+			$result = '<<ARGS[1]>> <<$dateVars[''period'']>>'
+		else
+			$result = '<<$mid(100 + ARGS[1], 2, 2)>>:<<$mid(100 + ARGS[2], 2, 2)>> <<$dateVars[''period'']>>'
 		end
-	else
-		$result = '<<$mid(100 + ARGS[1], 2, 2)>>:<<$mid(100 + ARGS[2], 2, 2)>>'
 	end
 end