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

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

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

class  ActionBuildStoneCircleCB
 

Функции

ActionBuildStoneCircleCB ActionContinuousBaseCB ActionBuildStoneCircle ()
 
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)
 

Функции

◆ ActionBuildStoneCircle()

12 {
13 m_CallbackClass = ActionBuildStoneCircleCB;
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_stonecircle";
19
20 }
int m_CommandUID
Definition ActionBase.c:31
int m_StanceMask
Definition ActionBase.c:33
Definition ActionBuildStoneCircle.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 )
40 {
41 Object target_object = target.GetObject();
42
43 if ( target_object && target_object.IsFireplace() )
44 {
46
47 if ( fireplace_target.IsBaseFireplace() && fireplace_target.CanBuildStoneCircle() )
48 {
49 return true;
50 }
51 }
52
53 return false;
54 }
Definition BarrelHoles_ColorBase.c:2
Definition ObjectTyped.c:2

◆ CreateActionComponent()

override void CreateActionComponent ( )
12 {
13 m_CallbackClass = ActionBuildStoneCircleCB;
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

◆ HasProgress()

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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
57 {
58 Object target_object = action_data.m_Target.GetObject();
60
61 if ( fireplace_target.CanBuildStoneCircle() )
62 {
63 ItemBase attached_item = ItemBase.Cast( fireplace_target.GetAttachmentByType( fireplace_target.ATTACHMENT_STONES ) );
64
65 /*InventoryLocation inventory_location = new InventoryLocation;
66 attached_item.GetInventory().GetCurrentInventoryLocation( inventory_location );
67 fireplace_target.GetInventory().SetSlotLock( inventory_location.GetSlot(), true );*/
68
69 //set oven state
70 fireplace_target.SetStoneCircleState( true );
71
72 // extend lifetime
73 fireplace_target.SetLifetimeMax( FireplaceBase.LIFETIME_FIREPLACE_STONE_CIRCLE );
74 }
75 }
Definition InventoryItem.c:731