Page MenuHomeWildfire Games

D3014.id13539.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D3014.id13539.diff

Index: binaries/data/mods/public/gui/session/trade/TradeButtonManager.js
===================================================================
--- binaries/data/mods/public/gui/session/trade/TradeButtonManager.js
+++ binaries/data/mods/public/gui/session/trade/TradeButtonManager.js
@@ -8,8 +8,8 @@
if (!TradeButtonManager.IsAvailable())
throw "TradeButtonManager instantiated with no tradeable resources or too few buttons!";
- // Assume that the simulation state will always follow the GUI
- this.tradingGoods = Engine.GuiInterfaceCall("GetTradingGoods", g_ViewedPlayer);
+ // For players assume that the simulation state will always follow the GUI of this player.
+ this.tradingGoods = Engine.GuiInterfaceCall("GetTradingGoods");
let resourceCodes = g_ResourceData.GetTradableCodes();
this.selectedResource = resourceCodes[0];
@@ -23,6 +23,10 @@
update()
{
+ // Observers can change perspective and values can update while viewing the dialog.
+ if (g_IsObserver)
+ this.tradingGoods = Engine.GuiInterfaceCall("GetTradingGoods");
+
this.tradeHelp.tooltip = colorizeHotkey(translate(this.TradeSwapTooltip), "session.fulltradeswap");
let enabled = controlsPlayer(g_ViewedPlayer);

File Metadata

Mime Type
text/plain
Expires
Sun, Sep 22, 11:54 AM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3373315
Default Alt Text
D3014.id13539.diff (1 KB)

Event Timeline