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

◆ ActionCondition()

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

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

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

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