This commit is contained in:
parent
6bb6258da3
commit
1416c7149b
3 changed files with 87 additions and 0 deletions
33
Mud Designer/MudEngine/GameObjects/Bag.cs
Normal file
33
Mud Designer/MudEngine/GameObjects/Bag.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using MudDesigner.MudEngine.GameObjects.Items;
|
||||
|
||||
namespace MudDesigner.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 void Add(BaseItem item)
|
||||
{
|
||||
if (Items.Count < Size)
|
||||
Items.Add(item);
|
||||
}
|
||||
|
||||
public int GetSlotsRemaining()
|
||||
{
|
||||
return Size - Items.Count;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
//MudEngine
|
||||
using MudDesigner.MudEngine.Attributes;
|
||||
using MudDesigner.MudEngine.FileSystem;
|
||||
using MudDesigner.MudEngine.GameObjects;
|
||||
using MudDesigner.MudEngine.GameObjects.Environment;
|
||||
|
||||
namespace MudDesigner.MudEngine.GameObjects.Environment
|
||||
{
|
||||
public struct StartingLocation
|
||||
{
|
||||
public string Room;
|
||||
public string Zone;
|
||||
public string Realm;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
namespace MudDesigner.MudEngine.GameObjects
|
||||
{
|
||||
public enum AvailableTravelDirections
|
||||
{
|
||||
None = 0,
|
||||
North,
|
||||
South,
|
||||
East,
|
||||
West,
|
||||
Up,
|
||||
Down,
|
||||
}
|
||||
|
||||
public static class TravelDirections
|
||||
{
|
||||
public static AvailableTravelDirections GetReverseDirection(AvailableTravelDirections Direction)
|
||||
{
|
||||
switch (Direction)
|
||||
{
|
||||
case AvailableTravelDirections.Down:
|
||||
return AvailableTravelDirections.Up;
|
||||
case AvailableTravelDirections.East:
|
||||
return AvailableTravelDirections.West;
|
||||
case AvailableTravelDirections.None:
|
||||
return AvailableTravelDirections.None;
|
||||
case AvailableTravelDirections.North:
|
||||
return AvailableTravelDirections.South;
|
||||
case AvailableTravelDirections.South:
|
||||
return AvailableTravelDirections.North;
|
||||
case AvailableTravelDirections.Up:
|
||||
return AvailableTravelDirections.Down;
|
||||
case AvailableTravelDirections.West:
|
||||
return AvailableTravelDirections.East;
|
||||
default:
|
||||
return AvailableTravelDirections.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue