DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс CAContinuousTimeCooking
+ Граф наследования:CAContinuousTimeCooking:

Защищенные члены

void CAContinuousTimeCooking (float cooking_update_time)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override float GetProgress ()
 

Защищенные данные

float m_LocalTimeElpased
 
float m_TimeElapsed
 
float m_TimeElapsedRepeat
 
float m_TimeElapsedDamage
 
ref Param1< floatm_SpentUnits
 
float m_TimeToCook
 
float m_AdjustedTimeToCook
 
Cooking m_CookingProcess
 
Edible_Base m_ItemToCook
 
float m_CookingUpdateTime
 
float m_AdjustedCookingUpdateTime
 
float m_MinTempToCook
 

Закрытые данные

const float TIME_DAMAGE_THRESHOLD = 5.0
 

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

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

◆ CAContinuousTimeCooking()

void CAContinuousTimeCooking ( float cooking_update_time)
inlineprotected
21 {
23 }
float m_CookingUpdateTime
Definition CAContinuousTimeCooking.c:15
Definition EntityAI.c:95

Перекрестные ссылки m_CookingUpdateTime.

Методы

◆ Execute()

override int Execute ( ActionData action_data)
inlineprotected
54 {
55 if ( !action_data.m_Player )
56 {
57 return UA_ERROR;
58 }
59
61 float cooking_time = m_ItemToCook.GetFoodStage().GetCookingTime();
63 {
64 m_TimeElapsed += action_data.m_Player.GetDeltaT();
65 m_TimeElapsedRepeat += action_data.m_Player.GetDeltaT();
66
67 if (m_ItemToCook.GetTemperature() < m_MinTempToCook)
68 m_AdjustedTimeToCook += action_data.m_Player.GetDeltaT();
69
71 {
73
74 if (GetGame().IsServer() && m_ItemToCook.GetTemperature() >= m_MinTempToCook)
75 {
77
79 {
82 }
83 }
84
85 if (cooking_state_update == 1)
86 {
88
89 if (!GetGame().IsServer())
90 {
91 if (m_ItemToCook.IsMeat() && m_ItemToCook.GetFoodStage().GetFoodStageType() == FoodStageType.BAKED)
92 {
93 GetGame().GetAnalyticsClient().OnActionCookedSteak();
94 }
95 }
96 }
97
99 }
100
101 return UA_PROCESSING;
102 }
103 else
104 {
105 if (m_SpentUnits)
106 {
109 }
111 return UA_FINISHED;
112 }
113 }
FoodStageType
Definition FoodStage.c:2
void SetACData(Param units)
Definition CABase.c:40
void OnCompletePogress(ActionData action_data)
Definition CAContinuousBase.c:8
float m_MinTempToCook
Definition CAContinuousTimeCooking.c:18
const float TIME_DAMAGE_THRESHOLD
Definition CAContinuousTimeCooking.c:3
float m_TimeElapsedRepeat
Definition CAContinuousTimeCooking.c:7
Edible_Base m_ItemToCook
Definition CAContinuousTimeCooking.c:14
float m_AdjustedCookingUpdateTime
Definition CAContinuousTimeCooking.c:16
float m_TimeElapsed
Definition CAContinuousTimeCooking.c:6
float m_TimeElapsedDamage
Definition CAContinuousTimeCooking.c:8
Cooking m_CookingProcess
Definition CAContinuousTimeCooking.c:13
float m_AdjustedTimeToCook
Definition CAContinuousTimeCooking.c:12
ref Param1< float > m_SpentUnits
Definition CAContinuousTimeCooking.c:9
override void Setup(ActionData action_data)
Definition CAContinuousTimeCooking.c:25
override FoodStage GetFoodStage()
Definition Edible_Base.c:297
override bool IsMeat()
Definition Edible_Base.c:303
Definition constants.c:638
proto native CGame GetGame()
const float FIRE_ATTACHMENT_DAMAGE_PER_SECOND
various damage per second constants
Definition constants.c:770
const int UA_FINISHED
Definition constants.c:443
const int UA_ERROR
Definition constants.c:462
const int UA_PROCESSING
Definition constants.c:441

Перекрестные ссылки GameConstants::FIRE_ATTACHMENT_DAMAGE_PER_SECOND, Edible_Base::GetFoodStage(), GetGame(), Edible_Base::IsMeat(), m_AdjustedCookingUpdateTime, m_AdjustedTimeToCook, m_CookingProcess, m_CookingUpdateTime, m_ItemToCook, m_MinTempToCook, m_SpentUnits, m_TimeElapsed, m_TimeElapsedDamage, m_TimeElapsedRepeat, CAContinuousBase::OnCompletePogress(), CABase::SetACData(), Setup(), TIME_DAMAGE_THRESHOLD, UA_ERROR, UA_FINISHED и UA_PROCESSING.

◆ GetProgress()

override float GetProgress ( )
inlineprotected
116 {
117 if (m_AdjustedTimeToCook != 0)
118 {
120 }
121
122 return 1;
123 }

Перекрестные ссылки m_AdjustedTimeToCook и m_TimeElapsed.

◆ Setup()

override void Setup ( ActionData action_data)
inlineprotected
26 {
29
30 if (!m_SpentUnits)
31 {
33 }
34 else
35 {
36 m_SpentUnits.param1 = 0;
37 }
38
39 //fireplace & cooking process
40 FireplaceBase fireplace = FireplaceBase.Cast(action_data.m_Target.GetObject());
41 m_CookingProcess = fireplace.GetCookingProcess();
42 m_ItemToCook = m_CookingProcess.GetFoodOnStick(action_data.m_MainItem);
45
46 //update elapsed time
47 m_TimeElapsed = m_ItemToCook.GetFoodStage().GetCookingTime();
48
51 }
CookingMethodType
Definition Cooking.c:2
float m_TimeToCook
Definition CAContinuousTimeCooking.c:11
Definition BarrelHoles_ColorBase.c:2

Перекрестные ссылки Edible_Base::GetFoodStage(), m_AdjustedCookingUpdateTime, m_AdjustedTimeToCook, m_CookingProcess, m_CookingUpdateTime, m_ItemToCook, m_MinTempToCook, m_SpentUnits, m_TimeElapsed, m_TimeElapsedDamage, m_TimeElapsedRepeat и m_TimeToCook.

Используется в Execute().

Поля

◆ m_AdjustedCookingUpdateTime

float m_AdjustedCookingUpdateTime
protected

Используется в Execute() и Setup().

◆ m_AdjustedTimeToCook

float m_AdjustedTimeToCook
protected

Используется в Execute(), GetProgress() и Setup().

◆ m_CookingProcess

Cooking m_CookingProcess
protected

Используется в Execute() и Setup().

◆ m_CookingUpdateTime

float m_CookingUpdateTime
protected

Используется в CAContinuousTimeCooking(), Execute() и Setup().

◆ m_ItemToCook

Edible_Base m_ItemToCook
protected

Используется в Execute() и Setup().

◆ m_LocalTimeElpased

float m_LocalTimeElpased
protected

◆ m_MinTempToCook

float m_MinTempToCook
protected

Используется в Execute() и Setup().

◆ m_SpentUnits

ref Param1<float> m_SpentUnits
protected

Используется в Execute() и Setup().

◆ m_TimeElapsed

float m_TimeElapsed
protected

Используется в Execute(), GetProgress() и Setup().

◆ m_TimeElapsedDamage

float m_TimeElapsedDamage
protected

Используется в Execute() и Setup().

◆ m_TimeElapsedRepeat

float m_TimeElapsedRepeat
protected

Используется в Execute() и Setup().

◆ m_TimeToCook

float m_TimeToCook
protected

Используется в Setup().

◆ TIME_DAMAGE_THRESHOLD

const float TIME_DAMAGE_THRESHOLD = 5.0
private

Используется в Execute().


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