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

См. исходные тексты.

Структуры данных

class  ActionDismantleOvenCB
 

Функции

ActionDismantleOvenCB ActionContinuousBaseCB ActionDismantleOven ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
40 {
41 //Action not allowed if player has broken legs
42 if (player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
43 return false;
44
45 Object target_object = target.GetObject();
46
47 if ( target_object && target_object.IsFireplace() )
48 {
50
51 if ( fireplace_target.IsBaseFireplace() && fireplace_target.CanDismantleOven() )
52 {
53 return true;
54 }
55 }
56
57 return false;
58 }
eBrokenLegs
Definition EBrokenLegs.c:2
Definition BarrelHoles_ColorBase.c:2
Definition ObjectTyped.c:2
Definition EntityAI.c:95

◆ ActionDismantleOven()

12 {
13 m_CallbackClass = ActionDismantleOvenCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
17 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_HIGH;
18
19 m_Text = "#dismantle_oven";
20 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionDismantleOven.c:2
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в ActionConstructor::RegisterActions() и FireplaceBase::SetActions().

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionDismantleOvenCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;

Перекрестные ссылки m_CommandUID и m_StanceMask.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
23 {
24
25 m_ConditionTarget = new CCTNonRuined( UAMaxDistances.DEFAULT );
26 m_ConditionItem = new CCINotPresent;
27 }
Definition CCINotPresent.c:2
Definition CCTNonRuined.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

Перекрестные ссылки UAMaxDistances::DEFAULT.

◆ GetInputType()

override GetInputType ( )
30 {
32 }
Definition ActionInput.c:522

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
61 {
62 Object target_object = action_data.m_Target.GetObject();
64
65 if ( fireplace_target.CanDismantleOven() )
66 {
67 ItemBase attached_item = ItemBase.Cast( fireplace_target.GetAttachmentByType( fireplace_target.ATTACHMENT_STONES ) );
68
69 // for backward compatibility - for the cases built before slot locking was commented out for the stone att slot
71 attached_item.GetInventory().GetCurrentInventoryLocation( inventory_location );
72 fireplace_target.GetInventory().SetSlotLock( inventory_location.GetSlot(), false );
73
74 //set oven state
75 fireplace_target.SetOvenState( false );
76
77 // extend lifetime (either back to stone circle lifetime or standard fireplace one)
78 if ( fireplace_target.HasStoneCircle() )
79 {
80 fireplace_target.SetLifetimeMax( FireplaceBase.LIFETIME_FIREPLACE_STONE_CIRCLE );
81 }
82 else
83 {
84 fireplace_target.SetLifetimeMax( 10800 );
85 }
86 }
87 }
InventoryLocation.
Definition InventoryLocation.c:29
Definition InventoryItem.c:731