More system properties because yes!! 🎉
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
7c547f6452
commit
e2d77f21ba
@ -385,7 +385,7 @@ QString BaseInstance::name() const
|
|||||||
|
|
||||||
QString BaseInstance::windowTitle() const
|
QString BaseInstance::windowTitle() const
|
||||||
{
|
{
|
||||||
return BuildConfig.LAUNCHER_DISPLAYNAME + ": " + name().replace(QRegularExpression("\\s+"), " ");
|
return BuildConfig.LAUNCHER_DISPLAYNAME + ": " + name();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: why is this here? move it to MinecraftInstance!!!
|
// FIXME: why is this here? move it to MinecraftInstance!!!
|
||||||
|
@ -634,6 +634,12 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftS
|
|||||||
launchScript += "windowParams " + windowParams + "\n";
|
launchScript += "windowParams " + windowParams + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// instance info
|
||||||
|
{
|
||||||
|
launchScript += "instanceName " + name() + "\n";
|
||||||
|
launchScript += "instanceIconKey " + iconKey() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// legacy auth
|
// legacy auth
|
||||||
if (session) {
|
if (session) {
|
||||||
launchScript += "userName " + session->player_name + "\n";
|
launchScript += "userName " + session->player_name + "\n";
|
||||||
|
@ -105,11 +105,25 @@ public final class EntryPoint {
|
|||||||
return ExitCode.ABORT;
|
return ExitCode.ABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// populate properties to provide mods with more info
|
||||||
|
String name = params.getString("instanceName", "");
|
||||||
|
String iconKey = params.getString("instanceIconKey", "default");
|
||||||
|
|
||||||
|
System.setProperty("org.prismlauncher.instance.name", name);
|
||||||
|
System.setProperty("org.prismlauncher.instance.icon.id", iconKey);
|
||||||
|
System.setProperty("org.prismlauncher.instance.icon.path", "icon.png");
|
||||||
|
|
||||||
|
// set multimc properties for compatibility
|
||||||
|
System.setProperty("multimc.instance.title", name);
|
||||||
|
System.setProperty("multimc.instance.icon", iconKey);
|
||||||
|
|
||||||
|
// launch the game
|
||||||
|
String launcherType = params.getString("launcher");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Launcher launcher;
|
Launcher launcher;
|
||||||
String type = params.getString("launcher");
|
|
||||||
|
|
||||||
switch (type) {
|
switch (launcherType) {
|
||||||
case "standard":
|
case "standard":
|
||||||
launcher = new StandardLauncher(params);
|
launcher = new StandardLauncher(params);
|
||||||
break;
|
break;
|
||||||
@ -119,7 +133,7 @@ public final class EntryPoint {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Invalid launcher type: " + type);
|
throw new IllegalArgumentException("Invalid launcher type: " + launcherType);
|
||||||
}
|
}
|
||||||
|
|
||||||
launcher.launch();
|
launcher.launch();
|
||||||
|
Loading…
Reference in New Issue
Block a user