384 {
386
387 if ( slot_index != -1 )
388 {
389 PluginHorticulture module_horticulture = PluginHorticulture.Cast(
GetPlugin( PluginHorticulture ) );
390 string plant_type = module_horticulture.GetPlantType( seed );
391
392 Slot slot =
m_Slots.Get( slot_index );
393 slot.SetState(Slot.STATE_PLANTED);
394 slot.m_PlantType = plant_type;
395 slot.SetSeed(seed);
396
397 if ( !slot.NeedsWater() )
398 {
399 seed.LockToParent();
400
401 Timer growthTimer = NULL;
403 Param createPlantParam = new Param1<Slot>(slot);
404 growthTimer.Run( 0.1, this, "CreatePlant", createPlantParam, false );
405 }
406 }
407 }
PluginBase GetPlugin(typename plugin_type)
int GetSlotIndexBySelection(string selection_component)
ref array< ref Slot > m_Slots