tnevolin / thinker-doer

Modifications to a SMACX Thinker mod to highlight more game features
GNU General Public License v2.0
29 stars 3 forks source link

picking Change and then OK, removes completion bonus #99

Closed bvanevery closed 4 weeks ago

bvanevery commented 3 years ago

lost my free minerals Cha Dawn of the Planet Cult, 2129.zip I had this Gun Foil with a double row of minerals, white above red. I selected Change for some reason, looking at other units to verify something for some reason. I think this act alone, ruined my completion bonus. I don't think I selected any unit in the unit / facility selection screen. If I did, I know I only clicked on a Gun Foil. The completion bonus shouldn't get cancelled out just from looking at part of a UI.

It suggests that some value for the completion bonus is not getting updated somewhere. I don't know if this behavior is also present in the original game.

I do know that in the original game, if you select a completely different unit, you will lose your bonus. But I don't think you lose the bonus just for looking at the Change screen, or for clicking on the unit that's already being built.

before clicking on Change Cha Dawn of the Planet Cult, 2137.zip Not too many turns later, I got another completion event in the same city. This time I saved the game before doing anything, so that behavior can be verified.

right before clicking on Change

Clicking on Change and then hitting ESC to exit the unit/facility selection screen, does not lose the bonus. Clicking on Change and then hitting Cancel, does not lose the bonus either. However, clicking on Change and then hitting OK, does lose the bonus. The unit being produced is highlighted on the selection screen.
Change followed by OK

tnevolin commented 1 year ago

Vanilla bug. I can try to fix it but it happens so rare. Do you think we should bother?

bvanevery commented 1 year ago

Only if low effort.

tnevolin commented 1 year ago

I didn't analyze it but it will most likely require juggling with backup stored minerals and item switching routines. Some moderate efforts, probably. I'll leave it here for a while.