Exemplo n.º 1
0
        public override void ExposeData()
        {
            base.ExposeData();

            Scribe_Deep.LookDeep(ref Bill, "Bill");

            // init main product, required by trigger.
            if (MainProduct == null)
            {
                MainProduct = new MainProductTracker(Bill.recipe);
            }

            Scribe_Deep.LookDeep(ref Trigger, "trigger", manager);
            Scribe_Values.LookValue(ref _hasMeaningfulIngredientChoices, "hasMeaningFulIngredientChoices", false);
            Scribe_Values.LookValue(ref _createIngredientBills, "createIngredientBills", true);

            // bill giver tracking is going to error out in cross-map import/export, so create a new one.
            if (Manager.LoadSaveMode == Manager.Modes.Normal)
            {
                Scribe_Deep.LookDeep(ref BillGivers, "BillGivers", this);
            }
            else
            {
                BillGivers = new BillGiverTracker(this);
            }
            Scribe_Values.LookValue(ref restrictToMaxSkill, "maxSkill", false);

            // scribe history in normal load/save only.
            if (Manager.LoadSaveMode == Manager.Modes.Normal)
            {
                Scribe_Deep.LookDeep(ref History, "History");
            }
        }
Exemplo n.º 2
0
        public ManagerJob_Production( RecipeDef recipe )
        {
            Bill = recipe.UsesUnfinishedThing ? new Bill_ProductionWithUft( recipe ) : new Bill_Production( recipe );
            _hasMeaningfulIngredientChoices = Dialog_CreateJobsForIngredients.HasPrerequisiteChoices( recipe );
            MainProduct = new MainProductTracker( Bill.recipe );
            Trigger = new Trigger_Threshold( this );
            BillGivers = new BillGiverTracker( this );

            History = new History( new[] { Trigger.ThresholdFilter.Summary } );
        }
Exemplo n.º 3
0
        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 override void ExposeData()
        {
            base.ExposeData();

            Scribe_Deep.LookDeep( ref Bill, "Bill" );
            Scribe_Values.LookValue( ref _hasMeaningfulIngredientChoices, "hasMeaningFulIngredientChoices", false );
            Scribe_Values.LookValue( ref _createIngredientBills, "createIngredientBills", true );

            // bill giver tracking is going to error out in cross-map import/export, so create a new one.
            if ( Manager.LoadSaveMode == Manager.Modes.Normal )
            {
                Scribe_Deep.LookDeep( ref BillGivers, "BillGivers", this );
            }
            else
            {
                BillGivers = new BillGiverTracker( this );
            }
            Scribe_Values.LookValue( ref restrictToMaxSkill, "maxSkill", false );

            // init main product, required by trigger.
            if ( MainProduct == null )
            {
                MainProduct = new MainProductTracker( Bill.recipe );
            }

            Scribe_Deep.LookDeep( ref Trigger, "Trigger", this );

            // scribe history in normal load/save only.
            if ( Manager.LoadSaveMode == Manager.Modes.Normal )
            {
                Scribe_Deep.LookDeep( ref History, "History" );
            }
        }