Skip to content

Commit 5ed35f3

Browse files
authored
Merge pull request #243 from Pryaxis/constilation-public
Expose ConstileationProvider as public
2 parents de66a13 + f916276 commit 5ed35f3

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

TerrariaServerAPI/TerrariaApi.Server/ConstileationProvider.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,25 @@ namespace TerrariaApi.Server;
88
/// <summary>
99
/// Cons"tile"ation provider is a tile adapter that will function similar to heaptile to reduce memory, but instead of using math to determine offsets, a TileData structure is used instead which already knows the layout.
1010
/// </summary>
11-
internal class ConstileationProvider : ModFramework.ICollection<ITile>
11+
public class ConstileationProvider : ModFramework.ICollection<ITile>
1212
{
1313
private TileData[] data = null;
1414

15+
/// <summary>
16+
/// Returns the max tile x value
17+
/// </summary>
1518
public int Width => Main.maxTilesX + 1;
19+
/// <summary>
20+
/// Returns the max tile y value
21+
/// </summary>
1622
public int Height => Main.maxTilesY + 1;
1723

24+
/// <summary>
25+
/// Returns a tile given the coordinates
26+
/// </summary>
27+
/// <param name="x">Tile X</param>
28+
/// <param name="y">Tile Y</param>
29+
/// <returns>Tile data via the <see cref="ITile"/> interface</returns>
1830
public unsafe ITile this[int x, int y]
1931
{
2032
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)