10 override typename GetInputType()
15 override void CreateConditionComponents()
23 if ( player.GetCommand_Vehicle() )
27 if (
Class.CastTo( garden_base, target.GetObject() ) )
32 garden_base.GetActionComponentNameList( target.GetComponentIndex(), selections );
35 for (
int s = 0; s < selections.Count(); s++)
37 selection = selections[s];
38 slot = garden_base.GetSlotBySelection( selection );
44 if ( slot && slot.GetSeed() )
46 if ( slot.GetWateredState() != eWateredState.DRY)
49 m_Seed =
SeedBase.Cast( slot.GetSeed() );
53 if ( player.GetInventory().CanAddEntityIntoInventory( m_Seed ) && m_Seed.GetHierarchyRootPlayer() != player )
56 return player.GetInventory().CanAddEntityIntoHands( m_Seed );
63 override bool InventoryReservation(ActionData action_data)
72 if ( action_data.m_Player.GetInventory().HasInventoryReservation( m_Seed, il ) )
85 action_data.m_ReservedInventoryLocations.Insert( il );
91 override void OnExecuteClient(ActionData action_data)
93 super.OnExecuteClient(action_data);
100 if ( !player.GetInventory().CanAddEntityIntoHands( m_Seed ) )
102 il = action_data.m_ReservedInventoryLocations.Get( 0 );
104 m_Seed.GetInventory().GetCurrentInventoryLocation( targetInventoryLocation );
106 stackable = m_Seed.GetTargetQuantityMax( il.GetSlot() );
109 if ( stackable == 0 || stackable >= m_Seed.GetQuantity() )
111 player.PredictiveTakeToDst( targetInventoryLocation, il );
115 m_Seed.SplitIntoStackMaxToInventoryLocationClient( il );
122 stackable = m_Seed.GetTargetQuantityMax( -1 );
124 if ( stackable == 0 || stackable >= m_Seed.GetQuantity() )
126 action_data.m_Player.PredictiveTakeEntityToHands( m_Seed );
131 il.SetHands( action_data.m_Player, m_Seed );
132 m_Seed.SplitIntoStackMaxToInventoryLocationClient( il );