SpryFox/DarkConfig

Add Annotation to toggle multi-array transposing

grahamboree opened this issue · 0 comments

2d array transposition is useful in some cases to match the config logical layout with the data layout.

e.g. this config specifies an adjacency list in a format that is intended to visually match

TileMask:
  - [1, 2, 3]
  - [4, 5, 6]
  - [7, 8, 9]

The expectation is that TileMask[0,0] would correspond to slot 7, when in reality it corresponds to slot 1.
Also, incrementing x is intended to move horizontal in the 2d array, so TileMask[1, 0] is expected to correspond to slot 8, when in reality it corresponds to slot 4.

There are also cases where we absolutely don't want this transposed behavior.

We should make an annotation that can optionally transpose the config values for 2d arrays. This let's users opt-in to the transposed matrix reification described above. Default behavior should continue to reify arrays to the exact structure defined in the yaml.