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() != 0 )
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 ) )
78 action_data.m_Player.GetInventory().AddInventoryReservationEx( m_Seed, il,
GameInventory.c_InventoryReservationTimeoutMS );
85 action_data.m_ReservedInventoryLocations.Insert( il );
91 override void OnExecute(
ActionData action_data )
101 if ( !player.GetInventory().CanAddEntityIntoHands( m_Seed ) )
103 il = action_data.m_ReservedInventoryLocations.Get( 0 );
105 m_Seed.GetInventory().GetCurrentInventoryLocation( targetInventoryLocation );
107 stackable = m_Seed.GetTargetQuantityMax( il.GetSlot() );
109 if ( stackable == 0 || stackable >= m_Seed.GetQuantity() )
111 player.PredictiveTakeToDst( targetInventoryLocation, il );
115 m_Seed.SplitIntoStackMaxToInventoryLocationClient( il );
123 stackable = m_Seed.GetTargetQuantityMax( -1 );
125 if ( stackable == 0 || stackable >= m_Seed.GetQuantity() )
127 action_data.m_Player.PredictiveTakeEntityToHands( m_Seed );
132 il.SetHands( action_data.m_Player, m_Seed );
133 m_Seed.SplitIntoStackMaxToInventoryLocationClient( il );