From 33f74c4a734d23711960e4a9f0394e3a76f4d041 Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Wed, 6 Oct 2021 15:13:43 -0300 Subject: [PATCH] version text --- .../ClientSource/Screens/MainMenuScreen.cs | 19 ++++++++++++++----- .../SharedSource/Lua/LuaSetup.cs | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Barotrauma/BarotraumaClient/ClientSource/Screens/MainMenuScreen.cs b/Barotrauma/BarotraumaClient/ClientSource/Screens/MainMenuScreen.cs index 6a5f9c48d..12f4e936a 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Screens/MainMenuScreen.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Screens/MainMenuScreen.cs @@ -420,19 +420,28 @@ namespace Barotrauma } }; #endif - new GUIButton(new RectTransform(new Point(300, 30), Frame.RectTransform, Anchor.TopRight) { AbsoluteOffset = new Point(40, 230) }, - "Remove Client-Side Lua", style: "GUIButtonLarge", color: GUI.Style.Red) + + new GUIButton(new RectTransform(new Point(300, 30), Frame.RectTransform, Anchor.TopLeft) { AbsoluteOffset = new Point(20, 50) }, + "Remove Client-Side Lua", style: "MainMenuGUIButton", color: GUI.Style.Red) { IgnoreLayoutGroups = true, UserData = Tab.Empty, ToolTip = "Remove Client-Side Lua.", OnClicked = (tb, userdata) => { - return false; + if (!File.Exists("Barotrauma.dll.original")) + { + new GUIMessageBox("", "Error: Barotrauma.dll.original not found, Github version? Use Steam validate files instead."); + } + + return true; } }; - - + + new GUITextBlock(new RectTransform(new Point(300, 30), Frame.RectTransform, Anchor.TopLeft) { AbsoluteOffset = new Point(10, 10) }, "Using LuaForBarotrauma version " + AssemblyInfo.GitRevision, Color.Red) + { + IgnoreLayoutGroups = false + }; var minButtonSize = new Point(120, 20); var maxButtonSize = new Point(480, 80); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaSetup.cs b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaSetup.cs index a6471b555..f7621dda5 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaSetup.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Lua/LuaSetup.cs @@ -254,7 +254,7 @@ namespace Barotrauma luaSetup = this; - PrintMessage("Lua!"); + PrintMessage("Lua! Version " + AssemblyInfo.GitRevision); luaScriptLoader = new LuaScriptLoader(this); luaScriptLoader.ModulePaths = new string[] { }; @@ -487,7 +487,7 @@ namespace Barotrauma lua.Globals["SERVER"] = isServer; lua.Globals["CLIENT"] = !isServer; - LuaDocs.GenerateDocs(typeof(EntitySpawner)); + // LuaDocs.GenerateDocs(typeof(EntitySpawner)); if (File.Exists("Lua/MoonsharpSetup.lua")) // try the default loader DoFile("Lua/MoonsharpSetup.lua");