Move the static values to a defined constant
That way it's not saved and it can be upgraded from version to version
This commit is contained in:
parent
0d8e91b5a5
commit
42d2a17a6a
@ -1,3 +1,6 @@
|
|||||||
|
# will be populated by the chibi inits
|
||||||
|
define __poses = {}
|
||||||
|
|
||||||
init 5 python:
|
init 5 python:
|
||||||
class DollChibi(renpy.Displayable):
|
class DollChibi(renpy.Displayable):
|
||||||
|
|
||||||
@ -21,7 +24,10 @@ init 5 python:
|
|||||||
if doll is None:
|
if doll is None:
|
||||||
doll = states.dolls[name]
|
doll = states.dolls[name]
|
||||||
self.char = doll
|
self.char = doll
|
||||||
self.poses = poses or {}
|
|
||||||
|
__poses[name] = {}
|
||||||
|
if poses is not None:
|
||||||
|
self.poses.update(poses)
|
||||||
|
|
||||||
# Animation
|
# Animation
|
||||||
self.anim_frames = None
|
self.anim_frames = None
|
||||||
@ -42,6 +48,11 @@ init 5 python:
|
|||||||
|
|
||||||
self.instances[name] = self
|
self.instances[name] = self
|
||||||
|
|
||||||
|
# no setter, on purpose
|
||||||
|
@property
|
||||||
|
def poses(self):
|
||||||
|
return __poses[self.name]
|
||||||
|
|
||||||
def register(self, pose, frames, size):
|
def register(self, pose, frames, size):
|
||||||
self.poses[pose] = (frames, size)
|
self.poses[pose] = (frames, size)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user