Rename some parameters to avoid shadowing builtin names

This commit is contained in:
Gouvernathor 2024-04-01 22:35:46 +02:00
parent 25820e002a
commit 40335c5fa4
12 changed files with 27 additions and 28 deletions

View File

@ -18,7 +18,7 @@ init python:
renpy.show_screen(controller, focused)
screen cho_dual_cg(focused, _layer="screens", bubble="cho_handjob_bubble", mask="cho_handjob_bubble_mask"):
screen cho_dual_cg(focused, _layer="screens", bubble_="cho_handjob_bubble", mask="cho_handjob_bubble_mask"):
tag switcher
zorder 300
@ -27,12 +27,12 @@ screen cho_dual_cg(focused, _layer="screens", bubble="cho_handjob_bubble", mask=
if d:
$ btn = AlphaMask(Fixed(Transform(d, align=( (1.0, 0.05) if flip else (0.0, 0.05) ), zoom=0.5, xzoom=flip)), Transform(mask, zoom=0.25))
$ btn = Fixed(Transform(bubble, zoom=0.25), btn)
$ btn = Fixed(Transform(bubble_, zoom=0.25), btn)
imagebutton:
idle Transform(btn, alpha=0.75)
hover Transform(btn, alpha=1.0)
action Function(cg_pov_switch, layer=_layer)
focus_mask True
at transform:
xzoom flip
xzoom flip

View File

@ -50,10 +50,10 @@ label ast_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=
return
# Screens
screen ast_cloth_pile(position=(440, 425)): # Default position: Right of desk, below feet.
screen ast_cloth_pile(pos=(440, 425)): # Default position: Right of desk, below feet.
tag ast_cloth_pile
zorder astoria_chibi.zorder
add "characters/chibis/cloth_pile_r.webp" pos position zoom 0.5
add "characters/chibis/cloth_pile_r.webp" pos pos zoom 0.5
# Chibi definition
default astoria_chibi = Chibi("astoria", ["fix", "base", "bottom", "shoes", "top", "robe", "gloves"], update_astoria_chibi)

View File

@ -50,10 +50,10 @@ label cho_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=
return
# Screens
screen cho_cloth_pile(position=(440, 425)): # Default position: Right of desk, below feet.
screen cho_cloth_pile(pos=(440, 425)): # Default position: Right of desk, below feet.
tag cho_cloth_pile
zorder cho_chibi.zorder
add "characters/chibis/cloth_pile_r.webp" pos position zoom 0.5
add "characters/chibis/cloth_pile_r.webp" pos pos zoom 0.5
# Chibi definition
default cho_chibi = Chibi("cho", ["fix", "base", "bottom", "shoes", "top", "robe", "gloves"], update_cho_chibi)

View File

@ -910,7 +910,7 @@ label cc_pf_strip_T2_intro_E3:
hide screen bld1
hide screen blkfade
with d3
call teleport(position="cho", effect=False)
call teleport(position_="cho", effect=False)
pause .5
call bld
@ -1239,4 +1239,3 @@ label cc_pf_strip_T2_E3_fail_repeat:
call cho_walk(action="leave")
jump end_cho_event

View File

@ -101,7 +101,7 @@ label hufflepuff_match:
with d3
call gen_chibi("stand", "door", "base")
call teleport(position="genie", effect=False)
call teleport(position_="genie", effect=False)
pause .5
call gen_chibi("stand", "door", "base", flip=False)

View File

@ -1680,7 +1680,7 @@ label cho_quid_E14:
play sound "sounds/kick.ogg"
call gen_chibi("stand", 430, "base")
call teleport(position="genie", effect=False)
call teleport(position_="genie", effect=False)
cho @ cheeks blush "Whoa! I didn't know you could apparate at Hogwarts!" ("angry", "narrow", "base", "mid")
gen "Appa--{w=0.4} What?" ("base", xpos="far_left", ypos="base")

View File

@ -31,9 +31,9 @@ style meter_text:
align (0.0, 0.5)
xoffset 5
screen swear_bubble(type):
screen swear_bubble(kind):
tag bubble
zorder 30
add "interface/meter/bubble/"+str(type)+".webp" ypos 100 xpos 100
add "interface/meter/bubble/[kind].webp" ypos 100 xpos 100
timer 1.0 action Hide("swear_bubble")

View File

@ -146,7 +146,7 @@ label slytherin_match:
with d3
call gen_chibi("stand", "door", "base")
call teleport(position="genie", effect=False)
call teleport(position_="genie", effect=False)
pause .2
call ton_chibi("stand", "desk", "base", flip=True)

View File

@ -50,10 +50,10 @@ label ton_walk(xpos=None, ypos=None, speed=1.0, action=None, reduce=False, path=
return
# Screens
screen ton_cloth_pile(position=(440, 425)): # Default position: Right of desk, below feet.
screen ton_cloth_pile(pos=(440, 425)): # Default position: Right of desk, below feet.
tag ton_cloth_pile
zorder tonks_chibi.zorder
add "characters/chibis/cloth_pile_r.webp" pos position zoom 0.5
add "characters/chibis/cloth_pile_r.webp" pos pos zoom 0.5
label ton_sit(xpos=nxpos, ypos=nypos, flip=None, chair=True): # TODO: replace this with the regular chibi call and add a sitting pose/action -- call ton_chibi("sit", chair=False)

View File

@ -5,8 +5,8 @@ transform combine_transforms(one, two):
one
two
transform chibi_base(position, flip, scale):
pos position
transform chibi_base(pos, flip, scale):
pos pos
anchor (0.0, 1.0)
xzoom (-1 if flip else 1)
zoom (0.5 * scale)

View File

@ -103,31 +103,31 @@ label increase_house_points(house, points):
return
#TODO Check and fix teleport/heal effect position (chibis are now anchored bottom-left)
label teleport(position=None,effect=True,poof_label=None):
label teleport(position_=None, effect=True, poof_label=None):
python:
if position == "genie":
if position_ == "genie":
teleport_xpos = genie_chibi.pos[0]+75
teleport_ypos = genie_chibi.pos[1]
teleport_zorder = 3
elif position == "hermione":
elif position_ == "hermione":
teleport_xpos = hermione_chibi.pos[0]+45
teleport_ypos = hermione_chibi.pos[1]
teleport_zorder = 3
elif position == "cho":
elif position_ == "cho":
teleport_xpos = cho_chibi.pos[0]+45
teleport_ypos = cho_chibi.pos[1]
teleport_zorder = 3
elif position == "astoria":
elif position_ == "astoria":
teleport_xpos = astoria_chibi.pos[0]+45
teleport_ypos = astoria_chibi.pos[1]
teleport_zorder = 3
elif position == "desk":
elif position_ == "desk":
teleport_xpos = 320
teleport_ypos = 450
teleport_zorder = 5
else:
teleport_xpos = position[0]
teleport_ypos = position[1]
teleport_xpos = position_[0]
teleport_ypos = position_[1]
teleport_zorder = 2
if effect == True:

View File

@ -426,7 +426,7 @@ label not_so_great_escape:
play sound "sounds/magic4.ogg"
call gen_chibi("stand", 370, 295)
call teleport(position="genie", effect=False)
call teleport(position_="genie", effect=False)
stop music fadeout 3
gen "You'll never catch me alive!" ("angry", xpos="far_left", ypos="head")