27 {
28 GardenBase garden_base;
29 if ( Class.CastTo(garden_base, target.GetObject()))
30 {
31 Slot slot;
32
33 array<string> selections = new array<string>;
34 garden_base.GetActionComponentNameList(target.GetComponentIndex(), selections);
35 string selection;
36
37 for (int s = 0; s < selections.Count(); s++)
38 {
39 selection = selections[s];
40 slot = garden_base.GetSlotBySelection( selection );
41 if (slot)
42 break;
43 }
44
45 if ( slot && slot.GetPlant() )
46 {
47 return slot;
48 }
49 }
50 return null;
51 }