-
-
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
Refactor BspLump #23
Comments
Need to let copied list elements behave as if BspLump classes are real lists
each BspLump type will need a test for this, do not have RespawnBsp bsp_lumps to test |
This wouldn't work with |
should really address this before tackling #15 as making small edits & seeing their affects in-engine is very powerful for research gotta love writing my own kernel to handle big data |
No, really, we need to do garbage collection of some kind here bsp.VERTICES[0].z += 1 # doesn't work rn. but should
{print(v) for v in bsp.VERTICES[:64]} # makes a copy and deletes it within scope; no changes possible Maybe we could override the We would also need to accurately mimic how Python creates copies & deep-copies The odds someone smarter than me has already tried this are quite high. |
In #80 & #68 I've planned to use Generic Maybe we could even rethink inheritance & external lumps enough to simplify |
Setting a read-only flag on IMO the best way to set this would be as a kwarg when opening a bsp_tool.load_bsp("filepath/maps/filename.bsp", read_only=True)
bsp_tool.ValveBsp(bsp_tool.branches.valve.source, "filepath/maps/filename.bsp", read_only=True) The But still, I would like to avoid creating entries in Whatever path we take, I want to give the user some control about how much RAM they use, and have good default behaviour. |
Rather than worrying about potential performance impacts, test & measure different implementations Some manual garbage collection on cached changes could be nice, idk if automation is possible |
616f08d needs more tests Don't 100% understand when Also undecided as to whether or not slices are copies or not Behaviour should match:
|
Editing attrs of an object returned by a BspLump don’t update BspLump.changes, need to do some soft copies probably
Slice overriding & insertion don’t seem to work either.
Both of these need tests and more
editing a lump should be as easy as modifying the contents of a list
The text was updated successfully, but these errors were encountered: