public void Finish(ResearchNode node) { foreach (var n in node.MissingPrerequisitesInc()) { _queue.Remove(n); Find.ResearchManager.FinishProject(n.Research); } }
public void Prepend(ResearchNode node) { if (CantResearch(node)) { return; } UnsafeConcatFront(node.MissingPrerequisitesInc()); UpdateCurrentResearch(); }
public void Insert(ResearchNode node, int pos) { if (CantResearch(node)) { return; } pos = Math.Max(0, Math.Min(Count(), pos)); var idx = _queue.IndexOf(node); if (idx == pos) { return; } if (idx != -1) { DoMove(node, idx, pos); } else { UnsafeInsert(node.MissingPrerequisitesInc(), pos); } UpdateCurrentResearch(); }
private void UnsafeAppend(ResearchNode node) { UnsafeConcat(node.MissingPrerequisitesInc()); UpdateCurrentResearch(); }