116 {
117 int slotID = -1;
118 GardenBase garden;
123
124 Param6<int, GardenBase, int, int, int, int> params;
126
127 if (isTarget && player && player.GetActionManager())
128 {
129 ActionTarget at = player.GetActionManager().FindActionTarget();
130 if (at)
131 garden = GardenBase.Cast(at.GetObject());
132
133 if (garden)
134 {
135 array<string> selections = new array<string>;
136 garden.GetActionComponentNameList(at.GetComponentIndex(), selections);
137
138 for (int s = 0; s < selections.Count(); s++)
139 {
140 string selection = selections[s];
141 Slot slot = garden.GetSlotBySelection( selection );
142 if (slot && slot.GetPlant())
143 {
144 slotID = slot.GetSlotIndex();
145 }
146 }
147 }
148 }
149
150 params = new Param6<int, GardenBase, int, int, int, int>(slotID, garden, maturity, spoil, spoilRemove, dryRemove);
151
152 if (!
GetGame().IsMultiplayer())
153 {
154 if (slotID != -1 && garden)
155 {
156 Slot gSlot = garden.GetSlotByIndex(slotID);
157 if (gSlot && gSlot.GetPlant())
158 gSlot.GetPlant().DebugSetTimes(maturity, spoil, spoilRemove, dryRemove);
159 }
160 else
161 PlantBase.DebugSetGlobalTimes(params.param3, params.param4, params.param5, params.param6);
162 }
163 else if (player)
164 player.RPCSingleParam(
ERPCs.DEV_RPC_HORTICULTURE_UPDATE, params,
true);
165 }
class ActionTargets ActionTarget
EditBoxWidget m_DryRemoveEditBox
EditBoxWidget m_SpoilRemoveEditBox
EditBoxWidget m_SpoilEditBox
EditBoxWidget m_FullMaturityEditBox
proto native CGame GetGame()