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

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

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

class  ActionBuildOvenCB
 

Функции

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

Функции

◆ ActionBuildOven()

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

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

◆ ActionCondition()

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

◆ CreateActionComponent()

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

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

◆ CreateConditionComponents()

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

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

◆ GetInputType()

override GetInputType ( )
29 {
31 }
Definition ActionInput.c:522

◆ HasProgress()

override bool HasProgress ( )
34 {
35 return true;
36 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
60 {
61 Object target_object = action_data.m_Target.GetObject();
63
64 if ( fireplace_target.CanBuildOven() )
65 {
66 ItemBase attached_item = ItemBase.Cast( fireplace_target.GetAttachmentByType( fireplace_target.ATTACHMENT_STONES ) );
67
68 /*InventoryLocation inventory_location = new InventoryLocation;
69 attached_item.GetInventory().GetCurrentInventoryLocation( inventory_location );
70 fireplace_target.GetInventory().SetSlotLock( inventory_location.GetSlot(), true );*/
71
72 //set oven state
73 fireplace_target.SetOvenState( true );
74 fireplace_target.SetOrientation( action_data.m_Player.GetOrientation() - "180 0 0" );
75
76 // extend lifetime
77 fireplace_target.SetLifetimeMax( FireplaceBase.LIFETIME_FIREPLACE_STONE_OVEN );
78 }
79 }
Definition InventoryItem.c:731