From 448f5723e5814698f97e66c61d51ba3ef5a40244 Mon Sep 17 00:00:00 2001 From: reo101 Date: Mon, 17 Apr 2023 14:13:13 +0300 Subject: [PATCH] feat(prism-launcher): add *crack* patch --- overlays/default.nix | 6 ++++++ overlays/offline-mode-prism-launcher.diff | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 overlays/offline-mode-prism-launcher.diff diff --git a/overlays/default.nix b/overlays/default.nix index 18e3c1e..1479063 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -25,5 +25,11 @@ # install -v "${openasar}" "$out/opt/Discord/resources/app.asar" # ''; # }); + + prismlauncher = prev.prismlauncher.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or [ ]) ++ [ + ./offline-mode-prism-launcher.diff + ]; + }); }; } diff --git a/overlays/offline-mode-prism-launcher.diff b/overlays/offline-mode-prism-launcher.diff new file mode 100644 index 0000000..24a778a --- /dev/null +++ b/overlays/offline-mode-prism-launcher.diff @@ -0,0 +1,19 @@ +diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp +index 9e2fd11..3965913 100644 +--- a/launcher/minecraft/auth/AccountList.cpp ++++ b/launcher/minecraft/auth/AccountList.cpp +@@ -657,13 +657,7 @@ void AccountList::setListFilePath(QString path, bool autosave) + + bool AccountList::anyAccountIsValid() + { +- for(auto account: m_accounts) +- { +- if(account->ownsMinecraft()) { +- return true; +- } +- } +- return false; ++ return true; + } + + void AccountList::fillQueue() {