Compare commits
2 Commits
caa4cd0b2c
...
b49129ad1f
Author | SHA1 | Date | |
---|---|---|---|
b49129ad1f | |||
34547cb0ad |
@ -81,24 +81,27 @@ python early hide:
|
|||||||
def execute(self):
|
def execute(self):
|
||||||
print(f"{self}")
|
print(f"{self}")
|
||||||
who, action = self
|
who, action = self
|
||||||
func = eval(f"{who}_chibi.{action}")
|
chibi = DollChibi.instance[who]
|
||||||
|
getattr(chibi, action)
|
||||||
|
|
||||||
# print(f"Execution: {who} {action}")
|
# print(f"Execution: {who} {action}")
|
||||||
|
|
||||||
def lint(self):
|
def lint(self):
|
||||||
who, action = self
|
who, action = self
|
||||||
try:
|
|
||||||
chibi = eval(f"{who}_chibi")
|
if who not in DollChibi.instances:
|
||||||
except Exception:
|
|
||||||
renpy.error(f"Character chibi not defined: {who}")
|
renpy.error(f"Character chibi not defined: {who}")
|
||||||
|
|
||||||
|
chibi = DollChibi.instances[who]
|
||||||
|
|
||||||
if not hasattr(chibi, action):
|
if not hasattr(chibi, action):
|
||||||
renpy.error(f"Chibi action not defined: {who} {action}")
|
renpy.error(f"Chibi action not defined: {who} {action}")
|
||||||
|
|
||||||
def predict(self):
|
def predict(self):
|
||||||
who, action = self
|
who, action = self
|
||||||
|
|
||||||
chibi = eval(f"{who}_chibi")
|
chibi = DollChibi.instances[who]
|
||||||
doll = eval(f"{who}")
|
doll = getattr(store, who)
|
||||||
|
|
||||||
layers = (
|
layers = (
|
||||||
l[0] for pose in chibi.poses.keys()
|
l[0] for pose in chibi.poses.keys()
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
init 5 python:
|
init 5 python:
|
||||||
class DollChibi(renpy.Displayable):
|
class DollChibi(renpy.Displayable):
|
||||||
|
|
||||||
|
# class attribute
|
||||||
|
instances = {}
|
||||||
|
|
||||||
def __init__(self, name, layer="screens", zorder=12, zoom=0.28, **properties):
|
def __init__(self, name, layer="screens", zorder=12, zoom=0.28, **properties):
|
||||||
|
|
||||||
super().__init__(**properties)
|
super().__init__(**properties)
|
||||||
@ -35,6 +38,8 @@ init 5 python:
|
|||||||
self.atl_pause = False
|
self.atl_pause = False
|
||||||
self.atl_at_list = []
|
self.atl_at_list = []
|
||||||
|
|
||||||
|
self.instances[name] = self
|
||||||
|
|
||||||
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