16 {
17 GardenBase targetGB;
18 if (Class.CastTo(targetGB, action_data.m_Target.GetObject()))
19 {
21
23 {
25 }
26 else
27 {
29 }
30
31 if (action_data.m_MainItem)
33
34 if (targetGB)
35 {
36 array<string> selections = new array<string>;
37 targetGB.GetActionComponentNameList(action_data.m_Target.GetComponentIndex(), selections);
38
39 for (int s = 0; s < selections.Count(); s++)
40 {
44 break;
45 }
46
47 string itemType = action_data.m_MainItem.GetType();
48 float consumedQuantity =
GetGame().
ConfigGetFloat(
"cfgVehicles " + itemType +
" Horticulture ConsumedQuantity");
49 float actionLength =
GetGame().
ConfigGetFloat(
"cfgVehicles " + itemType +
" Horticulture FertilizeLength");
50 if (actionLength == 0)
51 actionLength = 1;
52
53 m_Slot.SetFertilizerQuantityMax(consumedQuantity);
56 }
57
59 float speedMultiplier = defaultTimeComplete / actionLength;
61 }
62 }
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()