WTS/game/scripts/characters/snape/chibi.rpy
LoafyLemon f64cbdee03 Detach interface and gameplay elements.
* Scaling fixes
* Attempt at splitting interface and gameplay elements
* Temporary room zoom fix
2024-05-15 22:47:08 +01:00

72 lines
2.0 KiB
Plaintext

label sna_chibi(action=None, xpos=None, ypos=None, flip=False):
$ snape_chibi.position(xpos, ypos, flip)
if action == "hide":
$ snape_chibi.hide()
return
elif action == "leave":
hide snape_main
hide screen bld1
hide screen blktone
play sound "sounds/door.ogg"
$ snape_chibi.hide()
with d3
pause .5
return
elif action == "reset":
$ snape_chibi.do(None)
return
$ snape_chibi.do(action)
return
label sna_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=None, flip=False):
call hide_characters
hide screen bld1
hide screen blktone
with d3
if action == "enter":
play sound "sounds/door.ogg"
call sna_chibi(None, "door", "base", flip)
with d3
if xpos or ypos:
$ snape_chibi.move((xpos, ypos), speed, reduce)
elif action == "leave":
$ snape_chibi.show()
$ snape_chibi.move(("door", "base"), speed, reduce)
play sound "sounds/door.ogg"
$ snape_chibi.hide()
with d3
pause .5
elif path:
$ snape_chibi.show()
$ snape_chibi.move(path, speed, reduce)
else:
$ snape_chibi.show()
$ snape_chibi.move((xpos, ypos), speed, reduce)
return
# Screens
screen with_snape(ani=False):
tag hanging_with_snape
zorder 3
if ani:
add "ch_gen toast_goblet" xpos 435*2 ypos 200*2 zoom 2.0
add "snape_toast_goblet" xpos 618*2 ypos 200*2
else:
add "characters/genie/chibis/drinking/01.webp" xpos 435*2 ypos 200*2
add "characters/snape/chibis/drinking/01.webp" xpos 618*2 ypos 200*2
# Chibi definition
default snape_chibi = Chibi("snape", ["base"], update_snape_chibi)
init python:
def update_snape_chibi(chibi):
# Assume chibi action has a matching image definition
chibi_image = "ch_sna {}".format(chibi.action or "stand")
chibi["base"] = chibi_image