Fix conflicting properties (by Gouvernathor)

big work
what was reliable before is now not, in recent versions of renpy, which is why we added that new config (which I put in say.rpy, but it can be moved somewhere else)
Also fixes the game_menu's title position, incidentally

some changes are incompatible with my diary and achievement branches, respectively, they will need to be merged with a bit of manual care
This commit is contained in:
LoafyLemon 2024-03-25 14:57:36 +00:00
parent b62b7bcc3a
commit 38d2494bc3
21 changed files with 66 additions and 85 deletions

View File

@ -105,7 +105,7 @@ label hermione_intro_E1:
zoom 1.0
align (0.5, 0.5)
pos (-520, -70)
easein_quad 3.0 align (0.0, 0.0) pos (0, 0) zoom 0.5
easein_quad 3.0 anchor (0.0, 0.0) pos (0, 0) zoom 0.5
menu:
"\"Good morning, Hermione.\"" if d_flag_01:

View File

@ -85,7 +85,7 @@ label luna_intro_E1:
show CG luna as cg zorder 17:
subpixel True
zoom 1.0
easein_quad 3.0 align (.0, .0) pos (0, 0) zoom 0.5 # pos (0, 0) not necessary in next renpy version
easein_quad 3.0 anchor (.0, .0) pos (0, 0) zoom 0.5 # use align (0, 0) in next renpy version
gen "What are you doing in my office?"
gen "Did Snape send you here? Surely--"

View File

@ -176,9 +176,9 @@ screen game_menu(title, scroll=None, yinitial=0.0):
padding (15, 15, 15, 15)
transclude
use navigation(title)
use navigation(title):
label title anchor (0.5, 0.5) align (0.9, 0.15)
label title xalign .5
if main_menu and not title == "Updater":
key "game_menu" action ShowMenu("main_menu")
@ -229,7 +229,7 @@ screen navigation(title=None):
default show_quick_start = False
default show_dev_start = False
default is_sensitive = not bool(title == "Updater")
default is_sensitive = title != "Updater"
key "keydown_K_LSHIFT" action SetLocalVariable("show_quick_start", True)
key "keyup_K_LSHIFT" action SetLocalVariable("show_quick_start", False)

View File

@ -44,7 +44,7 @@ screen say(who, what, side_image=None, icon=None):
ypos 1000
if side_image:
add side_image yalign 1.0 yanchor 1.0 zoom 0.5
add side_image yalign 1.0 zoom 0.5
else:
add SideImage()
@ -213,8 +213,9 @@ screen choice(items, menu_yalign=.6):
hbox:
spacing 2
xpos choice_width - 5
align (1.0, 0.5)
for i in range(0, max_progress):
xanchor 1.
yalign .5
for i in range(max_progress):
if i < len(progress):
add progress[i]
else:

View File

@ -173,8 +173,8 @@ screen achievement_window(msg="", title="", icon=None, xpos=0, ypos=60):
ypos 12
spacing 10
xalign 0.5
text title size 18 xalign 0.5 xanchor 0.5
text msg size 14 xalign 0.5 xanchor 0.5
text title size 18 xalign 0.5
text msg size 14 xalign 0.5
timer 6.0 action Hide("achievement_window")
transform rotate_circular(t=7):

View File

@ -134,7 +134,6 @@ screen book_menu(page, pages, title, page_title, page_text, page_overflow):
imagebutton:
pos (878, 100)
ysize 400
xalign 1.0
# Next
if page < pages:
idle Transform("interface/book/hover.webp", alpha=0)

View File

@ -133,10 +133,10 @@ screen credits(credits=credits_text, duration=credits_duration, chibis=credits_c
zoom 0.5
if left:
pos (20, config.screen_height - 20)
align (0.0, 1.0)
anchor (0.0, 1.0)
else:
pos (config.screen_width - 20, config.screen_height - 20)
align (1.0, 1.0)
anchor (1.0, 1.0)
text credits:
at credits_scroll(duration)

View File

@ -268,9 +268,9 @@ screen inventory_menu(xx, yy):
# Gold & Tokens
null height 16
text "{color=#daa520}Gold{/color} {outlinecolor=#ffffff00}[game.gold]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xalign 0.1 xanchor 0
text "{color=#daa520}Gold{/color} {outlinecolor=#ffffff00}[game.gold]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0
add gui.format("interface/achievements/{}/spacer_left.webp")
text "{color=#2055da}Tokens{/color} {outlinecolor=#ffffff00}[tokens]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xalign 0.1 xanchor 0
text "{color=#2055da}Tokens{/color} {outlinecolor=#ffffff00}[tokens]{/outlinecolor}" size 12 outlines [ (2, "#000", 0, 0) ] xpos 0.1 xanchor 0
add gui.format("interface/achievements/{}/spacer_left.webp")
vbox:
@ -357,16 +357,16 @@ screen inventory_menuitem(xx, yy):
text str(it_item.owned) size 10 align (0.1, 0.1) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
elif current_category == "Decorations":
if it_item.in_use:
add "interface/topbar/icon_check.webp" anchor (1.0, 1.0) align (1.0, 1.0) offset (-3, -3) zoom 0.5
add "interface/topbar/icon_check.webp" align (1.0, 1.0) offset (-3, -3) zoom 0.5
elif current_category in ("Books", "Quest Items"):
if it_item.used:
add "interface/topbar/icon_check.webp" anchor (1.0, 1.0) align (1.0, 1.0) offset (-3, -3) zoom 0.5
add "interface/topbar/icon_check.webp" align (1.0, 1.0) offset (-3, -3) zoom 0.5
if inventory_mode == 1 and (not it_item.givable or not states.active_girl in it_item.usable_on):
add "#b2000040"
if menu_items_length <= 0:
text "Nothing here yet" align (0.5, 0.5) anchor (0.5, 0.5) size 24
text "Nothing here yet" align (0.5, 0.5) size 24
if current_item:
frame:
@ -386,10 +386,10 @@ screen inventory_menuitem(xx, yy):
text "[current_item.owned]" size 14 align (0.1, 0.1) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
elif current_category == "Decorations":
if current_item.in_use:
add "interface/topbar/icon_check.webp" anchor (1.0, 1.0) align (1.0, 1.0) offset (-6, -6)
add "interface/topbar/icon_check.webp" align (1.0, 1.0) offset (-6, -6)
elif current_category in ("Books", "Quest Items"):
if current_item.used:
add "interface/topbar/icon_check.webp" anchor (1.0, 1.0) align (1.0, 1.0) offset (-6, -6)
add "interface/topbar/icon_check.webp" align (1.0, 1.0) offset (-6, -6)
if inventory_mode == 1 and (not current_item.givable or not states.active_girl in current_item.usable_on):
add "#b2000040"

View File

@ -397,10 +397,8 @@ screen map_screen_characters():
if states.her.map_location == "forest": # Mark forest event.
add "interface/achievements/glow.webp" xycenter (her_map_xpos, her_map_ypos) zoom 0.15 alpha 0.5 at rotate_circular
imagebutton:
xpos her_map_xpos
ypos her_map_ypos
xalign 0.5
yalign 0.5
xcenter her_map_xpos
ycenter her_map_ypos
idle "interface/map/name_hermione.webp"
hover "interface/map/name_hermione_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_hermione")
@ -410,10 +408,8 @@ screen map_screen_characters():
#Luna
if states.lun.unlocked:
imagebutton:
xpos lun_map_xpos
ypos lun_map_ypos
xalign 0.5
yalign 0.5
xcenter lun_map_xpos
ycenter lun_map_ypos
idle "interface/map/name_luna.webp"
hover "interface/map/name_luna_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_luna")
@ -423,10 +419,8 @@ screen map_screen_characters():
#Astoria
if states.ast.unlocked:
imagebutton:
xpos ast_map_xpos
ypos ast_map_ypos
xalign 0.5
yalign 0.5
xcenter ast_map_xpos
ycenter ast_map_ypos
idle "interface/map/name_astoria.webp"
hover "interface/map/name_astoria_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_astoria")
@ -436,10 +430,8 @@ screen map_screen_characters():
#Susan
if states.sus.unlocked:
imagebutton:
xpos sus_map_xpos
ypos sus_map_ypos
xalign 0.5
yalign 0.5
xcenter sus_map_xpos
ycenter sus_map_ypos
idle "interface/map/name_susan.webp"
hover "interface/map/name_susan_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_susan")
@ -449,10 +441,8 @@ screen map_screen_characters():
#Cho
if states.cho.unlocked:
imagebutton:
xpos cho_map_xpos
ypos cho_map_ypos
xalign 0.5
yalign 0.5
xcenter cho_map_xpos
ycenter cho_map_ypos
idle "interface/map/name_cho.webp"
hover "interface/map/name_cho_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_cho")
@ -462,10 +452,8 @@ screen map_screen_characters():
#Snape
if states.sna.unlocked:
imagebutton:
xpos sna_map_xpos
ypos sna_map_ypos
xalign 0.5
yalign 0.5
xcenter sna_map_xpos
ycenter sna_map_ypos
idle "interface/map/name_snape.webp"
hover "interface/map/name_snape_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_snape")
@ -475,10 +463,8 @@ screen map_screen_characters():
#Tonks
if states.ton.unlocked:
imagebutton:
xpos ton_map_xpos
ypos ton_map_ypos
xalign 0.5
yalign 0.5
xcenter ton_map_xpos
ycenter ton_map_ypos
idle "interface/map/name_tonks.webp"
hover "interface/map/name_tonks_hover.webp"
hovered SetScreenVariable("ball_hint", "summon_tonks")

View File

@ -41,7 +41,6 @@ screen close_button(xoffset=0, yoffset=0, action=Return("Close"), key=["game_men
imagebutton:
keyboard_focus False
xalign 1.0
xanchor 1.0
offset (xoffset, yoffset)
idle gui.format("interface/topbar/buttons/{}/ui_close.webp")
hover image_hover(gui.format("interface/topbar/buttons/{}/ui_close.webp"))

View File

@ -261,9 +261,9 @@ screen stats_menuitem(current_category, current_item, stats_flags):
if current_subcategory == "overview":
if stats_flags[current_category]:
text current_item["name"] size 20 xalign 0.5 xanchor 0.5 ypos 5
text current_item["name"] size 20 xalign 0.5 ypos 5
else:
text "???" size 20 xalign 0.5 xanchor 0.5 ypos 5
text "???" size 20 xalign 0.5 ypos 5
vbox:
xoffset 10

View File

@ -118,7 +118,6 @@ screen ui_points():
xalign 0.5
xsize 162
ysize 64
xanchor 0.5
if not persistent.toggle_points and not toggle_points:
add "interface/topbar/slytherin.webp" yanchor housepoints_y[slytherin_place]
@ -209,7 +208,6 @@ screen ui_menu():
add gui.format("interface/topbar/{}/menu.webp")
vbox:
xanchor 0.5
xalign 0.5
ypos 15
textbutton "Save" action ShowMenu("save") background None xalign 0.5 text_outlines [ (2, "#00000080", 1, 0) ]

View File

@ -343,7 +343,7 @@ screen advance_deck():
screen card_end_message(message):
zorder 15
text "{color=#FFF}{size=+40}[message]{/size}{/color}" xpos 540 ypos 300 xalign 0.5 yalign 0.5 outlines [ (5, "#000", 0, 0) ]
text "{color=#FFF}{size=+40}[message]{/size}{/color}" xcenter 540 ycenter 300 outlines [ (5, "#000", 0, 0) ]
screen rules_display(game_rules_list):
tag rules

View File

@ -111,7 +111,7 @@ screen deck_builder_screen():
#Page info
$ str_currentpage = currentpage+1
$ str_currentpage_max = int(math.ceil((len(unlocked_cards)-1)/card_shown)+1.0)
text "{color=#FFFFFF}{size=-5}Page [str_currentpage]/[str_currentpage_max]{/size}{/color}" xpos 215 ypos 360 text_align 0.5 xalign 0.5
text "{color=#FFFFFF}{size=-5}Page [str_currentpage]/[str_currentpage_max]{/size}{/color}" xcenter 215 ypos 360 text_align 0.5
#Gallery button
imagebutton:
@ -161,7 +161,7 @@ screen deck_builder_gallery():
use cardrender(card, 18+80*col, 67+125*row, False, cardzoom=0.25, color=card_exist(unlocked_cards, card))
imagebutton:
anchor (1.0, 0.0)
yanchor 0.0
ypos 18
xalign 0.98
@ -277,22 +277,22 @@ screen deck_builder_tutorial():
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 600 ypos 250
if deck_guide_helper == "numbers_guide":
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 540 ypos 300 xalign 0.5 yalign 0.5
add "images/cardgame/guide/[deck_guide_helper].webp" xcenter 540 ycenter 300
if deck_guide_helper == "tier_guide":
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 500 ypos 200 xanchor 0.5
add "images/cardgame/guide/[deck_guide_helper].webp" xcenter 500 ypos 200
if deck_guide_helper == "cho_stage2":
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 540 ypos 300 xalign 0.5 yalign 0.5
add "images/cardgame/guide/[deck_guide_helper].webp" xcenter 540 ycenter 300
if deck_guide_helper == "cho_stage3":
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 540 ypos 300 xalign 0.5 yalign 0.5
add "images/cardgame/guide/[deck_guide_helper].webp" xcenter 540 ycenter 300
if deck_guide_helper == "cho_stage4":
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 540 ypos 300 xalign 0.5 yalign 0.5
add "images/cardgame/guide/[deck_guide_helper].webp" xcenter 540 ycenter 300
if deck_guide_helper == "fight_guide":
add "images/cardgame/guide/[deck_guide_helper].webp" xpos 540 ypos 360 xalign 0.5
add "images/cardgame/guide/[deck_guide_helper].webp" xcenter 540 ypos 360
##Back button
#imagebutton:

View File

@ -163,9 +163,9 @@ screen mirror_menuitem(xx, yy):
xfill True
action Return(["select", ev])
if is_unlocked and not ev.seen:
text "NEW" style "wardrobe_item_caption" anchor (1.0, 1.0) align (1.0, 1.0) offset (-5, -5)
text "NEW" style "wardrobe_item_caption" align (1.0, 1.0) offset (-5, -5)
if ev.played:
add "interface/topbar/icon_check.webp" anchor (1.0, 1.0) align (1.0, 1.0) offset (-5, -5) zoom 0.7
add "interface/topbar/icon_check.webp" align (1.0, 1.0) offset (-5, -5) zoom 0.7
vbox:
text ev.name
text "By {}".format(authors) size 10
@ -173,7 +173,7 @@ screen mirror_menuitem(xx, yy):
if menu_items_length <= 0:
text "Nothing here yet" align (0.5, 0.5) anchor (0.5, 0.5) size 24
text "Nothing here yet" align (0.5, 0.5) size 24
if current_item:
frame:

View File

@ -91,7 +91,8 @@ screen puzzle_minigame():
vbox:
yanchor 0.0
align (0.5, 0.85)
ypos 0.85
xalign .5
textbutton "-Hint-" xalign 0.5 action ToggleScreenVariable("hint", True, False)
if tries >= 75:
textbutton "-Force it open-" xalign 0.5 action Return(False) at pulse_hover

View File

@ -41,7 +41,6 @@ define config.version = "1.46"
define compatible_version = 1.451
define config.name = "Witch Trainer Silver"
# Application window settings
define config.window_title = f"{config.name} (v{config.version}{' PRE-RELEASE' if prerelease else ''}) ({get_renderer()}) ({renpy.bits}-bit)"
define config.window_icon = "gui/icon.webp"
@ -128,6 +127,9 @@ define config.enter_replay_transition = None
define config.exit_replay_transition = None
define config.say_attribute_transition = d3
# Engine Compatibility
define config.check_conflicting_properties = True
# Python
define config.open_file_encoding = "utf-8"

View File

@ -156,9 +156,8 @@ screen desk_menu():
#Book
if item_store_intro_done:
add "interface/desk/book.webp" xalign 1.0 xpos 1080 ypos 0
add "interface/desk/book.webp" xalign 1.0 ypos 0
imagebutton:
xpos 1080
ypos 0
xalign 1.0
idle "interface/desk/book.webp"
@ -169,9 +168,8 @@ screen desk_menu():
action Return("inventory")
#Tissue Box
add "interface/desk/tissues.webp" xalign 1.0 xpos 1080 ypos 320
add "interface/desk/tissues.webp" xalign 1.0 ypos 320
imagebutton:
xpos 1080
ypos 320
xalign 1.0
idle "interface/desk/tissues.webp"
@ -186,7 +184,7 @@ screen desk_menu():
imagebutton:
xpos -10
ypos 0
xalign 0.0
xanchor 0.0
idle "interface/desk/work.webp"
hover "interface/desk/work_hover.webp"
hovered SetScreenVariable("ball_hint", "work")
@ -197,8 +195,6 @@ screen desk_menu():
#Cards
if states.cardgame.unlocked: #Or letter_cards_unlock.read #Day 26+
imagebutton:
xpos 0
ypos 600
xalign 0.0
yalign 1.0
idle "interface/desk/cards.webp"

View File

@ -227,17 +227,17 @@ screen shop_item_menuitem(xx, yy):
if menu_items[i].currency == "tokens":
if tokens >= menu_items[i].price:
text "{color=#2055da}T{/color} [price]" size 10 align (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#2055da}T{/color} [price]" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
text "{color=#2055da}T{/color} {color=#ff0000}[price]{/color}" size 10 align (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#2055da}T{/color} {color=#ff0000}[price]{/color}" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
if game.gold >= menu_items[i].price:
text "{color=#daa520}G{/color} [price]" size 10 align (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#daa520}G{/color} [price]" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
text "{color=#daa520}G{/color} {color=#ff0000}[price]{/color}" size 10 align (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#daa520}G{/color} {color=#ff0000}[price]{/color}" size 10 pos (0.95, 0.95) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
if menu_items_length <= 0:
text "Nothing here yet" align (0.5, 0.5) anchor (0.5, 0.5) size 24
text "Nothing here yet" align (0.5, 0.5) size 24
if current_item:
frame:
@ -258,14 +258,14 @@ screen shop_item_menuitem(xx, yy):
if current_item.currency == "tokens":
if tokens >= current_item.price:
text "{color=#2055da}T{/color} [current_item.price]" size 14 align (0.9, 0.9) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#2055da}T{/color} [current_item.price]" size 14 pos (0.9, 0.9) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
text "{color=#2055da}T{/color} {color=#ff0000}[current_item.price]{/color}" size 14 align (0.90, 0.90) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#2055da}T{/color} {color=#ff0000}[current_item.price]{/color}" size 14 pos (0.90, 0.90) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
if game.gold >= current_item.price:
text "{color=#daa520}G{/color} [current_item.price]" size 14 align (0.9, 0.9) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#daa520}G{/color} [current_item.price]" size 14 pos (0.9, 0.9) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
else:
text "{color=#daa520}G{/color} {color=#ff0000}[current_item.price]{/color}" size 14 align (0.90, 0.90) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
text "{color=#daa520}G{/color} {color=#ff0000}[current_item.price]{/color}" size 14 pos (0.90, 0.90) anchor (1.0, 1.0) color "#FFFFFF" outlines [ (1, "#000", 0, 0) ]
add gui.format("interface/achievements/{}/highlight.webp") pos (112, 375)
add gui.format("interface/achievements/{}/spacer.webp") pos (120, 398)

View File

@ -441,7 +441,7 @@ screen editor():
drag:
pos (50, 50)
maximum (500, 500)
ymaximum 500
xsize 500
frame:

Some files were not shown because too many files have changed in this diff Show More