3 private const float QUANTITY_USED_PER_SEC = 150;
5 override void CreateActionComponent()
23 override void CreateConditionComponents()
31 Object targetObject = target.GetObject();
33 if ( targetObject != NULL && targetObject.IsInherited(PlantBase) && item != NULL && !item.IsDamageDestroyed() )
35 PlantBase plant = PlantBase.Cast( targetObject );
37 if ( plant.NeedsWater() && item.GetQuantity() > 0 )
46 override void OnFinishProgressServer(
ActionData action_data )
48 Object targetObject = action_data.m_Target.GetObject();
50 if ( targetObject != NULL && targetObject.IsInherited(PlantBase) )
52 PlantBase plant = PlantBase.Cast( targetObject );
53 Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
54 float water = nacdata.param1;
55 Slot slot = plant.GetSlot();
56 water = action_data.m_Player.GetSoftSkillsManager().AddSpecialtyBonus( water, this.
GetSpecialtyWeight() );
57 slot.GiveWater( water );
62 override void OnFinishProgressClient(
ActionData action_data )
64 Object targetObject = action_data.m_Target.GetObject();
66 if ( targetObject != NULL && targetObject.IsInherited(PlantBase) )
68 PlantBase plant = PlantBase.Cast( targetObject );
69 Param1<float> nacdata = Param1<float>.Cast( action_data.m_ActionComponent.GetACData() );
70 float water = nacdata.param1;
71 Slot slot = plant.GetSlot();
72 water = action_data.m_Player.GetSoftSkillsManager().AddSpecialtyBonus( water, this.
GetSpecialtyWeight() );
73 slot.GiveWater( water );