House points

* Added house points to states.env
* Added visuals for when points are added or subtracted
* Updated points increment animation and refactored the screen
This commit is contained in:
LoafyLemon 2024-04-27 01:54:41 +01:00
parent 4e01b71a99
commit 7a4b31bf63
2 changed files with 85 additions and 26 deletions

View File

@ -32,27 +32,40 @@ label points_changes: # Gets called every day/night.
store.slytherin += points_s store.slytherin += points_s
hide screen points_changes hide screen points_changes
show screen points_changes(points_s, points_g, points_r, points_h) show screen points_changes(points_g, points_s, points_r, points_h)
return return
screen points_changes(points_s, points_g, points_r, points_h): screen points_changes(gryffindor=None, slytherin=None, ravenclaw=None, hufflepuff=None, prefix="+", direction="up"):
tag points_changes tag points_changes
zorder 35 zorder 35
hbox: hbox:
spacing 15 spacing 15
align (0.5, 0.1) align (0.5, 0.1)
if direction == "up":
at transform: at transform:
on start: on start:
alpha 0.0 alpha 0.0
on show: on show:
yoffset 0
alpha 1.0 alpha 1.0
easein 3.0 yoffset -50 alpha 0.0 yoffset 0
easein 4.0 yoffset -50 alpha 0.0
else:
at transform:
on start:
alpha 0.0
on show:
alpha 1.0
yoffset -50
easein 4.0 yoffset 0 alpha 0.0
text "+[points_s]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#3A734B" if gryffindor:
text "+[points_g]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#A74D2A" text "[prefix][gryffindor]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#A74D2A"
text "+[points_r]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#5974C2" if slytherin:
text "+[points_h]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#FBC60A" text "+[prefix][slytherin]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#3A734B"
if ravenclaw:
text "[prefix][ravenclaw]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#5974C2"
if hufflepuff:
text "[prefix][hufflepuff]" outlines [(1, "#000000BF", 1, 0)] size 24 color "#FBC60A"
timer 3.0 action Hide("points_changes") timer 4.0 action Hide("points_changes")

File diff suppressed because it is too large Load Diff