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

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

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

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

string m_NewItemTypeName = "Fireplace"
 

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

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

◆ ActionTakeFireplaceIndoor()

void ActionTakeFireplaceIndoor ( )
inlineprivate
6 {
7 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
8 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
9 m_Text = "#take_fireplace";
10 }
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
int m_CommandUID
Definition AnimatedActionBase.c:135
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
13 {
14 Object target_object = target.GetObject();
15
16 //empty hands --interact action base condition
17 if ( target_object && target_object.IsFireplace() )
18 {
19 FireplaceIndoor fireplace_indoor = FireplaceIndoor.Cast( target_object );
20
21 if ( fireplace_indoor && !fireplace_indoor.HasAshes() && !fireplace_indoor.IsBurning() && fireplace_indoor.IsCargoEmpty() && !fireplace_indoor.DirectCookingSlotsInUse() )
22 {
24 bool found = player.GetInventory().FindFirstFreeLocationForNewEntity( m_NewItemTypeName, FindInventoryLocationType.ANY, targetIL );
25 return found;
26 }
27 }
28
29 return false;
30 }
FindInventoryLocationType
flags for searching locations in inventory
Definition InventoryLocation.c:16
string m_NewItemTypeName
Definition ActionTakeFireplaceIndoor.c:3
InventoryLocation.
Definition InventoryLocation.c:28
Definition ObjectTyped.c:2
Definition EntityAI.c:95

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

◆ OnExecuteServer()

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

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

Поля

◆ m_NewItemTypeName

string m_NewItemTypeName = "Fireplace"
private

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


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