mirror of
https://git.cavemanon.xyz/Cavemanon/SnootGame.git
synced 2025-02-24 18:48:55 +01:00
Merge pull request 'updates branch/feature merging into patchy-patch5' (#52) from updates into Patchy-Patch5
Reviewed-on: https://git.snootgame.xyz/Cavemanon/SnootGame/pulls/52
This commit is contained in:
commit
1244ea7d01
2 changed files with 1869 additions and 1850 deletions
|
@ -1,10 +1,25 @@
|
||||||
################################################################################
|
###Updater Python stuff###
|
||||||
|
init python:
|
||||||
|
if persistent.updateresult is None:
|
||||||
|
persistent.updateresult = "No new version is available"
|
||||||
|
if persistent.autoup is None:
|
||||||
|
persistent.autoup = False
|
||||||
|
if persistent.updateWebServer is None:
|
||||||
|
persistent.updateWebServer = "http://updates.snootgame.xyz/updates.json"
|
||||||
|
|
||||||
|
def UpdateCheck():
|
||||||
|
pendingVersion = updater.UpdateVersion(persistent.updateWebServer)
|
||||||
|
if pendingVersion == None:
|
||||||
|
persistent.updateresult = "No new version is available"
|
||||||
|
else:
|
||||||
|
persistent.updateresult = pendingVersion
|
||||||
|
|
||||||
|
################################################################################
|
||||||
## Initialization
|
## Initialization
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
init offset = -1
|
init offset = -1
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Styles
|
## Styles
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -385,7 +400,6 @@ screen main_menu():
|
||||||
imagebutton auto "gui/button/menubuttons/extrasbutton_%s.png" action ShowMenu("extras")
|
imagebutton auto "gui/button/menubuttons/extrasbutton_%s.png" action ShowMenu("extras")
|
||||||
imagebutton auto "gui/button/menubuttons/quitbutton_%s.png" action Quit(confirm=not main_menu)
|
imagebutton auto "gui/button/menubuttons/quitbutton_%s.png" action Quit(confirm=not main_menu)
|
||||||
|
|
||||||
|
|
||||||
style main_menu_frame is empty
|
style main_menu_frame is empty
|
||||||
style main_menu_vbox is vbox
|
style main_menu_vbox is vbox
|
||||||
style main_menu_text is gui_text
|
style main_menu_text is gui_text
|
||||||
|
@ -712,21 +726,19 @@ screen updates():
|
||||||
## The use statement includes another screen inside this one. The actual
|
## The use statement includes another screen inside this one. The actual
|
||||||
## contents of the main menu are in the navigation screen.
|
## contents of the main menu are in the navigation screen.
|
||||||
|
|
||||||
##todo add size
|
|
||||||
##add gui.game_menu_background
|
|
||||||
vbox:
|
vbox:
|
||||||
xpos 1040
|
xpos 1140
|
||||||
# yalign 0.03
|
|
||||||
ypos 800
|
ypos 800
|
||||||
text _("UPDATES")
|
#text _("UPDATES")
|
||||||
label "[config.name!t]"
|
label "[config.name!t]"
|
||||||
text _("Your Version is [config.version!t]\n")
|
text _("Your Version is [config.version!t]\n")
|
||||||
##style_prefix "check"
|
##style_prefix "check"
|
||||||
label _("Auto Update")
|
textbutton _("Enable Automatic Updates") action [Notify("Toggling Automatic Updates..."), ToggleVariable("persistent.autoup", True, False)]
|
||||||
textbutton _("Enable Automatic Updates") action ToggleVariable("persistent.autoup", True, False)
|
text _("Automatic Updates: [persistent.autoup!t]\n")
|
||||||
textbutton _("Update Now!") ##action ("persistent.autoup", True, False) This should also set the value of updateresults
|
textbutton _("Check for Update!") action [Notify("Checking for update..."), Function(UpdateCheck)]
|
||||||
label _("Update Result:\n")
|
label _("Update Check Result:\n")
|
||||||
text _("[persistent.updateresult!t]\n")
|
text _("[persistent.updateresult!t]\n")
|
||||||
|
textbutton _("Update Now!") action updater.Update(persistent.updateWebServer, force=True)
|
||||||
textbutton "Back to Extras" action ShowMenu("extras")
|
textbutton "Back to Extras" action ShowMenu("extras")
|
||||||
vbox:
|
vbox:
|
||||||
xpos 1942
|
xpos 1942
|
||||||
|
@ -1244,11 +1256,11 @@ screen extrasnavigation():
|
||||||
# xpos 590
|
# xpos 590
|
||||||
xalign 0.79
|
xalign 0.79
|
||||||
yalign 1.0 #0.9
|
yalign 1.0 #0.9
|
||||||
imagebutton auto "gui/button/menubuttons/helpbutton_%s.png" action ShowMenu("help")
|
imagebutton auto "gui/button/menubuttons/helpbutton_%s.png" action ShowMenu('help')
|
||||||
imagebutton auto "gui/button/menubuttons/aboutbutton_%s.png" action ShowMenu("about")
|
imagebutton auto "gui/button/menubuttons/aboutbutton_%s.png" action ShowMenu('about')
|
||||||
imagebutton auto "gui/button/menubuttons/updatesbutton_%s.png" action ShowMenu("updates")
|
imagebutton auto "gui/button/menubuttons/updatesbutton_%s.png" action ShowMenu('updates')
|
||||||
imagebutton auto "gui/button/menubuttons/gallerybutton_%s.png" action ShowMenu("gallery")
|
imagebutton auto "gui/button/menubuttons/gallerybutton_%s.png" action ShowMenu('gallery')
|
||||||
imagebutton auto "gui/button/menubuttons/returnbutton_%s.png" action ShowMenu("main_menu")
|
imagebutton auto "gui/button/menubuttons/returnbutton_%s.png" action ShowMenu('main_menu')
|
||||||
|
|
||||||
|
|
||||||
## Help screen #################################################################
|
## Help screen #################################################################
|
||||||
|
|
|
@ -292,6 +292,13 @@ image black = "#000"
|
||||||
label splashscreen:
|
label splashscreen:
|
||||||
$ persistent.splashtype = random.randint(0,2000 - 1)
|
$ persistent.splashtype = random.randint(0,2000 - 1)
|
||||||
$ renpy.movie_cutscene("images/intros/CaveManonProductions.webm")
|
$ renpy.movie_cutscene("images/intros/CaveManonProductions.webm")
|
||||||
|
|
||||||
|
if persistent.autoup:
|
||||||
|
python:
|
||||||
|
UpdateCheck()
|
||||||
|
if persistent.updateresult != "No new version is available":
|
||||||
|
updater.update(persistent.updateWebServer, force=True)
|
||||||
|
|
||||||
stop sound
|
stop sound
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue