//NOTE: tOreType enum is in ItemBase Class /// <summary> /// This constructor will create an ore of the specified type /// </summary> /// <param name="type"></param> public ItemOre(tOreType type) : base(getOreString(type), type) { oreType = type; this.type = tItemType.Ore; _isStackable = true; _quantity = 1; }
/// <summary> /// This constructor makes an item with the specified name and ore type. /// </summary> /// <param name="name"></param> /// <param name="oreType"></param> public ItemBase(string name, ItemBase.tOreType oreType) { this.oreType = oreType; type = tItemType.Item; _name = name; _description = "A fine " + _name + "."; _quantity = 1; neededOreQuantity = 1; neededPoints = 1; }
/// <summary> /// This constructor makes an item with the specified name. /// </summary> /// <param name="name"></param> public ItemBase(string name) { oreType = tOreType.NOT_ORE; type = tItemType.Item; _name = name; _description = "A fine " + _name + "."; _quantity = 1; neededOreQuantity = 1; neededPoints = 1; }
/// <summary> /// Get the string representation of the type of ore /// </summary> /// <param name="ore"></param> /// <returns></returns> public static string getOreString(tOreType ore) { return Enum.GetName(typeof(tOreType), ore); }
public static string generateComponentCode(tAttributeType att, tOreType ore, ItemWeapon.tWeaponType wep, tComponentPart part) { return "" + (int)att + (int)ore + (int)wep + (int)part; }
public static string generateArmorCode(ItemComponent.tAttributeType att, tOreType ore, ItemArmor.tArmorPart part) { return "" + (int)att + (int)ore + (int)part; }