diff --git a/MudEngine/Commands/BaseCommand.cs b/MudEngine/Core/BaseCommand.cs similarity index 100% rename from MudEngine/Commands/BaseCommand.cs rename to MudEngine/Core/BaseCommand.cs diff --git a/MudEngine/Core/ParseProperty.cs b/MudEngine/Core/ParseProperty.cs deleted file mode 100644 index f56e43f..0000000 --- a/MudEngine/Core/ParseProperty.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Reflection; -using System.ComponentModel; -namespace MudEngine.Attributes -{ - [System.AttributeUsage(System.AttributeTargets.Property)] - public class ParseProperty - : System.Attribute - { - Object obj; - - public ParseProperty(Object var) - { - obj = var; - } - - public object GetObject() - { - return obj; - } - } - -} \ No newline at end of file diff --git a/MudEngine/GameObjects/BaseObject.cs b/MudEngine/GameObjects/BaseObject.cs index 8249cb8..0d5c829 100644 --- a/MudEngine/GameObjects/BaseObject.cs +++ b/MudEngine/GameObjects/BaseObject.cs @@ -178,43 +178,6 @@ namespace MudEngine.GameObjects { } - public virtual void NewSave() - { - ScriptObject obj = new ScriptObject(this); - PropertyInfo[] prop = this.GetType().GetProperties(); - - string path = this.SavePath; - - if (String.IsNullOrEmpty(path)) - return; - - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - - string filename = Path.Combine(path, Filename); - - if (File.Exists(filename)) - File.Delete(filename); - - foreach (var p in prop) - { - object[] attributes = p.GetCustomAttributes(typeof(MudEngine.Attributes.ParseProperty), false); - - foreach (Attribute a in attributes) - { - if (a.GetType().Name == "ParseProperty") - { - ParseProperty(p); - } - } - FileManager.WriteLine(filename, obj.GetProperty(p.Name).ToString(), p.Name); - } - } - - private void ParseProperty(PropertyInfo propety) - { - } - public virtual void Save() { string path = this.SavePath; diff --git a/MudEngine/GameObjects/Characters/BaseCharacter.cs b/MudEngine/GameObjects/Characters/BaseCharacter.cs index 156499d..6534422 100644 --- a/MudEngine/GameObjects/Characters/BaseCharacter.cs +++ b/MudEngine/GameObjects/Characters/BaseCharacter.cs @@ -6,7 +6,6 @@ using System.Text; using System.IO; //MUD Engine -using MudEngine.Attributes; using MudEngine.FileSystem; using MudEngine.Commands; using MudEngine.GameManagement; @@ -40,7 +39,6 @@ namespace MudEngine.GameObjects.Characters /// /// The current Room this Character is located at. /// - [ParseProperty(typeof(Room))] public Room CurrentRoom { get; set; } /// diff --git a/MudEngine/MudEngine.csproj b/MudEngine/MudEngine.csproj index f5fd306..42bebb5 100644 --- a/MudEngine/MudEngine.csproj +++ b/MudEngine/MudEngine.csproj @@ -54,8 +54,7 @@ - - + @@ -98,7 +97,6 @@ -