Skip to content

Figure out how to sort entries/how the order should be represented in the repo (if at all) #13

@that-hatter

Description

@that-hatter

Entries in the repo are currently unordered. But some entries should ideally be sorted in a specific way, especially constants:

  • "bitfield" constants should be sorted by the amount of bits instead of a direct numeric comparison
  • card names make more sense to be sorted by name
  • archetypes should be grouped so subarchetypes stick with their main archetype

Right now, the loader simply sorts entries alphabetically after parsing, except for constants which are sorted by value. Archetype sorting is also harcoded.

A similar project, the factorio runtime docs specifies an "order" property on entries, but this approach feels cumbersome to maintain.

One idea is to use the filenames as the basis for sorting, since they're not necessarily the same as the entry name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions