- Rooms can now be linked automatically via the new Zone.LinkRooms method. Room linking can no longer be done manually as the Doorways property is now read-only. - Door.Description has been removed. Doorway description will need to be included in Room.Description or Room.DetailedDescription properties. - Added DetailedDescription to make creating multi-line descriptions easier. Not supported by the Look command yet. - Game.IsRunning is now read-only. The Game will manage this property on its own. - BaseCharacter.ExecuteCommand now will always return a string. Simplifying the game loop for users as they no longer need to check what Type was returned by the command. - Doors now contain a DepartureRoom and a ArrivalRoom property allowing for easy access to Rooms that are linked together. - Fixed a bug where Game, Realms and Zones always assigned IsInitial to Realms, Zones and Rooms when added to the collections. Collection would contain multiple IsInitial objects. - Removed Room.InstalledDoorways property as that was used only by the old Designer - Removed Room.Load() as that implementation of it is obsolete. MudGame: - Revised Zeroth to build it's Zone and Rooms using the new Zone.LinkRooms function. - Greatly revised Program.cs and the Game loop to take advantage of many of the automations provided by the Engine now.
34 lines
916 B
C#
34 lines
916 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
using MudEngine.GameObjects.Characters;
|
|
using MudEngine.FileSystem;
|
|
using MudEngine.Commands;
|
|
using MudEngine.GameManagement;
|
|
using MudEngine.GameObjects.Environment;
|
|
using MudEngine.GameObjects.Items;
|
|
|
|
namespace MudEngine.Commands
|
|
{
|
|
public class CommandLook : IGameCommand
|
|
{
|
|
public string Name { get; set; }
|
|
public bool Override { get; set; }
|
|
|
|
public CommandResults Execute(string command, BaseCharacter player)
|
|
{
|
|
StringBuilder desc = new StringBuilder();
|
|
|
|
if (player.CurrentRoom == null)
|
|
{
|
|
return new CommandResults("Not within a created Room.");
|
|
}
|
|
|
|
desc.AppendLine(player.CurrentRoom.Description);
|
|
|
|
return new CommandResults(desc.ToString());
|
|
}
|
|
}
|
|
}
|