DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ActionBuryAshes.c

См. исходные тексты.

Структуры данных

class  ActionBuryAshesCB
 

Функции

ActionBuryAshesCB ActionContinuousBaseCB ActionBuryAshes ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Функции

◆ ActionBuryAshes()

12 {
13 m_CallbackClass = ActionBuryAshesCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIGMANIPULATE;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
17 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_LOW;
18 m_Text = "#bury";
19 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionBuryAshes.c:2
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions(), ItemBase::SetActions() и FarmingHoe::SetActions().

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
28 {
29 if (player.IsPlacingLocal())
30 {
31 return false;
32 }
33
34 //Action not allowed if player has broken legs
35 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
36 {
37 return false;
38 }
39
40 Fireplace fireplaceTarget = Fireplace.Cast(target.GetObject());
42 {
43 if (fireplaceTarget.HasAshes() && !fireplaceTarget.IsBurning() && fireplaceTarget.IsEmpty())
44 {
45 int liquidType;
46 string surfaceType;
47 GetGame().SurfaceUnderObject(fireplaceTarget, surfaceType, liquidType);
48 if (GetGame().IsSurfaceDigable(surfaceType))
49 {
50 return true;
51 }
52 }
53 }
54
55 return false;
56 }
eBrokenLegs
Definition EBrokenLegs.c:2
proto native CGame GetGame()

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

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionBuryAshesCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIGMANIPULATE;
15 m_FullBody = true;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
22 {
23 m_ConditionTarget = new CCTNonRuined(UAMaxDistances.DEFAULT);
24 m_ConditionItem = new CCINonRuined();
25 }
Definition CCINonRuined.c:2
Definition CCTNonRuined.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT.

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
59 {
60 //destroy fireplace with ashes
61 GetGame().ObjectDelete(action_data.m_Target.GetObject());
62
63 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 4);
64 }

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