MudEngine:

- Added FileManager.GetDataCollection() Method for getting a collection of values that match the supplied parameter. This is used by environments for restoring saved object collections
 - World Restoration is now fully implemented.
 - Removed un-needed Log messages
 - Added a pushMessage parameter to Log.Write() allowing messages to be sent directly to the console instead of stacking them in a cache. All log messages now push the message by default.
This commit is contained in:
Scionwest_cp 2010-08-15 11:15:35 -07:00
parent 742b75eeb6
commit 5aa5504171
12 changed files with 282 additions and 81 deletions

View file

@ -60,13 +60,30 @@ namespace MudEngine.FileSystem
if (line.StartsWith(";"))
continue;
if (line.StartsWith(name))
if (line.ToLower().StartsWith(name.ToLower()))
return line.Substring(name.Length + 1); //Accounts for name=value;
}
return "No data Found.";
}
public static List<String> GetCollectionData(String filename, String item)
{
List<String> items = new List<string>();
foreach (String line in File.ReadAllLines(filename))
{
//Ignore comments
if (line.StartsWith(";"))
continue;
if (line.ToLower().StartsWith(item.ToLower()))
items.Add(line.Substring(item.Length + 1)); //Accounts for name=value;
}
return items;
}
/// <summary>
/// Returns the complete path to the specified data's save folder.
/// </summary>