Engine:
- Corrected SaveDataTypes.Currency being named incorrectly. Changed to Currencies - ProjectInformation now inherits from the new IFileIO interface. - ProjectInformation.Load can be used instead of the FileManager now (note: Saving of ProjectInformation must still be done using FileManager) - Organizing of BaseObject done - BaseObject now supports BaseObject.Load. Use this instead of FileManager.Load - Fixed UIRealmControl error, attempting to deserialize into a null Zone Field - Program.cs is now encapsulated into a try/catch - IFileIO interface added for providing a blueprint on file I/O operations Designer: - Additional ObjectTypes added to the ObjectTypes enum - Additional commenting provided throughout the source. - Re-organized the source code. - Simplified the Constructor code. Roughly 50% less code now. - Re-wrote the Object Load code to make it easier to read and maintain. - Renamed several menu items to conform to the projects naming conventions
This commit is contained in:
parent
9311435007
commit
afd74530cd
47 changed files with 4530 additions and 0 deletions
67
Mud Designer/MudEngine/GameObjects/Environment/Room.cs
Normal file
67
Mud Designer/MudEngine/GameObjects/Environment/Room.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MudDesigner.MudEngine.GameObjects.Environment
|
||||
{
|
||||
public class Room : BaseObject
|
||||
{
|
||||
[Category("Environment Information")]
|
||||
[Description("Shows what rooms are currently created and linked to within this Room.")]
|
||||
[ReadOnly(true)]
|
||||
public string DoorList
|
||||
{
|
||||
get
|
||||
{
|
||||
string installed = "";
|
||||
if (this.InstalledDoors.Count != 0)
|
||||
{
|
||||
foreach (Door d in InstalledDoors)
|
||||
{
|
||||
installed += d.TravelDirection.ToString() + ",";
|
||||
}
|
||||
if (InstalledDoors.Count >= 2)
|
||||
{
|
||||
installed = installed.Substring(0, installed.Length - 1);
|
||||
}
|
||||
return installed;
|
||||
}
|
||||
else
|
||||
return "None Installed.";
|
||||
}
|
||||
}
|
||||
|
||||
[Category("Environment Information")]
|
||||
[Description("Allows for linking of Rooms together via Doorways")]
|
||||
public List<Door> InstalledDoors;
|
||||
|
||||
[ReadOnly(true)]
|
||||
[Description("This is the Zone that the Room is currently assigned to.")]
|
||||
[Category("Environment Information")]
|
||||
public string Zone
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Category("Environment Information")]
|
||||
[DefaultValue(false)]
|
||||
[Description("Determins if the Player can be attacked within this Room or not.")]
|
||||
public bool IsSafe
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Room TestRoom { get; set; }
|
||||
public Room()
|
||||
{
|
||||
InstalledDoors = new List<Door>();
|
||||
IsSafe = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue