diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-23 16:13:24 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-23 16:13:24 -0300 |
commit | c9eadeb54626ab92498616086b828c7f8d71d629 (patch) | |
tree | be03a58991e124f27dac1adfe7301e5957550b85 | |
parent | e4dbacca7a444a7575776ab59eb13c531f01b5aa (diff) | |
download | sdk-c9eadeb54626ab92498616086b828c7f8d71d629.tar.gz sdk-c9eadeb54626ab92498616086b828c7f8d71d629.tar.bz2 sdk-c9eadeb54626ab92498616086b828c7f8d71d629.tar.xz sdk-c9eadeb54626ab92498616086b828c7f8d71d629.zip |
Save support
-rw-r--r-- | 00_init.rpy | 2 | ||||
-rw-r--r-- | editor.rpy | 7 | ||||
-rw-r--r-- | script.rpy | 21 |
3 files changed, 20 insertions, 10 deletions
diff --git a/00_init.rpy b/00_init.rpy index 7d843dc..5574ff5 100644 --- a/00_init.rpy +++ b/00_init.rpy @@ -146,7 +146,7 @@ init -3 python: def GAME_LOADER(): global allunitsbase, allunits, allquests, allstory, allworld, alltaverns - global allnews, tr_uptodate, tr_memcheck + global alltquests, tr_uptodate, tr_memcheck # FIXME: Error handling # Load unit data @@ -406,10 +406,3 @@ label quest_editors: $print("Quest Editor closed") jump restore -label updater_editors: - $ url=renpy.input("Please insert update server URL:", default="http://spheres.tmw2.org/updates/") - $ updater.update(url) # , public_key="cert/certificate.pem") → Need to be RSA - - jump restore - - @@ -5,9 +5,26 @@ label start: scene black
centered "Click to load game data"
$ GAME_LOADER()
+
+label loop:
menu:
"Quest editor":
- call quest_editors
+ jump quest_editors
"Quit":
return
- return
+
+label restore:
+ menu:
+ "Save changes":
+ python:
+ f=open(get_path("editor.json"), "r")
+ alltquests["Main"]=json.load(f)
+ f.close()
+ f=open(get_path("quests.json"), "w")
+ json.dump(alltquests, f, indent=1, separators=(',', ': '))
+ f.close()
+ pass
+ "Discard changes":
+ pass
+ jump loop
+
|