summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-31 16:42:44 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-31 16:42:44 -0300
commit428426a147ae6fb46a2c13c9079bada4e378ae96 (patch)
tree1d9069c7e0c75d86fa929699661b6f88b806a74f
parente4fa27671cb76caf21f7f7e19cd74ed448310ec6 (diff)
downloadclient-428426a147ae6fb46a2c13c9079bada4e378ae96.tar.gz
client-428426a147ae6fb46a2c13c9079bada4e378ae96.tar.bz2
client-428426a147ae6fb46a2c13c9079bada4e378ae96.tar.xz
client-428426a147ae6fb46a2c13c9079bada4e378ae96.zip
You can now add a custom server! \o/
-rw-r--r--game/misc.rpy26
-rw-r--r--game/screens.rpy4
-rw-r--r--game/story.rpy4
3 files changed, 32 insertions, 2 deletions
diff --git a/game/misc.rpy b/game/misc.rpy
index 27659dc..cfc8981 100644
--- a/game/misc.rpy
+++ b/game/misc.rpy
@@ -323,4 +323,30 @@ init python:
return val+int(val*(max(lvl-1, 0)/100.0))
+label add_server:
+ centered "This allows you to add a new custom server.\n\
+This option is intended for {color=#0f0}advanced users only{/color}.\n\
+\n\
+We provide no warranty for custom servers, and they cannot be removed from the server list, so be careful, as they might harm your phone.\n\
+\n\
+Remember that selecting a new server will disconnect you from the one you are set to login automatically.\n\
+Make sure to note down the password or have provided a valid email, or you'll lose access to your account!\n\n{fast}{w=2.0}Click to continue →"
+ $ namai=renpy.input("What is the host of the server you want to add?", default="spheres.tmw2.org")
+ if (namai == ""):
+ $ renpy.full_restart()
+ return
+ $ porta=renpy.input("In which port is it listening to?", default="61000", allow="0123456789") or 0
+ $ porta=int(porta)
+ if (porta > 65535 or porta < 1):
+ centered "Ports only go up to 65535."
+ $ renpy.full_restart()
+ return
+ $ human=renpy.input("What is the human readable name of the server?", default="Custom Server")
+ if (human == ""):
+ $ renpy.full_restart()
+ return
+ $ persistent.serverlist.append([human, namai, porta])
+ centered "The new server has been added successfully!"
+ $ renpy.full_restart()
+ return
diff --git a/game/screens.rpy b/game/screens.rpy
index f6bdc29..21ae77e 100644
--- a/game/screens.rpy
+++ b/game/screens.rpy
@@ -826,6 +826,10 @@ screen preferences():
SetVariable("persistent.host", k[1]),
SetVariable("persistent.port", k[2]),
Jump("clear_all")]
+ showif debug:
+ null height 30
+ textbutton _("+ New Server"):
+ action Call("add_server")
vbox:
style_prefix "check"
null height 60
diff --git a/game/story.rpy b/game/story.rpy
index b83cf7c..680c8db 100644
--- a/game/story.rpy
+++ b/game/story.rpy
@@ -148,8 +148,8 @@ label SQ00001_post:
####################################################
label SQ00005_post:
- $ show_img("bg castle", False)
- scene bg castle with Dissolve(1.0)
+ $ show_img("bg humancity", False)
+ scene bg humancity with Dissolve(1.0)
"You" "We did it! We reached the Stronghold!"
## TODO FIXME old scripts