Designer:

- Designer now has a status bar to show when various things are completed successfully.
 - The Offline Runtime can now be launched via the Designers Project menu.
 - Designer now features a 'Set As Initial Location' item within the Right-Click menu. Right Click on a Zone and assign it as your projects initial starting location.

Engine:
 - BaseCharacter class fleshed out a little bit. Now includes an OnTravel method for player travel code.
 - PlayerBasic class now inherits from BaseCharacter.
 - ProjectInformation now supports setting the games initial zone location.
 - ProjectInformation.Filename is now placed within a category (Object Settings) within the Property Pane of the Designer.
 - Room.GetDoor method added for returning a specified door with the matching  travel direction.
 - StartingLocation now overrides ToString to return the location that's currently assigned to it for use within the Designer.
 - Zone class now has an EntranceRoom Property for settings the default entrance room for the Zone. This is used by the Runtime and the designer when setting and retrieving the InitialLocation.

Offline Runtime:
 - Now creates a basic player, loads the project and places the player within the entrance room designated by the InitialLocation.Zone
 - Runtime contains code that automatically moves the player to the north during startup. This will be removed, it's only there for testing purposes.
 - Runtime does not print anything to the console yet.
This commit is contained in:
Scionwest_cp 2010-01-31 19:02:06 -08:00
parent 2ec31c0170
commit efc49e35ce
12 changed files with 233 additions and 37 deletions

View file

@ -111,6 +111,8 @@ namespace MudDesigner
break;
case "Currencies":
return ObjectType.Currency;
case "Rooms":
return ObjectType.Room;
case "Realms":
return ObjectType.Realm;
case "Zones":
@ -392,6 +394,11 @@ namespace MudDesigner
}
}
private void SetStatus(string status)
{
lblStatus.Text = "Status: " + status;
}
/// <summary>
/// Refreshes the Project Explorer incase the directory structure
/// has changed, but was not reflected in the Explorer
@ -588,5 +595,47 @@ namespace MudDesigner
if (e.KeyCode == Keys.Enter)
FindObject(txtSearch.Text);
}
private void setAsInitialLocationToolStripMenuItem_Click(object sender, EventArgs e)
{
if (GetNodeType(treeExplorer.SelectedNode) == ObjectType.ZoneRoot)
{
StartingLocation location = new StartingLocation();
Zone zone = new Zone();
string filename = "";
if (Path.GetExtension(treeExplorer.SelectedNode.FullPath) == "")
{
filename = treeExplorer.SelectedNode.Text + ".zone";
}
else
filename = treeExplorer.SelectedNode.Text;
string path = Path.Combine(FileManager.GetDataPath(SaveDataTypes.Zones), Path.GetFileNameWithoutExtension(filename));
path = Path.Combine(path, filename);
zone = (Zone)zone.Load(path);
location.Realm = "No Realm Associated.";
location.Zone = zone.Name;
location.Room = zone.EntranceRoom;
_Project.InitialLocation = location;
_Project.Save(Path.Combine(FileManager.GetDataPath(SaveDataTypes.Root), "Game.xml"));
SetStatus("Location Assigned successfully.");
}
else
MessageBox.Show("You must select a Zone File when you set the Initial Location", "Mud Designer");
}
private void freshLoginToolStripMenuItem_Click(object sender, EventArgs e)
{
Runtime form = new Runtime();
form.Show();
this.Hide();
while (form.Created)
Application.DoEvents();
this.Show();
}
}
}