Skip to content

Commit

Permalink
Fix for cet 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-js authored and nat-js committed Mar 30, 2021
1 parent 354ed8c commit 17ca582
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lang/en_us.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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!" ,
Expand Down
14 changes: 7 additions & 7 deletions lang/example.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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!" ,
}
}
2 changes: 1 addition & 1 deletion scripts/autoexec.lua
Original file line number Diff line number Diff line change
@@ -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']
Expand Down
2 changes: 2 additions & 0 deletions scripts/cet_mod_manager/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,6 @@ function CETMM.OpenFolder(folder)
end
end

print("CET file module loaded.")

return CETMM

0 comments on commit 17ca582

Please sign in to comment.