#3252 closed defect (fixed)
[PATCH] getTradingTooltip is wrong
Reported by: | elexis | Owned by: | sanderd17 |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
The tooltip of the trade cart always says that the current player / observer profits, since it always uses the hardcoded string "you":
var tooltip = sprintf(translate("%(gain)s (%(player)s)"), { gain: gainString, player: translate("you") });
It basically acts as if one could only click the own trade carts. A simple check is missing. If the trade cart belongs to another player than that playername should be displayed instead.
Attachments (2)
Change History (7)
by , 9 years ago
Attachment: | t3252_fix_trade_tooltip.patch added |
---|
Fixes the two issues described above. (Attempts to use the correct playername, and succeeds if #3253 is committed).
comment:2 by , 9 years ago
Keywords: | patch review added; simple removed |
---|---|
Milestone: | Backlog → Alpha 19 |
Summary: | getTradingTooltip says "you" profit from other trade carts → [PATCH] getTradingTooltip is wrong |
comment:4 by , 9 years ago
Keywords: | review removed |
---|
by , 9 years ago
Attachment: | t3252_clean_trade_tooltip.patch added |
---|
The string "You" will now only appear in singleplayer, in order to prevent confusion with players who might call themselves "You".
Note:
See TracTickets
for help on using tickets.
The other problem with this tooltip is it has "player X" hardcoded and doesn't use (nor attempt to use) the actual playername:
So this second bug is not related to #3253.