MudEngine:
- Minor tweaks to Room.cs for checking file extension validity - Scripting Engine and related classes added to Solution (Files existed but were not a part of solution)
This commit is contained in:
parent
2c9536a02c
commit
06266b7245
3 changed files with 9 additions and 5 deletions
|
@ -133,9 +133,9 @@ namespace MudEngine.GameObjects.Environment
|
|||
/// <returns></returns>
|
||||
public override object Load(string roomName)
|
||||
{
|
||||
//Correct the roomname incase it doesnt contain a file extension
|
||||
if (!roomName.ToLower().EndsWith(".room"))
|
||||
roomName += ".room";
|
||||
//Correct the filename incase it doesnt contain a file extension
|
||||
if (!roomName.ToLower().EndsWith(this.GetType().Name.ToLower()))
|
||||
roomName.Insert(roomName.Length, this.GetType().Name.ToLower());
|
||||
|
||||
//If the current room does not belong within a Realm, then load it from the
|
||||
//Zones root directory
|
||||
|
|
|
@ -65,6 +65,10 @@
|
|||
<Compile Include="GameObjects\Items\BaseItem.cs" />
|
||||
<Compile Include="GameObjects\Currency.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Scripting\GameObject.cs" />
|
||||
<Compile Include="Scripting\GameObjectCollection.cs" />
|
||||
<Compile Include="Scripting\ScriptEngine.cs" />
|
||||
<Compile Include="Scripting\StartupObject.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="GameObjects\Characters\NPC\" />
|
||||
|
|
|
@ -60,12 +60,12 @@ namespace MudEngine.Scripting
|
|||
|
||||
return previousProperty.GetValue(Instance, null);
|
||||
}
|
||||
|
||||
/* Dynamic Type Instancing isn't supported in .NET 3.5; Requires 4.0
|
||||
public dynamic GetProperty()
|
||||
{
|
||||
return Instance;
|
||||
}
|
||||
|
||||
*/
|
||||
public object InvokeMethod(string methodName, params object[] parameters)
|
||||
{
|
||||
MethodInfo method = Instance.GetType().GetMethod(methodName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue