DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionPourLiquid.c
См. документацию.
2{
3 private const float TIME_TO_REPEAT = 0.25;
4
9};
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 = "#pour_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(item,target_item);;
40 }
41 return false;
42 }
43
44 override void OnStartAnimationLoop( ActionData action_data )
45 {
46 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
47 {
48 Bottle_Base vessel_in_hands = Bottle_Base.Cast( action_data.m_Target.GetObject() );
49 Param1<bool> play = new Param1<bool>( true );
50
51 GetGame().RPCSingleParam( vessel_in_hands, SoundTypeBottle.POURING, play, true );
52 }
53 }
54
55 override void OnEndAnimationLoop( ActionData action_data )
56 {
57 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
58 {
59 Bottle_Base target_vessel = Bottle_Base.Cast( action_data.m_Target.GetObject());
60 Param1<bool> play = new Param1<bool>( false );
61
62 GetGame().RPCSingleParam( target_vessel, SoundTypeBottle.POURING, 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
73 GetGame().RPCSingleParam( target_vessel, SoundTypeBottle.POURING, play, true );
74 }
75 }
76};
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 bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionPourLiquid.c:33
override bool HasProneException()
Определения ActionPourLiquid.c:28
override void CreateConditionComponents()
Определения ActionPourLiquid.c:22
override void OnEnd(ActionData action_data)
Определения ActionPourLiquid.c:66
override void OnEndAnimationLoop(ActionData action_data)
Определения ActionPourLiquid.c:55
override void OnStartAnimationLoop(ActionData action_data)
Определения ActionPourLiquid.c:44
void ActionPourLiquid()
Определения ActionPourLiquid.c:13
const float TIME_TO_REPEAT
Определения ActionPourLiquid.c:3
override void CreateActionComponent()
Определения ActionPourLiquid.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()