- Realm.Zones Property Category changed from "Realm Information" to "Environment Information" - Changed Zone.Rooms from internal to public - Added a custom Editor for the Zone.Rooms property. - Room Editing development started. Rooms are created and managed within the currently loaded Zone. - UIRealmEditor had un-unused code removed. - Added UIRoomEditor. Manages the UIRoomControl. - Added UIRoomControl, which will be the editor used when managing Rooms within a Zone Object.
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
using System.ComponentModel;
|
|
|
|
using MudDesigner.MudEngine.FileSystem;
|
|
using MudDesigner.MudEngine.GameObjects;
|
|
using MudDesigner.MudEngine.UITypeEditors;
|
|
|
|
namespace MudDesigner.MudEngine.GameObjects.Environment
|
|
{
|
|
public class Realm : BaseObject
|
|
{
|
|
|
|
[Category("Environment Information")]
|
|
[EditorAttribute(typeof(UIRealmEditor), typeof(System.Drawing.Design.UITypeEditor))]
|
|
public List<string> Zones { get; set; }
|
|
|
|
public Realm()
|
|
{
|
|
Zones = new List<string>();
|
|
}
|
|
|
|
public Zone GetZone(string ZoneName)
|
|
{
|
|
//correct the zonename if needed
|
|
if (!ZoneName.EndsWith(".zone"))
|
|
ZoneName += ".zone";
|
|
|
|
//build our path
|
|
string realmPath = Path.Combine(FileManager.GetDataPath(SaveDataTypes.Realms), this.Name);
|
|
|
|
//get a collection of all the zones within the realm
|
|
string[] files = Directory.GetFiles(realmPath, "*.zone");
|
|
Zone zone = new Zone();
|
|
|
|
//look four our zone file
|
|
foreach (string file in files)
|
|
{
|
|
if (file == ZoneName)
|
|
{
|
|
string zonePath = Path.Combine(realmPath, Path.GetDirectoryName(file));
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|