Changes project wide with this check-in.
MudCompiler: No longer works. Needs to be re-wrote to support the new Alpha 2.0 engine MudDesigenr: Removed most of the forms since we are not working on it. Only form left is Project Manager, which will be removed shortly as well. MudGame: No longer runs. All of the source code was removed due to MudEngine Alpha 2.0 source changing drastically. MudEngine: Alpha 2.0 source code finally checked-in. It contains the full re-build of the engine. A lot of new abstract classes have been added.
This commit is contained in:
parent
5be2f9bf5b
commit
a365256d53
48 changed files with 2254 additions and 2021 deletions
172
MudEngine/Core/BaseEnvironment.cs
Normal file
172
MudEngine/Core/BaseEnvironment.cs
Normal file
|
@ -0,0 +1,172 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MudEngine.Core
|
||||
{
|
||||
public abstract class BaseEnvironment : BaseObject, IEnvironment
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or Sets if this environment will be safe from harmful objects
|
||||
/// </summary>
|
||||
[Category("Environment Settings")]
|
||||
[Description("Sets if the environment will be safe from harmful objects.")]
|
||||
public bool IsSafe {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a collection of all occupants, either players or NPC, within this environment.
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public List<string> CurrentOccupants {get; private set;}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the way that the environment smells.
|
||||
/// </summary>
|
||||
[Category("Environment Settings")]
|
||||
[Description("Sets how the environment will smell.")]
|
||||
public string Smell {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets how the environment feels.
|
||||
/// </summary>
|
||||
[Category("Environment Settings")]
|
||||
[Description("Sets how the environment feels.")]
|
||||
public string Feel {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets the sounds that can be heard within this environment.
|
||||
/// </summary>
|
||||
[Category("Environment Settings")]
|
||||
[Description("Sets the sounds that can be heard within this environment")]
|
||||
public string Listen { get; set; }
|
||||
|
||||
protected BaseGame ActiveGame { get; private set; }
|
||||
|
||||
public BaseEnvironment(BaseGame game)
|
||||
{
|
||||
this.ActiveGame = game;
|
||||
this.ID = this.ActiveGame.GetAvailableID();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs any actions needed when a character occupies the environment.
|
||||
/// </summary>
|
||||
/// <param name="character"></param>
|
||||
public virtual void OnOccupantEnter(ICharacter character)
|
||||
{
|
||||
if (!CurrentOccupants.Contains(character.Name))
|
||||
CurrentOccupants.Add(character.Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs needed actions when a character leaves the occupied environment.
|
||||
/// </summary>
|
||||
/// <param name="character"></param>
|
||||
public virtual void OnOccupantExit(ICharacter character)
|
||||
{
|
||||
if (!CurrentOccupants.Contains(character.Name))
|
||||
CurrentOccupants.Remove(character.Name);
|
||||
}
|
||||
|
||||
bool IEnvironment.IsSafe
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
List<string> IEnvironment.CurrentOccupants
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
string IEnvironment.Smell
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
string IEnvironment.Feel
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
string IEnvironment.Listen
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
void IEnvironment.OnOccupantEnter(ICharacter character)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
void IEnvironment.OnOccupantExit(ICharacter character)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IObject.Name
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
string IObject.Filename
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
string IObject.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue