Designer:

- Redesigned Doorway Manager
 - Reworked the Door class
 - Reworked the Room Class.
This commit is contained in:
Scionwest_cp 2010-01-21 22:02:36 -08:00
parent 2a88141b02
commit de726021df
3 changed files with 14 additions and 38 deletions

View file

@ -93,13 +93,6 @@
<Compile Include="MudEngine\GameManagement\ProjectInformation.cs" /> <Compile Include="MudEngine\GameManagement\ProjectInformation.cs" />
<Compile Include="MudEngine\FileSystem\FileManager.cs" /> <Compile Include="MudEngine\FileSystem\FileManager.cs" />
<Compile Include="MudEngine\GameManagement\QuestSetup.cs" /> <Compile Include="MudEngine\GameManagement\QuestSetup.cs" />
<Compile Include="MudEngine\UITypeEditors\UIDoorwayControl.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MudEngine\UITypeEditors\UIDoorwayControl.Designer.cs">
<DependentUpon>UIDoorwayControl.cs</DependentUpon>
</Compile>
<Compile Include="MudEngine\UITypeEditors\UIDoorwayEditor.cs" />
<Compile Include="MudEngine\UITypeEditors\UIRealmControl.cs"> <Compile Include="MudEngine\UITypeEditors\UIRealmControl.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -126,10 +119,6 @@
<DependentUpon>Designer.cs</DependentUpon> <DependentUpon>Designer.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="MudEngine\UITypeEditors\UIDoorwayControl.resx">
<DependentUpon>UIDoorwayControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MudEngine\UITypeEditors\UIRealmControl.resx"> <EmbeddedResource Include="MudEngine\UITypeEditors\UIRealmControl.resx">
<DependentUpon>UIRealmControl.cs</DependentUpon> <DependentUpon>UIRealmControl.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>

View file

@ -14,21 +14,6 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
[Serializable] [Serializable]
public class Door public class Door
{ {
public struct DoorwayLinkInformation
{
public string Realm;
public string Zone;
public string Room;
public override string ToString()
{
if (string.IsNullOrEmpty(Room))
return "Doorway to no where.";
else
return "Doorway to " + Room;
}
}
[Category("Door Settings")] [Category("Door Settings")]
[DefaultValue(false)] [DefaultValue(false)]
public bool IsLocked public bool IsLocked
@ -54,32 +39,27 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
} }
[Category("Door Settings")] [Category("Door Settings")]
[EditorAttribute(typeof(UIDoorwayEditor), typeof(System.Drawing.Design.UITypeEditor))] public AvailableTravelDirections TravelDirection { get; set; }
public DoorwayLinkInformation DoorwayLink
{
get;
set;
}
[Browsable(false)] public string ConnectedRoom { get; set; }
public AvailableTravelDirections TravelDirection;
public Door() public Door()
{ {
LevelRequirement = 0; LevelRequirement = 0;
IsLocked = false; IsLocked = false;
RequiredKey = new BaseItem(); RequiredKey = new BaseItem();
DoorwayLink = new DoorwayLinkInformation();
} }
public Door(DoorwayLinkInformation linkInformation) : this() public Door(AvailableTravelDirections travelDirection, string connectedRoom)
: this()
{ {
this.DoorwayLink = linkInformation; ConnectedRoom = connectedRoom;
TravelDirection = travelDirection;
} }
public override string ToString() public override string ToString()
{ {
return this.TravelDirection.ToString() + " Doorway"; return this.TravelDirection.ToString();
} }
} }
} }

View file

@ -36,6 +36,12 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
} }
} }
public AvailableTravelDirections Directions
{
get;
set;
}
[Category("Environment Information")] [Category("Environment Information")]
[Description("Allows for linking of Rooms together via Doorways")] [Description("Allows for linking of Rooms together via Doorways")]
public List<Door> Doorways public List<Door> Doorways
@ -75,6 +81,7 @@ namespace MudDesigner.MudEngine.GameObjects.Environment
public Room() public Room()
{ {
Doorways = new List<Door>(); Doorways = new List<Door>();
IsSafe = false; IsSafe = false;
} }
} }