-
Notifications
You must be signed in to change notification settings - Fork 363
Closed
Labels
Milestone
Description
The current sprite_lists and name_mapping members are "public". Some users are modifying these directly causing issues that are hard to debug and understand. We should make them private and add additional tools if needed.
Lines 30 to 32 in 98d4cac
| def __init__(self) -> None: | |
| self.sprite_lists: List[SpriteList] = [] | |
| self.name_mapping: Dict[str, SpriteList] = {} |
Things like __len__ and __delitem__ are candidates here.
On a few occations users have been deleting spritelists from name_mapping thinking that this will remove the spritelist. For more dynamic worlds this means you end up with hundres of spritelists in spritelists and performance tanks.
pushfoo and gran4