private static void PostLoad() { var bundle = AssetBundle.LoadFromStream(Assembly.GetExecutingAssembly() .GetManifestResourceStream("ProtoRegister.resources")); var iconSapling = bundle.LoadAsset <Sprite>("iconSapling"); var itemSapling = new ItemProto { Name = "sapling", ID = 9150, GridIndex = 1506, Type = EItemType.Resource, StackSize = 200, Description = "", DescFields = new [] { EItemDescType.MadeIn }.ToIntArray() }.SetIconSprite(iconSapling); ProtoRegister.RegisterItem(itemSapling); var recipeSapling = new RecipeProto { Name = "sapling", ID = 220, GridIndex = 1610, Type = ERecipeType.Assemble, Items = new[] { 1030 }, ItemCounts = new[] { 1 }, Results = new[] { itemSapling.ID }, ResultCounts = new[] { 5 }, TimeSpend = 30, Handcraft = true, Description = "", preTech = LDB.techs.Select(1121) }.SetIconSprite(iconSapling); ProtoRegister.RegisterRecipe(recipeSapling); }
private static void PreLoad() { var stringSapling = new StringProtoJP(28500, "sapling", "Sapling", "苗木"); ProtoRegister.RegisterString(stringSapling); }