Template:BuildingsNavNext/doc

Template page
Revision as of 06:38, 3 August 2025 by Kelno (talk | contribs)

This navbox goal is to mimick the game build UI in what categories and items are shown.

Dev notes

  • Game orders category just by declaring them in order in data.categories
  • Order within a category seems to be done with some "id" of who registered first? Not implemented here.
    • (but if we need that, maybe it's enough to just add an ordering field with the same logic as the one for filter categories.)
  • In game code, BuildView.lua is where most of the stuff happens
  • Game filters entities by:
    • only stuff that is unlocked by faction
    • `if not frame_def.construction_recipe then return end -- not a building` -> This one matches our `entity.recipeType != Construction` in the sub template (BuildingsNavCat)
    • `if not bp_frame_def and not def.visual then return end -- no default visual` -> Extract code already skips this