'DontLoadTextures' can be configured

This commit is contained in:
in0finite 2019-07-14 00:16:33 +02:00
parent b1fdbf4256
commit 2a56f7f336
3 changed files with 7 additions and 3 deletions

View file

@ -223,6 +223,8 @@ namespace SanAndreasUnity.Behaviours
private static void StepLoadConfig ()
{
Config.Load ();
TextureDictionary.DontLoadTextures = Config.Get<bool>("dontLoadTextures");
}
private static IEnumerator StepSelectGTAPath ()

View file

@ -224,7 +224,7 @@ namespace SanAndreasUnity.Importing.Conversion
private static readonly Utilities.AsyncLoader<string, TextureDictionary> s_asyncLoader =
new Utilities.AsyncLoader<string, TextureDictionary> (StringComparer.InvariantCultureIgnoreCase);
private static bool DontLoadTextures => true;
public static bool DontLoadTextures { get; set; } = false;
private static Texture2D s_dummyTexture;
private static Texture2D DummyTexture {
@ -406,7 +406,7 @@ namespace SanAndreasUnity.Importing.Conversion
{
if (DontLoadTextures)
return new LoadedTexture(DummyTexture, false);
if (!_alpha.ContainsKey(name))
{
return ParentName != null ? Parent.GetAlpha(name) : null;

View file

@ -38,6 +38,8 @@
"${game_dir}/data/animgrp.dat",
"${data_dir}/auxanimgrp.dat"
],
"weapons_path": "${game_dir}/data/weapon.dat"
"weapons_path": "${game_dir}/data/weapon.dat",
"dontLoadTextures": false,
}