Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Keyi Zhang
    @Kuree
    like in the tool
    ln 63
    Snaitf
    @Snaitf
    but the tool wrapper works fine
    Keyi Zhang
    @Kuree
    even if create a new resource from scratch?
    Snaitf
    @Snaitf
    i'll check again
    Keyi Zhang
    @Kuree
    it will try to read the stream
    which doesn't have list information
    it will break the wrapper
    Snaitf
    @Snaitf
    nah, it works
    Keyi Zhang
    @Kuree
    :O
    but the list does exit?
    Snaitf
    @Snaitf
    I created the UnknownList by copying your code from MatdEntryList
    Keyi Zhang
    @Kuree
    but when you initialize the empty
    you shouldn't pass the stream
    it should be
    if (this.unknownList1 == null) this.unknownList1 = new UnknownList(OnResourceChanged);
    rather than
    if (this.unknownList1 == null) this.unknownList1 = new UnknownList(OnResourceChanged, s);
    Snaitf
    @Snaitf
    oic, the reason it works in tool, is probably because the ref flag is set to false by default, so it doesn't get called when makeing a new one
    Keyi Zhang
    @Kuree
    that's what I thought
    Snaitf
    @Snaitf
    but then, when I go into grid and change the ref flag to true, it does create an empty unknown list, with no errors
    Keyi Zhang
    @Kuree
    it should throw some errors in my understanding
    Snaitf
    @Snaitf
    here is a completely new tool - http://i.imgur.com/GR4fbcM.png - and here is that same tool with listflag set to true in the grid - http://i.imgur.com/djardIZ.png
    Keyi Zhang
    @Kuree
    that's really weird
    but anyway I changed it back to the constructor without stream
    just in case it will break the unparse function
    Snaitf
    @Snaitf
    kk
    Keyi Zhang
    @Kuree
    and I also clean up some redundant code
    Snaitf
    @Snaitf
    in fact, that is how you did it in the spandrel wrapper, too
    if (this.modlEntryList1 == null) this.modlEntryList1 = new ModlEntryList(OnResourceChanged, s);
    • this.modlEntryList1.UnParse(s);
    which is why i did it that way, too
    Keyi Zhang
    @Kuree
    uhh oops
    I'm sorry that was a mistake
    Snaitf
    @Snaitf
    heh, ok, least i know why mine was wrong, too
    Keyi Zhang
    @Kuree
    okay need to do homework now..
    Snaitf
    @Snaitf
    alright, thx for help
    Snaitf
    @Snaitf

    hmm, there is still a problem with the fence wrapper. I think it is in the lines:

    for (int i = 0; i < r.ReadUInt16(); i++) this.unknownList1.Add(r.ReadUInt32());

    Won't that try to read another uint16 every time through the loop?
    I tried changing it to:

    int count = r.ReadUInt16();
    for (int i = 0; i < count; i++) this.unknownList1.Add(r.ReadUInt32());

    that makes it parse ok, but when i hit grid/commit, the file gets corrupted, i'm not sure what else is wrong

    Snaitf
    @Snaitf
    what does simple list use for a count when unparsing? It needs to be a ushort.
    Keyi Zhang
    @Kuree
    I'll check it
    found the problem
    fixed it
    thank you for testing it
    Snaitf
    @Snaitf
    ah, ok, ty and yw
    A
    @andrewtavera
    Hey Kuree, are you here?
    Snaitf
    @Snaitf
    Found a bug in your bug fix, and fixed it. Pull request sent.
    Keyi Zhang
    @Kuree
    lol
    oops
    Snaitf
    @Snaitf
    heh, just a simple c&p error
    that's the last of the cat res wrappers
    Keyi Zhang
    @Kuree
    hmm didn't realize that vs as a built-in hex editor
    Snaitf
    @Snaitf
    Umm, did I miss something?
    Keyi Zhang
    @Kuree
    no