BaseScript now has a method for reporting failed Script.Load() method invocations. It will log the class name and property field if used correctly.
Some classes have some protection in place now in the event the class attempts to load a property that does not exist in the save file. CommandSystem instances now use their instanced CommandCollection property instead of the static class property.
This commit is contained in:
parent
9b475691d5
commit
f5cf0c1f6a
4 changed files with 17 additions and 5 deletions
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using MudEngine.Core;
|
||||
using MudEngine.Core.Interfaces;
|
||||
using MudEngine.Game.Characters;
|
||||
using MudEngine.Game;
|
||||
|
@ -70,7 +71,9 @@ namespace MudEngine.Game.Environment
|
|||
{
|
||||
base.Load(filename);
|
||||
|
||||
this.Filename = this.SaveData.GetData("Filename");
|
||||
try { this.Filename = this.SaveData.GetData("Filename"); }
|
||||
catch { LoadFailedMessage("Filename"); }
|
||||
|
||||
this.Enabled = Convert.ToBoolean(this.SaveData.GetData("Enabled"));
|
||||
|
||||
String role = this.SaveData.GetData("RequiredRole");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue