Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Commands.js
Context not available. | |||||
var queue = Engine.QueryInterface(cmd.entity, IID_ProductionQueue); | var queue = Engine.QueryInterface(cmd.entity, IID_ProductionQueue); | ||||
if (queue) | if (queue) | ||||
queue.AddBatch(cmd.template, "technology"); | queue.AddBatch(cmd.template, "technology"); | ||||
// if the researched technology is phasing, send a notification to GUI | |||||
elexis: Capital I in accordance with the rest of the file and most of the code and since it's a sentence | |||||
if (cmd.template.startsWith("phase_") && !cmd.template.autoResearch) | |||||
Not Done Inline ActionsAn alternative place to include instead of Commands.js would be ProductionQueue. Actually it was said a long time ago that Commands.js should contain as few code as possible, everything should be moved to the components themselves. so probably better to move it there. elexis: An alternative place to include instead of `Commands.js` would be ProductionQueue.
This would… | |||||
{ | |||||
var cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | |||||
cmpGuiInterface.PushNotification({ | |||||
"type": "phase", | |||||
"players": [player], | |||||
"phaseName": cmd.template, | |||||
"phaseState": "started" | |||||
}); | |||||
} | |||||
}, | }, | ||||
"stop-production": function(player, cmd, data) | "stop-production": function(player, cmd, data) | ||||
Context not available. |
Wildfire Games · Phabricator
Capital I in accordance with the rest of the file and most of the code and since it's a sentence