Building construction placement UI
When the player chooses to build a building, they need some way to pick a location for it.
The implementation should be somewhat similar to the Atlas entity preview feature. Probable approach is: GuiInterface.js
should provide some functions ShowEntityPreview(templateName, x, z, angle, player)
and HideEntityPreview()
. Those functions would construct a local entity with the preview|templateName
magic template, and move it around, and delete it when it's hidden. Show
would return a flag indicating if that's a valid build location (based on terrain, obstructions, etc). (Also it'd have to change the colour to indicate obstruction, and deal with FOW etc). The GUI input-handling scripts would just call those functions to show the previews, and then send the parameters to a 'construct' command when the player clicks.
Change History
(3)
Resolution: |
→ fixed
|
Status: |
new → closed
|
Done in r7285, r7352, etc.