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

DEPRECATED. Подробнее...

+ Граф наследования:ActionTransferLiquid:

Закрытые члены

void ActionTransferLiquid ()
 
override void CreateConditionComponents ()
 
override bool HasProneException ()
 
override string GetText ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartClient (ActionData action_data)
 
override void OnStartServer (ActionData action_data)
 
override ActionData CreateActionData ()
 
override void WriteToContext (ParamsWriteContext ctx, ActionData action_data)
 
override bool ReadFromContext (ParamsReadContext ctx, out ActionReciveData action_recive_data)
 
override void HandleReciveData (ActionReciveData action_recive_data, ActionData action_data)
 
override void OnStartAnimationLoop (ActionData action_data)
 
override void OnEndAnimationLoop (ActionData action_data)
 
- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Подробное описание

DEPRECATED.

Конструктор(ы)

◆ ActionTransferLiquid()

void ActionTransferLiquid ( )
inlineprivate
28 {
30 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_EMPTY_VESSEL;
31 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
33 }
float m_SpecialtyWeight
Definition ActionBase.c:77
Definition ActionTransferLiquid.c:12
int m_CommandUIDProne
Definition AnimatedActionBase.c:144
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, AnimatedActionBase::m_CommandUIDProne и ActionBase::m_SpecialtyWeight.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
56 {
57 ItemBase target_item = ItemBase.Cast(target.GetObject());
58
59 if ( target_item && item )
60 {
61 bool can_drain = Liquid.CanTransfer(target_item,item);
62 bool can_pour = Liquid.CanTransfer(item,target_item);
63
64 if (can_drain && can_pour)
65 {
66 return true;
67 }
68 else if (!can_pour && can_drain)
69 {
70 if ( (!GetGame().IsDedicatedServer()) && !player.GetLiquidTendencyDrain() )
71 {
72 player.SetLiquidTendencyDrain(true);
73 return false;
74 }
75 else
76 {
77 return true;
78 }
79 }
80 else if (!can_drain && can_pour)
81 {
82 if ( (!GetGame().IsDedicatedServer()) && player.GetLiquidTendencyDrain() )
83 {
84 player.SetLiquidTendencyDrain(false);
85 return false;
86 }
87 else
88 {
89 return true;
90 }
91 }
92 }
93 return false;
94 }
Definition InventoryItem.c:731
proto native CGame GetGame()

Перекрестные ссылки GetGame().

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
36 {
39 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTNonRuined.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT, ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ GetText()

override string GetText ( )
inlineprivate
47 {
49 if ( player.GetLiquidTendencyDrain() )
50 return "#drain_liquid";
51 else
52 return "#pour_liquid";
53 }
PlayerBase GetPlayer()
Definition ModifierBase.c:51
Definition PlayerBaseClient.c:2

Перекрестные ссылки GetGame() и GetPlayer().

◆ HandleReciveData()

override void HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )
inlineprivate

◆ HasProneException()

override bool HasProneException ( )
inlineprivate
42 {
43 return true;
44 }

◆ OnEndAnimationLoop()

override void OnEndAnimationLoop ( ActionData action_data)
inlineprivate
164 {
165 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
166 {
167 Bottle_Base target_vessel = Bottle_Base.Cast( action_data.m_Target.GetObject());
168 Param1<bool> play = new Param1<bool>( false );
169 if (TransferLiquidActionData.Cast(action_data).m_Tendency)
170 GetGame().RPCSingleParam( target_vessel, SoundTypeBottle.EMPTYING, play, true );
171 else
172 GetGame().RPCSingleParam( target_vessel, SoundTypeBottle.POURING, play, true );
173 }
174 }
SoundTypeBottle
Definition Bottle_Base.c:2
Definition Canteen.c:2

Перекрестные ссылки GetGame().

◆ OnStartAnimationLoop()

override void OnStartAnimationLoop ( ActionData action_data)
inlineprivate
148 {
149 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
150 {
151 Bottle_Base vessel_in_hands = Bottle_Base.Cast( action_data.m_Target.GetObject() );
152 Param1<bool> play = new Param1<bool>( true );
154 {
155 if (TransferLiquidActionData.Cast(action_data).m_Tendency == true)
156 GetGame().RPCSingleParam( vessel_in_hands, SoundTypeBottle.EMPTYING, play, true );
157 else if (!TransferLiquidActionData.Cast(action_data).m_Tendency == false)
158 GetGame().RPCSingleParam( vessel_in_hands, SoundTypeBottle.POURING, play, true );
159 }
160 }
161 }

Перекрестные ссылки GetGame().

◆ OnStartClient()

override void OnStartClient ( ActionData action_data)
inlineprivate
97 {
98 TransferLiquidActionData.Cast(action_data).m_Tendency = action_data.m_Player.GetLiquidTendencyDrain();
99 }

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
inlineprivate
102 {
103 super.OnStartServer(action_data);
104
105 if (!GetGame().IsMultiplayer())
106 TransferLiquidActionData.Cast(action_data).m_Tendency = action_data.m_Player.GetLiquidTendencyDrain();
107 }

Перекрестные ссылки GetGame().

◆ ReadFromContext()

override bool ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )
inlineprivate
123 {
125 {
127 }
129
130 super.ReadFromContext(ctx, action_recive_data);
131
132 bool tendency_drain;
133 if ( !ctx.Read(tendency_drain) )
134 return false;
135 recive_data_transfer.m_TendencyRecived = tendency_drain;
136 return true;
137 }

◆ WriteToContext()

override void WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )
inlineprivate
116 {
117 super.WriteToContext(ctx, action_data);
118
119 ctx.Write(action_data.m_Player.GetLiquidTendencyDrain());
120 }

Объявления и описания членов класса находятся в файле: