
Source: drugwars.io repository
Project Information
- Repository: https://github.com/FutureShockco/drugwars.io
- Project Name: Drugwars.io Frontend
- Publisher: FutureShock/hightouch
- Issue: drugwars.io#64
The drugwars API provides the resource production rates, the building levels as well as the resource balances together with a timestamp of the last update. The frontend then calculates the current balances based on the balances at the time of the last update plus the production rate and the level of the Operation Center building. Each level of the Operation Center building increases the resource production rates by 0.5%.
Expected behavior
The Operation Center bonus ("+0.5% Income per Level") should be added to the shown balances based on the balance at the last update, the production rate and the OC level.
Actual behavior
A fixed 1x 0.5% bonus was added if the Operation Center level was greater than 0, plus 0.005 drugs/weapons/alcohol per level (absolute units, not percent).
How to reproduce
See the code, details in the Github issue.
History/Fix
I have created a Github Issue here together with a possible fix. The issue was then fixed by hightouch with commits 8220cb4 + e2c3f40.