Disable Improvement Type for a Specific Civ

pineappledan

Deity
Joined
Aug 9, 2017
Messages
10,027
Location
Alberta, Canada
I'm working on a custom civ, and I want their unique improvement to effectively REPLACE trading posts on the tech tree, rather than be an entirely new improvement.

The easiest way I can think to do this is to set up the new improvement normally, then knock out their workers' ability to construct the trading post. This is what I have been trying:
Spoiler :
Code:
function TimuridNoVillage()
    for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do
        local pPlayer = Players[iPlayerLoop]
        local Worker = GameInfoTypes.UNITCLASS_WORKER
        if (pPlayer:GetCivilizationType() == TimuridsID) then
            Worker:CanBuild(GameInfoTypes.IMPROVEMENT_TRADING_POST, false, false)
        
        end
    end
end
Any pointers for what I could do to make this work?
 
Top Bottom