Added ability to run the game when all patch servers are down

This commit is contained in:
Observer KRypt0n_ 2022-08-06 09:46:32 +02:00
parent a1cdf81eca
commit 59b50afa63
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2

View file

@ -271,6 +271,7 @@ impl App {
match config::get() { match config::get() {
Ok(mut config) => { Ok(mut config) => {
match state { match state {
LauncherState::PatchAvailable(Patch::NotAvailable) |
LauncherState::Launch => { LauncherState::Launch => {
let this = this.clone(); let this = this.clone();
@ -767,12 +768,22 @@ impl App {
LauncherState::PatchAvailable(patch) => { LauncherState::PatchAvailable(patch) => {
match patch { match patch {
Patch::NotAvailable | Patch::NotAvailable => {
self.widgets.launch_game.set_label("Patch not available");
self.widgets.launch_game.set_tooltip_text(Some("Patch servers are unavailable and launcher can't verify the game's patching status. You're allowed to run the game on your own risk"));
self.widgets.launch_game.remove_css_class("suggested-action");
self.widgets.launch_game.add_css_class("destructive-action");
}
Patch::Outdated { .. } | Patch::Outdated { .. } |
Patch::Preparation { .. } => { Patch::Preparation { .. } => {
self.widgets.launch_game.set_label("Patch not available"); self.widgets.launch_game.set_label("Patch not available");
self.widgets.launch_game.set_sensitive(false); self.widgets.launch_game.set_sensitive(false);
self.widgets.launch_game.set_tooltip_text(Some("Patch is outdated or in preparation state, so unavailable for usage. Return back later to see its status"));
self.widgets.launch_game.remove_css_class("suggested-action"); self.widgets.launch_game.remove_css_class("suggested-action");
self.widgets.launch_game.add_css_class("destructive-action"); self.widgets.launch_game.add_css_class("destructive-action");
} }