From 314f9716095546442fa664bcb9f54c501a6705b2 Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:21:01 +0200 Subject: [PATCH] Allow poses to be passed to the constructor, and update test script One problem : it still should not go into a defaulted object --- game/scripts/doll/chibi.rpy | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/game/scripts/doll/chibi.rpy b/game/scripts/doll/chibi.rpy index 35ca16dc..cdbf71f2 100644 --- a/game/scripts/doll/chibi.rpy +++ b/game/scripts/doll/chibi.rpy @@ -4,7 +4,7 @@ init 5 python: # class attribute instances = {} - def __init__(self, name, layer="screens", zorder=12, zoom=0.28, doll=None, **properties): + def __init__(self, name, layer="screens", zorder=12, zoom=0.28, doll=None, poses=None, **properties): super().__init__(**properties) @@ -21,7 +21,7 @@ init 5 python: if doll is None: doll = states.dolls[name] self.char = doll - self.poses = {} + self.poses = poses or {} # Animation self.anim_frames = None @@ -368,11 +368,12 @@ init offset = 5 default hooch_chibi = DollChibi(name="hooch", doll=hooch) # default cho_chibi_new = DollChibi(name="cho", doll=cho) -# default tonks_chibi_new = DollChibi(name="tonks", doll=tonks) +# default tonks_chibi_new = DollChibi(name="tonks", doll=tonks, poses=dict( +# stand=(1, (600, 800)), +# walk=(8, (600, 800)), +# )) # label chibitest: -# chibi tonks register ("stand", 1, (600, 800)) -# chibi tonks register ("walk", 8, (600, 800)) # "Rollback block" # $ renpy.block_rollback() @@ -392,8 +393,6 @@ default hooch_chibi = DollChibi(name="hooch", doll=hooch) # jump main_room_menu # label chibitest2: -# chibi tonks register ("stand", 1, (600, 800)) -# chibi tonks register ("walk", 8, (600, 800)) # "Rollback block" # $ renpy.block_rollback()