Skip to content

Commit

Permalink
Move after winch assets are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaPiggy committed Aug 31, 2024
1 parent e9af7f4 commit 72a3b55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 11 additions & 0 deletions Winch/Core/AssetLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ internal static void LoadAssets()
if (Directory.Exists(winchAssetFolderPath))
LoadAssetFolder(winchAssetFolderPath);

try
{
ItemUtil.Initialize();
GridConfigUtil.Initialize();
WorldEventUtil.Initialize();
}
catch (Exception ex)
{
WinchCore.Log.Error($"Failed to initialize winch utils: {ex}");
}

foreach (var modAssembly in ModAssemblyLoader.EnabledModAssemblies.Values)
{
ModAssemblyLoader.ForceModContext(modAssembly);
Expand Down
11 changes: 0 additions & 11 deletions Winch/Core/Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ internal static void Initialize()
{
WinchCore.Log.Debug("Initializer started.");

try
{
ItemUtil.Initialize();
GridConfigUtil.Initialize();
WorldEventUtil.Initialize();
}
catch (Exception ex)
{
WinchCore.Log.Error($"Failed to initialize winch utils: {ex}");
}

// Any unity methods like "Awake" and etc. require patching later (here) or else game explodes for whatever reason. Even just touching the method slightly makes the loading screen go black and spam the error below.
// I assume it is because where we originally patch is before unity native dlls load or something.
/*
Expand Down

0 comments on commit 72a3b55

Please sign in to comment.