- Added GameCommands namespace for holding all of the game command classes
 - Added ICommand interface for game commands.
 - Added IPlayer interface for player classes.
 - Added CommandLook for prepping the Test Runtime for looking at environments.

Misc:
 - Updated Mud Designer Project Roadmap file (MudDesigner.pod)
This commit is contained in:
Scionwest_cp 2010-01-22 22:14:08 -08:00
parent 7c72fbb2e8
commit 85aae88e34
6 changed files with 91 additions and 3 deletions

Binary file not shown.

View file

@ -74,6 +74,7 @@
<DependentUpon>Designer.cs</DependentUpon> <DependentUpon>Designer.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="MudEngine\FileSystem\SaveDataTypes.cs" /> <Compile Include="MudEngine\FileSystem\SaveDataTypes.cs" />
<Compile Include="MudEngine\GameCommands\CommandLook.cs" />
<Compile Include="MudEngine\GameManagement\GameScript.cs" /> <Compile Include="MudEngine\GameManagement\GameScript.cs" />
<Compile Include="MudEngine\GameObjects\Bag.cs" /> <Compile Include="MudEngine\GameObjects\Bag.cs" />
<Compile Include="MudEngine\GameObjects\BaseObject.cs" /> <Compile Include="MudEngine\GameObjects\BaseObject.cs" />
@ -85,8 +86,10 @@
<Compile Include="MudEngine\GameObjects\Environment\TravelDirections.cs" /> <Compile Include="MudEngine\GameObjects\Environment\TravelDirections.cs" />
<Compile Include="MudEngine\GameObjects\Environment\Zone.cs" /> <Compile Include="MudEngine\GameObjects\Environment\Zone.cs" />
<Compile Include="MudEngine\GameObjects\Items\BaseItem.cs" /> <Compile Include="MudEngine\GameObjects\Items\BaseItem.cs" />
<Compile Include="MudEngine\Interfaces\ICommand.cs" />
<Compile Include="MudEngine\Interfaces\IFileIO.cs" /> <Compile Include="MudEngine\Interfaces\IFileIO.cs" />
<Compile Include="MudEngine\Interfaces\IGameObject.cs" /> <Compile Include="MudEngine\Interfaces\IGameObject.cs" />
<Compile Include="MudEngine\Interfaces\IPlayer.cs" />
<Compile Include="MudEngine\Interfaces\IQuest.cs" /> <Compile Include="MudEngine\Interfaces\IQuest.cs" />
<Compile Include="MudEngine\Interfaces\IRoom.cs" /> <Compile Include="MudEngine\Interfaces\IRoom.cs" />
<Compile Include="MudEngine\Interfaces\IRuleSet.cs" /> <Compile Include="MudEngine\Interfaces\IRuleSet.cs" />

View file

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MudDesigner.MudEngine.FileSystem;
using MudDesigner.MudEngine.GameCommands;
using MudDesigner.MudEngine.GameManagement;
using MudDesigner.MudEngine.GameObjects.Environment;
using MudDesigner.MudEngine.GameObjects.Items;
using MudDesigner.MudEngine.Interfaces;
namespace MudDesigner.MudEngine.GameCommands
{
public class CommandLook : IGameCommand
{
public string Name { get; set; }
public bool Override { get; set; }
public object Execute(params object[] parameters)
{
Room room = new Room() ;
StringBuilder desc = new StringBuilder();
foreach (object obj in parameters)
{
if (obj is Room)
room = (Room)obj;
}
if (room == null)
return null;
foreach (Door door in room.Doorways)
{
if (door.TravelDirection != MudDesigner.MudEngine.GameObjects.AvailableTravelDirections.Down && door.TravelDirection != MudDesigner.MudEngine.GameObjects.AvailableTravelDirections.Up)
{
desc.AppendLine("To the ");
desc.Append(door.TravelDirection.ToString());
desc.Append(" is ");
desc.Append(door.ConnectedRoom);
}
}
return desc.ToString();
}
}
}

View file

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MudDesigner.MudEngine.Interfaces
{
public interface IGameCommand
{
//Name of the command
string Name { get; set; }
//Used to override commands with the same name
bool Override { get; set; }
//Executes the command.
object Execute(params object[] Parameter);
}
}

View file

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MudDesigner.MudEngine.Interfaces
{
public interface IPlayer : IGameObject
{
}
}

View file

@ -1,21 +1,30 @@
using System; //.Net Framework
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
//Mud Designer
using MudDesigner.MudEngine.GameCommands;
using MudDesigner.MudEngine.FileSystem;
using MudDesigner.MudEngine.GameManagement;
using MudDesigner.MudEngine.GameObjects;
using MudDesigner.MudEngine.GameObjects.Environment;
using MudDesigner.MudEngine.GameObjects.Items;
namespace MudDesigner namespace MudDesigner
{ {
public partial class Runtime : Form public partial class Runtime : Form
{ {
public Runtime() public Runtime()
{ {
InitializeComponent(); InitializeComponent();
} }
private void txtCommand_TextChanged(object sender, EventArgs e) private void txtCommand_TextChanged(object sender, EventArgs e)