Designer:
- Door Linking implementation started. - Duplicate directions are not allowed within a Room - If a User enters the name of a non-existing Room for linking to a Doorway, the Designer generates that Room for the User. - Room Editor now refreshes it's list of Rooms after the Doorway Manager closes so that auto generated Rooms are displayed. - Added new Doorway Manager UI Engine: - Added Door.DoorwayExist() method to the Door class.
This commit is contained in:
parent
0811af95b1
commit
f919539a89
12 changed files with 512 additions and 25 deletions
|
@ -56,10 +56,5 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
|
|||
ConnectedRoom = connectedRoom;
|
||||
TravelDirection = travelDirection;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.TravelDirection.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using System.Drawing.Design;
|
||||
|
||||
using MudDesigner.MudEngine.UITypeEditors;
|
||||
|
||||
namespace MudDesigner.MudEngine.GameObjects.Environment
|
||||
{
|
||||
|
@ -36,14 +39,10 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
|
|||
}
|
||||
}
|
||||
|
||||
public AvailableTravelDirections Directions
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Category("Environment Information")]
|
||||
[Description("Allows for linking of Rooms together via Doorways")]
|
||||
[EditorAttribute(typeof(UIDoorwayEditor), typeof(UITypeEditor))]
|
||||
[RefreshProperties(RefreshProperties.All)]
|
||||
public List<Door> Doorways
|
||||
{
|
||||
get;
|
||||
|
@ -77,12 +76,22 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
|
|||
set;
|
||||
}
|
||||
|
||||
public Room TestRoom { get; set; }
|
||||
public Room()
|
||||
{
|
||||
Doorways = new List<Door>();
|
||||
|
||||
IsSafe = false;
|
||||
}
|
||||
|
||||
public bool DoorwayExist(string travelDirection)
|
||||
{
|
||||
foreach (Door door in Doorways)
|
||||
{
|
||||
if (door.TravelDirection.ToString().ToLower() == travelDirection.ToLower())
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue