Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/input.js
Show First 20 Lines • Show All 1,342 Lines • ▼ Show 20 Lines | function OnTrainMouseWheel(dir) | ||||
updateSelectionDetails(); | updateSelectionDetails(); | ||||
} | } | ||||
function getBuildingsWhichCanTrainEntity(entitiesToCheck, trainEntType) | function getBuildingsWhichCanTrainEntity(entitiesToCheck, trainEntType) | ||||
{ | { | ||||
return entitiesToCheck.filter(entity => { | return entitiesToCheck.filter(entity => { | ||||
let state = GetEntityState(entity); | let state = GetEntityState(entity); | ||||
return state && state.production && state.production.entities.length && | return state && state.production && state.production.entities.length && | ||||
state.production.entities.indexOf(trainEntType) != -1; | state.production.entities.indexOf(trainEntType) != -1 && (!state.upgrade || !state.upgrade.isUpgrading); | ||||
}); | }); | ||||
} | } | ||||
function initBatchTrain() | function initBatchTrain() | ||||
{ | { | ||||
registerConfigChangeHandler(changes => { | registerConfigChangeHandler(changes => { | ||||
if (changes.has("gui.session.batchtrainingsize")) | if (changes.has("gui.session.batchtrainingsize")) | ||||
updateDefaultBatchSize(); | updateDefaultBatchSize(); | ||||
▲ Show 20 Lines • Show All 300 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator