Ticket #4059: batchtrainingoption.patch

File batchtrainingoption.patch, 2.2 KB (added by Sandarac, 8 years ago)

GUI option can just be removed.

  • binaries/data/config/default.cfg

     
    8585noautomipmap = true
    8686novbo = false
    8787noframebufferobject = false
     88batchtrainingsize = 5
    8889
    8990; Disable hardware cursors
    9091nohwcursor = false
  • binaries/data/mods/public/gui/options/options.json

     
    8484            "label": "Observer Limit",
    8585            "tooltip": "Prevent further observer from joining if the limit is reached",
    8686            "parameters": { "config": "network.observerlimit", "min": 0, "max": 16 }
     87        },
     88        {
     89            "type": "number",
     90            "label": "Batch Training Size",
     91            "tooltip": "Set the number of units created when batch training",
     92            "parameters": { "config": "batchtrainingsize", "min": 2, "max": 10 }
    8793        }
    8894    ],
    8995    "graphicsSetting":
  • binaries/data/mods/public/gui/session/input.js

     
    12621262var batchTrainingType;
    12631263var batchTrainingCount;
    12641264var batchTrainingEntityAllowedCount;
    1265 const batchIncrementSize = 5;
    12661265
    12671266function flushTrainingBatch()
    12681267{
     
    13721371    if (!decrement)
    13731372        var template = GetTemplateData(trainEntType);
    13741373
     1374    let batchIncrementSize = +Engine.ConfigDB_GetValue("user", "batchtrainingsize");
     1375
    13751376    if (Engine.HotkeyIsPressed("session.batchtrain") && batchTrainingPossible)
    13761377    {
    13771378        if (inputState == INPUT_BATCHTRAINING)
     
    14551456// the training button with shift down
    14561457function getTrainingBatchStatus(playerState, entity, trainEntType, selection)
    14571458{
     1459    let batchIncrementSize = +Engine.ConfigDB_GetValue("user", "batchtrainingsize");
    14581460    var appropriateBuildings = [entity];
    14591461    if (selection && selection.indexOf(entity) != -1)
    14601462        appropriateBuildings = getBuildingsWhichCanTrainEntity(selection, trainEntType);