Skip to content

Conversation

przystuj
Copy link
Contributor

@przystuj przystuj commented Sep 3, 2025

gfx_showbuilderqueue.luawas responsible for tracking active build orders and displaying their building ghosts. I want to create another widget that also needs to track build orders, so I’ve extracted that logic into api_builder_queue.lua.

The API now handles build order tracking, while gfx_showbuilderqueueis only responsible for displaying the ghosts.

The only functional change is that previously, whenever a unit’s commands changed, all of its ghosts were redrawn. Now, only obsolete ghosts are removed. From the player’s perspective, there should be no visible difference in behavior.

Test steps

  • Start a match with allied AI. Make some long build queues with various constructors.
  • The building ghosts should be visible for both player and allies.
  • Cancel and/or modify the orders - the ghosts should update properly
  • Destroy the builder in the middle of the queue - ghosts should be cleared
  • Share the builder in the middle of the queue - ghosts should be still visible if builder continues the queue
  • Open some 8v8 replay. You should see ghosts of both teams
  • Enable Player View. You should see ghosts only of this player's team

Api will keep track of build orders and gfx_showbuilderqueue will only display the ghosts
@przystuj przystuj marked this pull request as ready for review September 4, 2025 00:01
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.

1 participant