Compare commits
3 Commits
0d8e91b5a5
...
6b6ad56af4
Author | SHA1 | Date | |
---|---|---|---|
6b6ad56af4 | |||
0f80487dfc | |||
42d2a17a6a |
@ -1,3 +1,6 @@
|
||||
# will be populated by the chibi inits
|
||||
define __poses = {}
|
||||
|
||||
init 5 python:
|
||||
class DollChibi(renpy.Displayable):
|
||||
|
||||
@ -21,7 +24,10 @@ init 5 python:
|
||||
if doll is None:
|
||||
doll = states.dolls[name]
|
||||
self.char = doll
|
||||
self.poses = poses or {}
|
||||
|
||||
__poses[name] = {}
|
||||
if poses is not None:
|
||||
self.poses.update(poses)
|
||||
|
||||
# Animation
|
||||
self.anim_frames = None
|
||||
@ -42,11 +48,10 @@ init 5 python:
|
||||
|
||||
self.instances[name] = self
|
||||
|
||||
def register(self, pose, frames, size):
|
||||
self.poses[pose] = (frames, size)
|
||||
|
||||
if config.developer:
|
||||
print(f"Registered \"{pose}\" pose for {self.name}")
|
||||
# no setter, on purpose
|
||||
@property
|
||||
def poses(self):
|
||||
return __poses[self.name]
|
||||
|
||||
@functools.cache
|
||||
def build_image(self, hash, pose):
|
||||
@ -366,7 +371,10 @@ init 5 python:
|
||||
|
||||
init offset = 5
|
||||
|
||||
default hooch_chibi = DollChibi(name="hooch", doll=hooch)
|
||||
default hooch_chibi = DollChibi(name="hooch", doll=hooch, poses=dict(
|
||||
stand=(1, (600, 800)),
|
||||
walk=(8, (600, 800)),
|
||||
))
|
||||
# default cho_chibi_new = DollChibi(name="cho", doll=cho)
|
||||
# default tonks_chibi_new = DollChibi(name="tonks", doll=tonks, poses=dict(
|
||||
# stand=(1, (600, 800)),
|
||||
|
@ -16,9 +16,4 @@ init python:
|
||||
|
||||
char.set_face(mouth="base", eyes="base", eyebrows="base", pupils="mid", cheeks="none", tears="none")
|
||||
|
||||
def chibi_init():
|
||||
# TODO: Perhaps it could be automated?
|
||||
hooch_chibi.register("stand", 1, (600, 800))
|
||||
hooch_chibi.register("walk", 8, (600, 800))
|
||||
|
||||
config.start_callbacks.extend([wardrobe_init, chibi_init])
|
||||
config.start_callbacks.append(wardrobe_init)
|
||||
|
Loading…
Reference in New Issue
Block a user