Bladeren bron

[added] option to use your weekend alarm as an alarm during the holidays as well

hornguy6 4 jaren geleden
bovenliggende
commit
f89f428e88
2 gewijzigde bestanden met toevoegingen van 16 en 4 verwijderingen
  1. 10 4
      locations/bed2.qsrc
  2. 6 0
      locations/budilnik.qsrc

+ 10 - 4
locations/bed2.qsrc

@@ -135,8 +135,12 @@ if $ARGS[0] = 'sleep':
 	*nl
 	if budilnikOn = 1 and ((hour => timer and week + 1 < 6) or (hour < timer and week < 6)):
 		'You run through your regular nightly routine, setting your alarm for <b>'+iif(timer < 10,'0<<timer>>','<<timer>>')+':'+iif(timerM < 10,'0<<timerM>>','<<timerM>>')+'</b>, you undress, and prepare for sleep:'
-	elseif budilnikOn = 1:
+	elseif budilnikOn = 1 and alarm_holiday = 1 and (week > 5 or kanikuli > 0):
+		'You run through your regular nightly routine, setting your alarm for <b>'+iif(timerEnd < 10,'0<<timerEnd>>','<<timerEnd>>')+':'+iif(timerEndM < 10,'0<<timerEndM>>','<<timerEndM>>')+'</b>, you undress, and prepare for sleep:'
+	elseif budilnikOn = 1 and (week > 5):
 		'You run through your regular nightly routine, setting your alarm for <b>'+iif(timerEnd < 10,'0<<timerEnd>>','<<timerEnd>>')+':'+iif(timerEndM < 10,'0<<timerEndM>>','<<timerEndM>>')+'</b>, you undress, and prepare for sleep:'
+	elseif budilnikOn = 1:
+		'You run through your regular nightly routine, setting your alarm for <b>'+iif(timer < 10,'0<<timer>>','<<timer>>')+':'+iif(timerM < 10,'0<<timerM>>','<<timerM>>')+'</b>, you undress, and prepare for sleep:'
 	else
 		'You run through your regular nightly routine, not bothering to setting your alarm, you undress, and prepare for sleep:'
 	end
@@ -302,10 +306,12 @@ if $ARGS[0] = 'dream':
 	end
 
 	alarm_now = hour * 60 + minut
-	if week < 6:
-		alarm_time = timer * 60 + timerM
-	else
+	if alarm_holiday = 1 and (kanikuli > 0 or week > 5):
+		alarm_time = timerEnd * 60 + timerEndM
+	elseif week > 5:
 		alarm_time = timerEnd * 60 + timerEndM
+	else
+		alarm_time = timer * 60 + timerM
 	end
 	alarm_set = alarm_time - rand(1,5)
 	if alarm_set <0:

+ 6 - 0
locations/budilnik.qsrc

@@ -22,6 +22,12 @@ if $ARGS[0] = 'start':
 	'<center><b><a href="exec:gt ''budilnik'', ''0''">0</a></b></center>'
 	'<center><b><a href="exec: bud_weekend = 0 & gt ''budilnik'', ''Reset''">Reset (week)</a> <a href="exec: bud_weekend = 0 & gt ''budilnik'', ''Time''">Set this time for the week</a></b></center>' 
 	'<center><b><a href="exec:  bud_weekend = 1 & gt ''budilnik'', ''Reset''">Reset (weekend)</a> <a href="exec: bud_weekend = 1 & gt ''budilnik'', ''Time''">Set this time for the weekend</a></b></center>'
+	if Storyline > 0 and alarm_holiday = 0:
+		'<center><b><a href="exec:  alarm_holiday = 1 & gt ''budilnik'', ''start''">Use weekend alarm for holidays</a></b></center>'
+	elseif Storyline > 0 and alarm_holiday = 1:
+		'<center><b><a href="exec:  alarm_holiday = 0 & gt ''budilnik'', ''start''">Stop using weekend alarm for holidays</a></b></center>'
+	end
+
 	
 	*nl
 	if budilnikOn = 0: