public Manager( Map map ) : base(map) { _stack = new JobStack(); ManagerTabs = new List<ManagerTab> { new ManagerTab_Overview( this ), new ManagerTab_Production( this ), new ManagerTab_ImportExport( this ), new ManagerTab_Hunting( this ), new ManagerTab_Forestry( this ), new ManagerTab_Livestock( this ), new ManagerTab_Foraging( this ) // Power is added by Manager.UnlockPowerTab() after the appropriate research is done. }; }
internal void NewJobStack( JobStack jobstack ) { // clean up old jobs foreach ( ManagerJob job in _stack.FullStack() ) { job.CleanUp(); } // replace stack _stack = jobstack; // touch new jobs in inappropriate places foreach ( ManagerJob job in _stack.FullStack() ) { job.Touch(); } }
public override void ExposeData() { base.ExposeData(); Scribe_Values.LookValue( ref HelpShown, "HelpShown", false); Scribe_Deep.LookDeep( ref _stack, "JobStack" ); foreach ( ManagerTab tab in ManagerTabs ) { IExposable exposableTab = tab as IExposable; if ( exposableTab != null ) { Scribe_Deep.LookDeep(ref exposableTab, tab.Label); } } if ( _stack == null ) { _stack = new JobStack(); } }
public Manager() { _stack = new JobStack(); }
internal void NewJobStack( JobStack jobstack ) { // clean up old jobs foreach ( ManagerJob job in _stack.FullStack() ) { job.CleanUp(); } // replace stack _stack = jobstack; // touch new jobs in inappropriate places (reset timing so they are properly performed) foreach ( ManagerJob job in _stack.FullStack() ) { job.Touch(); } }
private void DoExport( string name ) { try { try { Scribe.InitWriting( FilePath( name ), "ManagerJobs" ); } catch ( Exception ex ) { GenUI.ErrorDialog( "ProblemSavingFile".Translate( ex.ToString() ) ); throw; } ScribeHeaderUtility.WriteGameDataHeader(); _jobStackIO = Manager.Get.JobStack; Scribe_Deep.LookDeep( ref _jobStackIO, "JobStack" ); } catch ( Exception ex2 ) { Log.Error( "Exception while saving jobstack: " + ex2 ); } finally { Scribe.FinalizeWriting(); Messages.Message( "FM.JobsExported".Translate( _jobStackIO.FullStack().Count ), MessageSound.Standard ); Refresh(); } }
public override void ExposeData() { base.ExposeData(); // TODO: migrate HelpShown to HugsLib invisible setting. Scribe_Values.LookValue( ref HelpShown, "HelpShown", false ); Scribe_Deep.LookDeep( ref _stack, "JobStack" ); foreach ( ManagerTab tab in ManagerTabs ) { var exposableTab = tab as IExposable; if ( exposableTab != null ) { Scribe_Deep.LookDeep( ref exposableTab, tab.Label ); } } if ( _stack == null ) { _stack = new JobStack(); } }