Table of Contents

Class PluginDungeonFloorplan

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

One landblock's indoor cells seen from above, worked out from the cell geometry the game data carries: level faces are floor, standing faces are walls, and the doorways between cells are left open. Everything is in the landblock's own frame and in metres: x grows east and y grows north from the landblock's south-west corner, the frame the game's own cell positions use. The plan is built once and never changed, so it is safe to keep and to read from any thread.

public sealed record PluginDungeonFloorplan : IEquatable<PluginDungeonFloorplan>
Inheritance
PluginDungeonFloorplan
Implements
Inherited Members

Constructors

PluginDungeonFloorplan(uint, IReadOnlyList<PluginDungeonLayer>, IReadOnlyList<PluginDungeonCell>, Vector3, Vector3)

One landblock's indoor cells seen from above, worked out from the cell geometry the game data carries: level faces are floor, standing faces are walls, and the doorways between cells are left open. Everything is in the landblock's own frame and in metres: x grows east and y grows north from the landblock's south-west corner, the frame the game's own cell positions use. The plan is built once and never changed, so it is safe to keep and to read from any thread.

public PluginDungeonFloorplan(uint LandblockId, IReadOnlyList<PluginDungeonLayer> Layers, IReadOnlyList<PluginDungeonCell> Cells, Vector3 BoundsMin, Vector3 BoundsMax)

Parameters

LandblockId uint

The landblock the plan is of, with a zero low half.

Layers IReadOnlyList<PluginDungeonLayer>

The storeys, lowest first.

Cells IReadOnlyList<PluginDungeonCell>

Every cell with geometry, in cell id order.

BoundsMin Vector3

The lowest corner of the box around every cell's geometry, in landblock-local metres.

BoundsMax Vector3

The highest corner of that box.

Properties

BoundsMax

The highest corner of that box.

public Vector3 BoundsMax { get; init; }

Property Value

Vector3

BoundsMin

The lowest corner of the box around every cell's geometry, in landblock-local metres.

public Vector3 BoundsMin { get; init; }

Property Value

Vector3

Cells

Every cell with geometry, in cell id order.

public IReadOnlyList<PluginDungeonCell> Cells { get; init; }

Property Value

IReadOnlyList<PluginDungeonCell>

Empty

The plan of nothing: what comes back for a landblock the host does not know, a landblock with no indoor cells, or a host that cannot read the game data.

public static PluginDungeonFloorplan Empty { get; }

Property Value

PluginDungeonFloorplan

IsEmpty

True when there is nothing to draw.

public bool IsEmpty { get; }

Property Value

bool

LandblockId

The landblock the plan is of, with a zero low half.

public uint LandblockId { get; init; }

Property Value

uint

Layers

The storeys, lowest first.

public IReadOnlyList<PluginDungeonLayer> Layers { get; init; }

Property Value

IReadOnlyList<PluginDungeonLayer>

Methods

ToLandblockLocal(in PluginNavigationPosition)

A position in the plan's frame: metres east and north of the south-west corner of the position's own landblock, and metres up. Compare its landblock (CellId with a zero low half) with LandblockId before drawing it on this plan.

public static Vector3 ToLandblockLocal(in PluginNavigationPosition position)

Parameters

position PluginNavigationPosition

A position as the navigation surface reports it.

Returns

Vector3