Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 1,101 Lines • ▼ Show 20 Lines | if (this.placementEntity) | ||||
{ | { | ||||
if (cmd.actorSeed !== undefined) | if (cmd.actorSeed !== undefined) | ||||
cmpVisual.SetActorSeed(cmd.actorSeed); | cmpVisual.SetActorSeed(cmd.actorSeed); | ||||
if (!result.success) | if (!result.success) | ||||
cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1); | cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1); | ||||
else | else | ||||
cmpVisual.SetShadingColor(1, 1, 1, 1); | cmpVisual.SetShadingColor(1, 1, 1, 1); | ||||
let cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager); | |||||
let entityTemplate = cmpTemplateManager.GetTemplate(this.placementEntity[0]); | |||||
let visualActor = ApplyValueModificationsToTemplate("VisualActor/Actor", cmpVisual.GetActorName(), | |||||
QueryOwnerInterface(ent).GetPlayerID(), entityTemplate); | |||||
cmpVisual.SetActor(visualActor); | |||||
} | } | ||||
} | } | ||||
return result; | return result; | ||||
}; | }; | ||||
/** | /** | ||||
* Previews the placement of a wall between cmd.start and cmd.end, or just the starting piece of a wall if cmd.end is not | * Previews the placement of a wall between cmd.start and cmd.end, or just the starting piece of a wall if cmd.end is not | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
* @param cmd.wallSet Object holding the set of wall piece template names. Set to an empty value to clear the preview. | * @param cmd.wallSet Object holding the set of wall piece template names. Set to an empty value to clear the preview. | ||||
* @param cmd.start Starting point of the wall segment being created. | * @param cmd.start Starting point of the wall segment being created. | ||||
* @param cmd.end (Optional) Ending point of the wall segment being created. If not defined, it is understood that only | * @param cmd.end (Optional) Ending point of the wall segment being created. If not defined, it is understood that only | ||||
* the starting point of the wall is available at this time (e.g. while the player is still in the process | * the starting point of the wall is available at this time (e.g. while the player is still in the process | ||||
* of picking a starting point), and that therefore only the first entity in the wall (a tower) should be | * of picking a starting point), and that therefore only the first entity in the wall (a tower) should be | ||||
* previewed. | * previewed. | ||||
* @param cmd.snapEntities List of candidate entities to snap the start and ending positions to. | * @param cmd.snapEntities List of candidate entities to snap the start and ending positions to. | ||||
*/ | */ | ||||
GuiInterface.prototype.SetWallPlacementPreview = function(player, cmd) | GuiInterface.prototype.SetWallPlacementPreview = function(player, cmd) | ||||
leper: Should this be adjusted too? (Note that I haven't tried the patch yet.) | |||||
SandaracUnsubmitted Not Done Inline ActionsYes, you're right, it should have been handled, done now. Sandarac: Yes, you're right, it should have been handled, done now. | |||||
{ | { | ||||
let wallSet = cmd.wallSet; | let wallSet = cmd.wallSet; | ||||
let start = { | let start = { | ||||
"pos": cmd.start, | "pos": cmd.start, | ||||
"angle": 0, | "angle": 0, | ||||
"snapped": false, // did the start position snap to anything? | "snapped": false, // did the start position snap to anything? | ||||
"snappedEnt": INVALID_ENTITY, // if we snapped, was it to an entity? if yes, holds that entity's ID | "snappedEnt": INVALID_ENTITY, // if we snapped, was it to an entity? if yes, holds that entity's ID | ||||
▲ Show 20 Lines • Show All 836 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Should this be adjusted too? (Note that I haven't tried the patch yet.)