Ticket #4059: batchtrainingoption.patch
File batchtrainingoption.patch, 2.2 KB (added by , 8 years ago) |
---|
-
binaries/data/config/default.cfg
85 85 noautomipmap = true 86 86 novbo = false 87 87 noframebufferobject = false 88 batchtrainingsize = 5 88 89 89 90 ; Disable hardware cursors 90 91 nohwcursor = false -
binaries/data/mods/public/gui/options/options.json
84 84 "label": "Observer Limit", 85 85 "tooltip": "Prevent further observer from joining if the limit is reached", 86 86 "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 } 87 93 } 88 94 ], 89 95 "graphicsSetting": -
binaries/data/mods/public/gui/session/input.js
1262 1262 var batchTrainingType; 1263 1263 var batchTrainingCount; 1264 1264 var batchTrainingEntityAllowedCount; 1265 const batchIncrementSize = 5;1266 1265 1267 1266 function flushTrainingBatch() 1268 1267 { … … 1372 1371 if (!decrement) 1373 1372 var template = GetTemplateData(trainEntType); 1374 1373 1374 let batchIncrementSize = +Engine.ConfigDB_GetValue("user", "batchtrainingsize"); 1375 1375 1376 if (Engine.HotkeyIsPressed("session.batchtrain") && batchTrainingPossible) 1376 1377 { 1377 1378 if (inputState == INPUT_BATCHTRAINING) … … 1455 1456 // the training button with shift down 1456 1457 function getTrainingBatchStatus(playerState, entity, trainEntType, selection) 1457 1458 { 1459 let batchIncrementSize = +Engine.ConfigDB_GetValue("user", "batchtrainingsize"); 1458 1460 var appropriateBuildings = [entity]; 1459 1461 if (selection && selection.indexOf(entity) != -1) 1460 1462 appropriateBuildings = getBuildingsWhichCanTrainEntity(selection, trainEntType);