MudEngine:

- Minor tweaks to Room.cs for checking file extension validity
 - Scripting Engine and related classes added to Solution (Files existed but were not a part of solution)
This commit is contained in:
Scionwest_cp 2010-07-17 09:55:43 -07:00
parent 2c9536a02c
commit 06266b7245
3 changed files with 9 additions and 5 deletions

View file

@ -133,9 +133,9 @@ namespace MudEngine.GameObjects.Environment
/// <returns></returns>
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