mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-01-22 17:26:20 +01:00
73 lines
3 KiB
Text
73 lines
3 KiB
Text
#TODO
|
|
#<strike>add chadshark</strike>
|
|
#The game needs something like a CG gallery, if only to track your progress.
|
|
#remove sex
|
|
#troll /adgd/
|
|
#idk debug lol
|
|
#just like make game
|
|
#??????
|
|
#Profit&Export
|
|
#/usr/bin/touch gf - cannot touch 'gf': Permission denied
|
|
|
|
#To whoever looked at the old script file of this, woe be upon ye, because it was an absolute clusterfuck. story scripts are now in the script directory. everything here is just boilerplate code for characters, scenes, transitions, and whatnot.
|
|
#Even then (extending to definitions.rpy), it's incredibly inconsistant with how things are named, how things are set up, and there's definitely a lot of optimization that could be had and refactoring needed.
|
|
#Why yes all my code was formerly in one massive file called "script" thats 28k lines long, how could you tell?
|
|
#Licensed under the GNU AGPL v3, for more information check snootgame.xyz or the LICENSE file that should have came with this work.
|
|
|
|
init python:
|
|
import webbrowser # This is for the ch2 "look the link up" choice
|
|
import random
|
|
|
|
# extra music channel so we can do crossfade instead of fadeout followed by fadein
|
|
renpy.music.register_channel("music1","music",True,tight=True)
|
|
renpy.music.register_channel("music2","music",True,tight=True)
|
|
|
|
# allows playing looped ambience alongside music
|
|
renpy.music.register_channel("ambient","sfx",True,tight=True)
|
|
renpy.music.register_channel("ambient1","sfx",True,tight=True)
|
|
renpy.music.register_channel("ambient2","sfx",True,tight=True)
|
|
renpy.music.register_channel("ambient3","sfx",True,tight=True)
|
|
|
|
# Set vars for bonus chapter completion
|
|
if persistent.bonus_chapters == None:
|
|
if renpy.seen_image("big ending"): #for returning players
|
|
persistent.bonus_chapters = 0b111111111
|
|
persistent.old_bonus_chapters = 0b111111111
|
|
else:
|
|
persistent.bonus_chapters = 0b0
|
|
persistent.old_bonus_chapters = 0b0
|
|
|
|
# Randomizes the placement of choice boxes when a choice menu appears
|
|
def randomize_choices(choices):
|
|
# fine for size of 2
|
|
if (renpy.random.randint(0, 1)):
|
|
choices.reverse()
|
|
return choices
|
|
|
|
# For people upgrading to patch 11 and onwards, a fix to make sure the fang tail movie is unlocked.
|
|
if renpy.seen_image("fang tail"):
|
|
renpy.mark_image_seen("fang_tail_movie")
|
|
|
|
# Determine the splash type for the Snoot game logo
|
|
persistent.splashtype = random.randint(0,2000 - 1)
|
|
|
|
|
|
label before_main_menu:
|
|
# Force users pre-Patch 11 to use english if they were on 'None'
|
|
if preferences.language == None:
|
|
$ preferences.language = 'en'
|
|
|
|
# Call initial language setup screen
|
|
if (persistent.languaged_up is None):
|
|
$ preferences.set_volume('ui', config.default_sfx_volume)
|
|
call screen lang_sel
|
|
$ persistent.languaged_up = True
|
|
return
|
|
|
|
label start:
|
|
|
|
$ toggle_debug()
|
|
|
|
pause 1.0
|
|
|
|
$ renpy.call(chapter_list[chapter_list_index]) # Call first element of the chapter_list array
|