- Updated MudDesigner to reference the new MudEngine solution. - MudDesigner currently references engine classes within it's own solution and the MudEngine solution. This will be addressed soon. All classes related to the engine will be moved to the MudEngine project. - Began prepping for the removal of all UITypeEditor classes and the namespace from the MudDesigner project. Please note that while this version will compile, it is currently broken. Projects do not get created correctly due to the migration I'm performing. The designer is given less priority at the moment as the engine is the primary focus. Projects will need to be hard-coded using the MudEngine library until the designer is fixed.
43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
using MudEngine.GameObjects.Characters;
|
|
using MudEngine.GameObjects.Characters.Controlled;
|
|
using MudEngine.FileSystem;
|
|
using MudEngine.Commands;
|
|
using MudEngine.GameManagement;
|
|
using MudEngine.GameObjects.Environment;
|
|
using MudEngine.GameObjects.Items;
|
|
using MudDesigner.Engine.Interfaces;
|
|
|
|
namespace MudEngine.Commands
|
|
{
|
|
public class CommandLook : IGameCommand
|
|
{
|
|
public string Name { get; set; }
|
|
public bool Override { get; set; }
|
|
|
|
public CommandResults Execute(BaseCharacter player, GameSetup project, Room room, string command)
|
|
{
|
|
StringBuilder desc = new StringBuilder();
|
|
|
|
if (room == null)
|
|
{
|
|
return new CommandResults("Not within a created Room.");
|
|
}
|
|
|
|
desc.AppendLine(room.Description);
|
|
foreach (Door door in room.Doorways)
|
|
{
|
|
if (door.TravelDirection != MudEngine.GameObjects.AvailableTravelDirections.Down && door.TravelDirection != MudEngine.GameObjects.AvailableTravelDirections.Up)
|
|
{
|
|
desc.AppendLine(door.Description);
|
|
}
|
|
}
|
|
|
|
return new CommandResults(desc.ToString());
|
|
}
|
|
}
|
|
}
|