Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Player.js
Context not available. | |||||
this.UpdateSharedLos(); | this.UpdateSharedLos(); | ||||
else if (msg.tech == this.template.SharedDropsitesTech) | else if (msg.tech == this.template.SharedDropsitesTech) | ||||
this.sharedDropsites = true; | this.sharedDropsites = true; | ||||
// Send a notification for new phase | |||||
elexis: An alternative would be TechnologyManager.prototype.ResearchTechnology. If you change the other… | |||||
let cmpDataTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_DataTemplateManager); | |||||
let template = cmpDataTemplateManager.GetTechnologyTemplate(msg.tech); | |||||
if (msg.tech.startsWith("phase_") && !template.autoResearch) | |||||
{ | |||||
var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); | |||||
cmpGUIInterface.PushNotification({ | |||||
elexisUnsubmitted Not Done Inline Actionswhitespace, let elexis: whitespace, let | |||||
"type": "phase", | |||||
"players": [this.playerID], | |||||
"phaseName": msg.tech, | |||||
"phaseState": "completed" | |||||
}); | |||||
} | |||||
}; | }; | ||||
Player.prototype.OnDiplomacyChanged = function() | Player.prototype.OnDiplomacyChanged = function() | ||||
Context not available. |
Wildfire Games · Phabricator
An alternative would be TechnologyManager.prototype.ResearchTechnology. If you change the other, changing this one is probably better too, in particular since it doesn't do anything with the player component itself.