Changes between Version 1 and Version 2 of Ticket #6429


Ignore:
Timestamp:
Feb 8, 2022, 8:20:23 AM (2 years ago)
Author:
Langbart
Comment:

adding a possible solution to the issue

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6429 – Description

    v1 v2  
    2727==== bisect
    2828The issue can be noticed for the first time with [25365].
     29
     30==== solution(1)
     31Simply adding `|| false` to
     32[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/gui/session/trade/TradeDialogBarterPanel.js$27 Line 27] in `TradeDialogBarterPanel.js`
     33
     34{{{
     35#!js lineno=20
     36        update()
     37        {
     38                let playerState = GetSimState().players[g_ViewedPlayer];
     39                let canBarter = playerState && playerState.canBarter;
     40
     41                this.barterButtonManager.setViewedPlayer(g_ViewedPlayer);
     42                this.barterButtonManager.update();
     43                this.barterNoMarketsMessage.hidden = canBarter *|| false*;
     44                this.barterResources.hidden = !canBarter;
     45                this.barterHelp.hidden = !canBarter;
     46                this.barterHelp.tooltip = sprintf(
     47                        translate(this.InstructionsTooltip), {
     48                                "quantity": this.barterButtonManager.getSelectedButton().BarterResourceSellQuantity,
     49                                "hotkey": colorizeHotkey("%(hotkey)s", "session.massbarter"),
     50                                "multiplier": this.barterButtonManager.getSelectedButton().Multiplier
     51                        });
     52        }
     53};