default texture update ??? idk
This commit is contained in:
parent
e3e1bdac94
commit
e7c5717719
1 changed files with 27 additions and 24 deletions
|
|
@ -167,34 +167,37 @@ namespace PvZ_Fusion_Translator
|
|||
|
||||
internal static void LoadDefaultTextures()
|
||||
{
|
||||
string textureDefaultDir = Path.Combine(Core.Instance.modsDirectory, AssetType.Dumps.ToString(), "Default Textures [Do Not Remove]");
|
||||
if (!Directory.Exists(textureDefaultDir))
|
||||
if(Utils.customTextures)
|
||||
{
|
||||
Directory.CreateDirectory(textureDefaultDir);
|
||||
}
|
||||
try
|
||||
{
|
||||
foreach (string filepath in Directory.EnumerateFiles(textureDefaultDir, "*.png", SearchOption.AllDirectories))
|
||||
{
|
||||
string textureDefaultDir = Path.Combine(Core.Instance.modsDirectory, AssetType.Dumps.ToString(), "Default Textures [Do Not Remove]");
|
||||
if (!Directory.Exists(textureDefaultDir))
|
||||
{
|
||||
Directory.CreateDirectory(textureDefaultDir);
|
||||
}
|
||||
try
|
||||
{
|
||||
foreach (string filepath in Directory.EnumerateFiles(textureDefaultDir, "*.png", SearchOption.AllDirectories))
|
||||
{
|
||||
|
||||
#if OBFUSCATE
|
||||
if (CheckSumStore.IsModified(filepath))
|
||||
{
|
||||
Log.LogError("File {0} was modified!" , filepath);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if OBFUSCATE
|
||||
if (CheckSumStore.IsModified(filepath))
|
||||
{
|
||||
Log.LogError("File {0} was modified!" , filepath);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
Texture2D texture2D = Utils.LoadImage(filepath);
|
||||
TextureStore.textureDict[Path.GetFileNameWithoutExtension(filepath)] = filepath;
|
||||
}
|
||||
}
|
||||
Texture2D texture2D = Utils.LoadImage(filepath);
|
||||
TextureStore.textureDict[Path.GetFileNameWithoutExtension(filepath)] = filepath;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.LogError("Error loading Texture.");
|
||||
Log.LogError(e.GetType() + " " + e.Message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.LogError("Error loading Texture.");
|
||||
Log.LogError(e.GetType() + " " + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void LoadCustomTextures()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue