-
-
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
save_as() method for every BspClass #15
Comments
|
This has been addressed now, but we do need automated testing to ensure this remains stable. All an automated test needs to confirm (for now) is that loading and saving a .bsp matches the source file byte-for-byte |
All base.Bsp subclasses with their unique |
The top comment tracks each During the initial development of each |
Automated testing for |
#112 shows that we need to test all Building tests to support |
refactors to |
#143 found some bugs w/ |
We might need to categorise other tails to see if they need padding too >>> import bsp_tool, os, fnmatch
>>> md = "E:/Mod/QuakeII/rerelease/pak0/maps/"
>>> maps = {m[:-4]: bsp_tool.load_bsp(os.path.join(md, m)) for m in fnmatch.filter(os.listdir(md), "*.bsp")}
>>> subfolders = {d for d in os.listdir(md) if os.path.isdir(os.path.join(md, d))}
>>> maps.update({
... f"{sd}/{m}"[:-4]: bsp_tool.load_bsp(os.path.join(md, sd, m))
... for sd in subfolders
... for m in fnmatch.filter(os.listdir(os.path.join(md, sd)), "*.bsp")})
...
>>> bspx_maps = {m: b for m, b in maps.items() if b"BSPX" in b._tail()}
>>> {b.__class__ for b in bspx_maps.values()}
{bsp_tool.id_software.IdTechBsp, bsp_tool.id_software.QbismBsp} Related |
This is because |
Any changes made to a .bsp should be saved back to that .bsp by bsp_tool
The user shouldn't have to worry about specifics like lump containing offsets
However confirming the saved map is valid will not be a feature at this time
(could use an optional branch script method as a fuzzy validator for engine limit checks etc.)
TRACKER:
base.Bsp
subclasses with a functional & tested.save_as()
methodFurther TODOS
tests/test_save.py
needs to be content aware, otherwise saves must be byte-for-byteThe text was updated successfully, but these errors were encountered: