Page MenuHomeWildfire Games

Correct cost tooltip for upgrades
ClosedPublic

Authored by bb on Sep 14 2020, 9:01 PM.

Details

Summary

As noticed in D2654, free upgrades give redundant newline in the tooltip. Also the Cost header isn't shown for upgrades in the selection_panels tooltip. This is due to a wrong function call in rP20046.

Test Plan

Agree the tooltip is better this way
Wonder why rP20046 changed this like this
Notice that similar code (training, construction etc.) uses this function

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

bb created this revision.Sep 14 2020, 9:01 PM
bb requested review of this revision.Sep 14 2020, 9:10 PM
Nescio added a subscriber: Nescio.Sep 14 2020, 9:21 PM

Correctize

The correct verb is to correct.

Nescio removed a subscriber: Nescio.Sep 14 2020, 9:21 PM
Freagarach accepted this revision.Sep 16 2020, 6:21 PM
Freagarach added a subscriber: Freagarach.
  • Works.
  • Correct.

Wonder why rP20046 changed this like this

Good question.

This revision is now accepted and ready to land.Sep 16 2020, 6:21 PM

@elexis provided the hint why the line is changed: if (template.wallSet) will always be false and thus it is not necessary to go through that?

Stan retitled this revision from Correctize cost tooltip for upgrades to Correct cost tooltip for upgrades.Dec 17 2020, 3:56 PM
bb added a comment.Dec 18 2020, 1:43 PM

Don't see why one will never have upgradable wallsets. Yes wallsets are never realised as global entities. But even during placement, in theory, there could be upgrades (note that I really mean upgrades, not technologies or whatever). Not that I see a direct usecase (surely it is not implemented), but I could imagine some mod wanting to up the wallset on a player command to build gates in some segments directly, or any other modification allowed by upgrades.

This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Dec 22 2020, 11:27 PM