mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07:00
Configurable batch size when training units. Patch by Sandarac, fixes #4059.
This was SVN commit r18421.
This commit is contained in:
parent
70417715be
commit
2735494a92
3 changed files with 10 additions and 1 deletions
|
|
@ -330,6 +330,7 @@ limitfps = true ; Limit FPS in the menus and loading screen
|
|||
attacknotificationmessage = true ; Show attack notification messages
|
||||
camerajump.threshold = 40 ; How close do we have to be to the actual location in order to jump back to the previous one?
|
||||
timeelapsedcounter = false ; Show the game duration in the top right corner
|
||||
batchtrainingsize = 5 ; Number of units to be trained per batch (when pressing the hotkey)
|
||||
|
||||
[gui.session.minimap]
|
||||
blinkduration = 1.7 ; The blink duration while pinging
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@
|
|||
"label": "Observer Limit",
|
||||
"tooltip": "Prevent further observer from joining if the limit is reached",
|
||||
"parameters": { "config": "network.observerlimit", "min": 0, "max": 16 }
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"label": "Batch Training Size",
|
||||
"tooltip": "Number of units trained per batch",
|
||||
"parameters": { "config": "gui.session.batchtrainingsize", "min": 1, "max": 20 }
|
||||
}
|
||||
],
|
||||
"graphicsSetting":
|
||||
|
|
|
|||
|
|
@ -1262,7 +1262,6 @@ var batchTrainingEntities;
|
|||
var batchTrainingType;
|
||||
var batchTrainingCount;
|
||||
var batchTrainingEntityAllowedCount;
|
||||
const batchIncrementSize = 5;
|
||||
|
||||
function flushTrainingBatch()
|
||||
{
|
||||
|
|
@ -1372,6 +1371,8 @@ function addTrainingToQueue(selection, trainEntType, playerState)
|
|||
if (!decrement)
|
||||
var template = GetTemplateData(trainEntType);
|
||||
|
||||
let batchIncrementSize = +Engine.ConfigDB_GetValue("user", "gui.session.batchtrainingsize");
|
||||
|
||||
if (Engine.HotkeyIsPressed("session.batchtrain") && batchTrainingPossible)
|
||||
{
|
||||
if (inputState == INPUT_BATCHTRAINING)
|
||||
|
|
@ -1455,6 +1456,7 @@ function addResearchToQueue(entity, researchType)
|
|||
// the training button with shift down
|
||||
function getTrainingBatchStatus(playerState, entity, trainEntType, selection)
|
||||
{
|
||||
let batchIncrementSize = +Engine.ConfigDB_GetValue("user", "gui.session.batchtrainingsize");
|
||||
var appropriateBuildings = [entity];
|
||||
if (selection && selection.indexOf(entity) != -1)
|
||||
appropriateBuildings = getBuildingsWhichCanTrainEntity(selection, trainEntType);
|
||||
|
|
|
|||
Loading…
Reference in a new issue