Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
nice walpaper
I did notice that your original statement should have made sense, but I didn't think that it may have been an issue with using currentTime instead of currentHour, Glad I could help!
I just messed up the variable names :) The correct code is:
if(currentHour >= morningStarts && currentHour < dayStarts){
showDayPart(DayPart.Morning);
}
I modified the If arguments to start with this and it seemed to have done the trick, of course I may have broken the code but I guess I'll find out in the morning. I would recommend @RedMagic update the code to follow this for those who are night owls and occasionally restart their PC after midnight:
if(currentTime <= morningStarts && currentHour < morningStarts){
showDayPart(DayPart.night);
} else if (currentHour >= morningStarts && currentHour < dayStarts){
showDayPart(DayPart.Morning);
could be as simple as modifying the if-else statements or the way the script grabs the time. IE since the night cycle starts late, and its technically early, its defaulting to morning instead of night any tips would be appreciated though!