diff --git a/MudEngine/GameObjects/Environment/Room.cs b/MudEngine/GameObjects/Environment/Room.cs index 409ec3a..609e8f2 100644 --- a/MudEngine/GameObjects/Environment/Room.cs +++ b/MudEngine/GameObjects/Environment/Room.cs @@ -133,9 +133,9 @@ namespace MudEngine.GameObjects.Environment /// public override object Load(string roomName) { - //Correct the roomname incase it doesnt contain a file extension - if (!roomName.ToLower().EndsWith(".room")) - roomName += ".room"; + //Correct the filename incase it doesnt contain a file extension + if (!roomName.ToLower().EndsWith(this.GetType().Name.ToLower())) + roomName.Insert(roomName.Length, this.GetType().Name.ToLower()); //If the current room does not belong within a Realm, then load it from the //Zones root directory diff --git a/MudEngine/MudEngine.csproj b/MudEngine/MudEngine.csproj index a98ec70..784b64c 100644 --- a/MudEngine/MudEngine.csproj +++ b/MudEngine/MudEngine.csproj @@ -65,6 +65,10 @@ + + + + diff --git a/MudEngine/Scripting/GameObject.cs b/MudEngine/Scripting/GameObject.cs index ee59dec..0f6e704 100644 --- a/MudEngine/Scripting/GameObject.cs +++ b/MudEngine/Scripting/GameObject.cs @@ -60,12 +60,12 @@ namespace MudEngine.Scripting return previousProperty.GetValue(Instance, null); } - + /* Dynamic Type Instancing isn't supported in .NET 3.5; Requires 4.0 public dynamic GetProperty() { return Instance; } - + */ public object InvokeMethod(string methodName, params object[] parameters) { MethodInfo method = Instance.GetType().GetMethod(methodName);