muddesigner/MUDEngine/Engine.cs
Scionwest_cp 035fdf96d9 New Project added: Currency Editor. Allows for creating and managing of the games currencies.
Mud Designer HUB:
 * frmMain.cs - HUB now scans entire solution directory to find the correct app to launch rather than just checking the Project Manager directory.
 * frmMain.cs - HUB now has the app launch precess wrapped within a try/catch/finally. No exception handling added as of yet within the catch.

MUDEngine:
 * Engine.cs - ValidateProjectPath method now creates the Currency directory.
 * Objects namespace added.
 * Moved the Environment namespace and folder within the new Objects namespace.
 * BaseObject.cs created. All Game objects will inherit from this, or a child of this class.
 * Currency.cs created.
 * ProjectInformation.cs - Added using statements.

Project Manager:
 * Added Using statements for MUDEngine
2009-11-06 22:30:22 -08:00

32 lines
1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MUDEngine
{
public class Engine
{
/// <summary>
/// Used to ensure that the paths needed to run the game exists.
/// </summary>
/// <param name="validatedPath"></param>
public static void ValidateProjectPath(string validatedPath)
{
string dataPath = System.IO.Path.Combine(validatedPath, "Data");
if (!System.IO.Directory.Exists(dataPath))
System.IO.Directory.CreateDirectory(dataPath);
//begin checking directories
string[] paths = { "Rooms", "Zones", "Realms", "Currency" };
foreach (var path in paths)
{
string createPath = System.IO.Path.Combine(dataPath, path);
if (!System.IO.Directory.Exists(createPath))
System.IO.Directory.CreateDirectory(createPath);
}
}
}
}