20 if (
Class.
CastTo(target_GB, action_data.m_Target.GetObject() ) )
34 if ( action_data.m_MainItem )
44 target_GB.GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selections);
46 for (
int s = 0; s < selections.Count(); s++)
55 string item_type = action_data.m_MainItem.GetType();
56 float consumed_quantity =
GetGame().
ConfigGetFloat(
"cfgVehicles " + item_type +
" Horticulture ConsumedQuantity" );
57 float action_length =
GetGame().
ConfigGetFloat(
"cfgVehicles " + item_type +
" Horticulture FertilizeLength" );
58 if (action_length == 0)
61 m_Slot.SetFertilizerQuantityMax(consumed_quantity);
67 float speedMultiplier = defaultTimeComplete / action_length;
75 if ( !action_data.m_Player )
90 Class.
CastTo(garden_base, action_data.m_Target.GetObject() );
void CalcAndSetQuantity()
void OnCompletePogress(ActionData action_data)
void CAContinuousFertilizeGardenSlot(float quantity_used_per_second)
override int Execute(ActionData action_data)
override float GetProgress()
float m_AlreadyFilledAmount
float m_SpentQuantityTotal
override void Setup(ActionData action_data)
float m_SlotFertilizerNeed
ref Param1< float > m_SpentUnits
float m_QuantityUsedPerSecond
void CAContinuousQuantity(float quantity_used_per_second)
proto native float ConfigGetFloat(string path)
Get float value from config on path.
Super root of all classes in Enforce script.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.