muddesigner/MudGame/Scripts/EarthGame.cs
Scionwest_cp 9313611784 MudEngine:
- FileManager.GetData() method now checks to ensure that the supplied filename exists prior to attempting to reading data.
 - Adjusted Game.AutoSaveInterval to 60 minutes instead of 1 minute.
 - Placed all of the File reading code within Game.Load() into a Try/Catch to prevent exceptions if there was an error restoring the game from saved state.
 - GameWorld.Load() now places saved Realms that were created at runtime into the Games Realm Collection. This allows for hard-coded and dynamically created Realms to co-exist.
 - BaseObject.Filename now appends a file extension to the filename if a filename is set but the user forgets to add the file extension. This affects all classes inheriting from BaseObject
 - BaseCharacter updated to invoke commands by instancing a copy of the command and executing it, instead of injecting commands from the player.
 - Added EditRealm command. Allows for editing existing Realms properties. Currently has editing of Simple Descriptions, Detailed Descriptions, name and filename fully implemented.
     Example: EditRealm MyRealmName

MudGame:
 - Removed Cali.Create() call. The MudGame no longer creates a hard-coded world. I want to get away from hard-coded environments all together. They should be built dynamically by admins.
2010-09-05 00:49:37 -07:00

47 lines
No EOL
2.2 KiB
C#

/// <summary>
/// The EarthGame script extends from the Mud Designer Game Engine internal Game class.
/// In order for the script to be used as the new default Game class within the engine, it MUST
/// inherit from Game by using a colon followed by Game after the script name.
///
/// Ex: EarthGame : Game
///
/// This allows developers to extend on or modify how the Game will act during runtime.
/// </summary>
public class EarthGame : Game
{
//Our custom California Realm script.
public WorldCalifornia Cali;
/// <summary>
/// The Constructor for the Game.
/// If you wish to have the internal engine Game class execute it's constructor code before your code
/// is called, you must call the base class by using a colon followed by base() on the same line as your constructor.
///
/// Ex: EarthGame() : base()
///
/// This will ensure that all of the engine properties are setup correctly, incase you miss anything.
/// Any code placed within your constructor is executed after the internal Game class constructor is executed,
/// allowing you to override of the engines properties and set things up how your game needs things set.
/// </summary>
public EarthGame() : base()
{
//The following are Properties this script inherits from the internal Game class.
GameTitle = "Planet Earth MUD";
Story = "The planet Earth reproduced in a MUD for your playing enjoyment!";
IsMultiplayer = true;
CompanyName = "Mud Designer Team";
Website = "Visit Http://MudDesigner.Codeplex.com for the latest News, Documentation and Releases.";
Version = "Example Game Version 1.0";
//Maximum number of players allowed to play on the server at any given time.
MaximumPlayers = 1000;
//Create a new instance of our California realm script, we must pass a reference to our EarthGame
//to the script so that it may add the Realm to our Game world. That is done by using the 'this' keyword.
Cali = new WorldCalifornia(this);
//Calling the create method within the california script.
//Cali.Create();
}
}