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

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

void ActionFillBottleBase ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool ActionConditionContinue (ActionData action_data)
 
int GetStanceMask (PlayerBase player)
 
int GetActionCommandEx (ActionData actionData)
 
int GetLiquidType (PlayerBase player, ActionTarget target, ItemBase item)
 
void SetupStance (PlayerBase player)
 
override bool IsLockTargetOnUse ()
 

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

int m_AllowedLiquidMask
 

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

const float WATER_DEPTH = 0.5
 
const string ALLOWED_WATER_SURFACES = string.Format("%1|%2|%3", UAWaterType.FRESH, UAWaterType.STILL, UAWaterType.SNOW)
 
const int ALLOWED_LIQUID
 

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

- Закрытые члены унаследованные от 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)
 

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

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

◆ ActionFillBottleBase()

void ActionFillBottleBase ( )
inlineprotected
33 {
35 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_FILLBOTTLEPOND;
36 m_FullBody = true;
37 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
39 m_Text = "#fill";
40
42 m_AllowedLiquidMask &= ~LIQUID_SNOW;
43 }
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
float m_SpecialtyWeight
Definition ActionBase.c:77
int m_StanceMask
Definition ActionBase.c:62
Definition ActionFillBottleBase.c:2
int m_AllowedLiquidMask
Definition ActionFillBottleBase.c:30
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
const int LIQUID_GROUP_DRINKWATER
Definition constants.c:533
const int LIQUID_GASOLINE
Definition constants.c:522

Перекрестные ссылки LIQUID_GASOLINE, LIQUID_GROUP_DRINKWATER, m_AllowedLiquidMask, AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, ActionBase::m_FullBody, ActionBase::m_SpecialtyWeight, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected
52 {
53 Object targetObject = target.GetObject();
54 if (targetObject)
55 {
57 return false;
58 }
59 else
60 {
62 if (!waterCheck.Can(player, target))
63 return false;
64 }
65
67
68 if (item.GetQuantity() > item.GetQuantityMin())
69 liquidType = Liquid.TranslateLiquidType(liquidType);
70
71 return liquidType != LIQUID_NONE && Liquid.CanFillContainer(item,liquidType);
72 }
void CCTWaterSurfaceEx(float maximal_target_distance, int allowedLiquidSource)
Definition CCTWaterSurface.c:62
override int GetLiquidType()
Definition ItemBase.c:8522
Definition ObjectTyped.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108
Definition EnConvert.c:106
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
const int LIQUID_NONE
Definition constants.c:506

Перекрестные ссылки CCTWaterSurfaceEx(), UAMaxDistances::DEFAULT, vector::DistanceSq(), GetLiquidType(), LIQUID_NONE и m_AllowedLiquidMask.

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)
inlineprotected
75 {
76 return action_data.m_MainItem.GetQuantity() < action_data.m_MainItem.GetQuantityMax();
77 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprotected
46 {
49 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTNone.c:2

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

◆ GetActionCommandEx()

int GetActionCommandEx ( ActionData actionData)
inlineprotected
93 {
94 int commandUID = DayZPlayerConstants.CMD_ACTIONFB_FILLBOTTLEPOND;
95 if (actionData.m_Target.GetObject())
96 {
97 commandUID = DayZPlayerConstants.CMD_ACTIONFB_FILLBOTTLEWELL;
98 }
99
100 return commandUID;
101 }

◆ GetLiquidType()

int GetLiquidType ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected
104 {
106 if ( target.GetObject() )
107 {
108 liquidType = target.GetObject().GetLiquidSourceType();
109 }
110 else
111 {
112 string surfaceType;
113 vector hit_pos = target.GetCursorHitPos();
114 GetGame().SurfaceGetType3D(hit_pos[0], hit_pos[1], hit_pos[2], surfaceType);
115 if (surfaceType == "")
116 {
117 if ( hit_pos[1] <= g_Game.SurfaceGetSeaLevel() + 0.001 )
118 {
120 }
121 }
122 else
123 {
124 liquidType = SurfaceInfo.GetByName(surfaceType).GetLiquidType();
125 }
126 }
127
129 }
DayZGame g_Game
Definition DayZGame.c:3815
Definition SurfaceInfo.c:8
static proto SurfaceInfo GetByName(string name)
proto native CGame GetGame()
const int LIQUID_SALTWATER
Definition constants.c:527

Перекрестные ссылки g_Game, SurfaceInfo::GetByName(), GetGame(), LIQUID_NONE, LIQUID_SALTWATER и m_AllowedLiquidMask.

Используется в ActionFillBottleBaseCB::CreateActionComponent().

◆ GetStanceMask()

int GetStanceMask ( PlayerBase player)
inlineprotected
80 {
81 vector water_info = HumanCommandSwim.WaterLevelCheck(player, player.GetPosition());
82 if (water_info[1] > WATER_DEPTH)
83 {
84 return DayZPlayerConstants.STANCEMASK_ERECT;
85 }
86 else
87 {
88 return DayZPlayerConstants.STANCEMASK_CROUCH;
89 }
90 }
const float WATER_DEPTH
Definition ActionFillBottleBase.c:28
class HumanCommandLadder HumanCommandSwim()
Definition human.c:673

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

◆ IsLockTargetOnUse()

override bool IsLockTargetOnUse ( )
inlineprotected
146 {
147 return false;
148 }

◆ SetupStance()

void SetupStance ( PlayerBase player)
inlineprotected
132 {
133 //returns in format (totalWaterDepth, characterDepht, 0)
134 vector water_info = HumanCommandSwim.WaterLevelCheck(player, player.GetPosition());
135 if (water_info[1] > WATER_DEPTH)
136 {
137 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
138 }
139 else
140 {
141 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
142 }
143 }

Перекрестные ссылки HumanCommandSwim(), ActionBase::m_StanceMask и WATER_DEPTH.

Поля

◆ ALLOWED_LIQUID

const int ALLOWED_LIQUID
private

◆ ALLOWED_WATER_SURFACES

const string ALLOWED_WATER_SURFACES = string.Format("%1|%2|%3", UAWaterType.FRESH, UAWaterType.STILL, UAWaterType.SNOW)
private

◆ m_AllowedLiquidMask

int m_AllowedLiquidMask
protected

◆ WATER_DEPTH

const float WATER_DEPTH = 0.5
private

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


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