You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
snake-biscuits opened this issue
Sep 4, 2024
· 3 comments
Assignees
Labels
archivesrelated to archives modulebugSomething isn't workingrefactorrequires restructuring some backed stuffslow burnlots of work & will take a long time
Some archives scripts cannot import branches.base valve.source & nexon.cso2 import pkware.Zip & nexon.PakFile
Using Struct would be really handy for some binary structures (those less tightly packed)
This might be because we use from ..branches.base import Struct (to avoid collision w/ archives.base)
Since that has to go through bsp_tool/branches/__init__.py, which loads all branch scripts
Would from ..branches import base as branches_base work?
If that isn't the case, we'll have to move branches.base classes elsewhere (maybe utils.binary?)
The text was updated successfully, but these errors were encountered:
moving such a core feature to a new location is a huge job
we also need to be sure the new location is a good one
utils.binary seems like a good location from a namespaces perspective
but branches.base is a big cluttered file, overlapping w/ function utils could be extremely messy
taking each class (Struct, MappedArray & BitField) into their own script seems smart, but idk branches.base contains some utils universal to all 3, which might be hard to spread
tbh we could put this under bsp_tool.lumps, since most lumps interact w/ RawBspLump etc. branches.shared.UnsignedInts etc. (BasicLumpClasses) would need to move too
grouping them together makes sense to me, feels intuitive to remember branches.shared is kinda an awkward spot anyway
would also be cool to have a generic SpecialLumpClass baseclass
for wiring up a .from_bytes()@classmethod
that way implementations only need a .from_stream()__init__
binary.read_struct has been really handy for building .from_stream()s in archives
I can see it getting a lot of use in SpecialLumpClass specs as well
Just can't think of where'd be a good place to put that
archivesrelated to archives modulebugSomething isn't workingrefactorrequires restructuring some backed stuffslow burnlots of work & will take a long time
Some
archives
scripts cannot importbranches.base
valve.source
&nexon.cso2
importpkware.Zip
&nexon.PakFile
Using
Struct
would be really handy for some binary structures (those less tightly packed)This might be because we use
from ..branches.base import Struct
(to avoid collision w/archives.base
)Since that has to go through
bsp_tool/branches/__init__.py
, which loads all branch scriptsIf that isn't the case, we'll have to move
branches.base
classes elsewhere (maybeutils.binary
?)The text was updated successfully, but these errors were encountered: