Compare commits

...

2 Commits

Author SHA1 Message Date
923384eb37 Fix test labels 2024-04-04 23:17:00 +02:00
c2d8c394a1 Fix cds 2024-04-04 23:15:35 +02:00
2 changed files with 23 additions and 16 deletions

View File

@ -73,16 +73,23 @@ python early hide:
class chibi: class chibi:
@staticmethod @staticmethod
def parse(l): def parse(l):
who = l.simple_expression() who = l.name()
action = l.simple_expression() action = l.name()
arguments = l.arguments() # may be None
l.expect_eol()
return (who, action) return (who, action, arguments)
def execute(self): def execute(self):
print(self) print(self)
who, action = self who, action, arguments = self
chibi = DollChibi.instance[who] chibi = DollChibi.instances[who]
getattr(chibi, action) method = getattr(chibi, action)
if arguments is None:
args, kwargs = (), {}
else:
args, kwargs = arguments.evaluate()
method(*args, **kwargs)
# print(f"Execution: {who} {action}") # print(f"Execution: {who} {action}")

View File

@ -374,12 +374,12 @@ default hooch_chibi = DollChibi(name="hooch", doll=hooch)
# "Rollback block" # "Rollback block"
# $ renpy.block_rollback() # $ renpy.block_rollback()
# chibi tonks move (path=[(500, 421), (650, 521), (800, 421)], repeat=3, pause=False)
# "repeat 3" # "repeat 3"
# chibi tonks move (path=[(500, 421), (650, 521), (800, 421)], repeat=3)
# "loop"
# chibi tonks move (path=[(500, 421), (650, 521), (800, 421)], loop=True)
# "doll synchronisation"
# chibi tonks move (path=[(500, 421), (650, 521), (800, 421)], loop=True, pause=False) # chibi tonks move (path=[(500, 421), (650, 521), (800, 421)], loop=True, pause=False)
# "loop"
# chibi tonks move (path=[(500, 421), (650, 521), (800, 421)], loop=True, pause=False)
# "doll synchronisation"
# ton @ hair default "Default" ("base", "base", "base", "mid") # ton @ hair default "Default" ("base", "base", "base", "mid")
# ton @ hair angry "Angry" ("angry", "narrow", "angry", "mid") # ton @ hair angry "Angry" ("angry", "narrow", "angry", "mid")
# ton @ hair scared "Scared" ("scream", "wide", "worried", "mid") # ton @ hair scared "Scared" ("scream", "wide", "worried", "mid")
@ -395,18 +395,18 @@ default hooch_chibi = DollChibi(name="hooch", doll=hooch)
# "Rollback block" # "Rollback block"
# $ renpy.block_rollback() # $ renpy.block_rollback()
# "pos 1"
# chibi tonks place (pos=(300,300)) # chibi tonks place (pos=(300,300))
# "pos 2" # "pos 1"
# chibi tonks place (pos=(400,300)) # chibi tonks place (pos=(400,300))
# "pos 3" # "pos 2"
# chibi tonks place (pos=(400,400)) # chibi tonks place (pos=(400,400))
# "pos 4" # "pos 3"
# chibi tonks place (pos=(200,400)) # chibi tonks place (pos=(200,400))
# "pos 5" # "pos 4"
# chibi tonks place (pos=(600,400)) # chibi tonks place (pos=(600,400))
# "End" # "pos 5"
# hide tonks_chibi # hide tonks_chibi
# hide tonks_main # hide tonks_main
# "End"
# jump main_room_menu # jump main_room_menu