DayZ 1.24
Loading...
Searching...
No Matches
ActionBuryAshes.c File Reference

Go to the source code of this file.

Classes

class  ActionBuryAshesCB
 

Functions

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

Function Documentation

◆ ActionBuryAshes()

Definition at line 1 of file ActionBuryAshes.c.

12 {
13 m_CallbackClass = ActionBuryAshesCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIGMANIPULATE;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT;
18 m_Text = "#bury";
19 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), ItemBase::SetActions(), FarmingHoe::SetActions(), and Iceaxe::SetActions().

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 27 of file ActionBuryAshes.c.

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

References GetGame().

◆ CreateActionComponent()

override void ActionBuryAshes::CreateActionComponent ( )

Definition at line 12 of file ActionBuryAshes.c.

12 {
13 m_CallbackClass = ActionBuryAshesCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_DIGMANIPULATE;
15 m_FullBody = true;

References m_FullBody, m_SpecialtyWeight, m_StanceMask, m_Text, and UASoftSkillsWeight::ROUGH_LOW.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 21 of file ActionBuryAshes.c.

22 {
25 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 52 of file ActionBuryAshes.c.

53 {
54 //destroy fireplace with ashes
55 GetGame().ObjectDelete(action_data.m_Target.GetObject());
56
57 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 4);
58
59 //add soft skill specialty
60 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(UASoftSkillsWeight.ROUGH_LOW);
61 }

References GetGame(), and UASoftSkillsWeight::ROUGH_LOW.