- Works for multiplayer now, exit doesn't shut down everything. - Less memory usage. - TODO: If startup message, handle it.
28 lines
719 B
C#
28 lines
719 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
using MudEngine.GameObjects.Characters;
|
|
using MudEngine.GameManagement;
|
|
using MudEngine.Commands;
|
|
using MudEngine.GameObjects.Environment;
|
|
|
|
namespace MudEngine.Commands
|
|
{
|
|
public class CommandExit : IGameCommand
|
|
{
|
|
public bool Override { get; set; }
|
|
public string Name { get; set; }
|
|
|
|
public CommandResults Execute(string command, BaseCharacter player)
|
|
{
|
|
if (player.ActiveGame.IsMultiplayer)
|
|
player.Disconnect();
|
|
else
|
|
player.ActiveGame.Shutdown();
|
|
|
|
return new CommandResults();
|
|
}
|
|
}
|
|
}
|