You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.
I don't know if this project is still maintained, but I'll leave this issue for people who wants to use it. Just to they be aware of this little bug.
The bug
There's a bug in includes/classes/class.PlanetRessUpdate.php while updating research. Exactly in SetNextQueueTechOnTop method. It is using resources before any resource update. So it checks if you have enough resources on planet to research based on old planet state.
Example
You got 10000 metal, produce 7000/h. You plan 3 research tasks, each take 1h and each costs 7000 metal. So they all should be done, because each takes 1h to do and 7000 metal and you produce 7000 metal per hour. But only one will be done. After setting first, you had 3000 metal. And this 3000 metal will be used to check if you have enough resources in SetNextQueueTechOnTop.
One more thing...
To solve this problem you can't simply add this->UpdateResources(time), because this will update resources twice in some cases. You have to change a little bit how ResourceUpdate class works or deal with this bug 😄 Maybe I will write solution to this one day 🔧
PS: Sorry for my english, I am trying my best ^^
The text was updated successfully, but these errors were encountered:
I don't know if this project is still maintained, but I'll leave this issue for people who wants to use it. Just to they be aware of this little bug.
The bug
There's a bug in includes/classes/class.PlanetRessUpdate.php while updating research. Exactly in SetNextQueueTechOnTop method. It is using resources before any resource update. So it checks if you have enough resources on planet to research based on old planet state.
Example
You got 10000 metal, produce 7000/h. You plan 3 research tasks, each take 1h and each costs 7000 metal. So they all should be done, because each takes 1h to do and 7000 metal and you produce 7000 metal per hour. But only one will be done. After setting first, you had 3000 metal. And this 3000 metal will be used to check if you have enough resources in SetNextQueueTechOnTop.
One more thing...
To solve this problem you can't simply add
this->UpdateResources(time)
, because this will update resources twice in some cases. You have to change a little bit how ResourceUpdate class works or deal with this bug 😄 Maybe I will write solution to this one day 🔧PS: Sorry for my english, I am trying my best ^^
The text was updated successfully, but these errors were encountered: