Page Menu
Home
Wildfire Games
Search
Configure Global Search
Log In
Files
F5214979
D3014.id13539.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3014.id13539.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3014: Show correct trade info for observers
Attached
Detach File
Event Timeline
Log In to Comment