Class SectorMapLoader
Class that represents a map loader that loads from the sector files from CipSoft.
Inheritance
Implements
Inherited Members
Namespace: Fibula.Map.SectorFiles
Assembly: Fibula.Map.SectorFiles.dll
Syntax
public class SectorMapLoader : IMapLoader
Constructors
| Improve this Doc View SourceSectorMapLoader(ILogger, ICreatureFinder, IItemFactory, IOptions<SectorMapLoaderOptions>)
Initializes a new instance of the SectorMapLoader class.
Declaration
public SectorMapLoader(ILogger logger, ICreatureFinder creatureFinder, IItemFactory itemFactory, IOptions<SectorMapLoaderOptions> sectorMapLoaderOptions)
Parameters
Type | Name | Description |
---|---|---|
Serilog.ILogger | logger | A reference to the logger instance in use. |
ICreatureFinder | creatureFinder | A reference to the creature finder. |
IItemFactory | itemFactory | A reference to the item factory. |
Microsoft.Extensions.Options.IOptions<SectorMapLoaderOptions> | sectorMapLoaderOptions | The options for this map loader. |
Fields
| Improve this Doc View SourceCommentSymbol
The symbol used for comments.
Declaration
public const char CommentSymbol = '#'
Field Value
Type | Description |
---|---|
System.Char |
PositionSeparator
The separator used for positions of sectors.
Declaration
public const char PositionSeparator = '-'
Field Value
Type | Description |
---|---|
System.Char |
SectorSeparator
The separator used for sector files.
Declaration
public const char SectorSeparator = ':'
Field Value
Type | Description |
---|---|
System.Char |
SectorXMax
The maximum X value for sectors known.
Declaration
public const int SectorXMax = 1043
Field Value
Type | Description |
---|---|
System.Int32 |
SectorXMin
The minimum X value for sectors known.
Declaration
public const int SectorXMin = 996
Field Value
Type | Description |
---|---|
System.Int32 |
SectorYMax
The maximum Y value for sectors known.
Declaration
public const int SectorYMax = 1031
Field Value
Type | Description |
---|---|
System.Int32 |
SectorYMin
The minimum Y value for sectors known.
Declaration
public const int SectorYMin = 984
Field Value
Type | Description |
---|---|
System.Int32 |
SectorZMax
The maximum Z value for sectors known.
Declaration
public const int SectorZMax = 15
Field Value
Type | Description |
---|---|
System.Int32 |
SectorZMin
The minimum Z value for sectors known.
Declaration
public const int SectorZMin = 0
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceCreatureFinder
Gets the creature finder instance.
Declaration
public ICreatureFinder CreatureFinder { get; }
Property Value
Type | Description |
---|---|
ICreatureFinder |
ItemFactory
Gets the item factory instance.
Declaration
public IItemFactory ItemFactory { get; }
Property Value
Type | Description |
---|---|
IItemFactory |
Logger
Gets the logger to use.
Declaration
public ILogger Logger { get; }
Property Value
Type | Description |
---|---|
Serilog.ILogger |
PercentageComplete
Gets the percentage completed loading the map [0, 100].
Declaration
public byte PercentageComplete { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Methods
| Improve this Doc View SourceHasLoaded(Int32, Int32, SByte)
Gets a value indicating whether this loader has previously loaded the given coordinates.
Declaration
public bool HasLoaded(int x, int y, sbyte z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The X coordinate. |
System.Int32 | y | The Y coordinate. |
System.SByte | z | The Z coordinate. |
Returns
Type | Description |
---|---|
System.Boolean | True if the loader has previously loaded the given coordinates, false otherwise. |
Load(Int32, Int32, Int32, Int32, SByte, SByte)
Attempts to load all tiles within a 3 dimensional coordinates window.
Declaration
public IEnumerable<(Location Location, ITile Tile)> Load(int fromX, int toX, int fromY, int toY, sbyte fromZ, sbyte toZ)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fromX | The start X coordinate for the load window. |
System.Int32 | toX | The end X coordinate for the load window. |
System.Int32 | fromY | The start Y coordinate for the load window. |
System.Int32 | toY | The end Y coordinate for the load window. |
System.SByte | fromZ | The start Z coordinate for the load window. |
System.SByte | toZ | The end Z coordinate for the load window. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ValueTuple<Location, ITile>> | A collection of ordered pairs containing the Location and its corresponding ITile. |