Room Designer:
- Designer now checks the argument to ensure room= format was used instead of assuming.
This commit is contained in:
parent
dae777bc24
commit
5b6ea538d5
1 changed files with 12 additions and 6 deletions
|
@ -64,9 +64,13 @@ namespace RoomDesigner
|
|||
SetupRoomScript();
|
||||
|
||||
if (parameters.Length != 0)
|
||||
{
|
||||
foreach (object argument in parameters)
|
||||
{
|
||||
if (argument.ToString().ToLower().StartsWith("room="))
|
||||
{
|
||||
string rooms = Engine.GetDataPath(Engine.SaveDataTypes.Rooms);
|
||||
string filename = System.IO.Path.Combine(rooms, parameters[0].ToString());
|
||||
string filename = System.IO.Path.Combine(rooms, argument.ToString());
|
||||
|
||||
//Room to load should always be the first arg.
|
||||
if (System.IO.File.Exists(filename))
|
||||
|
@ -74,6 +78,8 @@ namespace RoomDesigner
|
|||
_CurrentRoom = (Room)ManagedScripting.XmlSerialization.Load(filename, _CurrentRoom);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Show the user(s) the rooms properties
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue