Tkachov / ALERT

Amazing Luna Engine Research Tools (formerly dat1_extractor)
GNU General Public License v3.0
11 stars 5 forks source link

Update material MAGIC value #2

Closed rheaSaturn closed 1 year ago

Tkachov commented 1 year ago

I think I'd rather keep both old and new. I could make that change myself, or you could add another commit to your PR if you'd like.

See how this class is derived from a class that is used for original MSMR material? class MaterialRcra(Material):

We could derive a new one from MaterialRcra, and change the MAGIC in it. For example:

class MaterialRcra_v726(MaterialRcra):
    MAGIC = 0x7C7BD7D6

Dunno what'd be the best way to differentiate the versions; those commit messages have some number, but it seems it could repeat, and also ranges from small ones like 9 to bigger ones like 452, so it's hard to tell if that's a revision or what. 726 in my example is taken from v1.726.0.0 (which, IIRC, is the original RCRA we had on PC). Latest one could be without suffix (especially since renaming it would mean changing other files like ascii_to_model). If it changes again, this one would be _v922 then.

You don't need to put any stats comments in the new class, but you could put a commit message next to the CRC value, or some other note if you think it's appropriate (like, "since RCRA 1.922.0.0"). Also, if you have any other idea of how to label different version, feel free to use it in the change.

rheaSaturn commented 1 year ago

Yeah, I think having the latest one without suffix and the old ones named with _vXXX suffix could be the way to go. I'll make that class change and make a new commit for it.

Tkachov commented 1 year ago

Merged, thanks!