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:
|
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,11 +48,10 @@ init 5 python:
|
|||||||
|
|
||||||
self.instances[name] = self
|
self.instances[name] = self
|
||||||
|
|
||||||
def register(self, pose, frames, size):
|
# no setter, on purpose
|
||||||
self.poses[pose] = (frames, size)
|
@property
|
||||||
|
def poses(self):
|
||||||
if config.developer:
|
return __poses[self.name]
|
||||||
print(f"Registered \"{pose}\" pose for {self.name}")
|
|
||||||
|
|
||||||
@functools.cache
|
@functools.cache
|
||||||
def build_image(self, hash, pose):
|
def build_image(self, hash, pose):
|
||||||
@ -366,7 +371,10 @@ init 5 python:
|
|||||||
|
|
||||||
init offset = 5
|
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 cho_chibi_new = DollChibi(name="cho", doll=cho)
|
||||||
# default tonks_chibi_new = DollChibi(name="tonks", doll=tonks, poses=dict(
|
# default tonks_chibi_new = DollChibi(name="tonks", doll=tonks, poses=dict(
|
||||||
# stand=(1, (600, 800)),
|
# 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")
|
char.set_face(mouth="base", eyes="base", eyebrows="base", pupils="mid", cheeks="none", tears="none")
|
||||||
|
|
||||||
def chibi_init():
|
config.start_callbacks.append(wardrobe_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])
|
|
||||||
|
Loading…
Reference in New Issue
Block a user