MUD Engine:
- BaseObject now sets the default value for Name programmatically for the editors propertygrids. - Room, Realm and Zone no longer set their Name Properties to their default value, BaseObject handles it. Room Designer: - Scripts where'nt being saved, this has been corrected. - Rooms wheren't being loaded when supplied via the command line argument (Method is used by the Zone Builder) - Displaying scripts within the Designer is now fixed. Zone Builder: - Now displays the Zone Object Properties in the property grid.
This commit is contained in:
parent
24b5c3f687
commit
82e43cb4f2
7 changed files with 72 additions and 84 deletions
|
@ -61,7 +61,7 @@ namespace RoomDesigner
|
|||
|
||||
//Get the current rooms scripts.
|
||||
//TODO: Add Doorway script support
|
||||
SetupRoomScript();
|
||||
//SetupRoomScript();
|
||||
|
||||
if (parameters.Length != 0)
|
||||
{
|
||||
|
@ -69,13 +69,14 @@ namespace RoomDesigner
|
|||
{
|
||||
if (argument.ToString().ToLower().StartsWith("room="))
|
||||
{
|
||||
string rooms = Engine.GetDataPath(Engine.SaveDataTypes.Rooms);
|
||||
string filename = System.IO.Path.Combine(rooms, argument.ToString());
|
||||
string roomPath = Engine.GetDataPath(Engine.SaveDataTypes.Rooms);
|
||||
string room = argument.ToString().Substring("room=".Length);
|
||||
string filename = System.IO.Path.Combine(roomPath, room.ToString());
|
||||
|
||||
//Room to load should always be the first arg.
|
||||
if (System.IO.File.Exists(filename))
|
||||
{
|
||||
_CurrentRoom = (Room)ManagedScripting.XmlSerialization.Load(filename, _CurrentRoom);
|
||||
_CurrentRoom = (Room)MUDEngine.FileSystem.FileSystem.Load(filename, _CurrentRoom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,6 +85,7 @@ namespace RoomDesigner
|
|||
|
||||
//Show the user(s) the rooms properties
|
||||
propertyRoom.SelectedObject = _CurrentRoom;
|
||||
txtScript.Text = _CurrentRoom.Script;
|
||||
}
|
||||
|
||||
private void SetupRoomScript()
|
||||
|
@ -359,5 +361,10 @@ namespace RoomDesigner
|
|||
+ "}\n";
|
||||
MessageBox.Show(_ScriptEngine.Compile(code), "Script Compiling", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void txtScript_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
_CurrentRoom.Script = txtScript.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue