2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
define character.genie_say = Character("Genie", show_icon="genie")
|
|
|
|
|
|
|
|
init python:
|
2022-05-26 20:50:54 +00:00
|
|
|
def gen(what, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
|
2022-05-16 23:48:22 +00:00
|
|
|
global genie_xpos, genie_ypos, genie_offset, genie_flip, genie_zoom
|
|
|
|
redraw = False
|
|
|
|
tag = "genie_main"
|
|
|
|
layer = "screens"
|
|
|
|
side = None
|
|
|
|
#showing = renpy.showing(name=tag, layer=layer)
|
|
|
|
|
|
|
|
if xpos != None or ypos != None:
|
|
|
|
xpos = genie_xpos if xpos == None else sprite_pos.get("x").get(xpos, xpos)
|
|
|
|
ypos = genie_ypos if ypos == None else sprite_pos.get("y").get(ypos, ypos)
|
|
|
|
genie_xpos = xpos
|
|
|
|
genie_ypos = ypos
|
|
|
|
|
|
|
|
head_ypos = sprite_pos.get("y").get("head")
|
|
|
|
far_xpos = sprite_pos.get("x").get("far_left")
|
|
|
|
|
|
|
|
if genie_ypos in ("head", head_ypos):
|
|
|
|
genie_offset = (-25, 630)
|
|
|
|
else:
|
|
|
|
genie_offset = (0, 600)
|
|
|
|
|
2022-05-26 20:50:54 +00:00
|
|
|
if face:
|
|
|
|
variant = "genie {}".format(face)
|
2022-05-16 23:48:22 +00:00
|
|
|
renpy.set_tag_attributes(variant)
|
|
|
|
side = "genie"
|
|
|
|
|
|
|
|
if renpy.showing("genie", layer=layer):
|
|
|
|
renpy.show(variant, layer=layer, tag="genie")
|
|
|
|
|
|
|
|
if flip != None:
|
|
|
|
genie_flip = -1 if flip else 1
|
|
|
|
|
|
|
|
if what:
|
|
|
|
character.genie_say(what, image=side, **kwargs)
|
|
|
|
|
|
|
|
label update_genie:
|
|
|
|
|
|
|
|
$ genie_flip = 1
|
|
|
|
$ genie_zorder = 15
|
|
|
|
call gen_chibi("sit_behind_desk")
|
|
|
|
|
|
|
|
return
|