Pre-made profiles

This commit is contained in:
leha-code 2022-03-20 14:27:43 -04:00
parent 33aa358a28
commit 309633d842
No known key found for this signature in database
GPG Key ID: 15227A6455DDF7EE
2 changed files with 23 additions and 5 deletions

View File

@ -10,16 +10,15 @@
A better launcher for the Minecraft: Pi Edition Reborn mod.
<br/>
<br/>
<center>
<a href="https://github.com/mcpiscript/Planet/issues">Report Bug</a>
|
<a href="https://github.com/mcpiscript/Planet/issues">Request Feature</a>
</center>
</p>
</p>
<center>
![Downloads](https://img.shields.io/github/downloads/mcpiscript/Planet/total) ![Contributors](https://img.shields.io/github/contributors/mcpiscript/Planet?color=dark-green) ![Issues](https://img.shields.io/github/issues/mcpiscript/Planet) ![License](https://img.shields.io/github/license/mcpiscript/Planet) [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fmcpiscript%2FPlanet&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)
</center>
<!--## Table Of Contents
@ -62,7 +61,7 @@ And, no launcher supports AppImage, thus Planet is required to run new versions
| Discord RPC | Yes | No | No | No |
| External server support | Yes | Yes | Yes | No |
| Flatpak support | Yes | No | No | No |
| Pre-made profiles | No | Yes | Yes | Yes |
| Pre-made profiles | Yes | Yes | Yes | Yes |
| Easy GUI navigation | Yes | Yes | Yes | No |
| Skin support | Yes | No | No | No |
## Credits

View File

@ -1,7 +1,7 @@
#!/usr/bin/python3
"""
Planet is an improed launcher, inspired by jMCPIL, MCPIL and MCPIl-R
Planet is an improved launcher, inspired by jMCPIL, MCPIL and MCPIl-R
Copyright (C) 2022 Alexey Pavlov
Copyright (C) 2022 Red-Exe-Engineer
@ -531,6 +531,7 @@ class Planet(QMainWindow):
self.conf["username"] = self.usernameedit.text()
self.conf["options"] = self.launchfeatures
self.conf["render_distance"] = self.distancebox.currentText()
self.conf["profile"] = self.profilebox.currentText()
self.conf["hidelauncher"] = self.showlauncher.isChecked()
with open(f"/home/{USER}/.planet-launcher/config.json", "w") as file:
@ -552,6 +553,24 @@ class Planet(QMainWindow):
def launch(self):
self.save_profile()
if self.profilebox.currentText().lower() == "vanilla mcpi":
self.launchfeatures = launcher.get_features_dict(f"/home/{USER}/.planet-launcher/minecraft.AppImage")
for feature in self.launchfeatures:
self.launchfeatures[feature] = False
elif self.profilebox.currentText().lower() == "modded mcpi":
self.launchfeatures = launcher.get_features_dict(f"/home/{USER}/.planet-launcher/minecraft.AppImage")
self.launchfeatures["Touch GUI"] = False
elif self.profilebox.currentText().lower() == "modded mcpe":
self.launchfeatures = launcher.get_features_dict(f"/home/{USER}/.planet-launcher/minecraft.AppImage")
elif self.profilebox.currentText().lower() == "optimized mcpe":
self.launchfeatures = launcher.get_features_dict(f"/home/{USER}/.planet-launcher/minecraft.AppImage")
self.launchfeatures["Fancy Graphics"] = False
self.launchfeatures["Smooth Lightning"] = False
self.launchfeatures["Animated Water"] = False
self.launchfeatures['Disable "gui_blocks" Atlas'] = False
self.env = launcher.set_username(self.env, self.usernameedit.text())
self.env = launcher.set_options(self.env, self.launchfeatures)
self.env = launcher.set_render_distance(