Add setting to have overheat cooldown in steps - #562
Open
Desour wants to merge 2 commits into
Open
Conversation
Member
|
If the old way is inconsistent shouldn't this just be the default? |
Contributor
Author
|
Yes sure. I was just scared by the possibility of people complaining about a change. steps is now the default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problems to be solved:
Currently the cooldown is done in steps of seconds and the time it takes a device to fully cooldown is also in seconds.
Gates however have a delay in server steps (always exactly 2 steps). This makes it nearly impossible to build circuits that can never overheat, in any circumstances.
Also, servers have a much longer server step dtime, which results in inconsistencies and bad defaults (see also #561).
Changes:
cooldown_mode(enum: seconds(default), steps (default)) says whether to use the old or the new method.cooldown_time_steps(float, default=125.0) andcooldown_granularity_steps(int) can be used to configure the new mode, they work like their non-_stepscounterparts.*_stepsare typically much higher. If you use an older mesecons version, thecooldown_modesetting is ignored and circuits will overheat. Also it's much more convenient to have separate settings if you want to play around with them. Furthermore, the new settings allow to define suitable defaults.125 steps is 2 seconds for a step time of 0.016 seconds. I was not able to measure a lower step time in singleplayer.
This is a pretty strict value compared to the old settings. But it isn't actually that strict, it allows one heat every 6.25 steps, which is enough for a shortcut NOT gate plus two diode gates for delay.
The granularity of 20 steps if the same as 0.5 seconds with a dtime of 0.025 seconds.
For servers the seconds-based cooldown would be ca. every 5 steps. So this value is more performance-friendly to servers.
I currently don't know exactly if this value is good, but it's probably good enough.
Other changes:
overheat_maxin settingtypes.txt.