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

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

void CAContinuousQuantityEdible (float quantity_used_per_second, float time_to_repeat)
 
override void Setup (ActionData action_data)
 
override void CalcAndSetQuantity (ActionData action_data)
 
override float GetProgress ()
 

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

float m_InitItemQuantity
 
float m_SpentQuantityTotal
 
float m_QuantityUsedPerSecondStart
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от CAContinuousQuantityRepeat
void CAContinuousQuantityRepeat (float quantity_used_per_second, float time_to_repeat)
 
override void Setup (ActionData action_data)
 
override int Execute (ActionData action_data)
 
override int Cancel (ActionData action_data)
 
override float GetProgress ()
 
void CalcAndSetQuantity (ActionData action_data)
 
- Закрытые данные унаследованные от CAContinuousQuantityRepeat
float m_ItemQuantity
 
float m_SpentQuantity
 
float m_ItemMaxQuantity
 
float m_TimeElpased
 
float m_QuantityUsedPerSecond
 
float m_AdjustedQuantityUsedPerSecond
 
float m_DefaultTimeToRepeat
 
ref Param1< floatm_SpentUnits
 

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

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

◆ CAContinuousQuantityEdible()

void CAContinuousQuantityEdible ( float quantity_used_per_second,
float time_to_repeat )
inlineprotected
8 {
13 }
float m_QuantityUsedPerSecondStart
Definition CAContinuousQuantityEdible.c:5
float m_SpentQuantityTotal
Definition CAContinuousQuantityEdible.c:4
float m_InitItemQuantity
Definition CAContinuousQuantityEdible.c:3
float m_DefaultTimeToRepeat
Definition CAContinuousQuantityRepeat.c:9
Definition EntityAI.c:95

Перекрестные ссылки CAContinuousQuantityRepeat::m_DefaultTimeToRepeat, m_InitItemQuantity, m_QuantityUsedPerSecondStart и m_SpentQuantityTotal.

Методы

◆ CalcAndSetQuantity()

override void CalcAndSetQuantity ( ActionData action_data)
inlineprotected
33 {
34 if ( m_SpentUnits )
35 {
38
40 }
41 //m_SpentQuantity = Math.Floor(m_SpentQuantity);
42
43 PlayerBase ntarget = PlayerBase.Cast( action_data.m_Target.GetObject() );
44 if ( ntarget )
45 {
46 if ( GetGame().IsServer() )
47 {
48 //action_data.m_MainItem.Consume(targetObject, m_SpentQuantity);
49 ntarget.Consume(action_data.m_MainItem, m_SpentQuantity, EConsumeType.ITEM_CONTINUOUS);
50
51 }
52 }
53 else
54 {
55 if ( GetGame().IsServer() )
56 {
57 //action_data.m_MainItem.Consume(action_data.m_Player, m_SpentQuantity);
58 action_data.m_Player.Consume(action_data.m_MainItem, m_SpentQuantity, EConsumeType.ITEM_CONTINUOUS);
59 }
60 }
61 }
EConsumeType
Definition EConsumeType.c:2
void SetACData(Param units)
Definition CABase.c:40
float m_SpentQuantity
Definition CAContinuousQuantityRepeat.c:4
ref Param1< float > m_SpentUnits
Definition CAContinuousQuantityRepeat.c:10
Definition PlayerBaseClient.c:2
proto native CGame GetGame()

Перекрестные ссылки GetGame(), CAContinuousQuantityRepeat::m_SpentQuantity, m_SpentQuantityTotal, CAContinuousQuantityRepeat::m_SpentUnits и CABase::SetACData().

◆ GetProgress()

override float GetProgress ( )
inlineprotected
64 {
65 //return super.GetProgress();
66 if (m_SpentQuantity > 0)
67 {
69 }
70 else
71 {
73 }
74 }
Definition EnMath.c:7
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), m_InitItemQuantity, CAContinuousQuantityRepeat::m_SpentQuantity и m_SpentQuantityTotal.

◆ Setup()

override void Setup ( ActionData action_data)
inlineprotected
16 {
17 super.Setup( action_data );
18
19 if (m_InitItemQuantity < 0)
20 {
21 m_InitItemQuantity = action_data.m_MainItem.GetQuantity();
22 }
23
25 //qty adjustments based on item properties:
26 if (action_data.m_MainItem.GetTemperature() > PlayerConstants.CONSUMPTION_DAMAGE_TEMP_THRESHOLD)
27 {
29 }
30 }
float m_QuantityUsedPerSecond
Definition CAContinuousQuantityRepeat.c:7
Definition PlayerConstants.c:2
static const float CONSUMPTION_DAMAGE_TEMP_THRESHOLD
Definition PlayerConstants.c:136
Definition ActionConstants.c:168
const float CONSUMPTION_SLOWDOWN_COEF_HOT
Definition ActionConstants.c:170

Перекрестные ссылки PlayerConstants::CONSUMPTION_DAMAGE_TEMP_THRESHOLD, UAMisc::CONSUMPTION_SLOWDOWN_COEF_HOT, m_InitItemQuantity, CAContinuousQuantityRepeat::m_QuantityUsedPerSecond и m_QuantityUsedPerSecondStart.

Поля

◆ m_InitItemQuantity

float m_InitItemQuantity
protected

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

◆ m_QuantityUsedPerSecondStart

float m_QuantityUsedPerSecondStart
protected

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

◆ m_SpentQuantityTotal

float m_SpentQuantityTotal
protected

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