forked from 0ad/0ad
Display expected trading gain (GainMultiplier = 1) for market foundations when setting rally points. Fixes #1963.
This was SVN commit r13452.
This commit is contained in:
parent
b2f6a1260e
commit
5b1f5dd2c1
@ -277,7 +277,11 @@ function getActionInfo(action, target)
|
||||
data.target = traderData.secondMarket;
|
||||
data.source = traderData.firstMarket;
|
||||
cursor = "action-setup-trade-route";
|
||||
tooltip = "Click to establish a default route for new traders. Gain: " + gain + " metal.";
|
||||
tooltip = "Click to establish a default route for new traders.";
|
||||
if (trader)
|
||||
tooltip += " Gain: " + gain + " metal.";
|
||||
else // Foundation or cannot produce traders
|
||||
tooltip += " Expected gain: " + gain + " metal.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ function CalculateTraderGain(firstMarket, secondMarket, template)
|
||||
if (cmpFirstMarketOwnership.GetOwner() != cmpSecondMarketOwnership.GetOwner())
|
||||
gain *= 1 + INTERNATIONAL_TRADING_ADDITION / 100;
|
||||
|
||||
if (template.GainMultiplier)
|
||||
if (template && template.GainMultiplier)
|
||||
gain *= template.GainMultiplier;
|
||||
gain = Math.round(gain);
|
||||
return gain;
|
||||
|
Loading…
Reference in New Issue
Block a user