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

Закрытые члены

void ActionDigWorms ()
 
override void CreateConditionComponents ()
 
override bool Can (PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool ActionConditionContinue (ActionData action_data)
 
override bool HasTarget ()
 
override void OnFinishProgressServer (ActionData action_data)
 
bool IsTargetFertile (ActionTarget target)
 
bool IsPlayerOnGround (PlayerBase player)
 
void SetDiggignAnimation (ItemBase item)
 DEPRECATED - See ItemBase.OverrideActionAnimation() to override commands for items.
 
- Закрытые члены унаследованные от 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)
 

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

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

◆ ActionDigWorms()

void ActionDigWorms ( )
inlineprivate
20 {
22 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIGGIN_WORMS;
23 m_FullBody = true;
24 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
26 m_Text = "#dig_up_worms";
27 }
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 ActionDigWorms.c:2
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

Перекрестные ссылки 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 )
inlineprivate
44 {
45 if (player.IsPlacingLocal())
46 return false;
47
49 }
bool IsTargetFertile(ActionTarget target)
Definition ActionDigWorms.c:73
bool IsPlayerOnGround(PlayerBase player)
Definition ActionDigWorms.c:92

Перекрестные ссылки IsPlayerOnGround() и IsTargetFertile().

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)
inlineprivate
52 {
53 return IsPlayerOnGround(action_data.m_Player);
54 }

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

◆ Can()

override bool Can ( PlayerBase player,
ActionTarget target,
ItemBase item,
int condition_mask )
inlineprivate
36 {
38 return false;
39
40 return player.CheckFreeSpace(vector.Forward, 0.8, false);
41 }
Definition EnConvert.c:106
static const vector Forward
Definition EnConvert.c:109

Перекрестные ссылки vector::Forward.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
30 {
33 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTSurface.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

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

◆ HasTarget()

override bool HasTarget ( )
inlineprivate
57 {
58 return true;
59 }

◆ IsPlayerOnGround()

bool IsPlayerOnGround ( PlayerBase player)
inlineprivate
93 {
94 vector position = player.GetPosition();
95 float heightDiff = GetGame().SurfaceY(position[0], position[2]);
97
98 return heightDiff <= 0.4; // Player is considered on ground
99 }
proto native CGame GetGame()

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

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

◆ IsTargetFertile()

bool IsTargetFertile ( ActionTarget target)
inlineprivate
74 {
75 if (target)
76 {
77 string surface_type;
79 position = target.GetCursorHitPos();
80
81 GetGame().SurfaceGetType(position[0], position[2], surface_type);
82
83 if (GetGame().IsSurfaceFertile(surface_type))
84 {
85 return true;
86 }
87 }
88
89 return false;
90 }

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

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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprivate
62 {
64 int count = action_data.m_MainItem.GetOnDigWormsAmount();
65 for (int i = 0; i < count; i++)
66 {
67 Class.CastTo(worms, GetGame().CreateObjectEx("Worm", action_data.m_Player.GetPosition(), ECE_PLACE_ON_SURFACE));
68 }
69
70 MiscGameplayFunctions.DealEvinronmentAdjustedDmg(action_data.m_MainItem, action_data.m_Player, 4);
71 }
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition InventoryItem.c:731
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), ECE_PLACE_ON_SURFACE и GetGame().

◆ SetDiggignAnimation()

void SetDiggignAnimation ( ItemBase item)
private

DEPRECATED - See ItemBase.OverrideActionAnimation() to override commands for items.


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