- Updated all game commands to support the new Player.Send() method. Returning CommandResults is no longer supported. - Login command now executes the Look command upon completing login. - Look command now supports Rooms DetailDescription property. Use this for multi-line descriptions. - Several changes to the Restart command. Still not working fully however, it no longer calls duplicate methods. - Fixed Walk command not moving players around. - Loading engine commands no longer happens more than once. - Added additional Server Console log output - BaseCharacter.Send() now correctly displays content to the user and prints the "Command:" message to the player after every command completed. - The Server now sets Player.IsControlled to true when a player connects. - BaseCharacter.Send() checks if the game is multi-player or not. If it is, it prints to Console, if not then prints to telnet clients. Mud Offline Example: - Updated Zeroth Realm creation to use Room.DetailDescription now that the Look command supports it. - Updated the Game loop. No longer needs to print to the console due to the player.Execute() command automatically printing content to the console. Mud Server: - Removed player from server as it was not being used any longer.
63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using System;
|
|
|
|
using MudEngine.GameManagement;
|
|
using MudEngine.GameObjects;
|
|
using MudEngine.GameObjects.Environment;
|
|
|
|
namespace MUDGame
|
|
{
|
|
internal class Zeroth
|
|
{
|
|
Game game;
|
|
Realm realm;
|
|
|
|
internal Zeroth(Game game)
|
|
{
|
|
this.game = game;
|
|
realm = new Realm(game);
|
|
}
|
|
|
|
internal void BuildZeroth()
|
|
{
|
|
realm.Name = "Zeroth";
|
|
realm.Description = "The land of " + realm.Name + " is fully of large forests and dangerous creatures.";
|
|
realm.IsInitialRealm = true;
|
|
game.AddRealm(realm);
|
|
|
|
//Build Rooms.
|
|
BuildHome();
|
|
}
|
|
|
|
private void BuildHome()
|
|
{
|
|
//Build Zones
|
|
Zone zone = new Zone(game);
|
|
zone.Name = "Home";
|
|
zone.Description = "Your home is small and does not contain many items, but it's still your home and someplace you can relax after your battles.";
|
|
zone.IsSafe = true;
|
|
zone.StatDrain = false;
|
|
zone.IsInitialZone = true;
|
|
zone.Realm = realm.Name;
|
|
realm.AddZone(zone);
|
|
|
|
Room bedroom = new Room(game);
|
|
bedroom.Name = "Bedroom";
|
|
bedroom.DetailedDescription.Add("This is your bedroom, it's small but comfortable. You have a bed, a book shelf and a rug on the floor.");
|
|
bedroom.DetailedDescription.Add("You may walk to the WEST to find you Closet.");
|
|
bedroom.Zone = zone.Name;
|
|
bedroom.Realm = realm.Name;
|
|
bedroom.IsInitialRoom = true;
|
|
zone.AddRoom(bedroom);
|
|
|
|
Room closet = new Room(game);
|
|
closet.Name = "Closet";
|
|
closet.DetailedDescription.Add("Your closet contains clothing and some shoes.");
|
|
closet.DetailedDescription.Add("You may walk to your EAST to find your Room.");
|
|
closet.Zone = zone.Name;
|
|
closet.Realm = realm.Name;
|
|
zone.AddRoom(closet);
|
|
|
|
zone.LinkRooms(AvailableTravelDirections.West, closet, bedroom);
|
|
}
|
|
}
|
|
}
|