23 {
24 GardenBase gardenBase = GardenBase.Cast(target.GetObject());
25
26 if (gardenBase && (!gardenBase.IsHologram() || !gardenBase.IsBeingPlaced()))
27 {
28 array<string> selections = new array<string>();
29 gardenBase.GetActionComponentNameList(target.GetComponentIndex(), selections);
30
31 foreach (string selection : selections)
32 {
33 Slot slot = gardenBase.GetSlotBySelection(selection);
34 if (slot)
35 {
36 if (item != null && item.GetQuantity() > 0 && gardenBase.CanPlantSeed(selection))
37 return true;
38 }
39 }
40 }
41
42 return false;
43 }