Show / Hide Table of Contents

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.).

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
BuildingDirectory
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
public class BuildingDirectory : MonoBehaviour

Fields

| Improve this Doc View Source

buildingKey0

Declaration
public const int buildingKey0 = 16777216
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

BuildingCount

Gets total number of buildings in this directory (can be 0).

Declaration
public int BuildingCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

LocationData

Gets location data of set location.

Declaration
public DFLocation LocationData { get; }
Property Value
Type Description
DFLocation
| Improve this Doc View Source

LocationID

Gets LocationID of set location.

Declaration
public uint LocationID { get; }
Property Value
Type Description
UInt32
| Improve this Doc View Source

MapID

Gets MapID of set location.

Declaration
public int MapID { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

GetBuildingsOfFaction(Int32)

Declaration
public List<BuildingSummary> GetBuildingsOfFaction(int factionId)
Parameters
Type Name Description
Int32 factionId
Returns
Type Description
List<BuildingSummary>
| Improve this Doc View Source

GetBuildingsOfType(DFLocation.BuildingTypes)

Declaration
public List<BuildingSummary> GetBuildingsOfType(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
List<BuildingSummary>
| Improve this Doc View Source

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.

| Improve this Doc View Source

GetHousesForSale()

Declaration
public List<BuildingSummary> GetHousesForSale()
Returns
Type Description
List<BuildingSummary>
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX