summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/core.rpy1
-rw-r--r--game/update.rpy2
-rw-r--r--game/vault.rpy9
3 files changed, 7 insertions, 5 deletions
diff --git a/game/core.rpy b/game/core.rpy
index ebae01b..26e2b1b 100644
--- a/game/core.rpy
+++ b/game/core.rpy
@@ -207,6 +207,7 @@ init 10 python:
md5check_client(silent=True)
persistent.last_run = now()
+ mp = MultiPersistent("vault.themanaworld.org", True)
######### Done with pre-init
label splashscreen:
diff --git a/game/update.rpy b/game/update.rpy
index 16e0cf9..0e285b8 100644
--- a/game/update.rpy
+++ b/game/update.rpy
@@ -491,6 +491,6 @@ label resetm:
label resetp:
$ persistent.rhash = None
$ persistent.passd = None
- $ persistent.sub = None
+ $ mp.sub = None
return
diff --git a/game/vault.rpy b/game/vault.rpy
index d6477f8..be6fe55 100644
--- a/game/vault.rpy
+++ b/game/vault.rpy
@@ -54,7 +54,7 @@ init python:
self.variable = str(persistent.email)
uedit[key] = str(self.variable)
if (persistent.passd is not None and self.variable == "***"):
- self.variable = str(bytearray((x ^ (persistent.rhash/persistent.sub) for x in bytearray(persistent.passd, 'utf-8'))))
+ self.variable = str(bytearray((x ^ (persistent.rhash/mp.sub) for x in bytearray(persistent.passd, 'utf-8'))))
uedit[key] = str(self.variable)
def get_text(self):
@@ -201,10 +201,11 @@ label register_vault:
if uedit["rbmx"]:
$ persistent.email = str(email)
if uedit["rbpd"]:
- $ hsh = renpy.random.randint(11, 63)
- $ persistent.sub = renpy.random.randint(127, 2048)
- $ persistent.rhash = int(hsh)*persistent.sub
+ $ hsh = renpy.random.randint(11, 127)
+ $ mp.sub = renpy.random.randint(127, 16777215)
+ $ persistent.rhash = int(hsh)*mp.sub
$ persistent.passd = str(bytearray(x ^ hsh for x in bytearray(password, 'utf-8')))
+ $ mp.save()
# Wait for Vault to confirm.
if (r.status_code != 200):