-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mounting extra files to ArchiveClasses & BspClasses loaded from archives #197
Comments
really, this has 2 parts
|
started looking at this now planning to add
|
implementing we might need to keep the
might be a while until I land on an implementation |
.from_archive()
__init__
Some We already have def mount_file(self, filename: str, archive=None):
if archive is None:
self.external_files[filename] = open(filename, "rb")
else:
self.external_files[filename] = io.BytesIO(archive.read(filename))
def unmount_file(self, filename: str):
self.external_files.pop(filename) Afaik all external files would be binary Could be useful to have some kind of |
particle manifests would be a plaintext extra file for |
Footnotes
|
we could extract files we want to mount inside archives until we work out a system for streaming assets in archives anyway |
|
…e` (`.from_archive` & `.from_file`)
ArchiveClasses & BspClasses now automatically mount extras each specific class which uses external files now needs to access them via |
We need archives we can use to actually test file mounting Might have to make an Tho I guess for |
Could add a raw bytedata arg to def mount_file(self, filename: str, archive=None, raw_data: bytes = None):
if raw_data is not None:
self.extras[filename] = io.BytesIO(raw_data)
else:
... # load from file or archive as before I'm sure this could also be useful outside of testing |
|
Not every |
got
would also reduce memory costs by "streaming" data from discs |
From #191:
We should also look at some standard method for linking related files
sega.Gdi
,respawn.RPak
,respawn.Vpk
&valve.Vpk
could all use this toosince their
.read()
methods can't function without grabbing data from other filesPlaces where this'd be useful
ArchiveClasses
alcohol.Mds
golden_hawk.Cue
respawn.RPak
respawn.Vpk
sega.Gdi
valve.Vpk
BspClasses
ValveBsp
RespawnBsp
(respawn.ExternalLumpManager
)Related
BspClass.from_file
#156The text was updated successfully, but these errors were encountered: