using System; using Holo.Managers; using Holo.Source.Virtual.Catalogue; 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 position of the item on the wall of the virtual room. /// internal string wallPosition; /// /// Optional. The variable/status of the item. /// internal string Var; /// /// The template of the item /// internal itemTemplate Template; /// /// 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.wallPosition = wallPosition; this.Template = catalogueManager.getItem(tID); if (Var == "" && Template.posterString != null) this.Var = Template.posterString[1]; else this.Var = Var; } /// /// Returns the sprite name of this item by accessing catalogueManager.itemTemplate with the template ID. /// internal string Sprite { get { if (Template.posterString == null) return Template.Sprite; else return Template.posterString[0]; } } /// /// 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; } } }