summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-02-05 20:30:57 -0300
committerJesusaves <cpntb1@ymail.com>2024-02-05 20:30:57 -0300
commit4426deca3536f65f718aa829dca395dc15cfe114 (patch)
treee91ec6550fe26f3695c2b8699fdb27786c075e65
parent402e674896e2a913ea1a827c3d6171c6f0964f71 (diff)
downloadtkinter-4426deca3536f65f718aa829dca395dc15cfe114.tar.gz
tkinter-4426deca3536f65f718aa829dca395dc15cfe114.tar.bz2
tkinter-4426deca3536f65f718aa829dca395dc15cfe114.tar.xz
tkinter-4426deca3536f65f718aa829dca395dc15cfe114.zip
The world intro blurb which no one reads but was ranked higher than linking
-rwxr-xr-x__main__.py57
-rw-r--r--_info.py85
l---------mana_launcher.py1
3 files changed, 128 insertions, 15 deletions
diff --git a/__main__.py b/__main__.py
index b82a2be..fefce51 100755
--- a/__main__.py
+++ b/__main__.py
@@ -68,9 +68,11 @@ except:
else:
saveSettings = False
-## TODO FIXME
-if not "discord" in list(pref.keys()):
- pref["discord"] = True
+## Load the introduction screens if they exist
+try:
+ from _info import worldGreet
+except ImportError:
+ worldGreet={}
## Auto-detect if Discord should be used
## Don't crash only if a new FLOSS purist will immediately deleted discordrpc
@@ -251,13 +253,7 @@ def info_game(idx):
## Launch a specific world with its appropriate client
def launch_game(idx):
- ## Get/Set basic data
- HOST=serverlist[idx]["Host"]
- PORT=serverlist[idx]["Port"]
- CMD=""
- OPT=""
PWD=""
-
## Get credentials
auth = {"vaultId": vaultId,
"token": vaultToken,
@@ -285,6 +281,20 @@ def launch_game(idx):
traceback.print_exc()
return -1
+ ## First login special greeting
+ ## This is full of hacks, though
+ if auth2["new"]:
+ return (idx, PWD)
+ return do_real_launch(idx, PWD)
+
+def do_real_launch(idx, PWD):
+ global pref
+ ## Get/Set basic data
+ HOST=serverlist[idx]["Host"]
+ PORT=serverlist[idx]["Port"]
+ CMD=""
+ OPT=""
+
## Using system-wide versus local path
if pref["local"]:
CMD=os.getcwd()+"/manaplus/"
@@ -337,9 +347,27 @@ def launch_game(idx):
return app
+## Lame hack
+def greetHack(idx, PWD):
+ launch_game_master(idx, PWD)
+ world_select()
+ return
+
## Run a game from world selection screen, and handles MLP
-def launch_game_master(idx):
- app=launch_game(idx)
+def launch_game_master(idx, PWD=None):
+ if PWD is None:
+ app=launch_game(idx)
+ else:
+ app=do_real_launch(idx, PWD)
+ if type(app) != int:
+ try:
+ # worldGreet dl_
+ greeting=worldGreet[serverlist[idx]["UUID"]]
+ greeter(greeting, _dest=partial(greetHack, app[0], app[1]))
+ return
+ except:
+ app=do_real_launch(idx, PWD)
+
while app == 7:
stdout("[CLIENT] Mirror Lake triggered.")
## Set credentials
@@ -433,20 +461,19 @@ def world_select():
## TODO: Do not block main thread, launch this in a threading?
## TODO: Image button if an icon can be found
button = HoverButton(text=w["Name"], command=partial(launch_game_master, serverlist.index(w)), width=40, anchor="w", bg="#cc6600", fg="#fff", activebackground="#ee9933")
- ## TODO: First login greeting?
canva.create_window(200, ypos, window=button)
## TODO FIXME: World Info Button
button = HoverButton(text="?", command=partial(info_game, serverlist.index(w)), bg="#cc6600", fg="#fff", activebackground="#ee9933")
canva.create_window(370, ypos, window=button)
ypos += 40
- ## TODO: Footnote
+ ## TODO: Footnote: Settings button
labf = "Lv %d, %d/%d EXP" % (mySoul["level"], mySoul["exp"], mySoul["next"])
labelf = tk.Label(root, text=labf, bg="#0c3251", fg="#fff")
- labelf.config(font=('helvetica', 14))
+ labelf.config(font=('helvetica', 13))
canva.create_window(200, 550, window=labelf)
labelf = tk.Label(root, text="Home: %s" % mySoul["home"], bg="#0c3251", fg="#fff")
- labelf.config(font=('helvetica', 14))
+ labelf.config(font=('helvetica', 13))
canva.create_window(200, 570, window=labelf)
return
diff --git a/_info.py b/_info.py
new file mode 100644
index 0000000..8de6b82
--- /dev/null
+++ b/_info.py
@@ -0,0 +1,85 @@
+## This creates a dictionary with all worlds "welcome" intro screens
+worldGreet={}
+
+#################################################################################
+## Moubootaur Legends
+worldGreet["5936870052ae411c8f0271907f8cf2e4"]="\
+In a boundless dimension, time didn't exist.\n\
+And in an azure color, lies Mana.\n\
+Peace. Quietude. The Mana is there, as it always have been.\n\
+\n\
+Until one day. Nobody knows who or what stirred this, but maybe you do.\n\
+Nonetheless, Mana started to move restlessy, as time and space formed around it.\n\
+\n\
+The peaceful azure was no more, infinite combinations all at once,\n\
+everything came to be and at same time, none of that ever happened.\n\
+\n\
+Reality starts defining itself, new spaces, new times,\n\
+new realities happening and vanishing forever.\n\
+Eventually, this reality broke into other minor ones, and story was rewritten.\n\
+\n\
+And in one of the minor realities which came to be from the bigger one...\n\
+Lies this small world, the last to appear...\n\
+\n\
+{b}Moubootaur Legends{/b}."
+
+#################################################################################
+## TMW Classic
+worldGreet["5b24f66e1d184ee0922b60798b374342"]="\
+Before the universe existed as it is known,\n\
+There was only mana, and a sphere of energy to which mana was attracted.\n\
+Mana surrounded the sphere in all directions.\n\
+\n\
+Then, an anomaly. For a reason which perhaps you may know, the sphere expanded.\n\
+With great force in all directions, chaos ensued.\n\
+Sentient beings would be formed and dissolved soon after.\n\
+Eventually, one of these managed to grasp their own existence.\n\
+Soon after, the Great Dragons formed a society, and peace ensued.\n\
+\n\
+The Mana source formed, a tree expanding from it and stretching high.\n\
+Wars happened for the source, and soon, the Great Dragons were only four.\n\
+But the peace returned, and soon they forgot from each other.\n\
+\n\
+But then came greed, with greed a war, and one of them perished.\n\
+\n\
+This unleashed chaos again in the world, and in a call for adventurers,\n\
+many decided to risk their lives in a journey to Candor Island in...\n\
+\n\
+{b}The Mana World: Classic{/b}."
+
+#################################################################################
+## TMW rEvolt
+worldGreet["7206b46d2eaa40f6ba6fa7100b84d378"]="\
+Nobody knows how this world came to be.\n\
+The many wars have long destroyed any record worth consideration.\n\
+But everyone knows about one tree.\n\
+The Mana Tree.\n\
+And from it, life flows in the world.\n\
+\n\
+But one day, there was a war, and the tree was destroyed.\n\
+But life did not stop. So the tree must still exist.\n\
+Somewhere. Sometime. Beyond mortals' understanding.\n\
+\n\
+None realize, but this world came from another.\n\
+And in the another world, there was an enemy who destroyed many towns.\n\
+Adventurers were on pursuit, when something happened.\n\
+\n\
+Maybe you know, maybe you don't...\n\
+But these adventurers shall once again regroup, and finish what was started...\n\
+\n\
+{b}The Mana World: rEvolt{/b}."
+
+#################################################################################
+## TMW Crossroads
+worldGreet["788eb5e5b2ca414586506cea8eda2d14"]="\
+There's a place, transversal to every world.\n\
+\"The Crossroads\", dubbed the first traveler.\n\
+Being influenced by every world, and subtly influencing in the same way, it is often targeted by those whom seek control over reality itself, or by those whom seek to trade goods from different worlds.\n\
+\n\
+But the Crossroads lacks substance.\n\
+If it was more material, it would crash in the multiple universes it transverse.\n\
+Thus, life cannot exist from itself.\n\
+\n\
+Make sure to anchor yourself to a Home World, before venturing further into\n\
+\n\
+{b}The Crossroads{/b}."
diff --git a/mana_launcher.py b/mana_launcher.py
new file mode 120000
index 0000000..5a427d1
--- /dev/null
+++ b/mana_launcher.py
@@ -0,0 +1 @@
+__main__.py \ No newline at end of file