Compare commits
No commits in common. "6b6ad56af461b8882f0cbcf9941724289698ea46" and "0d8e91b5a5af4eeb8176de38d14800afda62f7ee" have entirely different histories.
6b6ad56af4
...
0d8e91b5a5
@ -1,6 +1,3 @@
|
|||||||
# will be populated by the chibi inits
|
|
||||||
define __poses = {}
|
|
||||||
|
|
||||||
init 5 python:
|
init 5 python:
|
||||||
class DollChibi(renpy.Displayable):
|
class DollChibi(renpy.Displayable):
|
||||||
|
|
||||||
@ -24,10 +21,7 @@ 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
|
||||||
@ -48,10 +42,11 @@ init 5 python:
|
|||||||
|
|
||||||
self.instances[name] = self
|
self.instances[name] = self
|
||||||
|
|
||||||
# no setter, on purpose
|
def register(self, pose, frames, size):
|
||||||
@property
|
self.poses[pose] = (frames, size)
|
||||||
def poses(self):
|
|
||||||
return __poses[self.name]
|
if config.developer:
|
||||||
|
print(f"Registered \"{pose}\" pose for {self.name}")
|
||||||
|
|
||||||
@functools.cache
|
@functools.cache
|
||||||
def build_image(self, hash, pose):
|
def build_image(self, hash, pose):
|
||||||
@ -371,10 +366,7 @@ init 5 python:
|
|||||||
|
|
||||||
init offset = 5
|
init offset = 5
|
||||||
|
|
||||||
default hooch_chibi = DollChibi(name="hooch", doll=hooch, poses=dict(
|
default hooch_chibi = DollChibi(name="hooch", doll=hooch)
|
||||||
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,4 +16,9 @@ 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")
|
||||||
|
|
||||||
config.start_callbacks.append(wardrobe_init)
|
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])
|
||||||
|
Loading…
Reference in New Issue
Block a user