DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ActionCondition()

override bool ActionDisinfectPlant::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

См. определение в файле ActionDisinfectPlant.c строка 31

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 ( slot && slot.GetPlant() )
51 {
52 m_Plant = PlantBase.Cast(slot.GetPlant());
53 if (m_Plant.IsSprayable())
54 {
55 if ( m_Plant.GetPlantStateIndex() < 1 )
56 return false;
57
58 if ( item.GetQuantity() > 0 )
59 {
60 return true;
61 }
62 }
63 }
64 }
65 return false;
66 }
void PlantBase()
Определения PlantBase.c:54
PlantBase m_Plant
Определения ActionDisinfectPlant.c:11

Перекрестные ссылки ActionTarget, Class::CastTo(), m_Plant и PlantBase().