Opened 8 years ago

Closed 8 years ago

#3793 closed defect (invalid)

[BUG] Bug in session\input.js lines 683-688

Reported by: False Vision Owned by: False Vision
Priority: Should Have Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description

In session\input.js line 683 the function updateBuildingPlacementPreview returns a boolean:

var result = updateBuildingPlacementPreview();

But the next line checks if it has a "cost" property: if (result && result.cost)

Also line 688 uses the property cost.

In line 687 getEntityCostTooltip should be called with 3 parameters not with a boolean.

Change History (1)

comment:1 by elexis, 8 years ago

Milestone: Alpha 21
Resolution: invalid
Status: newclosed

Thanks for looking at the code, but updateBuildingPlacementPreview can return an object (see return Engine.GuiInterfaceCall("SetWallPlacementPreview", {) in case you build a wall.

Building costs are fixed, but the costs of a wall depend on the length of the wall, so it has to check if the requirements are met while the user is placing it.

Note: See TracTickets for help on using tickets.