#1571 closed enhancement (fixed)
[PATCH] Redden construction/training/research icons when not enough resources
Reported by: | wraitii | Owned by: | wraitii |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 11 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Per this topic, I've updated the patch created by HowlingFlute to work with technologies and support shift-multiplier.
Attachments (4)
Change History (14)
by , 12 years ago
Attachment: | redIcons.patch added |
---|
comment:1 by , 12 years ago
Owner: | set to |
---|
by , 12 years ago
Attachment: | redIcons.2.patch added |
---|
by , 12 years ago
Attachment: | redIcons.3.patch added |
---|
comment:4 by , 12 years ago
Update to the patch. Moved it to Alpha 11 because I intend to commit it unless someone spots an obvious mistake/design flaw. (update after review by Deiz this morning).
comment:5 by , 12 years ago
Milestone: | Backlog → Alpha 11 |
---|
by , 12 years ago
Attachment: | redIcons.4.patch added |
---|
comment:6 by , 12 years ago
Did some clean-up (migrated the common tooltip stuff into a function) and modified GetNeededResources somewhat so the caller doesn't need to know all the resource types.
follow-up: 10 comment:7 by , 12 years ago
Nice work :)
I noticed one problem: when selecting multiple long wall segments, it shows insufficient resource counts as if only one of them would be upgraded, but I believe the button will attempt to upgrade all selected long walls. Of course it only shows the cost for one upgrade too, so it may be a slightly more complicated fix.
And one suggestion: I would love to see the insufficient resource counts listed in red in the tooltip. That would make them really stand out. Another way of doing this: show the insufficient resources combined with the standard costs, but then we'd probably also want to show full costs for batch training. Maybe something like this would work for a combined display:
Costs: 50 Wood 100(-15) Food
where the player has at least 50 wood and only 85 food (needing 15 more to build/train this entity). Whatever looks best and is most intuitive :)
comment:8 by , 12 years ago
Committed the patch (rev 12404). I changed the "Insufficient Resources" text to be red.
The fix about gates is quite complicated and quite CPU extensive for the result, but it probably should be added at some point, as with the integrated costs (though I'm not too sure about the actual readability of that).
comment:9 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:10 by , 12 years ago
Replying to historic_bruno:
I noticed one problem: when selecting multiple long wall segments, it shows insufficient resource counts as if only one of them would be upgraded, but I believe the button will attempt to upgrade all selected long walls. Of course it only shows the cost for one upgrade too, so it may be a slightly more complicated fix.
After discussion this has been moved to a different ticket (#1591), as it's only tangentially related to this ticket.
There's also the market case (insufficient resources to barter), gate upgrade costs, etc., though these are much less common cases than what you've implemented support for.
Though this is completely outside the scope of this patch: I think it's rather unfortunate that overlays require a whole new set of objects. It'd be nice to be able to apply arbitrary blending by manipulating sprite effects in unit-commands.js similarly to how text properties are handled. Although first we'd need proper blending capability, as the 'add_color' sprite effect does exactly that (additive only).