I got this report.
viewtopic.php?f=51&t=31718&start=30#p201886
I don't know how it happened... I listed my code a couple posts later, all it does is store the progress reported by the LUA script, and restore it if you change back. So the game itself had to have research going past 100% in the first place for my mod to attempt to restore it. Someone theorises a mod changing the cost of a technology down while it is already in progress in a save file...
Anyway, Wouldn't it be a relatively simple fix to change your game code to use a >= check for this?
[Rseding91] Research progress >100% issue
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Research progress >100% issue
I'm not sure what you mean. There's already a > check in place - that's why you get the error when attempting to set the research to > 1.bobingabout wrote:Anyway, Wouldn't it be a relatively simple fix to change your game code to use a >= check for this?
As for why you got a value > 1 - it's probably as you said: someone changed the technology prototype while it was in progress. I'll add a check during loading that correct the research progress if someone changes the research prototype while research is in progress so it shouldn't ever give a value > 1.
If you want to get ahold of me I'm almost always on Discord.
Re: [Rseding91] Research progress >100% issue
Fixed for 0.14.4.
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 22
- Joined: Thu Aug 04, 2016 4:33 am
- Contact:
Re: [Rseding91] Research progress >100% issue
Super glad this was fixed, I've suffered the same problem for quite some time and I'm glad to see it finally getting fixed..
-Cake
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [Rseding91] Research progress >100% issue
Wonderful.
I've written a fix for my mod as well, so it should never attempt to write >1 too.
I've written a fix for my mod as well, so it should never attempt to write >1 too.