Differential D4333 Diff 19020 ps/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
/** | /** | ||||
* Marks a technology as being queued for research at the given entityID. | * Marks a technology as being queued for research at the given entityID. | ||||
*/ | */ | ||||
TechnologyManager.prototype.QueuedResearch = function(tech, researcher) | TechnologyManager.prototype.QueuedResearch = function(tech, researcher) | ||||
{ | { | ||||
this.researchQueued.set(tech, researcher); | this.researchQueued.set(tech, researcher); | ||||
const cmpPlayer = Engine.QueryInterface(this.entity, IID_Player); | |||||
if (!cmpPlayer) | |||||
return; | |||||
const playerID = cmpPlayer.GetPlayerID(); | |||||
Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger).CallEvent("OnResearchQueued", { | |||||
"playerid": playerID, | |||||
"technologyTemplate": tech, | |||||
"researcherEntity": researcher | |||||
}); | |||||
}; | }; | ||||
// Marks a technology as actively being researched | // Marks a technology as actively being researched | ||||
TechnologyManager.prototype.StartedResearch = function(tech, notification) | TechnologyManager.prototype.StartedResearch = function(tech, notification) | ||||
{ | { | ||||
this.researchStarted.add(tech); | this.researchStarted.add(tech); | ||||
if (notification && tech.startsWith("phase")) | if (notification && tech.startsWith("phase")) | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator