/
etc/
lib/
src/Abilities/
src/Abilities/Skills/
src/Abilities/Spells/
src/Abilities/Spells/Enums/
src/Affects/
src/ArtheaConsole/
src/ArtheaConsole/Properties/
src/ArtheaGUI/Properties/
src/Clans/Enums/
src/Commands/Communication/
src/Commands/ItemCommands/
src/Connections/
src/Connections/Colors/
src/Connections/Enums/
src/Connections/Players/
src/Connections/Players/Enums/
src/Continents/
src/Continents/Areas/
src/Continents/Areas/Characters/
src/Continents/Areas/Characters/Enums/
src/Continents/Areas/Items/
src/Continents/Areas/Items/Enums/
src/Continents/Areas/Rooms/
src/Continents/Areas/Rooms/Enums/
src/Continents/Areas/Rooms/Exits/
src/Creation/
src/Creation/Attributes/
src/Creation/Interfaces/
src/Database/
src/Database/Interfaces/
src/Environment/
src/Properties/
src/Scripts/Enums/
src/Scripts/Interfaces/
#region Arthea License

/***********************************************************************
*  Arthea MUD by R. Jennings (2007)      http://arthea.googlecode.com/ *
*  By using this code you comply with the Artistic and GPLv2 Licenses. *
***********************************************************************/

#endregion

using Arthea.Abilities;
using Arthea.Clans;
using Arthea.Classes;
using Arthea.Collections;
using Arthea.Commands;
using Arthea.Connections;
using Arthea.Connections.Players;
using Arthea.Continents;
using Arthea.Continents.Areas;
using Arthea.Continents.Areas.Characters;
using Arthea.Continents.Areas.Items;
using Arthea.Continents.Areas.Rooms;
using Arthea.Races;
using Arthea.Scripts;

namespace Arthea.Environment
{
    /// <summary>
    /// Holds global lists.
    /// </summary>
    public struct Lists
    {
        #region Fields

        private static readonly AbilityList abilities = new AbilityList();
        private static readonly AreaList areas = new AreaList();
        private static readonly CharList characters = new CharList();
        private static readonly CharIndexList charIndexes = new CharIndexList();
        private static readonly ClanList clans = new ClanList();
        private static readonly ClassList classes = new ClassList();
        private static readonly CommandList commands = new CommandList();
        private static readonly ConnectionList connections = new ConnectionList();
        private static readonly ContinentList continents = new ContinentList();
        private static readonly Combat fights = new Combat();
        private static readonly HelpList helps = HelpList.Load();
        private static readonly ItemIndexList itemIndexes = new ItemIndexList();
        private static readonly ItemList items = new ItemList();
        private static readonly PlayerList players = new PlayerList();
        private static readonly RaceList races = new RaceList();
        private static readonly RoomList rooms = new RoomList();
        private static readonly ScriptCodeList scripts = new ScriptCodeList();
        private static readonly SocialList socials = SocialList.Load();

        #endregion

        #region Properties

        ///<summary>
        /// Gets the list of commands.
        ///</summary>
        /// <value>the command list</value>
        public static CommandList Commands
        {
            get { return commands; }
        }

        /// <summary>
        /// The list of connections.
        /// </summary>
        /// <value>the connection list</value>
        public static ConnectionList Connections
        {
            get { return connections; }
        }

        /// <summary>
        /// The list of characters
        /// </summary>
        /// <value>the character list</value>
        public static CharList Characters
        {
            get { return characters; }
        }

        /// <summary>
        /// The list of players
        /// </summary>
        /// <value>the list of players</value>
        public static PlayerList Players
        {
            get { return players; }
        }

        /// <summary>
        /// The list of continents
        /// </summary>
        /// <value>The list of continents</value>
        public static ContinentList Continents
        {
            get { return continents; }
        }

        /// <summary>
        /// The list of areas
        /// </summary>
        /// <value>the list of areas</value>
        public static AreaList Areas
        {
            get { return areas; }
        }

        /// <summary>
        /// The dictionary of rooms by id
        /// </summary>
        /// <value>the dictionary of rooms by id</value>
        public static RoomList Rooms
        {
            get { return rooms; }
        }

        /// <summary>
        /// The dictionary of item indexes by id
        /// </summary>
        /// <value>the item indexes</value>
        public static ItemIndexList ItemIndexes
        {
            get { return itemIndexes; }
        }

        /// <summary>
        /// The list of items
        /// </summary>
        /// <value>the list of items</value>
        public static ItemList Items
        {
            get { return items; }
        }

        /// <summary>
        /// The dictionary of character indexes by id
        /// </summary>
        /// <value>the character indexes</value>
        public static CharIndexList CharIndexes
        {
            get { return charIndexes; }
        }

        /// <summary>
        /// The list of clans
        /// </summary>
        /// <value>the clans</value>
        public static ClanList Clans
        {
            get { return clans; }
        }

        /// <summary>
        /// The list of classes
        /// </summary>
        /// <value>the classes</value>
        public static ClassList Classes
        {
            get { return classes; }
        }

        /// <summary>
        /// The list of characters fighting.
        /// </summary>
        /// <value>the characters fighting</value>
        public static Combat Fights
        {
            get { return fights; }
        }

        /// <summary>
        /// The list of helps
        /// </summary>
        /// <value>the help files</value>
        public static HelpList Helps
        {
            get { return helps; }
        }

        /// <summary>
        /// The list of socials
        /// </summary>
        /// <value>the socials</value>
        public static SocialList Socials
        {
            get { return socials; }
        }

        /// <summary>
        /// The list of abilities
        /// </summary>
        /// <value>the abilities</value>
        public static AbilityList Abilities
        {
            get { return abilities; }
        }

        /// <summary>
        /// The list of races
        /// </summary>
        /// <value>the races</value>
        public static RaceList Races
        {
            get { return races; }
        }

        /// <summary>
        /// The list of scripts
        /// </summary>
        /// <value>the scripts</value>
        public static ScriptCodeList Scripts
        {
            get { return scripts; }
        }

        #endregion

        #region Methods (1)

        /// <summary>
        /// Saves lists that need to be saved.
        /// </summary>
        public static void Save()
        {
            Continents.Save();
            Areas.Save();
            Clans.Save();
            Helps.Save();
            Socials.Save();
            Players.Save();
        }

        #endregion
    }
}