View Issue Details

IDProjectCategoryLast Update
0020496AI War 2GUIOct 13, 2018 3:49 pm
ReporterBobtree Assigned ToDominus Arbitrationis  
Status resolvedResolutionfixed 
Product Version0.783 Go Ahead And Shoot Me, Eyebot! 
Fixed in Version0.784 Dash And Destruct 
Summary0020496: Coprocessor tooltip count
DescriptionThe Coprocessor unit tooltip doesn't count the # of remaining Coprocessors correctly. With 4 on my galaxy map, they all say "if all remaining 1 of these die". The AIP does go down when you snipe the last one, as expected.
TagsNo tags attached.

Activities

BadgerBadger

Oct 13, 2018 2:44 pm

manager   ~0049932

The code in question is
                    buffer.Add( "AI Progress (AIP) will <color=#ffdf72>rise by " ).Add( relatedEntityData.AIPOnDeathWhenNoneLeft ).Add( "</color> if all remaining <color=#ffdf72>" )
                        .Add( BaseScenario.GetCountOfMatchingAIPOnDeathWhenNoneLeft( relatedEntityData ) ).Add( "</color> of these die. " );

        public static int GetCountOfMatchingAIPOnDeathWhenNoneLeft( GameEntityTypeData entityTypeData )
        {
            int count = 0;
            World_AIW2.Instance.DoForEntities( EntityRollupType.AIPOnDeathWhenNoneLeft, delegate ( GameEntity_Squad otherEntity )
            {
                if ( otherEntity.TypeData != entityTypeData )
                    return DelReturn.Continue;
                if ( otherEntity.HasAlreadyDoneOnFirstDeath )
                    return DelReturn.Continue;
                count++;
                return DelReturn.Break;
            } );
            return count;
        }

I'm not sure why it doesn't work.

Dominus Arbitrationis

Oct 13, 2018 3:49 pm

administrator   ~0049935

Fixed. The loop broke rather than continued.

Issue History

Date Modified Username Field Change
Oct 13, 2018 12:30 pm Bobtree New Issue
Oct 13, 2018 2:44 pm BadgerBadger Note Added: 0049932
Oct 13, 2018 3:49 pm Dominus Arbitrationis Assigned To => Dominus Arbitrationis
Oct 13, 2018 3:49 pm Dominus Arbitrationis Status new => resolved
Oct 13, 2018 3:49 pm Dominus Arbitrationis Resolution open => fixed
Oct 13, 2018 3:49 pm Dominus Arbitrationis Fixed in Version => 0.784 Dash And Destruct
Oct 13, 2018 3:49 pm Dominus Arbitrationis Note Added: 0049935