diff --git a/init.lua b/init.lua index 0a91b70..2808e90 100644 --- a/init.lua +++ b/init.lua @@ -320,7 +320,7 @@ registerForEvent("onDraw", function() ImGui.SetNextWindowSize(520*fontscale, 0, ImGuiCond.FirstUseEver) ImGui.SetNextWindowPos(wWidth*0.5-260*fontscale, wHeight*0.5-150, ImGuiCond.FirstUseEver) ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, 10, 10) - if ImGui.Begin("CETMM Error", ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoNav | ImGuiWindowFlags.NoMove) then + if ImGui.Begin("CETMM Error", bit32.bor(ImGuiWindowFlags.NoResize, ImGuiWindowFlags.NoSavedSettings, ImGuiWindowFlags.NoTitleBar, ImGuiWindowFlags.NoNav, ImGuiWindowFlags.NoMove)) then local win_width = ImGui.GetWindowSize() pushstylecolor(ImGuiCol.Button, theme.Hidden) pushstylecolor(ImGuiCol.ButtonHovered, theme.Hidden) @@ -364,9 +364,9 @@ registerForEvent("onDraw", function() ImGui.Dummy(0,6) ImGui.TextWrapped(i18n("text_error_window_4")) ImGui.Spacing() - ImGui.PushItemWidth(ImGui.CalcTextSize([[Game.CETMM = require 'cet_mod_manager']])+10) + ImGui.PushItemWidth(ImGui.CalcTextSize([[Game.CETMM = require 'cet_mod_manager/init']])+10) ImGui.Indent(15) - ImGui.InputText("##code", [[Game.CETMM = require 'cet_mod_manager']], 100, ImGuiInputTextFlags.ReadOnly) + ImGui.InputText("##code", [[Game.CETMM = require 'cet_mod_manager/init']], 100, ImGuiInputTextFlags.ReadOnly) ImGui.Unindent(15) ImGui.PopItemWidth() ImGui.Dummy(0,6) diff --git a/lang/en_us.lua b/lang/en_us.lua index 3975ae7..4872dda 100644 --- a/lang/en_us.lua +++ b/lang/en_us.lua @@ -45,7 +45,7 @@ return { tooltip_btn_settings = "Settings" , tooltip_btn_help = "Help" , text_error_window_1 = "Error!!" , - text_error_window_2 = "CET Mod Manager failed to load module!" , + text_error_window_2 = "CET Mod Manager failed to load it's file module!" , text_error_window_3 = "1. You need to open the following file in a text editor:" , text_error_window_4 = "2. And at the 2nd line of the file, paste the following code:" , text_error_window_5 = "3. Save the file and restart your game!" , diff --git a/lang/example.lua b/lang/example.lua index 1b26211..9bc465f 100644 --- a/lang/example.lua +++ b/lang/example.lua @@ -43,12 +43,12 @@ return { text_select_lang = "Selecte a Language (Needs font support)", text_select_settings = "Settings" , tooltip_btn_settings = "Settings" , - tooltip_btn_help = "Help", - -- text_error_window_1 = "Error!!" , - -- text_error_window_2 = "CET Mod Manager failed to load module!" , - -- text_error_window_3 = "1. You need to open the following file in a text editor:" , - -- text_error_window_4 = "2. And at the 2nd line of the file, paste the following code:" , - -- text_error_window_5 = "3. Save the file and restart your game!" , - -- text_error_window_6 = "Or you can just replace the autoexec.lua with the one included in this mod!" , + tooltip_btn_help = "Help" , + text_error_window_1 = "Error!!" , + text_error_window_2 = "CET Mod Manager failed to load it's file module!" , + text_error_window_3 = "1. You need to open the following file in a text editor:" , + text_error_window_4 = "2. And at the 2nd line of the file, paste the following code:" , + text_error_window_5 = "3. Save the file and restart your game!" , + text_error_window_6 = "Or you can just replace the autoexec.lua with the one included in this mod!" , } } diff --git a/scripts/autoexec.lua b/scripts/autoexec.lua index 2cbf6e1..f1382e4 100644 --- a/scripts/autoexec.lua +++ b/scripts/autoexec.lua @@ -1,5 +1,5 @@ json = require 'json/json' -Game.CETMM = require 'cet_mod_manager' +Game.CETMM = require 'cet_mod_manager/init' Game['DebugGiveHotkeys'] = Game['DebugGiveHotkeys;GameInstance'] Game['DebugNPCs_NonExec'] = Game['DebugNPCs_NonExec;GameInstanceStringStringString;GameInstance'] diff --git a/scripts/cet_mod_manager/init.lua b/scripts/cet_mod_manager/init.lua index 6ba0873..594577e 100644 --- a/scripts/cet_mod_manager/init.lua +++ b/scripts/cet_mod_manager/init.lua @@ -97,4 +97,6 @@ function CETMM.OpenFolder(folder) end end +print("CET file module loaded.") + return CETMM