DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionClose.c
См. документацию.
2{
4 {
5 m_Text = "#close";
6 }
7
13
14 override bool HasTarget()
15 {
16 return false;
17 }
18
19 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
20 {
21 if ( item && item.IsOpen() )
22 {
23 return true;
24 }
25 return false;
26 }
27
28 //setup
29 override bool SetupAction( PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data = NULL )
30 {
31 if( super.SetupAction( player, target, item, action_data, extra_data ) )
32 {
33 SetCloseAnimation( item );
34
35 return true;
36 }
37
38 return false;
39 }
40
42 {
43 switch( item.Type() )
44 {
45 case Compass:
46 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_CLOSEITEM_ONCE;
47 break;
48 case TelescopicBaton:
49 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
50 break;
51 }
52 }
53
54 override void OnExecuteServer( ActionData action_data )
55 {
56 action_data.m_MainItem.Close();
57 }
58};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
void SetCloseAnimation(ItemBase item)
Определения ActionClose.c:41
override bool HasTarget()
Определения ActionClose.c:14
override bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Определения ActionClose.c:29
override void OnExecuteServer(ActionData action_data)
Определения ActionClose.c:54
override void CreateConditionComponents()
Определения ActionClose.c:8
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionClose.c:19
void ActionClose()
Определения ActionClose.c:3
void ActionSingleUseBase()
Определения ActionSingleUseBase.c:31
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTNone.c:2
Определения Compass.c:2
Определения InventoryItem.c:731
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения PlayerBaseClient.c:2
Определения TelescopicBaton.c:2
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602