Differential D606 Diff 3375 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 1,045 Lines • ▼ Show 20 Lines | if (pos) | ||||
cmpRallyPointRenderer.SetDisplayed(true); | cmpRallyPointRenderer.SetDisplayed(true); | ||||
// remember which entities have their rally points displayed so we can hide them again | // remember which entities have their rally points displayed so we can hide them again | ||||
this.entsRallyPointsDisplayed.push(ent); | this.entsRallyPointsDisplayed.push(ent); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
GuiInterface.prototype.AddTargetMarker = function(player, cmd) | |||||
{ | |||||
let ent = Engine.AddLocalEntity(cmd.template); | |||||
if (!ent) | |||||
return; | |||||
let cmpPosition = Engine.QueryInterface(ent, IID_Position); | |||||
cmpPosition.JumpTo(cmd.x, cmd.z); | |||||
}; | |||||
/** | /** | ||||
* Display the building placement preview. | * Display the building placement preview. | ||||
* cmd.template is the name of the entity template, or "" to disable the preview. | * cmd.template is the name of the entity template, or "" to disable the preview. | ||||
* cmd.x, cmd.z, cmd.angle give the location. | * cmd.x, cmd.z, cmd.angle give the location. | ||||
* | * | ||||
* Returns result object from CheckPlacement: | * Returns result object from CheckPlacement: | ||||
* { | * { | ||||
* "success": true iff the placement is valid, else false | * "success": true iff the placement is valid, else false | ||||
▲ Show 20 Lines • Show All 936 Lines • ▼ Show 20 Lines | let exposedFunctions = { | ||||
"IsStanceSelected": 1, | "IsStanceSelected": 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, | |||||
"SetBuildingPlacementPreview": 1, | "SetBuildingPlacementPreview": 1, | ||||
"SetWallPlacementPreview": 1, | "SetWallPlacementPreview": 1, | ||||
"GetFoundationSnapData": 1, | "GetFoundationSnapData": 1, | ||||
"PlaySound": 1, | "PlaySound": 1, | ||||
"FindIdleUnits": 1, | "FindIdleUnits": 1, | ||||
"HasIdleUnits": 1, | "HasIdleUnits": 1, | ||||
"GetTradingRouteGain": 1, | "GetTradingRouteGain": 1, | ||||
"GetTradingDetails": 1, | "GetTradingDetails": 1, | ||||
Show All 25 Lines |
Wildfire Games · Phabricator