static bool TryRemoveThreadedTask(List<KSPTSTaskGroup> taskGroupList, Func<object, object> threadedTask) { for(int i = 0; i < taskGroupList.Count; i++) { KSPTSTaskGroup tmpTaskGroup = taskGroupList[i]; if(threadedTask.Equals(tmpTaskGroup.threadedTask)) { taskGroupList.Remove(tmpTaskGroup); return true; } } return false; }
public bool Merge(Func f) { if (f.Equals(this) && !f.IsEmptyBody() && this.IsEmptyBody()) { this.SetBody(f.body); this.SetTable(f.table); return true; } return false; }