LeeS
Imperator
The reason it works as I recall is that you are using Player:GetUnits():SetBuildDisabled(eUnitIndex, Boolean) which is a direct command to the GameCore. I can't off the top of my head think of any equivalent for Projects. Nor by looking at both my and other people's accumulated documentation do I see a direct equivalent for Projects.Remember the Mod you and Gedemon helped me with some Time ago, that disables Units from being able to be built if there are not enough of a second strategic resource (not maintenance resource)? I've got it to work without touching the ProductionPanel.lua. and it's a GameplayScript, so it affects also the AI. I still haven't finished it (the Concept/Design) but it works. You can have a look on this Thread, but it's not the finale code. So It should be possible to re-use it for Projects (using: pCity:GetBuildings():HasBuilding()...etc).
You can use City:GetBuildings():HasBuilding(iBuildingIndex) for all kinds of stuff but how are you going to use it to disable a project from showing on the UI without re-writing the UI file ? The Ai player in this case will not be bothered by "clutter" in the Production Panel list because the AI don't use it. The Gamecore just looks at whether they can do X at the moment in a given city and then it decides on whether or not to make that individual AI city actually do X.