DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionDrainLiquid.c
См. документацию.
10
12{
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_EMPTY_VESSEL;
17 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
18 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
19 m_Text = "#drain_liquid";
20 }
21
27
28 override bool HasProneException()
29 {
30 return true;
31 }
32
33 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
34 {
35 ItemBase target_item = ItemBase.Cast(target.GetObject());
36
37 if ( target_item && item )
38 {
39 return Liquid.CanTransfer(target_item,item);
40 }
41 return false;
42 }
43
44
45 override void OnStartAnimationLoop( ActionData action_data )
46 {
47 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
48 {
49 Bottle_Base vessel_in_hands = Bottle_Base.Cast( action_data.m_Target.GetObject() );
50 Param1<bool> play = new Param1<bool>( true );
51
52 GetGame().RPCSingleParam( vessel_in_hands, SoundTypeBottle.EMPTYING, play, true );
53 }
54 }
55
56 override void OnEndAnimationLoop( ActionData action_data )
57 {
58 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
59 {
60 Bottle_Base target_vessel = Bottle_Base.Cast( action_data.m_Target.GetObject());
61 Param1<bool> play = new Param1<bool>( false );
62 GetGame().RPCSingleParam( target_vessel, SoundTypeBottle.EMPTYING, play, true );
63 }
64 }
65
66 override void OnEnd( ActionData action_data )
67 {
68 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
69 {
70 Bottle_Base target_vessel = Bottle_Base.Cast( action_data.m_Target.GetObject());
71 Param1<bool> play = new Param1<bool>( false );
72 GetGame().RPCSingleParam( target_vessel, SoundTypeBottle.EMPTYING, play, true );
73 }
74 }
75};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
SoundTypeBottle
Определения Bottle_Base.c:2
float m_SpecialtyWeight
Определения ActionBase.c:77
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
ActionData m_ActionData
Определения AnimatedActionBase.c:3
void ActionContinuousBase()
Определения ActionContinuousBase.c:124
override void OnStartAnimationLoop(ActionData action_data)
Определения ActionDrainLiquid.c:45
override void OnEnd(ActionData action_data)
Определения ActionDrainLiquid.c:66
override void OnEndAnimationLoop(ActionData action_data)
Определения ActionDrainLiquid.c:56
override bool HasProneException()
Определения ActionDrainLiquid.c:28
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionDrainLiquid.c:33
override void CreateConditionComponents()
Определения ActionDrainLiquid.c:22
void ActionDrainLiquid()
Определения ActionDrainLiquid.c:13
const float TIME_TO_REPEAT
Определения ActionDrainLiquid.c:3
override void CreateActionComponent()
Определения ActionDrainLiquid.c:5
int m_CommandUID
Определения AnimatedActionBase.c:143
int m_CommandUIDProne
Определения AnimatedActionBase.c:144
Определения Canteen.c:2
Определения CCINonRuined.c:2
Определения CCTNonRuined.c:2
proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
const float DEFAULT
Определения ActionConstants.c:112
const float DRAIN_LIQUID
Определения ActionConstants.c:13
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()