Differential D1250 Diff 5478 ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 751 Lines • ▼ Show 20 Lines | for (let ent of cmd.entities) | ||||
for (let building of cmpBuilder.GetEntitiesList()) | for (let building of cmpBuilder.GetEntitiesList()) | ||||
if (buildableEnts.indexOf(building) == -1) | if (buildableEnts.indexOf(building) == -1) | ||||
buildableEnts.push(building); | buildableEnts.push(building); | ||||
} | } | ||||
return buildableEnts; | return buildableEnts; | ||||
}; | }; | ||||
/** | |||||
* Updates player colors on the minimap. | |||||
*/ | |||||
GuiInterface.prototype.UpdateDisplayedPlayerColors = function() | |||||
{ | |||||
for (let ent of Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager).GetGaiaAndNonGaiaEntities()) | |||||
{ | |||||
let cmpMinimap = Engine.QueryInterface(ent, IID_Minimap); | |||||
if (cmpMinimap) | |||||
cmpMinimap.UpdateColor(); | |||||
} | |||||
}; | |||||
GuiInterface.prototype.SetSelectionHighlight = function(player, cmd) | GuiInterface.prototype.SetSelectionHighlight = function(player, cmd) | ||||
{ | { | ||||
let playerColors = {}; // cache of owner -> color map | let playerColors = {}; // cache of owner -> color map | ||||
for (let ent of cmd.entities) | for (let ent of cmd.entities) | ||||
{ | { | ||||
let cmpSelectable = Engine.QueryInterface(ent, IID_Selectable); | let cmpSelectable = Engine.QueryInterface(ent, IID_Selectable); | ||||
if (!cmpSelectable) | if (!cmpSelectable) | ||||
▲ Show 20 Lines • Show All 1,117 Lines • ▼ Show 20 Lines | let exposedFunctions = { | ||||
"GetAvailableFormations": 1, | "GetAvailableFormations": 1, | ||||
"GetFormationRequirements": 1, | "GetFormationRequirements": 1, | ||||
"CanMoveEntsIntoFormation": 1, | "CanMoveEntsIntoFormation": 1, | ||||
"IsFormationSelected": 1, | "IsFormationSelected": 1, | ||||
"GetFormationInfoFromTemplate": 1, | "GetFormationInfoFromTemplate": 1, | ||||
"IsStanceSelected": 1, | "IsStanceSelected": 1, | ||||
"UpdateDisplayedPlayerColors": 1, | |||||
"SetSelectionHighlight": 1, | "SetSelectionHighlight": 1, | ||||
"GetAllBuildableEntities": 1, | "GetAllBuildableEntities": 1, | ||||
"SetStatusBars": 1, | "SetStatusBars": 1, | ||||
"GetPlayerEntities": 1, | "GetPlayerEntities": 1, | ||||
"GetNonGaiaEntities": 1, | "GetNonGaiaEntities": 1, | ||||
"DisplayRallyPoint": 1, | "DisplayRallyPoint": 1, | ||||
"AddTargetMarker": 1, | "AddTargetMarker": 1, | ||||
"SetBuildingPlacementPreview": 1, | "SetBuildingPlacementPreview": 1, | ||||
Show All 32 Lines |
Wildfire Games · Phabricator