18 {
19 GardenBase target_GB;
20 if ( Class.CastTo(target_GB, action_data.m_Target.GetObject() ) )
21 {
24
26 {
28 }
29 else
30 {
32 }
33
34 if ( action_data.m_MainItem )
36
37 if ( target_GB )
38 {
39
40
41
42
43 array<string> selections = new array<string>;
44 target_GB.GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selections);
45
46 for (int s = 0; s < selections.Count(); s++)
47 {
48
52 break;
53 }
54
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)
59 action_length = 1;
60
61 m_Slot.SetFertilizerQuantityMax(consumed_quantity);
64 }
65
67 float speedMultiplier = defaultTimeComplete / action_length;
69 }
70 }
float m_AlreadyFilledAmount
float m_SlotFertilizerNeed
ref Param1< float > m_SpentUnits
float m_QuantityUsedPerSecond
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native CGame GetGame()