muddesigner/MudEngine/GameObjects/Bag.cs
Scionwest_cp 9b023a2092 MudCompiler:
- Updated to work with ScriptingEngine changes.

MudEngine:
 - Game.PlayerCollection changed to a List<>. Server obtains a array version of it within Server.initialize() via players = pbs.ToArray().
 - All BaseObject classes now require a reference to the Game and contain a property called ActiveGame.
 - Player.Game removed and now uses it's parent objects ActiveGame property.
 - Player.Role property added. Uses the new SecurityRoles enum that specifies what level of access the player has.
 - ScriptEngine now loads all libraries found within the specified ScriptsPath directory, instances the scripts and places them into a collection.
 - Custom character script instancing is now supported, but not fully implemented throughout the engine. They can be loaded, but not used during runtime at this time.
2010-07-29 17:39:38 -07:00

40 lines
822 B
C#

//Microsoft .NET Framework
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//MUD Engine
using MudEngine.GameObjects.Items;
namespace MudEngine.GameObjects
{
public class Bag : BaseObject
{
/// <summary>
/// Gets or Sets the size of the bag.
/// </summary>
public int Size
{
get;
set;
}
private List<Items.BaseItem> Items { get; set; }
public Bag(GameManagement.Game game) : base(game)
{
}
public void Add(BaseItem item)
{
if (Items.Count < Size)
Items.Add(item);
}
public int GetSlotsRemaining()
{
return Size - Items.Count;
}
}
}