daviiadams
Prince
Is there a quick, easy way to check if a player has built an improvement?
Having scanned through Don's Lua Wiki (very good btw Don
) I can see GetImprovementType for Plot, but don't have a clue as to how to make use of that.
I did get GetImprovementCount to do something, but that's just returning zeros at the moment, at least in the way I'd been playing with the code:
Not that I'm expecting that small bit of Lua to do anything as it stands, just that it happens to be the only bit I've had any luck with - was rather hoping there'd be something along the lines of IsHasImprovement etc lurking somewhere
Having scanned through Don's Lua Wiki (very good btw Don

I did get GetImprovementCount to do something, but that's just returning zeros at the moment, at least in the way I'd been playing with the code:
Code:
for iImprovement in GameInfo.Improvements() do
local iImprovementType = iImprovement.Type;
local pImprovementCount = pPlayer:GetImprovementCount(iImprovementType);
print(iImprovementType .. " | " .. pImprovementCount);
end
Not that I'm expecting that small bit of Lua to do anything as it stands, just that it happens to be the only bit I've had any luck with - was rather hoping there'd be something along the lines of IsHasImprovement etc lurking somewhere
