Check trade route partners with lua?

Tomatekh

Emperor
Joined
Aug 6, 2012
Messages
1,434
Is there any way to check which civs have an active trade route to you (and/or which civs you have an active trade route with) in lua?

There seems to be:

Player.GetTradeRoutes
Player.GetTradeRoutesToYou
Player.GetTradeToYouRoutesTTString
Player.GetTradeYourRoutesTTString

But I'm not sure how they work.

Thanks in advance.
 
Code:
	local zimdata = Players[player]:GetTradeRoutes();
	for i,v in ipairs(zimdata) do
		if v.ToCity:GetOwner() ~= player then

		end
	end
	local zimdata = Players[player]:GetTradeRoutesToYou();
	for i,v in ipairs(zimdata) do
		if v.FromCity:GetOwner() ~= player then

		end
	end
 
Back
Top Bottom