public ManagerJob_Production(Manager manager, RecipeDef recipe) : base(manager) { Bill = recipe.UsesUnfinishedThing ? new Bill_ProductionWithUft(recipe) : new Bill_Production(recipe); _hasMeaningfulIngredientChoices = Dialog_CreateJobsForIngredients.HasPrerequisiteChoices(manager, recipe); MainProduct = new MainProductTracker(Bill.recipe); Trigger = new Trigger_Threshold(this); BillGivers = new BillGiverTracker(this); History = new History(new[] { Trigger.ThresholdFilter.Summary }); }
public void SetNewRecipe(RecipeDef newRecipe) { // clear currently assigned bills. CleanUp(); // set the bill on this job Bill = newRecipe.UsesUnfinishedThing ? new Bill_ProductionWithUft(newRecipe) : new Bill_Production(newRecipe); _hasMeaningfulIngredientChoices = Dialog_CreateJobsForIngredients.HasPrerequisiteChoices(manager, newRecipe); // mainproduct and trigger do not change. BillGivers = new BillGiverTracker(this); // set the last cache time so it gets updated. ForceRecacheOtherRecipe(); // null targets cache so it gets updated _targets = null; }