Skip to content

Commit d6fa97f

Browse files
committed
label overrides for menu
1 parent d10bb92 commit d6fa97f

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

game/Submods/All Scrollable Menus/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## September 12, 2020 (1.0.4):
2+
- Allow overrides of user choice for specific labels
3+
- This is done to deal with issues where Monika should not move in some labels
4+
15
## August 03, 2020 (1.0.3):
26
- Fix for changed constants as of the current unstable (build 126), will be carried through MAS 0.11.4
37

game/Submods/All Scrollable Menus/all_menus_are_gen_scrollable.rpy

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ init -989 python in gsm_utils:
2727
attachment_id=None,
2828
)
2929

30-
3130
#START: Update scripts
3231
label multimokia_all_gen_scrollable_menus_v1_0_0(version="v1_0_0"):
3332
return
@@ -137,6 +136,11 @@ init -1 python in gsm_utils:
137136
}
138137
}
139138

139+
#This dict holds all the labels which need to force a custom menu type
140+
LABEL_MENU_OVERRIDE_MAP = {
141+
"mas_bday_surprise_party_reacton_cake": TYPE_UNOBSTRUCTED_CHOICE_MENU
142+
}
143+
140144
init 900 python:
141145
def menu_override(items, set_expr):
142146
"""
@@ -177,10 +181,17 @@ init 900 python:
177181
else:
178182
set = None
179183

184+
#Get the menu style to use in case we need an override
185+
menu_type = gsm_utils.LABEL_MENU_OVERRIDE_MAP.get(mas_submod_utils.current_label)
186+
187+
#If there's no menu override, then we'll fallback to the chosen style
188+
if menu_type is None:
189+
menu_type = persistent._gsm_menu_style
190+
180191
#Prep before showing the menu
181192
if (
182193
renpy.showing("monika")
183-
and persistent._gsm_menu_style != gsm_utils.TYPE_UNOBSTRUCTED_CHOICE_MENU
194+
and menu_type != gsm_utils.TYPE_UNOBSTRUCTED_CHOICE_MENU
184195
):
185196
renpy.show("monika", at_list=[t21])
186197

@@ -205,13 +216,13 @@ init 900 python:
205216
window_hidden = True
206217

207218
#Parse menu items
208-
formatted_items = gsm_utils.TYPE_PARSE_MAP[persistent._gsm_menu_style](items)
219+
formatted_items = gsm_utils.TYPE_PARSE_MAP[menu_type](items)
209220

210221
#If the screen takes kwargs, we'll handle that here
211222
picked = renpy.call_screen(
212-
persistent._gsm_menu_style,
223+
menu_type,
213224
items=formatted_items,
214-
**gsm_utils.TYPE_KWARGS_MAP.get(persistent._gsm_menu_style, dict())
225+
**gsm_utils.TYPE_KWARGS_MAP.get(menu_type, dict())
215226
)
216227

217228
#Reset Monika's position

0 commit comments

Comments
 (0)