mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-03-22 18:12:28 +01:00
Merge pull request 'Extra Chapters Menu, Closes: #79' (#80) from nutbuster/SnootGame:bonus_chapter_menu into Monster-Update-6
Reviewed-on: https://git.snootgame.xyz/Cavemanon/SnootGame/pulls/80
This commit is contained in:
commit
67b9bfcb5c
5 changed files with 151 additions and 4 deletions
|
@ -468,7 +468,7 @@ screen main_menu():
|
||||||
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
|
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
|
||||||
[
|
[
|
||||||
[ "Start", Start() ],
|
[ "Start", Start() ],
|
||||||
[ "Mods", ShowMenu("mod_menu") ],
|
[ "Bonus Chapters", ShowMenu("ex_ch_menu") ],
|
||||||
[ "Load", ShowMenu("load") ],
|
[ "Load", ShowMenu("load") ],
|
||||||
[ "Options", ShowMenu("preferences") ],
|
[ "Options", ShowMenu("preferences") ],
|
||||||
[ "Extras", ShowMenu("extras") ], \
|
[ "Extras", ShowMenu("extras") ], \
|
||||||
|
@ -1171,15 +1171,16 @@ screen extrasnavigation():
|
||||||
else:
|
else:
|
||||||
add "gui/snootgame.png"
|
add "gui/snootgame.png"
|
||||||
vbox:
|
vbox:
|
||||||
spacing 25
|
spacing 10
|
||||||
xpos 1885
|
xpos 1885
|
||||||
yalign 0.9
|
ypos 1130
|
||||||
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
|
use main_menu_buttons("gui/button/menubuttons/template_idle.png",
|
||||||
[
|
[
|
||||||
[ "Help", ShowMenu("help") ],
|
[ "Help", ShowMenu("help") ],
|
||||||
[ "About", ShowMenu("about") ],
|
[ "About", ShowMenu("about") ],
|
||||||
[ "Updates", ShowMenu("updates") ],
|
[ "Updates", ShowMenu("updates") ],
|
||||||
[ "Gallery", ShowMenu("cg_gallery_0") ],
|
[ "Gallery", ShowMenu("cg_gallery_0") ],
|
||||||
|
[ "Mods", ShowMenu("mod_menu") ],
|
||||||
[ "Return", ShowMenu("main_menu") ]
|
[ "Return", ShowMenu("main_menu") ]
|
||||||
] )
|
] )
|
||||||
|
|
||||||
|
|
31
game/script/0._extra_stubs.rpy
Normal file
31
game/script/0._extra_stubs.rpy
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
label chapter_x1:
|
||||||
|
"1"
|
||||||
|
return
|
||||||
|
label chapter_x2:
|
||||||
|
"2"
|
||||||
|
return
|
||||||
|
label chapter_x3:
|
||||||
|
"3"
|
||||||
|
return
|
||||||
|
label chapter_x4:
|
||||||
|
"4"
|
||||||
|
return
|
||||||
|
label chapter_x5:
|
||||||
|
"5"
|
||||||
|
return
|
||||||
|
label chapter_x6:
|
||||||
|
"6"
|
||||||
|
return
|
||||||
|
label chapter_x7:
|
||||||
|
"7"
|
||||||
|
return
|
||||||
|
label chapter_x8:
|
||||||
|
"8"
|
||||||
|
return
|
||||||
|
label chapter_x9:
|
||||||
|
"9"
|
||||||
|
return
|
||||||
|
label chapter_x10:
|
||||||
|
"10"
|
||||||
|
return
|
102
game/src/extra_chapters_menu.rpy
Normal file
102
game/src/extra_chapters_menu.rpy
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
|
||||||
|
init python:
|
||||||
|
ex_chapters = [
|
||||||
|
[ "Chicxulub Gutterlanea", "chapter_x1" ],
|
||||||
|
[ "The Mous Pad", "chapter_x2" ],
|
||||||
|
[ "PTA Meeting", "chapter_x3" ],
|
||||||
|
[ "Passion of the Trigga I", "chapter_x4" ],
|
||||||
|
[ "Passion of the Trigga II", "chapter_x5" ],
|
||||||
|
[ "Passion of the Trigga III", "chapter_x6" ],
|
||||||
|
[ "Naomi's Tribulations I", "chapter_x7" ],
|
||||||
|
[ "Naomi's Tribulations II", "chapter_x8" ],
|
||||||
|
[ "Naomi's Tribulations III", "chapter_x9" ],
|
||||||
|
[ "RAYmba's Observations", "chapter_x10" ]
|
||||||
|
]
|
||||||
|
ex_chapters_menu = ex_chapters.copy()
|
||||||
|
|
||||||
|
if persistent.endings is None:
|
||||||
|
ending_image()
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
#similar to quick_button funcs
|
||||||
|
screen ex_ch_button(filename, label, function):
|
||||||
|
button:
|
||||||
|
xmaximum 600
|
||||||
|
ymaximum 129
|
||||||
|
action function
|
||||||
|
if 'Back' in label or 'Return' in label or 'Quit' in label or 'Main Menu' in label:
|
||||||
|
activate_sound "audio/ui/uiBack.wav"
|
||||||
|
else:
|
||||||
|
activate_sound "audio/ui/uiClick.wav"
|
||||||
|
fixed:
|
||||||
|
add filename xalign 0.5 yalign 0.5 zoom 0.9
|
||||||
|
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 34
|
||||||
|
|
||||||
|
# label_functions is [ [ "label", function() ], [ "foobar", foobar() ], .. ]
|
||||||
|
# Reuse the same image string and keep things 'neat'.
|
||||||
|
screen ex_ch_buttons(filename, label_functions):
|
||||||
|
for l_f in label_functions:
|
||||||
|
use ex_ch_button(filename, l_f[0], Start(l_f[1]) )
|
||||||
|
|
||||||
|
screen ex_ch_menu():
|
||||||
|
|
||||||
|
python:
|
||||||
|
global ex_chapters_menu
|
||||||
|
ex_chapters_menu = ex_chapters.copy()
|
||||||
|
e = persistent.endings #ending seen
|
||||||
|
if (e ^ 0b0000 == 0):
|
||||||
|
ex_chapters_menu.clear()
|
||||||
|
elif not (e & 0b1111 == 0b1111):
|
||||||
|
w = 4
|
||||||
|
for i in range(0, 4):
|
||||||
|
w -= persistent.endings >> i & 0b1 == 0b1
|
||||||
|
|
||||||
|
#trish
|
||||||
|
for i in range(5, 5-w, -1):
|
||||||
|
ex_chapters_menu.remove(ex_chapters[i])
|
||||||
|
#naomi
|
||||||
|
for i in range(8, 8-w, -1):
|
||||||
|
ex_chapters_menu.remove(ex_chapters[i])
|
||||||
|
ex_chapters_menu.pop()
|
||||||
|
|
||||||
|
tag menu
|
||||||
|
style_prefix "main_menu"
|
||||||
|
add gui.main_menu_background
|
||||||
|
|
||||||
|
frame:
|
||||||
|
xsize 420
|
||||||
|
yfill True
|
||||||
|
background "gui/overlay/main_menu.png"
|
||||||
|
|
||||||
|
#side_yfill True
|
||||||
|
vbox:
|
||||||
|
xpos 1940
|
||||||
|
yalign 0.03
|
||||||
|
if persistent.splashtype == 1:
|
||||||
|
add "gui/sneedgame.png"
|
||||||
|
else:
|
||||||
|
add "gui/snootgame.png"
|
||||||
|
|
||||||
|
viewport:
|
||||||
|
# this could be better but its ok for now
|
||||||
|
xpos 1885-540
|
||||||
|
xmaximum 540
|
||||||
|
ymaximum 0.8
|
||||||
|
ypos 200
|
||||||
|
yinitial 0
|
||||||
|
scrollbars "vertical"
|
||||||
|
mousewheel True
|
||||||
|
draggable True
|
||||||
|
pagekeys True
|
||||||
|
vbox:
|
||||||
|
#xpos 1885
|
||||||
|
spacing 12
|
||||||
|
#yalign 0.98
|
||||||
|
|
||||||
|
use ex_ch_button("gui/button/menubuttons/template_idle.png", "Return", ShowMenu("main_menu"))
|
||||||
|
#use ex_ch_button("gui/button/menubuttons/template_idle.png", str(e), ShowMenu("main_menu"))
|
||||||
|
if len(ex_chapters_menu):
|
||||||
|
use ex_ch_buttons("gui/button/menubuttons/template_idle.png", ex_chapters_menu )
|
||||||
|
for x in range(0, len(ex_chapters) - len(ex_chapters_menu)):
|
||||||
|
use ex_ch_button("gui/button/menubuttons/template_idle.png", "???", None)
|
|
@ -25,7 +25,7 @@ screen mod_menu_button(filename, label, function):
|
||||||
# Reuse the same image string and keep things 'neat'.
|
# Reuse the same image string and keep things 'neat'.
|
||||||
screen mod_menu_buttons(filename, arr):
|
screen mod_menu_buttons(filename, arr):
|
||||||
for x in arr:
|
for x in arr:
|
||||||
use mod_menu_button(filename, x['Name'], Start(x['Label']))
|
use mod_menu_button(filename, x['Name'], Start(x['Label']) )
|
||||||
|
|
||||||
screen mod_menu():
|
screen mod_menu():
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
init -1 python:
|
||||||
|
def ending_image():
|
||||||
|
#0b0000, ABCD, flash the bits with |=, check with &
|
||||||
|
endings = 0b0000
|
||||||
|
_e = 0b1
|
||||||
|
for i in range(1, 5):
|
||||||
|
fn = str(i)+"of4"
|
||||||
|
endings |= (_e * renpy.seen_image(fn))
|
||||||
|
_e = _e << 0b1
|
||||||
|
persistent.endings = endings
|
||||||
|
|
||||||
label storyline:
|
label storyline:
|
||||||
call chapter_1
|
call chapter_1
|
||||||
call chapter_2
|
call chapter_2
|
||||||
|
@ -31,6 +42,7 @@ label storyline:
|
||||||
call chapter_12A
|
call chapter_12A
|
||||||
call chapter_13A
|
call chapter_13A
|
||||||
call chapter_14A
|
call chapter_14A
|
||||||
|
$ ending_image()
|
||||||
$ renpy.quit()
|
$ renpy.quit()
|
||||||
else:
|
else:
|
||||||
#>>ERROR HANDLING OH SWEET BABY JESUS SHIT HIT THE FAN
|
#>>ERROR HANDLING OH SWEET BABY JESUS SHIT HIT THE FAN
|
||||||
|
@ -45,6 +57,7 @@ label storyline:
|
||||||
St "Yes, but you have to have something wrong with you to speedrun a visual novel beta"
|
St "Yes, but you have to have something wrong with you to speedrun a visual novel beta"
|
||||||
"/dev/non" "well shit. Please do report this bug and all the choices you made that lead to this point. Something fucked up real bad"
|
"/dev/non" "well shit. Please do report this bug and all the choices you made that lead to this point. Something fucked up real bad"
|
||||||
#just liek maek gaem
|
#just liek maek gaem
|
||||||
|
$ ending_image()
|
||||||
call ending
|
call ending
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue