summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-14 00:19:21 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-14 00:19:21 -0300
commitf901930c55222c6bc9b0f3b74f3d068964ca1df7 (patch)
tree86360fb16c490459d6ce147291e75bf16e6c68cc
parent9a32ba7ec570cbaa17d0efd986ac738fdc5999d9 (diff)
downloadrenpy-f901930c55222c6bc9b0f3b74f3d068964ca1df7.tar.gz
renpy-f901930c55222c6bc9b0f3b74f3d068964ca1df7.tar.bz2
renpy-f901930c55222c6bc9b0f3b74f3d068964ca1df7.tar.xz
renpy-f901930c55222c6bc9b0f3b74f3d068964ca1df7.zip
You can now set a home world. Your homeworld buffs you in every other world.
-rw-r--r--game/client.rpy7
-rw-r--r--game/soul.rpy28
2 files changed, 35 insertions, 0 deletions
diff --git a/game/client.rpy b/game/client.rpy
index 4b22cdb..df5b4c2 100644
--- a/game/client.rpy
+++ b/game/client.rpy
@@ -242,6 +242,13 @@ init 2 python:
## Newer versions of API may level you up - catch it
try:
mySoul["up"]=dat["lvlup"]
+ mySoul["home"]=dat["homew"]
+ for s in persistent.serverlist:
+ if mySoul["home"] == s["UUID"]:
+ mySoul["home"] = s["Name"]
+ break
+ if mySoul["home"] == "VAULT":
+ mySoul["home"]="Not Set"
except:
pass
progress = 100
diff --git a/game/soul.rpy b/game/soul.rpy
index 14991ba..9066d28 100644
--- a/game/soul.rpy
+++ b/game/soul.rpy
@@ -36,6 +36,15 @@ screen souldata():
hbox:
label "{color=#FFF}%s %d{/color}" % (_("Level"), mySoul["level"])
#button Level up
+ null width 60
+ label "{color=#FFF}%s %s{/color}" % (_("Home world: "), mySoul["home"])
+ if mySoul["home"] in ["Not Set", _("Not Set")]:
+ null width 30
+ textbutton _("Set ยป"):
+ background Frame("gui/frame.png", 0, 0)
+ xysize (100, 40)
+ action Return("sethome")
+ tooltip _("Sets a homeworld")
null height 30
## TODO: Other stuff
null height 30
@@ -173,6 +182,25 @@ label thevoid:
return
#################################################################################
+label sethome:
+ centered "{color=#fff}{b}{size=+25}WARNING!{/size}{/b}\n\nSetting a home world is {u}irreversible{/u}. Please make sure you understand the consequences before proceeding.{/color}{fast}"
+ centered "{color=#fff}{b}{size=+25}HOME WORLD{/size}{/b}\n\nEveryone yarns for a place to call home.\nWhen you finally find such place, you may set it as your home world.\n\nSetting a home world is {u}irreversible{/u} so choose wisely.\n\nOnce you have a homeworld, every other world in the Mirror Lake will sync their game progress based on your home world progress. This allows you to play through all the universes.{/color}{fast}"
+ centered "{color=#fff}{b}{size=+25}WARNING!{/size}{/b}\n\nSetting a home world is {u}irreversible{/u}.\n\nThis greatly boosts you on all other worlds, but only if your progress on the home world is advanced enough.{/color}{fast}"
+ python:
+ opt=[("{color=#f00}Do not set a home world{/color}", 0)]
+ for s in persistent.serverlist:
+ opt.append(("{color=#000}%s{/color}" % s["Name"], (s["UUID"], s["Name"])))
+ fin=renpy.display_menu(opt)
+ if not fin:
+ return
+ call screen confirm(_("{b}{size=+10}HOME WORLD{/size}{/b}\n\nAre you sure you want to set your home world to: {b}{i}%s{/i}{/b}?\nThis action is {u}irreversible{/u}, so choose carefully!" % fin[1]), Return(True), Return(False))
+ if _return:
+ python:
+ vault.post(VAULT_HOST+"/sethome", json={"vaultId": vaultId, "token": vaultToken, "home": fin[0]}, timeout=15.0)
+ mySoul["home"]=fin[1] # Actually fake
+ return
+
+#################################################################################
label intro:
$ RPCUpdate("The Void", "launcher")
scene DKBG