Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionLockAttachment
+ Граф наследования:ActionLockAttachment:

Закрытые члены

void ActionLockAttachment ()
 
override void OnActionInfoUpdate (PlayerBase player, ActionTarget target, ItemBase item)
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartAnimationLoop (ActionData action_data)
 
override void OnEnd (ActionData action_data)
 
override void OnEndAnimationLoop (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Закрытые данные

const string LOCK_VERSION = "#widget_lock"
 
const string UNLOCK_VERSION = "#widget_unlock"
 
string m_Name = LOCK_VERSION
 

Подробное описание

Конструктор(ы)

◆ ActionLockAttachment()

void ActionLockAttachment ( )
inlineprivate
27 {
30
31 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
32 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
33 m_FullBody = true;
34 }
bool m_FullBody
Definition ActionBase.c:52
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
int m_CommandUID
Definition AnimatedActionBase.c:135
m_CallbackClass
Definition AnimatedActionBase.c:137
Definition EntityAI.c:95
Definition ActionConstants.c:119
const float PRECISE_LOW
Definition ActionConstants.c:123
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, m_FullBody, m_SpecialtyWeight, m_StanceMask и UASoftSkillsWeight::PRECISE_LOW.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
54 {
55 if ( !target )
56 return false;
57
58 EntityAI parent_EAI = EntityAI.Cast(target.GetParent());
59 ItemBase target_IB = ItemBase.Cast(target.GetObject());
60
61 array<int> compLock = item.m_CompatibleLocks;
62 int targetType = eLockTypes.NONE;
63
64 if ( target_IB && parent_EAI )
65 {
66 //CAR DOOR HANDLING
67 //I don't really like this, but sometimes specifics have to be handled in generics
69 if ( targetDoor )
70 {
72 bool isPresent = targetDoor.GetInventory().GetCurrentInventoryLocation( loc );
73
74 if ( !isPresent || loc.GetSlot() == -1 )
75 return false;
76
77 string slotName = InventorySlots.GetSlotName( loc.GetSlot() );
78 if ( slotName && CarScript.Cast( parent_EAI ).GetCarDoorsState( slotName ) != CarDoorState.DOORS_OPEN )
79 return false;
80 }
81 //END OF CAR DOOR SPECIFICS
82
83
84 if ( target_IB.IsLockedInSlot() )
86 else if ( target_IB.IsAlive() )
88 else if ( !target_IB.IsLockedInSlot() )
89 return false;
90
91 targetType = target_IB.GetLockType();
92
93 for (int i = 0; i < compLock.Count(); i++)
94 {
95 if ( targetType == compLock[i] && targetType != eLockTypes.NONE)
96 {
97 return true;
98 }
99 }
100 }
101 return false;
102 }
eLockTypes
Definition ActionLockAttachment.c:4
CarDoorState
Definition CarScript.c:2
PlayerSpawnPreset slotName
string m_Name
Definition ActionLockAttachment.c:24
const string LOCK_VERSION
Definition ActionLockAttachment.c:22
const string UNLOCK_VERSION
Definition ActionLockAttachment.c:23
Definition InventoryItem.c:496
Definition CivilianSedan.c:2
override int GetCarDoorsState(string slotType)
Definition CivilianSedan.c:164
Definition Building.c:6
InventoryLocation.
Definition InventoryLocation.c:28
provides access to slot configuration
Definition InventorySlots.c:6
static proto native owned string GetSlotName(int id)
converts slot_id to string
Definition InventoryItem.c:731

Перекрестные ссылки CarScript::GetCarDoorsState(), InventorySlots::GetSlotName(), LOCK_VERSION, m_Name, slotName и UNLOCK_VERSION.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
48 {
51 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCINonRuined.c:2
Definition CCTCursorNoRuinCheck.c:2
Definition ActionConstants.c:105
const float SMALL
Definition ActionConstants.c:106

Перекрестные ссылки m_ConditionItem, m_ConditionTarget и UAMaxDistances::SMALL.

◆ OnActionInfoUpdate()

override void OnActionInfoUpdate ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
37 {
38 ItemBase target_IB = ItemBase.Cast(target.GetObject());
39 if ( target_IB.IsLockedInSlot() )
41 else if ( target_IB.IsAlive() )
43 else
44 m_Text = "";
45 }
string m_Text
Definition ActionBase.c:49

Перекрестные ссылки LOCK_VERSION, m_Text и UNLOCK_VERSION.

◆ OnEnd()

override void OnEnd ( ActionData action_data)
inlineprivate
117 {
118 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
119 {
120 ItemBase target_IB = ItemBase.Cast( action_data.m_Target.GetObject() );
121 Param2<bool, string> play = new Param2<bool, string>( false, action_data.m_MainItem.GetLockSoundSet() );
122 GetGame().RPCSingleParam( target_IB, ERPCs.RPC_SOUND_LOCK_ATTACH, play, true );
123 }
124 }
ERPCs
Definition ERPCs.c:2
proto native CGame GetGame()

Перекрестные ссылки GetGame().

◆ OnEndAnimationLoop()

override void OnEndAnimationLoop ( ActionData action_data)
inlineprivate
127 {
128 super.OnEndAnimationLoop( action_data );
129
130 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
131 {
132 ItemBase target_IB = ItemBase.Cast( action_data.m_Target.GetObject() );
133 Param2<bool, string> play = new Param2<bool, string>( false, action_data.m_MainItem.GetLockSoundSet() );
134 GetGame().RPCSingleParam( target_IB, ERPCs.RPC_SOUND_LOCK_ATTACH, play, true );
135 }
136 }

Перекрестные ссылки GetGame().

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprivate
139 {
140 ItemBase target_IB = ItemBase.Cast(action_data.m_Target.GetObject());
141
142 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 5);
143
144 if (target_IB.IsLockedInSlot())
145 {
146 target_IB.UnlockFromParent();
147 return;
148 }
149
150 target_IB.LockToParent();
151 }

◆ OnStartAnimationLoop()

override void OnStartAnimationLoop ( ActionData action_data)
inlineprivate
105 {
106 super.OnStartAnimationLoop( action_data );
107
108 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
109 {
110 ItemBase target_IB = ItemBase.Cast( action_data.m_Target.GetObject() );
111 Param2<bool, string> play = new Param2<bool, string>( true, action_data.m_MainItem.GetLockSoundSet() );
112 GetGame().RPCSingleParam( target_IB, ERPCs.RPC_SOUND_LOCK_ATTACH, play, true );
113 }
114 }

Перекрестные ссылки GetGame().

Поля

◆ LOCK_VERSION

const string LOCK_VERSION = "#widget_lock"
private

Используется в ActionCondition() и OnActionInfoUpdate().

◆ m_Name

string m_Name = LOCK_VERSION
private

Используется в ActionCondition().

◆ UNLOCK_VERSION

const string UNLOCK_VERSION = "#widget_unlock"
private

Используется в ActionCondition() и OnActionInfoUpdate().


Объявления и описания членов класса находятся в файле: