Esempio n. 1
0
        // Static setup methods

        /// <summary> Creates a new ItemDescription that can be used by the game. </summary>
        public static ItemDescription CreateItemDescription(string sName, string sDesc, string sDisplayImage, ContentManager xContent, string sShadow = "")
        {
            string sEntry = sName.Replace(" ", "");

            ItemDescription xDesc = new ItemDescription()
            {
                sFullName                 = sName,
                sDescription              = sDesc,
                sNameLibraryHandle        = sEntry + "_Name",
                sDescriptionLibraryHandle = sEntry + "_Description",
                sCategory                 = "",
                iInternalLevel            = 1,
                iValue = 1,
                enType = ModLibrary.ItemTypesNext
            };

            ItemCodex.denxLoadedDescriptions[xDesc.enType] = xDesc;
            ModLibrary.ItemDetails.Add(xDesc.enType, new ModItemData(xDesc.enType));

            Ui.AddMiscText("Items", xDesc.sNameLibraryHandle, sName, MiscTextTypes.GenericItemName);
            Ui.AddMiscText("Items", xDesc.sDescriptionLibraryHandle, sDesc, MiscTextTypes.GenericItemDescription);

            xDesc.SetTextures(sDisplayImage, xContent, sShadow);

            return(xDesc);
        }