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

◆ ActionCondition()

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

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

22 {
23 GardenBase garden_base;
24 if ( Class.CastTo(garden_base, target.GetObject()))
25 {
26 Slot slot;
27
28 array<string> selections = new array<string>;
29 garden_base.GetActionComponentNameList(target.GetComponentIndex(), selections);
30 string selection;
31
32 for (int s = 0; s < selections.Count(); s++)
33 {
34 selection = selections[s];
35 slot = garden_base.GetSlotBySelection( selection );
36 if (slot)
37 break;
38 }
39
40 if ( slot && slot.GetPlant() )
41 {
42 m_Plant = PlantBase.Cast(slot.GetPlant());
43 if (!m_Plant.IsHarvestable())
44 return true;
45 }
46 }
47 return false;
48 }
void PlantBase()
Определения PlantBase.c:54
PlantBase m_Plant
Определения ActionRemovePlant.c:3

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