Use an instance storage dict

to avoid main store pollution and evals
This commit is contained in:
Gouvernathor 2024-04-04 22:34:27 +02:00
parent caa4cd0b2c
commit 34547cb0ad
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,9 @@
init 5 python:
class DollChibi(renpy.Displayable):
# class attribute
instances = {}
def __init__(self, name, layer="screens", zorder=12, zoom=0.28, **properties):
super().__init__(**properties)
@ -35,6 +38,8 @@ init 5 python:
self.atl_pause = False
self.atl_at_list = []
self.instances[name] = self
def register(self, pose, frames, size):
self.poses[pose] = (frames, size)