Try adding these bits of code to FinalFrontierGameUtils.py...
Get the type index, substituting your building's type for "BUILDING_WHATEVER", in the __init__ function which should make it look like this (this is the entire function, if you haven't added anything to it):
Code:
def __init__(self):
self.dBuildingBonuses = { gc.getInfoTypeForString("BUILDING_FARM") : gc.getInfoTypeForString("BONUS_WHEAT"),
gc.getInfoTypeForString("BUILDING_RANCH") : gc.getInfoTypeForString("BONUS_COW"),
gc.getInfoTypeForString("BUILDING_HARBOR") : gc.getInfoTypeForString("BONUS_FISH"),
gc.getInfoTypeForString("BUILDING_PLANTATION") : gc.getInfoTypeForString("BONUS_SPICES"),
gc.getInfoTypeForString("BUILDING_WINERY") : gc.getInfoTypeForString("BONUS_WINE"),
gc.getInfoTypeForString("BUILDING_COTTONMILL") : gc.getInfoTypeForString("BONUS_COTTON")}
[B]self.iSmallPlanetBldg = gc.getInfoTypeForString("BUILDING_WHATEVER")[/B]
Note: if you want to allow for a building that can have unique versions, you can't predefine the building type like this. If you want to do this, I can give you the code for it. It would involve specifying a building class instead of the type in the code above and then looking up the civ specific building for the player trying to build things down near where it is used to do the comparison.
Add two small pieces of code to the cannotConstruct function.
First, right after the first check for rings:
Code:
...
if (pBuildingInfo.isRings()) and (not pPlanet.isRings()):
bNotHere = true
[B]if (eBuilding == self.iSmallPlanetBldg) and (pPlanet.getPlanetSize() != CvSolarSystem.iPlanetSizeSmall):
bNotHere == true[/B]
if (eBuilding in self.dBuildingBonuses):
...
Second, again right after a check for rings, this time inside the loop over all the planets in the system:
Code:
...
if (pBuildingInfo.isRings()) and (not pLoopPlanet.isRings()):
continue
[B]if (eBuilding == self.iSmallPlanetBldg) and (pLoopPlanet.getPlanetSize() != CvSolarSystem.iPlanetSizeSmall):
continue[/B]
if (pLoopPlanet.isHasBuilding(eBuilding)):
...
That should be it. Make sure you check your indentation so it matches the surrounding code and that sort of thing.
As you can see there is not a lot to it, so there is not a lot that could go wrong. The "CvSolarSystem.iPlanetSizeSmall" is a value that is defined for this planet size so you don't have to remember if small is size 0 or size 1, which I tend to forget - it is actually 0, by the way. Speaking of which, I have assumed that by "size 1 planet" you meant one that has a starting population limit of 1 (which is, technically, a size 0 planet by the definitions used in the code).