- Updated to work with ScriptingEngine changes. MudEngine: - Game.PlayerCollection changed to a List<>. Server obtains a array version of it within Server.initialize() via players = pbs.ToArray(). - All BaseObject classes now require a reference to the Game and contain a property called ActiveGame. - Player.Game removed and now uses it's parent objects ActiveGame property. - Player.Role property added. Uses the new SecurityRoles enum that specifies what level of access the player has. - ScriptEngine now loads all libraries found within the specified ScriptsPath directory, instances the scripts and places them into a collection. - Custom character script instancing is now supported, but not fully implemented throughout the engine. They can be loaded, but not used during runtime at this time.
62 lines
1.4 KiB
C#
62 lines
1.4 KiB
C#
//Microsoft .NET Framework
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Xml.Serialization;
|
|
using System.ComponentModel;
|
|
|
|
//MUD Engine
|
|
using MudEngine.GameObjects.Items;
|
|
|
|
namespace MudEngine.GameObjects.Environment
|
|
{
|
|
[XmlInclude(typeof(BaseItem))]
|
|
[Serializable]
|
|
public class Door
|
|
{
|
|
[Category("Door Settings")]
|
|
[DefaultValue(false)]
|
|
public bool IsLocked
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Category("Door Settings")]
|
|
[Browsable(false)]
|
|
public BaseItem RequiredKey
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Category("Door Settings")]
|
|
[DefaultValue(0)]
|
|
public int LevelRequirement
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[Category("Door Settings")]
|
|
public AvailableTravelDirections TravelDirection { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets the Room that the player will be arriving.
|
|
/// </summary>
|
|
public Room ArrivalRoom { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or Sets the Room that the user is leaving.
|
|
/// </summary>
|
|
public Room DepartureRoom { get; set; }
|
|
|
|
public Door(GameManagement.Game game)
|
|
{
|
|
LevelRequirement = 0;
|
|
IsLocked = false;
|
|
RequiredKey = new BaseItem(game);
|
|
}
|
|
}
|
|
}
|