Show / Hide Table of Contents

Class PlayerActivate

Example class to handle activation of doors, switches, etc. from Fire1 input.

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

Fields

| Improve this Doc View Source

buildingGreetingsEnabled

Declaration
public static bool buildingGreetingsEnabled
Field Value
Type Description
Boolean
| Improve this Doc View Source

closeHours

Declaration
public static byte[] closeHours
Field Value
Type Description
Byte[]
| Improve this Doc View Source

CorpseActivationDistance

Declaration
public const float CorpseActivationDistance = 3.75F
Field Value
Type Description
Single
| Improve this Doc View Source

DefaultActivationDistance

Declaration
public const float DefaultActivationDistance = 3.2F
Field Value
Type Description
Single
| Improve this Doc View Source

DoorActivationDistance

Declaration
public const float DoorActivationDistance = 3.2F
Field Value
Type Description
Single
| Improve this Doc View Source

MobileNPCActivationDistance

Declaration
public const float MobileNPCActivationDistance = 6.4F
Field Value
Type Description
Single
| Improve this Doc View Source

OnLootSpawned

When Loot is generated for an activated container, such as a shop shelve or a house container

Declaration
public static EventHandler<ContainerLootSpawnedEventArgs> OnLootSpawned
Field Value
Type Description
EventHandler<ContainerLootSpawnedEventArgs>
| Improve this Doc View Source

openHours

Declaration
public static byte[] openHours
Field Value
Type Description
Byte[]
| Improve this Doc View Source

PickpocketDistance

Declaration
public const float PickpocketDistance = 3.2F
Field Value
Type Description
Single
| Improve this Doc View Source

StaticNPCActivationDistance

Declaration
public const float StaticNPCActivationDistance = 6.4F
Field Value
Type Description
Single
| Improve this Doc View Source

TreasureActivationDistance

Declaration
public const float TreasureActivationDistance = 3.2F
Field Value
Type Description
Single

Properties

| Improve this Doc View Source

CurrentMode

Declaration
public PlayerActivateModes CurrentMode { get; }
Property Value
Type Description
PlayerActivateModes

Methods

| Improve this Doc View Source

AttemptExteriorDoorBash(RaycastHit)

Declaration
public bool AttemptExteriorDoorBash(RaycastHit hit)
Parameters
Type Name Description
RaycastHit hit
Returns
Type Description
Boolean
| Improve this Doc View Source

BuildingIsUnlocked(BuildingSummary)

Declaration
public bool BuildingIsUnlocked(BuildingSummary buildingSummary)
Parameters
Type Name Description
BuildingSummary buildingSummary
Returns
Type Description
Boolean
| Improve this Doc View Source

ChangeInteractionMode(PlayerActivateModes, Boolean)

Declaration
public void ChangeInteractionMode(PlayerActivateModes newMode, bool showText = true)
Parameters
Type Name Description
PlayerActivateModes newMode
Boolean showText
| Improve this Doc View Source

GetBuildingLockValue(BuildingSummary)

Declaration
public int GetBuildingLockValue(BuildingSummary buildingSummary)
Parameters
Type Name Description
BuildingSummary buildingSummary
Returns
Type Description
Int32
| Improve this Doc View Source

GetBuildingLockValue(Int32)

Declaration
public int GetBuildingLockValue(int quality)
Parameters
Type Name Description
Int32 quality
Returns
Type Description
Int32
| Improve this Doc View Source

GetBuildings(Transform, out Transform)

Declaration
public DaggerfallStaticBuildings GetBuildings(Transform buildingsTransform, out Transform owner)
Parameters
Type Name Description
Transform buildingsTransform
Transform owner
Returns
Type Description
DaggerfallStaticBuildings
| Improve this Doc View Source

GetDoors(Transform, out Transform)

Declaration
public DaggerfallStaticDoors GetDoors(Transform doorsTransform, out Transform owner)
Parameters
Type Name Description
Transform doorsTransform
Transform owner
Returns
Type Description
DaggerfallStaticDoors
| Improve this Doc View Source

HasCustomActivation(Int32, Int32)

Checks if a model object has a custom activation assigned

Declaration
public static bool HasCustomActivation(int textureArchive, int textureRecord)
Parameters
Type Name Description
Int32 textureArchive

The texture archive of the flat object to check.

Int32 textureRecord

The texture record of the flat object to check.

Returns
Type Description
Boolean
| Improve this Doc View Source

HasCustomActivation(String)

Checks if an object has a custom activation assigned

Declaration
public static bool HasCustomActivation(string goFlatModelName)
Parameters
Type Name Description
String goFlatModelName

The name of the flat / model object to check.

Returns
Type Description
Boolean
| Improve this Doc View Source

HasCustomActivation(UInt32)

Checks if a model object has a custom activation assigned

Declaration
public static bool HasCustomActivation(uint modelID)
Parameters
Type Name Description
UInt32 modelID

The model ID of the object to check.

Returns
Type Description
Boolean
| Improve this Doc View Source

IsActiveQuestBuilding(BuildingSummary, Boolean)

Declaration
public bool IsActiveQuestBuilding(BuildingSummary buildingSummary, bool residencesOnly = true)
Parameters
Type Name Description
BuildingSummary buildingSummary
Boolean residencesOnly
Returns
Type Description
Boolean
| Improve this Doc View Source

IsBuildingOpen(DFLocation.BuildingTypes)

Declaration
public static bool IsBuildingOpen(DFLocation.BuildingTypes buildingType)
Parameters
Type Name Description
DFLocation.BuildingTypes buildingType
Returns
Type Description
Boolean
| Improve this Doc View Source

LookAtInteriorLock(Int32)

Declaration
public static void LookAtInteriorLock(int lockValue)
Parameters
Type Name Description
Int32 lockValue
| Improve this Doc View Source

Pickpocket(DaggerfallEntityBehaviour)

Declaration
public void Pickpocket(DaggerfallEntityBehaviour target = null)
Parameters
Type Name Description
DaggerfallEntityBehaviour target
| Improve this Doc View Source

PrivateProperty_OnButtonClick(DaggerfallMessageBox, DaggerfallMessageBox.MessageBoxButtons)

Declaration
public void PrivateProperty_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton)
Parameters
Type Name Description
DaggerfallMessageBox sender
DaggerfallMessageBox.MessageBoxButtons messageBoxButton
| Improve this Doc View Source

RegisterCustomActivation(Mod, Int32, Int32, PlayerActivate.CustomActivation, Single)

Registers a custom activation for a flat object. Uses the textureArchive and textureRecord parameters to retrieve the correct object name

Declaration
public static void RegisterCustomActivation(Mod provider, int textureArchive, int textureRecord, PlayerActivate.CustomActivation customActivation, float activationDistance = 3.2F)
Parameters
Type Name Description
Mod provider

The mod that provides this override; used to enforce load order.

Int32 textureArchive

The texture archive of the flat object that will trigger the custom action upon activation.

Int32 textureRecord

The texture record of the flat object that will trigger the custom action upon activation.

PlayerActivate.CustomActivation customActivation

A callback that implements the custom action.

Single activationDistance
| Improve this Doc View Source

RegisterCustomActivation(Mod, UInt32, PlayerActivate.CustomActivation, Single)

Registers a custom activation for a model object. Uses the modelID parameter to retrieve the correct object name

Declaration
public static void RegisterCustomActivation(Mod provider, uint modelID, PlayerActivate.CustomActivation customActivation, float activationDistance = 3.2F)
Parameters
Type Name Description
Mod provider

The mod that provides this override; used to enforce load order.

UInt32 modelID

The model ID of the object that will trigger the custom action upon activation.

PlayerActivate.CustomActivation customActivation

A callback that implements the custom action.

Single activationDistance
| Improve this Doc View Source

SetClickDelay(Single)

Set a click delay before new clicks are accepted, usually when exiting UI.

Declaration
public void SetClickDelay(float delay = 0.3F)
Parameters
Type Name Description
Single delay

Delay in seconds. Valid range is 0.0 - 1.0

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