using System;
using Holo.Managers;
namespace Holo.Virtual.Rooms.Items
{
///
/// Represents a virtual wallitem in a virtual room.
///
public class wallItem
{
///
/// The ID of the item.
///
internal int ID;
///
/// The template ID of the item.
///
internal int templateID;
///
/// The position of the item on the wall of the virtual room.
///
internal string wallPosition;
///
/// Optional. The variable/status of the item.
///
internal string Var;
///
/// Initializes a new instance of a virtual wallitem in a virtual room.
///
/// The ID of this item.
/// The template ID of this item.
/// The wallposition of this item. [!Rabbit format]
/// The variable of this item. [optional, if not supplied then sprite color will be set]
public wallItem(int ID, int tID, string wallPosition, string Var)
{
this.ID = ID;
this.templateID = tID;
this.wallPosition = wallPosition;
if (Var == "")
this.Var = catalogueManager.getTemplate(tID).Colour;
else
this.Var = Var;
}
///
/// Returns the sprite name of this item by accessing catalogueManager.itemTemplate with the template ID.
///
internal string Sprite
{
get
{
return catalogueManager.getTemplate(templateID).Sprite;
}
}
///
/// Returns the item string of this item.
///
public override string ToString()
{
return ID + Convert.ToChar(9).ToString() + Sprite + Convert.ToChar(9) + " " + Convert.ToChar(9) + wallPosition + Convert.ToChar(9) + Var;
}
}
}