diff options
author | David Gay <david@davidgay.org> | 2021-06-04 10:46:47 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-04 10:46:47 -0400 |
commit | 341737fc160a77a282713e76cc6f522e36f122b5 (patch) | |
tree | f79da564a5d5c85e3a68f1b3041633c2594839cb /app/models | |
parent | 31cb12b7a9aee6581c21310dcf9adbf2c4c49ac4 (diff) |
Don't start progress bar halfway done due to rested time
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/character.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index 8a72ccd..b4e597b 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -210,7 +210,7 @@ class Character < ApplicationRecord end def percentage_of_activity_completed - (1 - (activity_time_remaining / activity_duration)) * 100 + (1 - (activity_time_remaining / (activity_duration - rested_duration_to_spend_on_activity))) * 100 end def rested_duration_to_spend_on_activity |