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

Private Member Functions

override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool ActionConditionContinue (ActionData action_data)
 
override void OnExecuteClient (ActionData action_data)
 
override void OnExecuteServer (ActionData action_data)
 

Private Attributes

int m_SlotID = InventorySlots.INVALID
 

Detailed Description

Definition at line 1 of file ActionFoldEntityToSlot.c.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 13 of file ActionFoldEntityToSlot.c.

14 {
15 EntityAI att = player.GetInventory().FindAttachment(m_SlotID);
16 if (item && att == null)
17 return true;
18 return false;
19 }

References m_SlotID.

◆ ActionConditionContinue()

override bool ActionFoldEntityToSlot::ActionConditionContinue ( ActionData action_data)
inlineprivate

Definition at line 21 of file ActionFoldEntityToSlot.c.

21{ return true; }

◆ CreateConditionComponents()

override void ActionFoldEntityToSlot::CreateConditionComponents ( )
inlineprivate

Definition at line 5 of file ActionFoldEntityToSlot.c.

6 {
9 }
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 ActionFoldEntityToSlot::HasTarget ( )
inlineprivate

Definition at line 11 of file ActionFoldEntityToSlot.c.

11{ return false; }

◆ OnExecuteClient()

override void ActionFoldEntityToSlot::OnExecuteClient ( ActionData action_data)
inlineprivate

Definition at line 23 of file ActionFoldEntityToSlot.c.

24 {
26 }
void ClearInventoryReservationEx(ActionData action_data)
Definition ActionBase.c:790

References ClearInventoryReservationEx().

◆ OnExecuteServer()

override void ActionFoldEntityToSlot::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 28 of file ActionFoldEntityToSlot.c.

29 {
30 if (!GetGame().IsMultiplayer())
32
33 ItemBase old_item = action_data.m_MainItem;
34 if (old_item.ConfigIsExisting("ChangeIntoOnAttach"))
35 {
37 string str = old_item.ChangeIntoOnAttach(slot_name);
38 if (str != "")
39 {
41 action_data.m_Player.ServerReplaceItemInHandsWithNewElsewhere(lambda);
42 }
43 }
44 }
provides access to slot configuration
static proto native owned string GetSlotName(int id)
converts slot_id to string
proto native CGame GetGame()

References ClearInventoryReservationEx(), GetGame(), InventorySlots::GetSlotName(), and m_SlotID.

Member Data Documentation

◆ m_SlotID


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