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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Setting to automatically restart server based on hours played #11142
Conversation
I like this PR, but not in the way you might think. Btw, for settings conversion, see #11143. That is, if that gets accepted. I tried to work out there how to do that. Anyway, for this PR: I think it is the wrong approach, but accidentally shows a good improvement. Let me explain. I think we have two types of users:
The first is more for long-term servers like reddit etc. I totally see this PR being of added value to them. So ... and I know this is a big ask .. shouldn't we have both settings? With day-length patch, the setting of this PR is going to make much more sense for that first group. But there will always be people in that second group .. and they will have to understand that if you freeze the calendar, the setting will never work. But this new one does. Best of both worlds? What do you think? |
Sure, that makes sense. This becomes a I think I'll also change the time units to hours. Minutes is probably too much precision, given than an hour is only five years in-game. On the other hand, it doesn't really hurt to use minutes, except that users desiring a longer time have to do some math. Anyone feel strongly that it should stay minutes? |
5d143a2
to
ec66197
Compare
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks nice; just a few bits and pieces :)
This comment was marked as resolved.
This comment was marked as resolved.
Owh, and one more: title says |
ec66197
to
fa8eafb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any changes to anything autoclean related? What am I missing?
You're missing my lack of reading comprehension. Indeed, this has nothing to do with autoclean. 馃檮
Owh, and one more: title says
dedicated server
, but the code says it works for justserver
. Do we want to emphasisdedicated
here, or just omit it?
...Hmm, I guess I don't know what difference there is between the two. I don't intend any emphasis, and have only tested on a standard client hosting a game, so I've amended the title.
fa8eafb
to
36247d6
Compare
36247d6
to
7923dbb
Compare
The only thing I wonder about, but I think it is fine:
An alternative would be to hook it onto the economy timer, and use that for restart. That way it would be a restart after N hours of play. In reality, I do not think it matters at all, as I suspect only servers use this, where the owner just wants a new game every 23 hours. And they never load in a map, and expect the restart to continue counting. |
I agree that servers are probably the only users of this, since it is only accessible from the command line. And once they do restart using this function, the timer starts from 0 as expected and it's a new game, not a savegame. |
Motivation / Problem
We have a setting for network games to automatically restart upon reaching a certain year. That will never happen if calendar time is frozen.
Description
Add a new setting for a timer that counts down hours played, and resets after that.
Limitations
This was originally a change before @TrueBrain suggested we have both, so blame him for more code to maintain. 馃槈
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.