|
@@ -3,37 +3,38 @@ $sleep_loc = 'sleep'
|
|
|
|
|
|
!! Deals with the sleep cycle, advancing both time and stats during sleep.
|
|
|
!!
|
|
|
-!! Moved here from dream_events
|
|
|
+!! Moved here from pre_sleep
|
|
|
+!! Move to dream_events. Then back to sleep (this location).
|
|
|
!! When busy moves back and forth to sleep_events (and can be redirected from there)
|
|
|
!! When done: Move to wakeup
|
|
|
|
|
|
if $ARGS[0] = 'full':
|
|
|
- msg 'gt ''sleep'', ''full'' is depricated! If you did not load an old save, please report this bug.'
|
|
|
- gt 'pre_sleep_events', 'start'
|
|
|
+ msg 'gt ''sleep'', ''full'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
|
|
|
+ gt 'pre_sleep', 'start'
|
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'sleep':
|
|
|
- msg 'gt ''sleep'', ''sleep'' is depricated! If you did not load an old save, please report this bug.'
|
|
|
+ msg 'gt ''sleep'', ''sleep'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
|
|
|
gt 'pre_sleep', 'prepare_sleep'
|
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'dream':
|
|
|
- msg 'gt ''sleep'', ''dream'' is depricated! If you did not load an old save, please report this bug.'
|
|
|
- gt 'dream_events', 'start'
|
|
|
+ msg 'gt ''sleep'', ''dream'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
|
|
|
+ gt 'sleep', 'start'
|
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'wake':
|
|
|
- msg 'gt ''sleep'', ''wake'' is depricated! If you did not load an old save, please report this bug.'
|
|
|
+ msg 'gt ''sleep'', ''wake'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
|
|
|
gt 'wakeup', 'start'
|
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'end':
|
|
|
- msg 'gt ''sleep'', ''end'' is depricated! If you did not load an old save, please report this bug.'
|
|
|
+ msg 'gt ''sleep'', ''end'' is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
|
|
|
gt 'bed_get_out', 'start'
|
|
|
end
|
|
|
|
|
|
if $ARGS[0] = '':
|
|
|
- msg 'gt ''sleep'', is depricated! If you did not load an old save, please report this bug.'
|
|
|
+ msg 'gt ''sleep'', is depricated! If you did not load an old save, please report this bug. You can continue playing without worry.'
|
|
|
gt 'pre_sleep', 'start'
|
|
|
|
|
|
end
|
|
@@ -42,6 +43,11 @@ end
|
|
|
|
|
|
|
|
|
if $ARGS[0] = 'start':
|
|
|
+ menu_off = 1
|
|
|
+ gt 'dream_events', 'start'
|
|
|
+end
|
|
|
+
|
|
|
+if $ARGS[0] = 'post_dream':
|
|
|
menu_off = 1
|
|
|
!! to avoid sleeping the whole day I decide to calcululate the duration of the sleep in advance
|
|
|
!! the quality of the sleep depends on many factors, so the time of sleep can be modify later, especially the part when the time of sleep is shortened
|
|
@@ -54,6 +60,17 @@ if $ARGS[0] = 'start':
|
|
|
xgt 'sleep', 'sleep_handler'
|
|
|
end
|
|
|
|
|
|
+if $ARGS[0] = 'sleep_handler':
|
|
|
+ menu_off = 1
|
|
|
+ gs 'sleep', 'calc_minutes_to_wakeup'
|
|
|
+
|
|
|
+ if sleepVars['minutes_to_wakeup'] > 0:
|
|
|
+ xgt 'sleep', 'sleep_loop'
|
|
|
+ else
|
|
|
+ xgt 'sleep', 'post_sleep'
|
|
|
+ end
|
|
|
+end
|
|
|
+
|
|
|
if $ARGS[0] = 'calc_minutes_to_wakeup':
|
|
|
sleepVars['time_now'] = daystart * 1440 + hour * 60 + minut
|
|
|
|
|
@@ -72,17 +89,6 @@ if $ARGS[0] = 'calc_minutes_to_wakeup':
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-if $ARGS[0] = 'sleep_handler':
|
|
|
- menu_off = 1
|
|
|
- gs 'sleep', 'calc_minutes_to_wakeup'
|
|
|
-
|
|
|
- if sleepVars['minutes_to_wakeup'] > 0:
|
|
|
- xgt 'sleep', 'sleep_loop'
|
|
|
- else
|
|
|
- xgt 'sleep', 'post_sleep'
|
|
|
- end
|
|
|
-end
|
|
|
-
|
|
|
|
|
|
if $ARGS[0] = 'sleep_loop':
|
|
|
menu_off = 1
|