Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: register new lua function DrawBuildSquare to show build squares on custom building commands #1733

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aurelienlt
Copy link

Registers canBuildEach = Spring.DrawBuildSquare(unitIds, buidCommands) which returns if each building command is allowed, while displaying the usual grid.

Mostly forking CUnitDrawerLegacy::ShowUnitBuildSquare and reproduce GuiHandler's behavior with overlapping queue.

My first MR on that project, so please lemme know best practices.

Peek 2024-10-20 19-27

@sprunk
Copy link
Collaborator

sprunk commented Oct 21, 2024

I think drawing should not be doing any validity calculations (add another function that checks overlap, buildability or whatnot) and should draw a single blueprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants