Skip to content

Commit

Permalink
Merge pull request #6754 from vtcifer/t2_warn_when_out_of_things_to_do
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtraDR authored Jan 15, 2024
2 parents 13e4955 + 739194f commit b8cf54e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t2.lic
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class T2
trainables = @settings['training_list']
EquipmentManager.new.empty_hands

# should only stay true if it gets through the below loop without executing anything.
warn_user = true
trainables.each do |trainable|
# Skip if learning rate is above start threshold for this trainable
if trainable['skill'].is_a?(Array)
Expand Down Expand Up @@ -81,8 +83,14 @@ class T2
execute_actions(trainable['scripts'])
update_cooldown(trainable['skill']) if has_cooldown?(trainable['skill'])
echo "***STATUS*** Completed #{trainable_title} in #{Time.at(Time.now - trainable_start_time).strftime("%Mm:%Ss")}"
warn_user = false
break
end
if warn_user
DRC.message("Ran out of things to do - please read the T2 tutorial if you see this message.\n https://github.com/rpherbig/dr-scripts/wiki/T2-Tutorial")
DRC.message("Sleeping 5 seconds.")
pause 5
end
end
if !@settings.t2_after_shutdown.empty?
echo "***STATUS*** Controlled shutdown, executing shutdown actions."
Expand Down

0 comments on commit b8cf54e

Please sign in to comment.