From 02752b78872abbd8245482f24a0caa9adaa2513c Mon Sep 17 00:00:00 2001 From: quaK Date: Tue, 6 Aug 2024 13:37:00 +0300 Subject: [PATCH] add frontend checks --- data/cdata/ui_scripts/MainMenu/__init__.lua | 4 ++++ data/cdata/ui_scripts/Mods/__init__.lua | 9 +++++---- data/cdata/ui_scripts/SystemLinkMenu/__init__.lua | 4 ++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/data/cdata/ui_scripts/MainMenu/__init__.lua b/data/cdata/ui_scripts/MainMenu/__init__.lua index edd94a68..01a7841a 100644 --- a/data/cdata/ui_scripts/MainMenu/__init__.lua +++ b/data/cdata/ui_scripts/MainMenu/__init__.lua @@ -1,3 +1,7 @@ +if not Engine.InFrontend() then + return +end + require("CampaignMenuButtons") require("CPMainMenu") require("CPMainMenuButtons") diff --git a/data/cdata/ui_scripts/Mods/__init__.lua b/data/cdata/ui_scripts/Mods/__init__.lua index 8fa17032..a6cb8dd4 100644 --- a/data/cdata/ui_scripts/Mods/__init__.lua +++ b/data/cdata/ui_scripts/Mods/__init__.lua @@ -1,6 +1,7 @@ +if not Engine.InFrontend() then + return +end + require("ModSelectButton") require("ModSelectMenu") - -if (Engine.InFrontend()) then - require("ModDownload") -end +require("ModDownload") diff --git a/data/cdata/ui_scripts/SystemLinkMenu/__init__.lua b/data/cdata/ui_scripts/SystemLinkMenu/__init__.lua index 52cb5df6..81b02e80 100644 --- a/data/cdata/ui_scripts/SystemLinkMenu/__init__.lua +++ b/data/cdata/ui_scripts/SystemLinkMenu/__init__.lua @@ -1,2 +1,6 @@ +if not Engine.InFrontend() then + return +end + require("ServerButtons") require("SysLinkBrowser")