Class PlayerActivate
Example class to handle activation of doors, switches, etc. from Fire1 input.
Inheritance
PlayerActivate
Assembly: Assembly-CSharp.dll
Syntax
public class PlayerActivate : MonoBehaviour
Fields
|
Improve this Doc
View Source
buildingGreetingsEnabled
Declaration
public static bool buildingGreetingsEnabled
Field Value
|
Improve this Doc
View Source
closeHours
Declaration
public static byte[] closeHours
Field Value
|
Improve this Doc
View Source
CorpseActivationDistance
Declaration
public const float CorpseActivationDistance = 3.75F
Field Value
|
Improve this Doc
View Source
DefaultActivationDistance
Declaration
public const float DefaultActivationDistance = 3.2F
Field Value
|
Improve this Doc
View Source
DoorActivationDistance
Declaration
public const float DoorActivationDistance = 3.2F
Field Value
|
Improve this Doc
View Source
MobileNPCActivationDistance
Declaration
public const float MobileNPCActivationDistance = 6.4F
Field Value
|
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
|
Improve this Doc
View Source
openHours
Declaration
public static byte[] openHours
Field Value
|
Improve this Doc
View Source
PickpocketDistance
Declaration
public const float PickpocketDistance = 3.2F
Field Value
|
Improve this Doc
View Source
StaticNPCActivationDistance
Declaration
public const float StaticNPCActivationDistance = 6.4F
Field Value
|
Improve this Doc
View Source
TreasureActivationDistance
Declaration
public const float TreasureActivationDistance = 3.2F
Field Value
Properties
|
Improve this Doc
View Source
CurrentMode
Declaration
public PlayerActivateModes CurrentMode { get; }
Property Value
Methods
|
Improve this Doc
View Source
AttemptExteriorDoorBash(RaycastHit)
Declaration
public bool AttemptExteriorDoorBash(RaycastHit hit)
Parameters
Returns
|
Improve this Doc
View Source
BuildingIsUnlocked(BuildingSummary)
Declaration
public bool BuildingIsUnlocked(BuildingSummary buildingSummary)
Parameters
Returns
|
Improve this Doc
View Source
ChangeInteractionMode(PlayerActivateModes, Boolean)
Declaration
public void ChangeInteractionMode(PlayerActivateModes newMode, bool showText = true)
Parameters
|
Improve this Doc
View Source
GetBuildingLockValue(BuildingSummary)
Declaration
public int GetBuildingLockValue(BuildingSummary buildingSummary)
Parameters
Returns
|
Improve this Doc
View Source
GetBuildingLockValue(Int32)
Declaration
public int GetBuildingLockValue(int quality)
Parameters
Type |
Name |
Description |
Int32 |
quality |
|
Returns
|
Improve this Doc
View Source
Declaration
public DaggerfallStaticBuildings GetBuildings(Transform buildingsTransform, out Transform owner)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public DaggerfallStaticDoors GetDoors(Transform doorsTransform, out Transform owner)
Parameters
Returns
|
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
|
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
|
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
|
Improve this Doc
View Source
IsActiveQuestBuilding(BuildingSummary, Boolean)
Declaration
public bool IsActiveQuestBuilding(BuildingSummary buildingSummary, bool residencesOnly = true)
Parameters
Returns
|
Improve this Doc
View Source
IsBuildingOpen(DFLocation.BuildingTypes)
Declaration
public static bool IsBuildingOpen(DFLocation.BuildingTypes buildingType)
Parameters
Returns
|
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
|
Improve this Doc
View Source
Declaration
public void PrivateProperty_OnButtonClick(DaggerfallMessageBox sender, DaggerfallMessageBox.MessageBoxButtons messageBoxButton)
Parameters
|
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<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)