Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actionforceabite.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
5 m_ActionData.m_ActionComponent = new CASingleUseQuantityEdible(UAQuantityConsumed.EAT_NORMAL);
6 }
7};
8
9class ActionForceABite: ActionForceConsumeSingle
10{
11 void ActionForceABite()
12 {
13 m_CallbackClass = ActionForceABiteCB;
14 m_Text = "#feed_a_bite";
15 }
16
17 override void CreateConditionComponents()
18 {
19 m_ConditionItem = new CCINonRuined;
20 m_ConditionTarget = new CCTMan(UAMaxDistances.DEFAULT);
21 }
22
23 override void OnEndServer( ActionData action_data )
24 {
25 super.OnEndServer(action_data);
26
27 if ( action_data.m_MainItem.GetQuantity() <= 0 )
28 {
29 action_data.m_MainItem.SetQuantity(0);
30 }
31 }
32};
ActionData m_ActionData
Definition cctman.c:2