Page MenuHomeWildfire Games

Have gather information take precedence over repair
ClosedPublic

Authored by temple on Mar 11 2018, 2:51 AM.

Details

Summary

resourceCarryingIcon and resourceCarryingText display the carried resources for workers and traders, the gatherers for resource supplies, and the information for builders and repairers. Usually an entity only has one of these things, however when they have more than one a choice must be made about which one to show.

If a field is not at 100% then it has both gather and repair information, and currently it displays the repair information. (See https://code.wildfiregames.com/rP21121#29216) However, the gather information is probably more important, so we should show that instead. This patch changes that preference.

Another example is fishing ships which can carry resources but also need repair.

Test Plan

Agree.
I also removed the visibility test so gather information will be shown in the fog of war.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.Mar 11 2018, 2:51 AM
temple added inline comments.Mar 11 2018, 3:00 AM
binaries/data/mods/public/gui/session/selection_details.js
218 ↗(On Diff #6131)

This text bleeds into the icon, so maybe add some spaces like with the gatherers and build/repair countdowns. Or maybe the resourceCarryingText object could be moved to the left.

251 ↗(On Diff #6131)

It might be nice to use the icon for the resource type here For example, the first couple of months I was confused about which mine was which, and I'm sure seeing the stone or metal icon here instead of the repair icon would've helped.

On the other hand, this will then look identical to the resource carrying state since both have the form "a / b", where one is current/max gatherers and the other is current/max resources. Maybe that's not a big deal, or maybe we could find a different way to display one of them (or maybe create some new icons).

Vulcan added a subscriber: Vulcan.Mar 11 2018, 10:51 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/222/display/redirect

mimo accepted this revision.Mar 11 2018, 1:21 PM

Thnaks for the patch

binaries/data/mods/public/gui/session/selection_details.js
218 ↗(On Diff #6131)

Both solutions seems fine.

251 ↗(On Diff #6131)

I'm not sure about the resource icons, which may be misleading (people understanding that it is the resource amount that this resource can provide).
Designing new icons would be the best :)

This revision is now accepted and ready to land.Mar 11 2018, 1:21 PM
elexis added a subscriber: elexis.Mar 11 2018, 2:18 PM
elexis added inline comments.
binaries/data/mods/public/gui/session/selection_details.js
266 ↗(On Diff #6131)

(Could nuke the Engine.GetGUIObjectByName duplication in this function. Maybe more readable in a separate commit however.)

This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Mar 11 2018, 6:07 PM