public BasicItemEntry(StardewModdingAPI.Mod mod, string internal_name, int price, int edibility, string cat_name, int category, string display_name, string desc) { ModId = mod.ModManifest.UniqueID; InternalName = internal_name; Price = price; Edibility = edibility; CategoryName = cat_name; Category = category; DisplayName = display_name; Description = desc; Mod = mod; }
public override object LoadMod(Assembly modAssembly, Type[] assemblyTypes, ModManifest manifest) { StardewModdingAPI.Mod instance = null; try { var type = assemblyTypes.First(x => x.BaseType == typeof(StardewModdingAPI.Mod)); instance = (StardewModdingAPI.Mod)modAssembly.CreateInstance(type.ToString()); if (instance != null) { instance.PathOnDisk = manifest.ModDirectory; instance.Entry(); } } catch (Exception ex) { Farmhand.Logging.Log.Exception("Error in Entry on SMAPI mod", ex); } return(instance); }