DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionDestroyCombinationLock.c
См. документацию.
2{
3 override void CreateActionComponent()
4 {
5 m_ActionData.m_ActionComponent = new CAContinuousRepeat(6.0);
6 }
7};
8
11{
12 static int CYCLES = 5;
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DISASSEMBLE;
17 m_FullBody = true;
18 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
19 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_MEDIUM;
20 m_Text = "#destroy_combination_lock";
21 }
22
28
29 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
30 {
31 Object target_object = target.GetObject();
32 string selection = target_object.GetActionComponentName( target.GetComponentIndex() );
33 Fence fence = Fence.Cast( target_object );
34
35 if ( fence && fence.IsLocked() && selection == "wall_interact" )
36 {
37 return true;
38 }
39
40 return false;
41 }
42
43 override void OnFinishProgressServer( ActionData action_data )
44 {
45 Fence fence = Fence.Cast( action_data.m_Target.GetObject() );
46 if ( fence )
47 {
48 CombinationLock combination_lock = fence.GetCombinationLock();
49 if ( combination_lock )
50 {
51 combination_lock.AddHealth("","",-(combination_lock.GetMaxHealth("","")/CYCLES));
52
53 if ( combination_lock.IsDamageDestroyed() )
54 {
55 combination_lock.UnlockServer( action_data.m_Player, fence );
56 GetGame().GetCallQueue( CALL_CATEGORY_GAMEPLAY ).CallLater( combination_lock.DestroyLock, 200, false );
57 }
58 }
59 }
60
61 action_data.m_MainItem.DecreaseHealth( UADamageApplied.SAW_LOCK, false );
62 }
63
64 override string GetAdminLogMessage(ActionData action_data)
65 {
66 return " destroyed combination lock with " + action_data.m_MainItem.GetDisplayName();
67 }
68};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
float m_SpecialtyWeight
Определения ActionBase.c:77
int m_StanceMask
Определения ActionBase.c:62
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
bool m_FullBody
Определения ActionBase.c:61
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
ActionData m_ActionData
Определения AnimatedActionBase.c:3
void ActionContinuousBase()
Определения ActionContinuousBase.c:124
override void CreateConditionComponents()
Определения ActionDestroyCombinationLock.c:23
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionDestroyCombinationLock.c:29
override string GetAdminLogMessage(ActionData action_data)
Определения ActionDestroyCombinationLock.c:64
override void OnFinishProgressServer(ActionData action_data)
Определения ActionDestroyCombinationLock.c:43
override void CreateActionComponent()
Определения ActionDestroyCombinationLock.c:3
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTNonRuined.c:2
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
Определения InventoryItem.c:731
Определения ObjectTyped.c:2
Определения PlayerBaseClient.c:2
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
const float SAW_LOCK
Определения ActionConstants.c:152
const float DEFAULT
Определения ActionConstants.c:112
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()
const int CALL_CATEGORY_GAMEPLAY
Определения tools.c:10