Class BuildingDirectory
Attached to same GameObject as DaggerfallLocation by scene builders. This behaviour manages a building dictionary for every building in an exterior location. Provides helpers to query buildings and link between related systems (automap, quest sites, info text, etc.).
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
public class BuildingDirectory : MonoBehaviour
Fields
| Improve this Doc View SourcebuildingKey0
Declaration
public const int buildingKey0 = 16777216
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceBuildingCount
Gets total number of buildings in this directory (can be 0).
Declaration
public int BuildingCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
LocationData
Gets location data of set location.
Declaration
public DFLocation LocationData { get; }
Property Value
Type | Description |
---|---|
DFLocation |
LocationID
Gets LocationID of set location.
Declaration
public uint LocationID { get; }
Property Value
Type | Description |
---|---|
UInt32 |
MapID
Gets MapID of set location.
Declaration
public int MapID { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceGetBuildingsOfFaction(Int32)
Declaration
public List<BuildingSummary> GetBuildingsOfFaction(int factionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | factionId |
Returns
Type | Description |
---|---|
List<BuildingSummary> |
GetBuildingsOfType(DFLocation.BuildingTypes)
Declaration
public List<BuildingSummary> GetBuildingsOfType(DFLocation.BuildingTypes buildingType)
Parameters
Type | Name | Description |
---|---|---|
DFLocation.BuildingTypes | buildingType |
Returns
Type | Description |
---|---|
List<BuildingSummary> |
GetBuildingSummary(Int32, out BuildingSummary)
Gets building summary.
Declaration
public bool GetBuildingSummary(int key, out BuildingSummary buildingSummaryOut)
Parameters
Type | Name | Description |
---|---|---|
Int32 | key | Building key. |
BuildingSummary | buildingSummaryOut | Building summary out. |
Returns
Type | Description |
---|---|
Boolean | True if lookup successful. |
GetHousesForSale()
Declaration
public List<BuildingSummary> GetHousesForSale()
Returns
Type | Description |
---|---|
List<BuildingSummary> |
MakeBuildingKey(Byte, Byte, Byte)
Create a building key unique within a single location only.
Declaration
public static int MakeBuildingKey(byte layoutX, byte layoutY, byte recordIndex)
Parameters
Type | Name | Description |
---|---|---|
Byte | layoutX | X position of parent block in map layout. |
Byte | layoutY | Y position of parent block in map layout. |
Byte | recordIndex | Record index of building inside parent block. |
Returns
Type | Description |
---|---|
Int32 | Building key. |
ReverseBuildingKey(Int32, out Int32, out Int32, out Int32)
Reverse a building key back to block layout coordinates and record index.
Declaration
public static void ReverseBuildingKey(int key, out int layoutXOut, out int layoutYOut, out int recordIndexOut)
Parameters
Type | Name | Description |
---|---|---|
Int32 | key | Building key. |
Int32 | layoutXOut | X position of parent block in map layout. |
Int32 | layoutYOut | Y position of parent block in map layout. |
Int32 | recordIndexOut | Record index of building inside parent block. |
SetLocation(in DFLocation, out DFBlock[])
Setup building directory from specified location.
Declaration
public void SetLocation(in DFLocation location, out DFBlock[] blocks)
Parameters
Type | Name | Description |
---|---|---|
DFLocation | location | Source location data. |
DFBlock[] | blocks | Exterior blocks. |