Ticket #1586: AI - Sorted and named by difficulty.patch

File AI - Sorted and named by difficulty.patch, 2.1 KB (added by Cerridan, 12 years ago)

AI's have gained a new "difficulty" attribute in order to sort them by difficulty.

  • binaries/data/mods/public/gui/gamesetup/gamesetup.js

     
    8787
    8888    // Sort AIs by displayed name
    8989    g_AIs.sort(function (a, b) {
    90         return a.data.name < b.data.name ? -1 : b.data.name < a.data.name ? +1 : 0;
     90        return a.data.difficulty < b.data.difficulty ? -1 : b.data.difficulty < a.data.difficulty ? +1 : 0;
    9191    });
    9292
    9393    // Get default player data - remove gaia
  • binaries/data/mods/public/simulation/ai/jubot/data.json

     
    11{
    2   "name": "JuBot",
     2  "name": "JuBot (Easy)",
     3  "difficulty": "0",
    34  "description": "Jubal's improved version of the 0AD TestBot.",
    45  "constructor": "JuBotAI"
    56}
  • binaries/data/mods/public/simulation/ai/qbot-wc/data.json

     
    11{
    2   "name": "Aegis Bot",
     2  "name": "Aegis Bot (Hard)",
     3  "difficulty": "2",
    34  "description": "Improvements over qBot by Wraitii. Still experimental(bugs possible).\nThis bot may be harder to defeat than the regular qBot. Please report any problems on the Wildfire forums.",
    45  "constructor": "QBotAI"
    56}
  • binaries/data/mods/public/simulation/ai/qbot/data.json

     
    11{
    2   "name": "qBot",
     2  "name": "qBot (Medium)",
     3  "difficulty": "1",
    34  "description": "Quantumstate's improved version of the Test Bot",
    45  "constructor": "QBotAI"
    56}