|
It appears that the code to display them has been commented out. I've attached a patch that appears to fix that.
spire-city-build-menu.patch (5,182 bytes)
diff --git CodeExternal/AIWarExternalCode/src/UIs/InGamePassiveDisplay/Window_InGameSidebarDirectBuild.cs CodeExternal/AIWarExternalCode/src/UIs/InGamePassiveDisplay/Window_InGameSidebarDirectBuild.cs
--- CodeExternal/AIWarExternalCode/src/UIs/InGamePassiveDisplay/Window_InGameSidebarDirectBuild.cs
+++ CodeExternal/AIWarExternalCode/src/UIs/InGamePassiveDisplay/Window_InGameSidebarDirectBuild.cs
@@ -179,37 +179,35 @@ namespace Arcen.AIW2.External
debugStage = 7300;
if ( sidebarCat.GrantedByCustomFleets )
{
- //planet.DoForEntities( EntityRollupType.PlayerCustomFleetFlagships, delegate ( GameEntity_Squad flagshipMostlyIgnored )
- //{
- // if ( flagshipMostlyIgnored.PlanetFaction.Faction != localFaction )
- // return DelReturn.Continue;
- // GameEntity_Squad quasiCenterpiece = flagshipMostlyIgnored..QuasiCenterpieceForStationary.GetSquad();
+ planet.DoForEntities( EntityRollupType.CityCenter, delegate ( GameEntity_Squad hub )
+ {
+ Fleet cityFleet = hub.GetFleetOrNull_Safe();
+ if ( hub.PlanetFaction.Faction != localFaction )
+ return DelReturn.Continue;
- // if ( quasiCenterpiece.GetIsCrippled() || quasiCenterpiece.GetIsNonfunctionalForAnotherReason() )
- // return DelReturn.Continue; //don't include mobile fleet flagships that are under Construction or remains or crippled
+ if ( hub.GetIsCrippled() || hub.GetIsNonfunctionalForAnotherReason() )
+ return DelReturn.Continue; //don't include mobile fleet flagships that are under Construction or remains or crippled
- // GameEntityTypeData typeDataForPurchase;
- // for ( int j = 0; j < sidebarCat.Items.Count; j++ )
- // {
- // typeDataForPurchase = sidebarCat.Items[j];
- // FleetMembership memDoNotAdd = quasiCenterpiece..GetButDoNotAddMembershipGroupBasedOnSquadType_AssumeNoDuplicates( typeDataForPurchase );
- // if ( memDoNotAdd == null )
- // continue;
- // if ( memDoNotAdd.ExplicitBaseSquadCap < 1 )
- // continue;
+ GameEntityTypeData typeDataForPurchase;
+ for ( int j = 0; j < sidebarCat.Items.Count; j++ )
+ {
+ typeDataForPurchase = sidebarCat.Items[j];
+ FleetMembership memDoNotAdd = cityFleet.GetButDoNotAddMembershipGroupBasedOnSquadType_AssumeNoDuplicates( typeDataForPurchase );
+ if ( memDoNotAdd == null )
+ continue;
+ if ( memDoNotAdd.ExplicitBaseSquadCap < 1 )
+ continue;
- // if ( typeDataForPurchase.BuildSidebarCategoriesIAmPartOf.Count <= 0 )
- // { }// BuildSidebarCategoryTable.Uncategorized.NonSim_BuildSidebarWorking.Add( newMem );
- // else
- // {
- // for ( int k = 0; k < typeDataForPurchase.BuildSidebarCategoriesIAmPartOf.Count; k++ )
- // typeDataForPurchase.BuildSidebarCategoriesIAmPartOf[k].NonSim_BuildSidebarWorking.Add( memDoNotAdd );
- // }
- // }
-
- // //once we found at least a single mobile fleet flagship, then stop looking for more!
- // return DelReturn.Break;
- //} );
+ if ( typeDataForPurchase.BuildSidebarCategoriesIAmPartOf.Count <= 0 )
+ { }// BuildSidebarCategoryTable.Uncategorized.NonSim_BuildSidebarWorking.Add( newMem );
+ else
+ {
+ for ( int k = 0; k < typeDataForPurchase.BuildSidebarCategoriesIAmPartOf.Count; k++ )
+ typeDataForPurchase.BuildSidebarCategoriesIAmPartOf[k].NonSim_BuildSidebarWorking.Add( memDoNotAdd );
+ }
+ }
+ return DelReturn.Continue;
+ } );
}
debugStage = 8000;
|