diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-05-08 04:07:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-05-08 04:07:12 -0300 |
commit | 70af0220ba9dec5a19677a10ec924efe034314da (patch) | |
tree | d570915b665f7ef56144816a80e73e8909016b2c | |
parent | fe939c80b53e28c22e8383bcafe6576263701f09 (diff) | |
download | renpy-2021.05.07.tar.gz renpy-2021.05.07.tar.bz2 renpy-2021.05.07.tar.xz renpy-2021.05.07.zip |
Connection core, still need to retrieve server credentials from Vaultv2021.05.07
-rw-r--r-- | game/client.rpy | 3 | ||||
-rw-r--r-- | game/core.rpy | 2 | ||||
-rw-r--r-- | game/mirrorlake.rpy | 4 | ||||
-rw-r--r-- | game/renpy.rpy | 33 | ||||
-rw-r--r-- | game/screens.rpy | 12 |
5 files changed, 44 insertions, 10 deletions
diff --git a/game/client.rpy b/game/client.rpy index bbecbd0..4d10873 100644 --- a/game/client.rpy +++ b/game/client.rpy @@ -57,6 +57,9 @@ init 1 python: execute("mkdir %s" % installdir, shell=True) if not download_manaplus("ManaPlus.AppImage"): return False + + status_update("Marking as executable...", 70) + execute("chmod +x %s" % installdir+"/ManaPlus.AppImage", shell=True) status_update("Installation successful!", 75) ######################################################### elif renpy.windows: diff --git a/game/core.rpy b/game/core.rpy index 0d40e66..86ee150 100644 --- a/game/core.rpy +++ b/game/core.rpy @@ -34,6 +34,8 @@ init -3 python: persistent.discord = True if (persistent.client is None): persistent.client = "manaplus" + if (persistent.iconify is None): + persistent.iconify = True ############################################################################# #, "themanaworld.org", "germantmw.de", "moubootaurlegends.org"] diff --git a/game/mirrorlake.rpy b/game/mirrorlake.rpy index d3892e2..d7e69ea 100644 --- a/game/mirrorlake.rpy +++ b/game/mirrorlake.rpy @@ -35,13 +35,13 @@ screen mirrorlake(): xalign 0.5 yalign 0.5 button: - action Return(None) + action Return("QUIT") fixed: xmaximum 320 ymaximum 40 xalign 0.5 add Frame("gui/button/choice_hover_background.png", 0, 0) - text _("Cancel"): + text _("Quit"): color "#FFF" xalign 0.5 yalign 0.5 diff --git a/game/renpy.rpy b/game/renpy.rpy index d968dff..dcfaf92 100644 --- a/game/renpy.rpy +++ b/game/renpy.rpy @@ -66,9 +66,34 @@ label start: hide TMW2 with dissolve #centered "Error" $ RPCUpdate("Moubootaur Legends", "Main Menu", "tmw2") - "User ID: [vaultId]" - call screen mirrorlake - "Selected: [_return]" - + if config.developer: + "User ID: [vaultId]" + while True: + $ renpy.block_rollback() + call screen mirrorlake + #if config.developer: + # "Selected: [_return]" + if _return is None or _return == "QUIT": + $ stdout("Good bye!") + $ renpy.quit() + return + scene black + show TMW2 at truecenter + with None + python: + HOST=persistent.serverlist[_return]["Host"] + PORT=persistent.serverlist[_return]["Port"] + CMD=handle_client(launch=True) + OPT="-s %s -y evol2 -p %s" % (HOST, PORT) + # TODO: Obtain access token from Vault + stdout("%s %s" % (CMD, OPT)) + if not renpy.mobile and persistent.iconify: + renpy.iconify() + execute("%s %s" % (CMD, OPT), shell=True) + # NOTE: Now we would like to un-minimize ourselves + # But we cannot =/ + # There's a few tricks but not very nice... + # https://stackoverflow.com/questions/45426203/minimize-window-with-python (Linux) + # https://stackoverflow.com/questions/2791489/how-do-i-take-out-the-focus-or-minimize-a-window-with-python/2792059 (Windows) return diff --git a/game/screens.rpy b/game/screens.rpy index c364414..7025a88 100644 --- a/game/screens.rpy +++ b/game/screens.rpy @@ -648,13 +648,17 @@ screen preferences(): hbox: box_wrap True - if renpy.variant("pc") or renpy.variant("web"): - - vbox: - style_prefix "radio" + vbox: + style_prefix "radio" + if renpy.variant("pc") or renpy.variant("web"): label _("Display") textbutton _("Window") action Preference("display", "window") textbutton _("Fullscreen") action Preference("display", "fullscreen") + label _("Iconify") + textbutton ifte(persistent.iconify, + _("Enabled"), + _("Disabled")): + action ToggleVariable("persistent.iconify") vbox: style_prefix "radio" |