Page MenuHomeWildfire Games

[gui] show gather rates for build and train tooltips
Needs ReviewPublic

Authored by Nescio on Jan 9 2021, 8:28 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Knowing which resources an unit can gather is important information, especially for people new to the game (or a mod).
There are gather rates and resource dropsite tooltip lines, which are displayed in the full entity details (right-click on icon), when hovering over an icon in the structure tree, and by the “attack and resistance” pop-up in the central selection panel.
However, gather rates are currently not displayed in the tooltips that pop up when hovering over an icon in the building and training right selection panels. This patch adds them there too, because this is useful to know before buying something. How it looks with the “detailed tooltips” setting off:

See also D2247, D2985, D3310.

Test Plan

Check for completeness and correctness.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
SeverityLocationCodeMessage
Warningbinaries/data/mods/public/gui/session/selection_panels.js:50ESLintBear (default-case)ESLintBear (default-case)
Warningbinaries/data/mods/public/gui/session/selection_panels.js:61ESLintBear (default-case)ESLintBear (default-case)
Warningbinaries/data/mods/public/gui/session/selection_panels.js:700ESLintBear (default-case)ESLintBear (default-case)
Warningbinaries/data/mods/public/gui/session/selection_panels.js:735ESLintBear (no-multi-spaces)ESLintBear (no-multi-spaces)
Unit
No Unit Test Coverage
Build Status
Buildable 14815
Build 31855: Vulcan BuildJenkins
Build 31854: Vulcan Build (macOS)Jenkins
Build 31853: Vulcan Build (Windows)Jenkins
Build 31852: arc lint + arc unit

Event Timeline

Nescio created this revision.Jan 9 2021, 8:28 PM
Owners added a subscriber: Restricted Owners Package.Jan 9 2021, 8:28 PM
Vulcan added a comment.Jan 9 2021, 8:34 PM

Build is green

builderr-debug-macos.txt
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framework/CoreVideo.tbd and library file /System/Library/Frameworks//CoreVideo.framework/CoreVideo are out of sync. Falling back to library file for linking.
ld: warning: text-based stu

See https://jenkins.wildfiregames.com/job/macos-differential/2737/display/redirect for more details.

Nescio requested review of this revision.Jan 9 2021, 8:37 PM
Stan edited the summary of this revision. (Show Details)EditedJan 9 2021, 8:38 PM
Stan added a subscriber: Stan.

Doesn't that make it a bit too crowded, I'm not sure how much is too much for tooltips. Wouldn't it make more sense to see attack?

wraitii added a subscriber: wraitii.Jan 9 2021, 8:55 PM

I do think this is the wrong way to go about this ultimately. Learning the stats of things and how to play the game shouldn't be done by having to look at various tooltips, we just need a better in-game encyclopaedia.

This isn't much code, I can't really argue it hurts to have, but I think we need to rethink this kind of thing. Just adding more information to tooltips isn't a solution IMO.

Nescio added a comment.Jan 9 2021, 9:01 PM

I think we need to rethink this kind of thing. Just adding more information to tooltips isn't a solution IMO.

Yes, I agree, in general. However, there is infantry in game that can gather and infantry that can't, just looking at their name and icon won't necessarily give you this information, and not everyone knows what classes to look for, hence this patch to make it more explicit.