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

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

void FirearmActionLoadBullet ()
 
override int GetActionCategory ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override Object GetDisplayInteractObject (PlayerBase player, ActionTarget target)
 
override bool CanBePerformedFromInventory ()
 
override bool CanBePerformedFromQuickbar ()
 

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

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

◆ FirearmActionLoadBullet()

void FirearmActionLoadBullet ( )
inlineprivate
4 {
5 m_Text = "#load_bullet";
6 }
string m_Text
Definition ActionBase.c:58

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
14 {
15 if (!super.ActionCondition(player, target, item))
16 return false;
17
18 HumanCommandWeapons hcw = player.GetCommandModifier_Weapons();
19 if (!target.GetObject())
20 return false;
21
23 EntityAI entity = EntityAI.Cast(target.GetObject());
24 if (entity && entity.IsManagingArrows() && entity.IsDamageDestroyed())
25 {
26 ArrowManagerBase arrowManager = ArrowManagerBase.Cast(entity.GetArrowManager());
27 if (arrowManager)
28 mag = Magazine.Cast(arrowManager.GetFirstArrow());
29 }
30 else
31 mag = Magazine.Cast(target.GetObject());
32
34 return mag && player.GetWeaponManager().CanLoadBullet(weapon, mag) && hcw && hcw.GetRunningAction() != WeaponActions.CHAMBERING;
35 }
Definition ArrowManagerBase.c:2
Definition Building.c:6
Definition human.c:994
Definition EntityAI.c:95
shorthand
Definition BoltActionRifle_Base.c:6
WeaponActions
actions
Definition human.c:816

◆ CanBePerformedFromInventory()

override bool CanBePerformedFromInventory ( )
inlineprivate
72 {
73 return true;
74 }

◆ CanBePerformedFromQuickbar()

override bool CanBePerformedFromQuickbar ( )
inlineprivate
77 {
78 return true;
79 }

◆ GetActionCategory()

override int GetActionCategory ( )
inlineprivate
9 {
10 return AC_SINGLE_USE;
11 }
const int AC_SINGLE_USE
Definition _constants.c:2

◆ GetDisplayInteractObject()

override Object GetDisplayInteractObject ( PlayerBase player,
ActionTarget target )
inlineprivate
59 {
60 EntityAI entity = EntityAI.Cast(target.GetObject());
61 if (!entity || (entity && entity.IsManagingArrows() && !entity.IsDamageDestroyed()))
62 return null;
63
64 ArrowManagerBase arrowManager = entity.GetArrowManager();
65 if (arrowManager)
66 return arrowManager.GetFirstArrow();
67
68 return null;
69 }

◆ Start()

override void Start ( ActionData action_data)
inlineprivate
38 {
39 super.Start(action_data);
40
42 EntityAI entity = EntityAI.Cast(action_data.m_Target.GetObject());
43 if (entity && entity.IsManagingArrows() && entity.IsDamageDestroyed())
44 {
45 ArrowManagerBase arrowManager = ArrowManagerBase.Cast(entity.GetArrowManager());
46 if (arrowManager)
47 {
48 mag = Magazine.Cast(arrowManager.AcquireFirstArrow(false));
49 mag.SetPosition(action_data.m_Player.GetPosition());
50 }
51 }
52 else
53 mag = Magazine.Cast(action_data.m_Target.GetObject());
54
55 action_data.m_Player.GetWeaponManager().LoadBullet(mag, this);
56 }

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