MudEngine:

- Fixed the ScriptEngine and CommandEngine not loading Custom game commands from scripts.
 - BaseCharacter's Create, Initialize, Send and FlushConsole are now overridable via scripts.
 - Invalid commands are now printed to the player "Invalid Command."

MudGame:
 - Added CommandSay script that adds primitive chatting support. Only players within the same Room can see the messages.
 - Renamed California script to WorldCalifornia
 - Renamed MyGame script to EarthGame.
 - Added Clear command script for and Say command script for showing how to build custom commands for use with the game. The commands can only be added server-side, but used client-side.
This commit is contained in:
Scionwest_cp 2010-08-15 14:11:21 -07:00
parent bbd411fdd1
commit 93a27ca75f
10 changed files with 72 additions and 19 deletions

View file

@ -228,7 +228,7 @@
Send("Command: ", false);
}
public void Create(string playerName, string password)
public virtual void Create(string playerName, string password)
{
Name = playerName;
Password = password;
@ -244,7 +244,7 @@
return false;
}
internal void Initialize()
public virtual void Initialize()
{
if (ActiveGame.IsMultiplayer)
client.Receive(new byte[255]);
@ -286,7 +286,7 @@
/// </summary>
/// <param name="data"></param>
/// <param name="newLine"></param>
internal void Send(String data, Boolean newLine)
public void Send(String data, Boolean newLine)
{
try
{
@ -309,12 +309,12 @@
/// Sends data to the player.
/// </summary>
/// <param name="data"></param>
internal void Send(String data)
public void Send(String data)
{
Send(data, true);
}
internal void FlushConsole()
public void FlushConsole()
{
try
{
@ -337,7 +337,7 @@
}
}
internal void Disconnect()
public void Disconnect()
{
if (IsActive)
{
@ -350,7 +350,8 @@
Log.Write(Name + " disconnected.");
}
}
internal String ReadInput()
public String ReadInput()
{
if (ActiveGame.IsMultiplayer)
{