Coder Social home page Coder Social logo

Double nested repeat support about lumina HOT 6 OPEN

akuseru avatar akuseru commented on May 30, 2024
Double nested repeat support

from lumina.

Comments (6)

NotAdam avatar NotAdam commented on May 30, 2024

Yep, and there can be groups in these or groups of these too, it's a huge mess. Fixing the groups would require them to have a name at least, and then it could be cleaned up a bit but it's pretty disgusting.

I'm not really sure on a good approach for handling these as its all kind of everywhere

from lumina.

goaaats avatar goaaats commented on May 30, 2024

How about just parsing it into a fixed-size array, I think that's what SC does

from lumina.

NotAdam avatar NotAdam commented on May 30, 2024

You can't for groups, because a group might repeat say 20 times and have several members, which would look more like

struct BaseParam
{
    uint kind;
    uint value;
} params[6];

Which isn't something you can do sequentially as is without sacrificing what the data actually is

from lumina.

NotAdam avatar NotAdam commented on May 30, 2024

I think it's not too much of a problem if the groups were named, because then you could generate structures for all of them, but as is, it's kind of just meaningless

from lumina.

NotAdam avatar NotAdam commented on May 30, 2024

Double nested repeat isn't done, nor is crazy shit like this:

{
  "sheet": "GCSupplyDuty",
  "definitions": [
    {
      "type": "repeat",
      "count": 11,
      "definition": {
        "type": "repeat",
        "count": 3,
        "definition": {
          "type": "group",
          "members": [
            {
              "name": "Item",
              "converter": {
                "type": "link",
                "target": "Item"
              }
            },
            {
              "name": "ItemCount"
            }
          ]
        }
      }
    }
  ]
}

But the generator has been completely rewritten and correctly supports:

  • Arrays
  • Groups (needs more work but what's there is a decent start)
  • Sheet references, lazily loaded
  • Any combinations of the above, except groups with sheet references
  • bools without returning junk

bitsets are gone and are just read by their columns now instead, easier that way

this is currently on develop, will merge into master and publish to nuget probably tomorrow or the day after once I fix a couple weird things

main thing to note: generated structs have moved to their own nuget package, lumina.generated, potentially changing namespace too but not 100% committed to that yet

from lumina.

NotAdam avatar NotAdam commented on May 30, 2024

fyi: all of these changes outlined above are available on nuget now

I'm still conflicted on whether double repeat and whatnot is even worth supporting, it's probably going to be more reasonable to manually implement those sheets as required

from lumina.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.