public static bool Init(IModHelper helper, IMonitor monitor, QualityProductsConfig config)
        {
            Helper  = helper;
            Monitor = monitor;

            try
            {
                MeadTexture = Helper.Content.Load <Texture2D>(config.TextureForMeadTypes);
                Monitor.Log($"Custom texture \"{config.TextureForMeadTypes}\" loaded.");
                return(true);
            }
            catch (ArgumentException)
            {
                Monitor.Log($"Invalid path \"{config.TextureForMeadTypes}\" for texture. Custom textures disabled.", LogLevel.Warn);
            }
            catch (ContentLoadException)
            {
                Monitor.Log($"File \"{config.TextureForMeadTypes}\" could not be loaded. Custom textures disabled.", LogLevel.Warn);
            }
            return(false);
        }
Beispiel #2
0
 public QualityProductsAPI(QualityProductsConfig config)
 {
     Config = config;
 }