View Issue Details

IDProjectCategoryLast Update
0025665AI War 2Gameplay IssueOct 27, 2021 6:15 pm
ReporterDaniexpert Assigned Totom.prince  
Status resolvedResolutionfixed 
Product VersionBeta 3.740 Code Panopticon 
Fixed in VersionBeta 3.740 Code Panopticon 
Summary0025665: Spire cities can't build any building
DescriptionSVN Build: I quickly ran a spire game and noticed that spire cities don't have their buildings listed in the build tab, making them a bit unusable. I don't know if there is a way to switch on that faction like Necromancers or it's just unfinished work due to the recent split of cities and fleets.
TagsNo tags attached.

Activities

tom.prince

Oct 17, 2021 4:59 pm

developer   ~0062976

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;
spire-city-build-menu.patch (5,182 bytes)   

Issue History

Date Modified Username Field Change
Oct 16, 2021 10:35 am Daniexpert New Issue
Oct 17, 2021 4:59 pm tom.prince Note Added: 0062976
Oct 17, 2021 4:59 pm tom.prince File Added: spire-city-build-menu.patch
Oct 27, 2021 6:15 pm tom.prince Assigned To => tom.prince
Oct 27, 2021 6:15 pm tom.prince Status new => resolved
Oct 27, 2021 6:15 pm tom.prince Resolution open => fixed
Oct 27, 2021 6:15 pm tom.prince Fixed in Version => Beta 3.740 Code Panopticon