- Rooms can now be linked together via the Doorway Manager. Use the Doorway manager for linking rooms even if they are contained within the same Zone as the same zone reverse door install is not implemented yet.
- TravelDirections now contains a TravelDirections.GetTravelDirectionValue which converts a string representing a direction into the corresponding AvailableTravelDirections enum value.
This commit is contained in:
parent
37b2d42b4c
commit
7da8fcfea9
8 changed files with 984 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
|||
namespace MudDesigner.MudEngine.GameObjects
|
||||
using System;
|
||||
|
||||
namespace MudDesigner.MudEngine.GameObjects
|
||||
{
|
||||
public enum AvailableTravelDirections
|
||||
{
|
||||
|
@ -35,5 +37,20 @@
|
|||
return AvailableTravelDirections.None;
|
||||
}
|
||||
}
|
||||
|
||||
public static AvailableTravelDirections GetTravelDirectionValue(string Direction)
|
||||
{
|
||||
Array values = Enum.GetValues(typeof(AvailableTravelDirections));
|
||||
|
||||
foreach (int value in values)
|
||||
{
|
||||
string displayName = Enum.GetName(typeof(AvailableTravelDirections), value);
|
||||
|
||||
if (displayName == Direction)
|
||||
return (AvailableTravelDirections)Enum.Parse(typeof(AvailableTravelDirections), displayName);
|
||||
}
|
||||
|
||||
return AvailableTravelDirections.None;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue