Ticket #3150: team_exploration_score.patch

File team_exploration_score.patch, 1.8 KB (added by Imarok, 8 years ago)

fixes the team exploration score

  • binaries/data/mods/public/gui/credits/texts/programming.json

     
    8383            {"nick": "h20", "name": "Daniel Wilhelm"},
    8484            {"nick": "historic_bruno", "name": "Ben Brian"},
    8585            {"nick": "idanwin"},
     86            {"nick": "Imarok", "name": "J. S."},
    8687            {"nick": "infyquest", "name": "Vijay Kiran Kamuju"},
    8788            {"nick": "IronNerd", "name": "Matthew McMullan"},
    8889            {"nick": "Itms", "name": "Nicolas Auvray"},
  • binaries/data/mods/public/gui/summary/counters.js

     
    11// FUNCTIONS FOR CALCULATING SCORES
    22var g_TeamMiscHelperData = [];
     3var teamExploration = [];
    34
    45function resetDataHelpers()
    56{
     
    3132}
    3233
    3334function calculateExplorationScore(playerState, position)
    34 {
     35{   
     36    teamExploration[playerState.team] = playerState.statistics.teamPercentMapExplored;
    3537    return playerState.statistics.percentMapExplored * 10;
    3638}
    3739
     
    5254        for (let w in counters)
    5355        {
    5456            let total = 0;
    55             for (let p = 0; p < g_Teams[t]; ++p)
    56                 total += (+Engine.GetGUIObjectByName("valueDataTeam[" + t + "][" + p + "][" + w + "]").caption);
    57 
     57            if(w == 2){ total = teamExploration[t] * 10;}
     58            else
     59            {
     60                for (let p = 0; p < g_Teams[t]; ++p)
     61                {
     62                    total += (+Engine.GetGUIObjectByName("valueDataTeam[" + t + "][" + p + "][" + w + "]").caption);
     63                }
     64            }
    5865            Engine.GetGUIObjectByName("valueDataTeam[" + t + "][" + w + "]").caption = total;
    5966        }
    6067    }