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

DEPRECATED. Подробнее...

+ Граф наследования:ActionTakeFireplaceFromBarrel:

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

void ActionTakeFireplaceFromBarrel ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

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

DEPRECATED.

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

◆ ActionTakeFireplaceFromBarrel()

5 {
6 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
7 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
8 m_Text = "#take_fireplace";
9 }
string m_Text
Definition ActionBase.c:58
int m_StanceMask
Definition ActionBase.c:62
int m_CommandUID
Definition AnimatedActionBase.c:143
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CommandUID, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
12 {
13 Object target_object = target.GetObject();
14
15 if ( target_object && target_object.IsFireplace() )
16 {
18
19 //check barrel fireplace state
20 if ( fireplace_barrel && fireplace_barrel.IsOpen() && !fireplace_barrel.HasAshes() && !fireplace_barrel.IsBurning() )
21 {
22 //check cargo and attachments
23 if ( fireplace_barrel.IsCargoEmpty() && fireplace_barrel.GetInventory().AttachmentCount() > 0 )
24 {
25 return true;
26 }
27 }
28 }
29
30 return false;
31 }
Definition BarrelHoles_Blue.c:2
Definition ObjectTyped.c:2
Definition EntityAI.c:95

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
34 {
35 Object target_object = action_data.m_Target.GetObject();
37
38 string newTypeName = "Fireplace";
40 bool found = action_data.m_Player.GetInventory().FindFirstFreeLocationForNewEntity( newTypeName, FindInventoryLocationType.ANY, targetIL );
41 if ( found )
42 {
43 // allow action only if there is place in inventory
45 lambda.OverrideNewLocation( targetIL );
46 action_data.m_Player.ServerReplaceItemWithNew( lambda );
47 }
48 }
void TakeFireplaceFromBarrelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Definition ActionTakeFireplaceFromBarrel.c:55
FindInventoryLocationType
flags for searching locations in inventory
Definition InventoryLocation.c:17
InventoryLocation.
Definition InventoryLocation.c:29

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


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