DayZ 1.24
Loading...
Searching...
No Matches
ActionGagSelf Class Reference
Inheritance diagram for ActionGagSelf:
[legend]
Collaboration diagram for ActionGagSelf:
[legend]

Private Member Functions

void ActionGagSelf ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
bool IsWearingMask (PlayerBase player)
 
- Private Member Functions inherited from 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)
 

Detailed Description

Definition at line 1 of file ActionGagSelf.c.

Constructor & Destructor Documentation

◆ ActionGagSelf()

void ActionGagSelf::ActionGagSelf ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 24 of file ActionGagSelf.c.

25 {
26 if (item.GetQuantity() > 1)
27 return false;
28
30 {
31 ItemBase headgear = ItemBase.Cast(player.FindAttachmentBySlotName("Headgear"));
32 if (headgear)
33 {
35 headgear_restricted = headgear.ConfigGetBool("noMask");
37 return false;
38 }
39 return true;
40 }
41
42 return false;
43 }
bool IsWearingMask(PlayerBase player)

References IsWearingMask().

◆ CreateConditionComponents()

override void ActionGagSelf::CreateConditionComponents ( )
inlineprivate

Definition at line 13 of file ActionGagSelf.c.

14 {
17 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool ActionGagSelf::HasTarget ( )
inlineprivate

Definition at line 19 of file ActionGagSelf.c.

20 {
21 return false;
22 }

◆ IsWearingMask()

bool ActionGagSelf::IsWearingMask ( PlayerBase player)
inlineprivate

Definition at line 57 of file ActionGagSelf.c.

58 {
59 if (player.GetInventory().FindAttachment(InventorySlots.MASK))
60 return true;
61 return false;
62 }
provides access to slot configuration

Referenced by ActionCondition().

◆ OnFinishProgressServer()

override void ActionGagSelf::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 45 of file ActionGagSelf.c.

46 {
48 if (Class.CastTo(new_item, action_data.m_Player.GetInventory().CreateAttachmentEx("MouthRag", InventorySlots.MASK)))
49 {
50 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, new_item, true, false, true);
51
52 action_data.m_MainItem.TransferModifiers(action_data.m_Player);
53 action_data.m_MainItem.Delete();
54 }
55 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo().


The documentation for this class was generated from the following file: