Hey Keith, got a quick one for you. This will show the Strength of the AI defenses on planets when you use the "AI Defenses" galaxy view. It's quite handy.
First, in GalaxyMapDisplayMode_Normal.cs, change GetTextAndColorForLowDownText() to be a virtual function
public virtual void GetTextAndColorForLowDownText( Planet planet, out string text, out Color color )
{
CombatSide localSide = planet.Combat.GetLocalSide();
int threatStrengthInt = localSide.DataByStance[SideStance.Hostile].ThreatStrength.IntValue;
.....
Then add the following to GalaxyMapDisplayMode_Badger.cs
public class GalaxyMapDisplayMode_AIDefenses : BaseGalaxyMapDisplayMode
{
public override void PickOtherThingsToShow( Planet planet, GameEntity EntityToSkip, GameEntity[] ArrayToFill )
{
UtilityMethodsFor_GalaxyMapDisplayMode.BasePickGalaxyMapOtherThingsToShow( planet, EntityToSkip, ArrayToFill,
delegate ( GameEntity entity )
{
if ( ArcenStrings.ListContains( entity.TypeData.Tags, "NormalPlanetNastyPick" ) )
return true;
if ( ArcenStrings.ListContains( entity.TypeData.Tags, "MasterControler" ) )
return true;
return false;
} );
}
//the below function is new
public override void GetTextAndColorForLowDownText( Planet planet, out string text, out Color color )
{
CombatSide localSide = planet.Combat.GetLocalSide();
int totalStrengthInt = localSide.DataByStance[SideStance.Hostile].TotalStrength.IntValue;
if ( totalStrengthInt <= 0 )
{
text = string.Empty;
color = ColorMath.White;
}
else
{
text = totalStrengthInt.ToString();
color = ColorMath.White;
}
}
}
It seems like a useful addition to things to get us started.
Also, why does SideStance.Hostile give me what I'm looking for? I would have expected the GetLocalSide() function to return the owner of the planet, so one would use SideStance.Friendly to check the strength of whoever owns the planet on that planet.