Skip to content
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

[Feature request] Stop night skipping if someone got out of bed #98

Open
VladOliinyk opened this issue Feb 3, 2022 · 1 comment
Open

Comments

@VladOliinyk
Copy link

I guess it is quite an important feature to stop night “scrolling” if someone got out of bed, and the number of sleepers is less than necessary.

So, from my experience, I can guess that it is not a big deal to implement it from a code logic perspective. If I understand right, we have a sort of “scrollTheNight()” function, which is scrolling the night instantly or with a configured delay.

So, I think it is needed to just add a boolean variable, that will be a rule that reflects could the night be scrolled or not, in other words, “are enough players sleeping?”.

And in the mentioned “scrollTheNight()” function, each cycle of “adding in-game time value” we should check for our new rule variable.

And, each time sleepers counter updates, we should update that variable that affects on night skipping process.

Here is my pseudo-code, and

I see the logic this way:

while (there is still night outside) {
If (enough players still sleep)
{ do skip iteration }
else
{ bruh, go to bed }
}

I’m not sure does this whole speech makes any sense, but I just have a mood to express it all. Hope it helps, and most importantly I hope it will be implemented soon!

p.s. writing this from phone was pretty painfull.

@Mobmaker55
Copy link

Just from a standpoint of how Minecraft works in general, once the required number of people are sleeping (in vanilla, 100%), getting out of bed does not change skipping to day, once the system starts. Granted, the time for sunrise is much faster in vanilla than with Harbor, so it's much less likely people will leave bed, but it's still a native vanilla feature.

Also, the average time going from night to day in Harbor from starting night skip is less than 15 seconds iirc, so why are you punishing all of your players if someone gets out 10 seconds earlier?
At that point, people may just start leaving so that way the required sleep count is lower, and then rejoining once it's day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants