DayZ 1.24
Loading...
Searching...
No Matches
ActionCookOnStick Class Reference
Inheritance diagram for ActionCookOnStick:
[legend]
Collaboration diagram for ActionCookOnStick:
[legend]

Private Member Functions

void ActionCookOnStick ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnEndServer (ActionData action_data)
 
- Private Member Functions inherited from 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)
 

Detailed Description

Definition at line 11 of file ActionCookOnStick.c.

Constructor & Destructor Documentation

◆ ActionCookOnStick()

void ActionCookOnStick::ActionCookOnStick ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

override bool ActionCookOnStick::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 31 of file ActionCookOnStick.c.

32 {
34 Object targetObject = target.GetObject();
35 Edible_Base item_on_stick = Edible_Base.Cast(item.GetAttachmentByType(Edible_Base));
36 if (fireplace_target && fireplace_target.CanCookOnStick() && item_on_stick && item_on_stick.CanBeCookedOnStick())
37 {
38 //fireplace
39 if (fireplace_target.IsBaseFireplace())
40 {
41 Fireplace fireplace = Fireplace.Cast(fireplace_target);
42 if (!fireplace.IsOven() && fireplace_target.CanCookOnStick())
43 return true;
44 }
45
46 //fireplace indoor
47 if (fireplace_target.IsFireplaceIndoor())
48 {
49 if (fireplace_target.CanCookOnStick())
50 return true;
51 }
52 }
53
54 return false;
55 }

◆ CreateConditionComponents()

override void ActionCookOnStick::CreateConditionComponents ( )
inlineprivate

Definition at line 25 of file ActionCookOnStick.c.

26 {
29 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ OnEndServer()

override void ActionCookOnStick::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 57 of file ActionCookOnStick.c.

58 {
59 super.OnEndServer(action_data);
60
61 ItemBase stick = action_data.m_MainItem;
62 Edible_Base item_on_stick = Edible_Base.Cast(stick.GetAttachmentByType(Edible_Base));
63
64 if (item_on_stick)
65 item_on_stick.MakeSoundsOnClient(false);
66 }

The documentation for this class was generated from the following file: