HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. "Read more...":https://support.plan.io/news/187
Bug #861509
closedMiddle-click tile popup very confused in rulesets where multiple activities can create/remove a single extra
0%
Description
(This patch is really a refactor on the way to solving bug #861460, but on the way I found what is arguably an actual bug, albeit a rather obscure one.)
It's possible for a ruleset to have two separate activities that are valid simultaneously to cause the creation or removal of a particular extra, say (um) irrigation and mining both producing an Artesian Well extra. If the activities take different times, the actual behaviour is that the two activities proceed independently in parallel, and the first one to complete wins (and units doing the slower activity stop it afterward, since it's no longer valid).
However, if such activities are happening simultaneously on a tile, the middle-click tile info popup erroneously pools activity points from the two activities together in a confusing way, often showing completion times that correspond to neither activity, and activities that are not occurring.
This patch will changeconcat_tile_activity_text()
to keep track of progress per-extra and per-activity, to fix this. Also, it will:
- Stop allocating big arrays on the stack (with this change the allocation was going to be something like tens of kilobytes)
- Split out the calculation into a separate function (as I am about to need it for something else)
The effect is that the tile popup will display the two activities separately, with correct completion times. It makes no attempt to signal that one activity is going to make the other one moot.
Files
Related issues
Updated by Jacob Nevins about 3 years ago
- File 26-classic-multicause.diff 26-classic-multicause.diff added
- File 26_multicause.sav.bz2 26_multicause.sav.bz2 added
(My initial example was "Clean Pollution" and "Pillage" both removing the Pollution extra, but I ran into bug #861508.)
Attached ruleset diff / savegame allows for exploring the behaviour.
Updated by Jacob Nevins about 3 years ago
- File m-multi-cause-middleclick.patch m-multi-cause-middleclick.patch added
- File 30-multi-cause-middleclick.patch 30-multi-cause-middleclick.patch added
- File 26-multi-cause-middleclick.patch 26-multi-cause-middleclick.patch added
- Status changed from In Progress to Resolved
Updated by Jacob Nevins about 3 years ago
- Blocks Bug #861460: SDL activity button tooltips say activities will take far more turns than they really will added
Updated by Jacob Nevins about 3 years ago
- Status changed from Resolved to Closed