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

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

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

class  ActionPackTentCB
 

Функции

ActionPackTentCB ActionContinuousBaseCB ActionPackTent ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool IsUsingProxies ()
 
override bool HasProgress ()
 
override bool HasAlternativeInterrupt ()
 
override bool UseMainItem ()
 
override bool ActionConditionContinue (ActionData action_data)
 
override ActionData CreateActionData ()
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override void OnExecute (ActionData action_data)
 
override void OnEnd (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override string GetAdminLogMessage (ActionData action_data)
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
79 {
80 Object targetObject = target.GetObject();
81 Object targetParent = target.GetParent();
82
84 if (inventory_tent && inventory_tent.GetHierarchyRootPlayer())
85 {
86 return false; //tent is somewhere in player's inventory
87 }
88
90 {
92 if ( tent.CanBePacked() )
93 {
95 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
96
97 for ( int s = 0; s < selections.Count(); s++ )
98 {
99 if ( selections[s] == "pack" )
100 {
101 return true;
102 }
103 }
104 }
105 }
106 return false;
107 }
Definition ObjectTyped.c:2
Definition EntityAI.c:95
Definition CarTent.c:2

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)
53 {
54 Object targetParent = action_data.m_Target.GetParent();
56 return tent.CanBePacked();
57 }

◆ ActionPackTent()

12 {
13 m_CallbackClass = ActionPackTentCB;
14 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
15 m_CommandUID = 0;
16 m_FullBody = true;
17 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
18 m_Text = "#pack_tent";
19 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionPackTent.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionPackTentCB;
14 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
15 m_CommandUID = 0;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateActionData()

override ActionData CreateActionData ( )
60 {
62 return action_data;
63 }
Definition ActionDeployBase.c:2

◆ CreateConditionComponents()

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

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

◆ GetAdminLogMessage()

override string GetAdminLogMessage ( ActionData action_data)
146 {
147 return " packed " + action_data.m_Target.GetParent().GetDisplayName() + " with Hands ";
148 }

◆ GetInputType()

override GetInputType ( )
28 {
30 }
Definition ActionInput.c:522

◆ HasAlternativeInterrupt()

override bool HasAlternativeInterrupt ( )
43 {
44 return true;
45 }

◆ HasProgress()

override bool HasProgress ( )
38 {
39 return true;
40 }

◆ IsUsingProxies()

override bool IsUsingProxies ( )
33 {
34 return true;
35 }

◆ OnEnd()

override void OnEnd ( ActionData action_data)
124 {
125 Object targetParent = action_data.m_Target.GetParent();
127 tent.SetIsBeingPacked(false);
128 if ( action_data.m_Player ) action_data.m_Player.TryHideItemInHands(false);
129 }

◆ OnExecute()

override void OnExecute ( ActionData action_data)
117 {
118 Object targetParent = action_data.m_Target.GetParent();
120 tent.SetIsBeingPacked(true);
121 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
132 {
133 //vector offset = Vector(1, 0, 0);
134 Object targetParent = action_data.m_Target.GetParent();
136 if (tent.CanBePacked())
137 {
138 tent.Pack( true );
139 tent.SetPosition( action_data.m_Player.GetPosition() /*+ offset*/ ); //Add offset to allign tent with player
140 tent.SetOrientation( action_data.m_Player.GetOrientation() );
141 tent.PlaceOnSurface();
142 }
143 }

◆ SetupAction()

override bool SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
66 {
67 if ( super.SetupAction(player, target, item, action_data, extra_data ))
68 {
71 poActionData.m_AlreadyPlaced = false;
72 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DEPLOY_2HD; //Call the animation
73 return true;
74 }
75 return false;
76 }

Перекрестные ссылки m_CommandUID.

◆ Start()

override void Start ( ActionData action_data)
110 {
111 super.Start(action_data);
112
113 if ( action_data.m_Player ) action_data.m_Player.TryHideItemInHands(true);
114 }

◆ UseMainItem()

override bool UseMainItem ( )
48 {
49 return false;
50 }