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

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

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

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

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

Закрытые данные

string m_NewItemTypeName = "Fireplace"
 

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

DEPRECATED.

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

◆ ActionTakeFireplaceIndoor()

void ActionTakeFireplaceIndoor ( )
inlineprivate
7 {
8 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
9 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
10 m_Text = "#take_fireplace";
11 }
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
14 {
15 Object target_object = target.GetObject();
16
17 //empty hands --interact action base condition
18 if ( target_object && target_object.IsFireplace() )
19 {
20 FireplaceIndoor fireplace_indoor = FireplaceIndoor.Cast( target_object );
21
22 if ( fireplace_indoor && !fireplace_indoor.HasAshes() && !fireplace_indoor.IsBurning() && fireplace_indoor.IsCargoEmpty() && !fireplace_indoor.DirectCookingSlotsInUse() )
23 {
25 bool found = player.GetInventory().FindFirstFreeLocationForNewEntity( m_NewItemTypeName, FindInventoryLocationType.ANY, targetIL );
26 return found;
27 }
28 }
29
30 return false;
31 }
FindInventoryLocationType
flags for searching locations in inventory
Definition InventoryLocation.c:17
string m_NewItemTypeName
Definition ActionTakeFireplaceIndoor.c:4
InventoryLocation.
Definition InventoryLocation.c:29
Definition ObjectTyped.c:2
Definition EntityAI.c:95

Перекрестные ссылки m_NewItemTypeName.

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
34 {
35 Object target_object = action_data.m_Target.GetObject();
36 FireplaceIndoor fireplace_indoor = FireplaceIndoor.Cast( target_object );
37
40 bool found = action_data.m_Player.GetInventory().FindFirstFreeLocationForNewEntity( m_NewItemTypeName, FindInventoryLocationType.ANY, targetIL );
41 if ( found )
42 {
43 // allow action only if there is place in inventory
44 lambda.OverrideNewLocation( targetIL );
45 action_data.m_Player.ServerReplaceItemWithNew( lambda );
46 }
47 }
void TakeFireplaceFromIndoorLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Definition ActionTakeFireplaceIndoor.c:54

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

Поля

◆ m_NewItemTypeName

string m_NewItemTypeName = "Fireplace"
private

Используется в ActionCondition() и OnExecuteServer().


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