JimmyCushnie / JECS

Jimmy's Epic Config System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for multi-dimensional arrays

JimmyCushnie opened this issue · comments

probably the best way to do this is by treating them as nested arrays. A 2d array is saved the same was as an array of arrays, a 3d array is saved the same way as an array of arrays of arrays, ect

You know it would be super exciting if you saved them as actual tables if they are 2D arrays. Something like this:

        Col0      Col1
Row0    val00     val01
Row1    val10     val11

But again, it is hard to implement and probably hard to use as well.

An interesting idea! Yeah, the biggest drawback I see is that it will be hard to use. SUCC files should be easy to write from scratch, with confidence that what you write won't have parsing errors. Perhaps it would be good to have this as an option without it being the default.

To prevent (or more realistically speaking, reduce) parsing errors, we might search for a separator character instead of relying on whitespace. For example:

         Col0,      Col1
Row0,    val00,     val01
Row1,    val10,     val11

Notice the commas.

Ah, that's clever