DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionDialCombinationLockOnTarget.c

См. исходные тексты.

Структуры данных

class  ActionDialCombinationLockOnTargetCB
 

Функции

ActionDialCombinationLockOnTargetCB ActionContinuousBaseCB ActionDialCombinationLockOnTarget ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool HasProneException ()
 
override GetInputType ()
 
override void OnActionInfoUpdate (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Переменные

const float REPEAT_AFTER_SEC = 0.5
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
45 {
46 if (!target.GetObject())
47 return false;
48
49 CombinationLock lock = CombinationLock.Cast(target.GetObject());
50 if (lock && lock.GetHierarchyParent() && Fence.Cast(lock.GetHierarchyParent()))
51 {
52 ConstructionActionData constructionActionData = player.GetConstructionActionData();
53 constructionActionData.SetCombinationLock(lock);
54
55 return true;
56 }
57
58 return false;
59 }
Definition CombinationLock4.c:2
Definition ConstructionActionData.c:2
Definition EntityAI.c:95

◆ ActionDialCombinationLockOnTarget()

ActionDialCombinationLockOnTargetCB ActionContinuousBaseCB ActionDialCombinationLockOnTarget ( )
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENITEM;
17 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_OPENITEM;
18 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_LOW;
19 m_Text = "#dial_combination_lock";
20 }
int m_CommandUIDProne
Definition ActionBase.c:32
int m_CommandUID
Definition ActionBase.c:31
Definition ActionDialCombinationLockOnTarget.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и SetActions().

◆ CreateActionComponent()

override void CreateActionComponent ( )
private

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
23 {
24 m_ConditionItem = new CCINone();
25 m_ConditionTarget = new CCTNonRuined(UAMaxDistances.DEFAULT);
26 }
Definition CCINone.c:2
Definition CCTNonRuined.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT.

◆ GetInputType()

override GetInputType ( )
34 {
36 }
Definition ActionInput.c:522

◆ HasProneException()

override bool HasProneException ( )
29 {
30 return true;
31 }

◆ OnActionInfoUpdate()

override void OnActionInfoUpdate ( PlayerBase player,
ActionTarget target,
ItemBase item )
39 {
40 ConstructionActionData constructionActionData = player.GetConstructionActionData();
41 m_Text = "#dial_combination_lock " + constructionActionData.GetDialNumberText();
42 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
62 {
63 //set dialed number
64 ConstructionActionData constructionActionData = action_data.m_Player.GetConstructionActionData();
67 {
68 combination_lock.DialNextNumber();
69
70 //check for unlock state
71 if (!combination_lock.IsLockedOnGate())
72 {
73 if (GetGame().IsMultiplayer())
74 ClearActionJuncture(action_data);
75 else
76 ClearInventoryReservationEx(action_data);
77
78 EntityAI target_entity = EntityAI.Cast(action_data.m_Target.GetObject());
79 combination_lock.UnlockServer(action_data.m_Player, target_entity.GetHierarchyParent());
80 }
81 }
82 }
Definition Building.c:6
proto native CGame GetGame()

Перекрестные ссылки ActionBase::ClearActionJuncture(), ActionBase::ClearInventoryReservationEx() и GetGame().

Переменные

◆ REPEAT_AFTER_SEC

const float REPEAT_AFTER_SEC = 0.5
private