Exemplo n.º 1
0
        public void Init(string itemName)
        {
            loadTexture();

            modObjectData                = new ModObjectData(itemName, loadDisplayName(), loadDescription());
            modObjectData.ObjectType     = Game1.content.LoadString("Strings\\StringsFromCSFiles:Tool.cs.14307");
            modObjectData.ObjectCategory = Constants.CATEGORY_WEAPON;
            modObjectData.Price          = 100;
            customObjectData             = modObjectData.CreateObjectData(texture, typeof(ToolBugNet));
        }
Exemplo n.º 2
0
        public void Init()
        {
            if (texture == null)
            {
                texture = ModEntry.INSTANCE.Helper.Content.Load <Texture2D>("assets/critterBag.png", StardewModdingAPI.ContentSource.ModFolder);
            }

            modObjectData                = new ModObjectData("Critter Bag", ModEntry.i18n.Get("name_critter"), ModEntry.i18n.Get("desc_critter"));
            modObjectData.ObjectType     = Constants.TYPE_BASIC;
            modObjectData.ObjectCategory = Constants.CATEGORY_ARTISAN;
            customObjectData             = modObjectData.CreateObjectData(texture, typeof(ObjectCritter));
            itemId = customObjectData.sdvId;
        }