using Cyber.Entities.SyncBases;
namespace Cyber.Items {
///
/// An item, containing itemmy information.
///
public class Item {
public delegate void ItemAction(Character host);
///
/// ID of the item, used in .
///
public readonly int ID;
///
/// Model ID of this item.
///
public int ModelID;
///
/// Name of the item.
///
public string Name;
///
/// Description of the item.
///
public string Description;
///
/// The weight of the item (in kg).
///
public float Weight;
///
/// The slot in which the item can be equipped to.
///
public EquipSlot Slot;
///
/// The function that is ran when the item is used.
///
public ItemAction Action;
///
/// Creates an item. This should technically be only called by ItemDB, but it's public because of "reasons".
///
/// ID of the item.
/// ModelID of the item, see ModelDB.
/// The name if the item.
/// The Weight of the item.
/// The equip slot of the item.
/// The description of the item.
public Item(int id, int modelId, string name, float weight, EquipSlot slot, string description, ItemAction action = null) {
ID = id;
ModelID = modelId;
Name = name;
Weight = weight;
Slot = slot;
Description = description;
Action = action;
}
///
/// Clones the item, used mostly for .
///
///
public Item Clone() {
return new Item(ID, ModelID, Name, Weight, Slot, Description, Action);
}
}
}