Interface ITile
Interface for all tiles.
Inherited Members
Namespace: Fibula.Map.Contracts.Abstractions
Assembly: Fibula.Map.Contracts.dll
Syntax
public interface ITile : IThingContainer, ILocatable
Properties
| Improve this Doc View SourceBlocksLay
Gets a value indicating whether items in this tile block laying.
Declaration
bool BlocksLay { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
BlocksPass
Gets a value indicating whether items in this tile block passing.
Declaration
bool BlocksPass { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
BlocksThrow
Gets a value indicating whether items in this tile block throwing.
Declaration
bool BlocksThrow { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Creatures
Gets the tile's creatures.
Declaration
IEnumerable<ICreature> Creatures { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ICreature> |
Flags
Gets the flags from this tile.
Declaration
byte Flags { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Ground
Gets the single ground item that a tile may have.
Declaration
IItem Ground { get; }
Property Value
Type | Description |
---|---|
IItem |
LastModified
Gets the last date and time that this tile was modified.
Declaration
DateTimeOffset LastModified { get; }
Property Value
Type | Description |
---|---|
System.DateTimeOffset |
LiquidPool
Gets the single liquid pool item that a tile may have.
Declaration
IItem LiquidPool { get; }
Property Value
Type | Description |
---|---|
IItem |
TopCreature
Gets the creature that is on top based on the tile's stack order.
Declaration
ICreature TopCreature { get; }
Property Value
Type | Description |
---|---|
ICreature |
TopItem
Gets the item that is on top based on the tile's stack order.
Declaration
IItem TopItem { get; }
Property Value
Type | Description |
---|---|
IItem |
TopThing
Gets the thing that is on top based on the tile's stack order.
Declaration
IThing TopThing { get; }
Property Value
Type | Description |
---|---|
IThing |
Methods
| Improve this Doc View SourceFindItemWithTypeId(UInt16)
Attempts to find an item in the tile with the given type.
Declaration
IItem FindItemWithTypeId(ushort typeId)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | typeId | The type to look for. |
Returns
Type | Description |
---|---|
IItem | The item with such id, null otherwise. |
GetItemsToDescribeByPriority(Int32)
Attempts to get the tile's items to describe prioritized and ordered by their stack order.
Declaration
(IEnumerable<IItem> fixedItems, IEnumerable<IItem> normalItems) GetItemsToDescribeByPriority(int maxItemsToGet = 9)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxItemsToGet | The maximum number of items to include in the result. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Collections.Generic.IEnumerable<IItem>, System.Collections.Generic.IEnumerable<IItem>> | The items in the tile, split by those which are fixed and those considered normal. |
GetStackOrderOfThing(IThing)
Attempts to get the position in the stack for the given IThing.
Declaration
byte GetStackOrderOfThing(IThing thing)
Parameters
Type | Name | Description |
---|---|---|
IThing | thing | The thing to find. |
Returns
Type | Description |
---|---|
System.Byte | The position in the stack for the IThing, or System.Byte.MaxValue if its not found. |
IsPathBlocking(Byte)
Determines if this tile is considered to be blocking the path.
Declaration
bool IsPathBlocking(byte avoidTypes = 14)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | avoidTypes | The damage types to avoid when checking for path blocking. By default, all types are considered path blocking. |
Returns
Type | Description |
---|---|
System.Boolean | True if the tile is considered path blocking, false otherwise. |
SetFlag(TileFlag)
Sets a flag on this tile.
Declaration
void SetFlag(TileFlag flag)
Parameters
Type | Name | Description |
---|---|---|
TileFlag | flag | The flag to set. |