Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Interface "Adjust time approximations"
Purpose of change
The approximate time did not match with apparent time of day. Sunset and sunrise especially can move by several hours depending on time of year.
This led to confusing situations like it being "dead of night" at 04:20 while the sun is already up and it is fully bright.
It also seems like the original writer forgot about integer rounding on some of the times and they last one hour too late.
Fix: #58010
Describe the solution
Use mixture of clock times and sun angles to decide what time it is.
The new definitions can overlap sometimes. The one listed first in the table will be used.
Earliest sunrise/latest sunset that currently can happen ingame is at around 04:00/19:30.
Latest sunrise/earliest sunset that currently can happen ingame is at around 07:00/16:00.
I think these will work decently fine for the current game location (Boston). Once modding or travel allows changing the game latitude we will need some handling for midnight sun and polar night. But those can't happen currently.
Also adjusted
is_night()
to define night to be below -6° instead of -12° andis_twilight()
(and by proxy theis_dawn()
andis_dusk()
too) to be from -6° to -1° instead of -18 to -1°`.Describe alternatives you've considered
The survivor does not care about social construct like "time of day". If they have no clock the time approximation could be just directly based on sun angle/light levels and ignore the actual time completely.
Survival skill could also make time approximations more accurate.
Testing
Changed time with debug menu and observed the correct time descriptions.
Additional context