DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionFertilizeSlot.c
См. документацию.
10
12{
14 {
16 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_MEDIUM;
17
18 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
19 m_FullBody = true;
20 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
21 m_Text = "#fertilize_slot";
22 }
23
29
30
31 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
32 {
33 GardenBase garden_base;
34 if ( Class.CastTo(garden_base, target.GetObject()))
35 {
36 Slot slot;
37
38 array<string> selections = new array<string>;
39 garden_base.GetActionComponentNameList(target.GetComponentIndex(), selections);
40 string selection;
41
42 for (int s = 0; s < selections.Count(); s++)
43 {
44 selection = selections[s];
45 slot = garden_base.GetSlotBySelection( selection );
46 if (slot)
47 break;
48 }
49
50 if ( garden_base.NeedsFertilization( selection ) )
51 {
52 if ( item.GetQuantity() > 0 )
53 {
54 return true;
55 }
56 }
57 }
58 return false;
59 }
60
61 override void OnFinishProgressServer( ActionData action_data )
62 {
63 // The functionality is in the Execute event of this user action's component.
64 }
65};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
float m_SpecialtyWeight
Определения ActionBase.c:77
int m_StanceMask
Определения ActionBase.c:62
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
bool m_FullBody
Определения ActionBase.c:61
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
ActionData m_ActionData
Определения AnimatedActionBase.c:3
void ActionContinuousBase()
Определения ActionContinuousBase.c:124
override void CreateConditionComponents()
Определения ActionFertilizeSlot.c:24
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionFertilizeSlot.c:31
void ActionFertilizeSlot()
Определения ActionFertilizeSlot.c:13
override void OnFinishProgressServer(ActionData action_data)
Определения ActionFertilizeSlot.c:61
const float QUANTITY_USED_PER_SEC
Определения ActionFertilizeSlot.c:3
override void CreateActionComponent()
Определения ActionFertilizeSlot.c:5
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTDummy.c:2
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения GardenPlot.c:2
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.