22 {
23 if ( player.GetCommand_Vehicle() )
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
44 if ( slot && slot.GetSeed() )
45 {
46 if ( slot.GetWateredState() != eWateredState.DRY)
47 return false;
48
49 m_Seed = SeedBase.Cast( slot.GetSeed() );
50
52 {
53 if ( player.GetInventory().CanAddEntityIntoInventory(
m_Seed ) &&
m_Seed.GetHierarchyRootPlayer() != player )
54 return true;
55 else
56 return player.GetInventory().CanAddEntityIntoHands(
m_Seed );
57 }
58 }
59 }
60 return false;
61 }