muddesigner/MudEngine/Commands/CommandSaveWorld.cs
Scionwest_cp 7e31a78f72 MudEngine:
- Deleted the following commands from the engine:
   Exit, GetTime, LinkRoom, Load, Look, Save and Walk.
   These are now part of the MudGame script library.
 - Revised all of the Commands prior to moving them to the Script Library. They are now very well commented.
 - Optimized the player login code.
 - All commands now support the Help command.
 - Game now has a MinimumPasswordSize property for setting the required minimum characters for a players password.
 - System.Linq and System.Text using statements added to scripts when they are compiled. Script writers no longer need to type out the fully qualified name of a Type within those namespaces.

MudGame:
 - Added the following commands to the script library:
   Exit, GetTime, LinkRoom, Load, Look, Save, Walk.
 - Added 76 lines of comments to WorldCalifornia to better help new users understand how to create their game worlds via script.
 - The Clear, Help, Say and Create commands have been given better commenting.
 - Existing scripts have been given some better optimizations.
2010-08-22 11:20:22 -07:00

35 lines
927 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using MudEngine.FileSystem;
using MudEngine.GameObjects.Characters;
using MudEngine.GameManagement;
using MudEngine.Commands;
using MudEngine.GameObjects.Environment;
namespace MudEngine.Commands
{
public class CommandSaveWorld : IGameCommand
{
public Boolean Override { get; set; }
public String Name { get; set; }
public List<String> Help { get; set; }
public CommandSaveWorld()
{
Help = new List<string>();
Help.Add("Saves the game world.");
}
public void Execute(String command, BaseCharacter player)
{
if ((player.Role == SecurityRoles.Admin) || (player.Role == SecurityRoles.GM))
{
player.ActiveGame.Save();
}
}
}
}