-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daytime Sleeping & en_us.json Improvements #48
Conversation
FIX: Added missing config option en_us.json entries REFACTOR: Updated some tooltips to be easier to read on bigger GUI sizes(notably the longer tooltips) REFACTOR: Updated the title language entry ever so slightly
FEAT: Added a new config option to enable/disable sleeping through the day! (fixes steves-underwater-paradise#21) FEAT: Config options to enable/disable time until dusk message REFACTOR: Some changes on how nighttime is detected, now always using a boolean form SleepMath instead of calculating it each time it is needed REFACTOR: Some additional changes to en_us.json
I forgot to mention this earlier, but I also added missing translation keys in en_us.json for some of the config options. |
Hi Superkat, this PR looks really good! Thanks a lot for the contribution, good luck with the rest of Modtoberfest (and beyond)! |
Glad you like it! It was a lot of fun to put together. Modtoberfest has challenged me to do things I never would've thought of doing, and it's been really great. If there's anything that needs changing, I can definitely change it. |
Thanks for the contribution Superkat! I'll try to get this released today. |
No worries! Don't feel the need to rush a release out if you don't have the time. Thanks for merging! |
(cherry picked from commit 6cd8241)
This PR does 2 main things.
Daytime Sleeping:
Sleeping through the day to dusk is now possible. It can be optionally toggled in the config, along with some other config options for the seconds until dusk message and the night time message. For the night time message, I decided to make it "The night begins." instead of "The moon rises", as I felt like the second option would have been too obvious. However, this is easily changeable in the config. Additionally, I also renamed the "WAKE_UP_TIME" int to be "SUNRISE_WAKE_UP", as a second
private static int
needed to be added.The actual daytime sleeping works by using a FabricApi method, which also works with Quilt in my quick testing. It then checks if the config option is enabled or disabled, then decides what to do from there. If enabled, it allows the user to sleep in the bed(even during the day), otherwise, it returns the vanilla action.
en_us.json Improvements:
Firstly, lots of the longer tooltips have been reduced in length to be more easily readable on larger GUI sizes. I made this its own commit so it should be easy to reverse if you don't like it. Secondly, the config title has changed from "Realistic Sleep mod config" to "Realistic Sleep Config". This helps make it seem more in line with other config titles(e.g. Video Settings, Key Binds, Mouse Settings, Mod Menu Options, etc.)
Video:
A quick video showcase of the PR. Happy Modtoberfest!
daytimeSleeping.mp4