private string getChopProgress(ClientWorkstation[] workstations) { float[] result = new float[workstations.Length]; for (int i = 0; i < workstations.Length; i++) { var item = workstations[i]; if (item.IsBeingUsed()) { ClientWorkableItem workableItem = (ClientWorkableItem)ReflectionUtil.GetValue(item, "m_item"); result[i] = workableItem.GetProgress(); } else { result[i] = 0.0F; } } string s = ""; foreach (float progress in result) { s += $"{progress},"; } return(s); }
public static bool HasFinishedChopping(ClientWorkstation workstation) { ClientWorkableItem workableItem = (ClientWorkableItem)ReflectionUtil.GetValue(workstation, "m_item"); return(workableItem.HasFinished()); }