Template:BuildingsNavNext/doc: Difference between revisions

Template page
(Created page with "This navbox end goal is to mimick the game build UI. 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: - o...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This navbox end goal is to mimick the game build UI.


Dev notes: 
== Description ==


- Game orders category just by declaring them in order in data.categories
This navbox goal is to mimick the game build UI in what categories and items are shown.
- 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.)
== Dev notes ==
- In game code, BuildView.lua is where most of the stuff happens
 
- Game filters entities by:
* Game orders category just by declaring them in order in data.categories
  - only stuff that is unlocked by faction
* Order within a category seems to be done with some "id" of who registered first? Not implemented here.  
  - `if not frame_def.construction_recipe then return end -- not a building` -> This one matches our `entity.recipeType != Construction` in the sub template BuildingsNavCat
** (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.)
  - `if not bp_frame_def and not def.visual then return end -- no default visual` -> Extract code already skips this
* 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

Latest revision as of 06:59, 3 August 2025

Description[edit source]

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

Dev notes[edit source]

  • 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