MudEngine:
- Converted all Types from C# types to .NET Types (such as bool changed to Boolean, and int changed to Int32). - Zone no longer gets saved from within GameWorld.Save, but rather in Realm.Save() - Room no longer gets saved from within GameWorld.Save(), but rather in Zone.Save(); - Added new SaveWorld command that admins only can execute to force save the world. It's not fully implemented at this time. MudGame: - began work on command execution from within the server while it's running.
This commit is contained in:
parent
9585cede63
commit
a52ccf8da9
36 changed files with 365 additions and 297 deletions
|
@ -19,7 +19,7 @@ namespace MudEngine.GameObjects
|
|||
[Description("The Display Name assigned to this object.")]
|
||||
//Required to refresh Filename property in the editors propertygrid
|
||||
[RefreshProperties(RefreshProperties.All)]
|
||||
public string Name
|
||||
public String Name
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -34,21 +34,21 @@ namespace MudEngine.GameObjects
|
|||
Filename = value + "." + this.GetType().Name;
|
||||
}
|
||||
}
|
||||
private string _Name;
|
||||
private String _Name;
|
||||
|
||||
[Category("Object Setup")]
|
||||
[Description("A brief description of this object. The description is displayed to users when they use a command for investigating an object")]
|
||||
public string Description { get; set; }
|
||||
public String Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A detailed description that treats each entry as a seperete line when outputted to the player
|
||||
/// </summary>
|
||||
public List<string> DetailedDescription { get; set; }
|
||||
public List<String> DetailedDescription { get; set; }
|
||||
|
||||
[Category("Object Setup")]
|
||||
[ReadOnly(true)]
|
||||
[Description("The filename of the current object. This is assigned by the engine and not editable.")]
|
||||
public string Filename
|
||||
public String Filename
|
||||
{
|
||||
//Returns the name of the object + the objects Type as it's extension.
|
||||
//Filenames are generated by the class itself, users can not assign it.
|
||||
|
@ -59,17 +59,17 @@ namespace MudEngine.GameObjects
|
|||
[Category("Environment Information")]
|
||||
[Description("If a user asks to use his/her senses to investigate an area, this is one of the results that will be displayed. Senses can be used to assist blind characters.")]
|
||||
[DefaultValue("You don't smell anything unsual.")]
|
||||
public string Smell { get; set; }
|
||||
public String Smell { get; set; }
|
||||
|
||||
[Category("Environment Information")]
|
||||
[Description("If a user asks to use his/her senses to investigate an area, this is one of the results that will be displayed. Senses can be used to assist blind characters.")]
|
||||
[DefaultValue("You hear nothing of interest.")]
|
||||
public string Listen { get; set; }
|
||||
public String Listen { get; set; }
|
||||
|
||||
[Category("Environment Information")]
|
||||
[Description("If a user asks to use his/her senses to investigate an area, this is one of the results that will be displayed. Senses can be used to assist blind characters.")]
|
||||
[DefaultValue("You feel nothing.")]
|
||||
public string Feel { get; set; }
|
||||
public String Feel { get; set; }
|
||||
|
||||
public Game ActiveGame { get; set; }
|
||||
|
||||
|
@ -80,7 +80,7 @@ namespace MudEngine.GameObjects
|
|||
{
|
||||
Name = "New " + this.GetType().Name;
|
||||
ActiveGame = game;
|
||||
DetailedDescription = new List<string>();
|
||||
DetailedDescription = new List<String>();
|
||||
|
||||
this.Feel = "You feel nothing.";
|
||||
this.Listen = "You hear nothing of interest.";
|
||||
|
@ -95,7 +95,7 @@ namespace MudEngine.GameObjects
|
|||
{
|
||||
}
|
||||
|
||||
private bool ShouldSerializeName()
|
||||
private Boolean ShouldSerializeName()
|
||||
{
|
||||
return this.Name != DefaultName();
|
||||
}
|
||||
|
@ -105,13 +105,13 @@ namespace MudEngine.GameObjects
|
|||
this.Name = DefaultName();
|
||||
}
|
||||
|
||||
private string DefaultName()
|
||||
private String DefaultName()
|
||||
{
|
||||
return "New " + this.GetType().Name;
|
||||
}
|
||||
|
||||
#region Public Methods
|
||||
public override string ToString()
|
||||
public override String ToString()
|
||||
{
|
||||
return this.Name;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ namespace MudEngine.GameObjects
|
|||
{
|
||||
}
|
||||
|
||||
public virtual void Save(string path)
|
||||
public virtual void Save(String path)
|
||||
{
|
||||
if (String.IsNullOrEmpty(path))
|
||||
return;
|
||||
|
@ -156,19 +156,19 @@ namespace MudEngine.GameObjects
|
|||
if (!Directory.Exists(path))
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
path = Path.Combine(path, Filename);
|
||||
String filename = Path.Combine(path, Filename);
|
||||
|
||||
if (File.Exists(path))
|
||||
File.Delete(path);
|
||||
if (File.Exists(filename))
|
||||
File.Delete(filename);
|
||||
|
||||
FileManager.WriteLine(path, this.Name, "Name");
|
||||
FileManager.WriteLine(path, this.Description, "Description");
|
||||
FileManager.WriteLine(path, this.Feel, "Feel");
|
||||
FileManager.WriteLine(path, this.Listen, "Listen");
|
||||
FileManager.WriteLine(path, this.Smell, "Smell");
|
||||
FileManager.WriteLine(filename, this.Name, "Name");
|
||||
FileManager.WriteLine(filename, this.Description, "Description");
|
||||
FileManager.WriteLine(filename, this.Feel, "Feel");
|
||||
FileManager.WriteLine(filename, this.Listen, "Listen");
|
||||
FileManager.WriteLine(filename, this.Smell, "Smell");
|
||||
}
|
||||
|
||||
public virtual void Load(string filename)
|
||||
public virtual void Load(String filename)
|
||||
{
|
||||
this.Name = FileManager.GetData(filename, "Name");
|
||||
this.Description = FileManager.GetData(filename, "Description");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue