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
|
@ -65,13 +65,19 @@ namespace RoomDesigner
|
||||||
|
|
||||||
if (parameters.Length != 0)
|
if (parameters.Length != 0)
|
||||||
{
|
{
|
||||||
string rooms = Engine.GetDataPath(Engine.SaveDataTypes.Rooms);
|
foreach (object argument in parameters)
|
||||||
string filename = System.IO.Path.Combine(rooms, parameters[0].ToString());
|
|
||||||
|
|
||||||
//Room to load should always be the first arg.
|
|
||||||
if (System.IO.File.Exists(filename))
|
|
||||||
{
|
{
|
||||||
_CurrentRoom = (Room)ManagedScripting.XmlSerialization.Load(filename, _CurrentRoom);
|
if (argument.ToString().ToLower().StartsWith("room="))
|
||||||
|
{
|
||||||
|
string rooms = Engine.GetDataPath(Engine.SaveDataTypes.Rooms);
|
||||||
|
string filename = System.IO.Path.Combine(rooms, argument.ToString());
|
||||||
|
|
||||||
|
//Room to load should always be the first arg.
|
||||||
|
if (System.IO.File.Exists(filename))
|
||||||
|
{
|
||||||
|
_CurrentRoom = (Room)ManagedScripting.XmlSerialization.Load(filename, _CurrentRoom);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue