KarloManco Posted December 21, 2022 Report Share Posted December 21, 2022 When a unit which is being trained is cancelled, the resourcesUsed counter is decreased by twice the cost of this unit. Steps to reproduce: 1. Click on any building to train a new unit 2. Cancel the unit before it is completed. 3. Check in the summary the Resources Used field I tested it with: cmd 1 {"type":"train","template":"units/rome/support_female_citizen","count":1,"entities":[150],"pushFront":false} cmd 1 {"type":"stop-production","entity":150,"id":1} and got resourcesUsed = -50 I am not a professional programmer but, in case it helps, the problem seems to be in: binaries > data > mods > public > simulation > components > Trainer.js > Trainer > Item > Stop There is a call to IncreaseResourceUsedCounter() in line 154 to decrease its value and a call to RefundResources() in line 161 which contains another call to IncreaseResourceUsedCounter(). Looks like this is why the value is decreased twice. I have checked (in the newest version, rev 27288) that by commenting lines 153 and 154 in the mentioned file (Trainer.js) the issue sees to be solved. PD: Thanks for this fabulous game. It is really awesome. Quote Link to comment Share on other sites More sharing options...
Freagarach Posted December 30, 2022 Report Share Posted December 30, 2022 Thank you for the report! (And the proposed fix.) It has been fixed with https://trac.wildfiregames.com/changeset/27321/. 1 Quote Link to comment Share on other sites More sharing options...
chrstgtr Posted December 30, 2022 Report Share Posted December 30, 2022 42 minutes ago, Freagarach said: Thank you for the report! (And the proposed fix.) It has been fixed with https://trac.wildfiregames.com/changeset/27321/. I have nothing to add here, but I just wanted to say welcome back and congrats. Quote Link to comment Share on other sites More sharing options...
Freagarach Posted December 30, 2022 Report Share Posted December 30, 2022 5 hours ago, chrstgtr said: I just wanted to say welcome back and congrats. Thanks! (I will generally stay off the forums though.) 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.