All of the classes that currently perform Save/Load operations now log when a Property failed to be loaded correctly.
This commit is contained in:
parent
32210124e0
commit
a6d346da3d
5 changed files with 28 additions and 49 deletions
|
@ -74,11 +74,16 @@ namespace MudEngine.Game.Environment
|
|||
try { this.Filename = this.SaveData.GetData("Filename"); }
|
||||
catch { LoadFailedMessage("Filename"); }
|
||||
|
||||
this.Enabled = Convert.ToBoolean(this.SaveData.GetData("Enabled"));
|
||||
try { this.Enabled = Convert.ToBoolean(this.SaveData.GetData("Enabled")); }
|
||||
catch { this.LoadFailedMessage("Enabled");}
|
||||
|
||||
String role = this.SaveData.GetData("RequiredRole");
|
||||
try
|
||||
{
|
||||
String role = this.SaveData.GetData("RequiredRole");
|
||||
|
||||
this.RequiredRole = CharacterRole.GetRole(role);
|
||||
this.RequiredRole = CharacterRole.GetRole(role);
|
||||
}
|
||||
catch { this.LoadFailedMessage("RequiredRole"); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue