Compare commits

...

7 Commits
main ... gouv-6

Author SHA1 Message Date
Gouvernathor 1f8e939cf9 Improve some animations
not sure why the "on show, appear, start" was there when there's no "on hide", but it prevents animation from really doing its job
2024-04-06 00:19:58 +02:00
Gouvernathor caa4cd0b2c Works without the screens
tested on a save
2024-04-03 01:47:02 +02:00
Gouvernathor cd63abd27b nitwit 2024-04-03 01:42:36 +02:00
Gouvernathor c0bc1cd69f Avoid using screens for chibis
Not exactly sure what to do with the screens for saves compat tbh, should be fine either way and maybe removing the definitions will work
2024-04-03 01:33:13 +02:00
Gouvernathor 00eda2aae5 Simpler syntax 2024-04-03 01:03:54 +02:00
Gouvernathor ae5ff121d9 Moar lint 2024-04-03 01:03:46 +02:00
Gouvernathor 2525bea67d Move the file again 2024-04-03 00:50:26 +02:00
6 changed files with 57 additions and 60 deletions

View File

@ -91,6 +91,8 @@ python early hide:
chibi = eval(f"{who}_chibi") chibi = eval(f"{who}_chibi")
except Exception: except Exception:
renpy.error(f"Character chibi not defined: {who}") renpy.error(f"Character chibi not defined: {who}")
if not hasattr(chibi, action):
renpy.error(f"Chibi action not defined: {who} {action}")
def predict(self): def predict(self):
who, action = self who, action = self
@ -142,6 +144,23 @@ python early hide:
return {"blocks": blocks} return {"blocks": blocks}
def lint(self):
any_true = False
for block, weight, condition in self["blocks"]:
if not isinstance(weight, (int, float)):
renpy.error(f"Weight must be a number, not {weight!r}")
if condition == "True":
any_true = True
else:
try:
eval(condition)
except Exception:
renpy.error(f"Condition could not be evaluated: {condition!r}")
if not any_true:
renpy.error("All blocks have a condition, which will raise an exception if all conditions are False at the same time at runtime")
def next(self): def next(self):
blocks = [(block, weight) for block, weight, condition in self["blocks"] if eval(condition)] blocks = [(block, weight) for block, weight, condition in self["blocks"] if eval(condition)]
total_weight = sum(weight for _, weight in blocks) total_weight = sum(weight for _, weight in blocks)

View File

@ -61,8 +61,10 @@ transform blink_repeat:
repeat repeat
transform bob(t=1): transform bob(t=1):
on show, appear, start: animation
yoffset absolute(0) subpixel True
yoffset absolute(0)
block:
ease t yoffset absolute(10) ease t yoffset absolute(10)
ease t yoffset absolute(0) ease t yoffset absolute(0)
repeat repeat
@ -155,4 +157,3 @@ init python:
trans.xoffset = renpy.random.randint(-2, 2) trans.xoffset = renpy.random.randint(-2, 2)
trans.yoffset = renpy.random.randint(-2, 2) trans.yoffset = renpy.random.randint(-2, 2)
return clamp(1.0 - st, 0.05, 1.0) return clamp(1.0 - st, 0.05, 1.0)

View File

@ -1,6 +1,8 @@
transform sprite_fly_idle: transform sprite_fly_idle:
on show, appear, start: animation
yoffset absolute(110) subpixel True
yoffset absolute(110)
block:
ease_back 2.5 yoffset absolute(90) ease_back 2.5 yoffset absolute(90)
ease_back 2.5 yoffset absolute(110) ease_back 2.5 yoffset absolute(110)
repeat repeat

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1 @@
define ALLOWED_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz " define ALLOWED_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz "

View File

@ -173,8 +173,9 @@ screen achievement_window(msg="", title="", icon=None, xpos=0, ypos=60):
timer 6.0 action Hide("achievement_window") timer 6.0 action Hide("achievement_window")
transform rotate_circular(t=7): transform rotate_circular(t=7):
on show, appear, start: animation
subpixel True subpixel True
block:
rotate 0 rotate 0
linear t rotate 360 linear t rotate 360
repeat repeat