ソースフォージにも上がっていた要望「発展アルゴリズム無効」モードを実装してみました。 Index: GlobalOptions.cs =================================================================== RCS file: /cvsroot/freetrain/FreeTrain/core/framework/GlobalOptions.cs,v retrieving revision 1.6 diff -u -r1.6 GlobalOptions.cs --- GlobalOptions.cs 30 Dec 2002 17:10:40 -0000 1.6 +++ GlobalOptions.cs 14 Jul 2003 15:37:57 -0000 @@ -57,7 +57,14 @@ } } - public new GlobalOptions load() { + /// <summary> + /// If false, cpu build lands and structures as population grows up. + /// If true, cpu never build any structures. + /// </summary> + public bool invalidateDevelopment = false; + + public new GlobalOptions load() + { return (GlobalOptions)base.load(); } Index: ConfigDialog.cs =================================================================== RCS file: /cvsroot/freetrain/FreeTrain/core/framework/ConfigDialog.cs,v retrieving revision 1.4 diff -u -r1.4 ConfigDialog.cs --- ConfigDialog.cs 25 Dec 2002 02:02:42 -0000 1.4 +++ ConfigDialog.cs 14 Jul 2003 15:37:58 -0000 @@ -20,6 +20,7 @@ private System.Windows.Forms.TrackBar msgStatusLength; private System.Windows.Forms.CheckBox drawStationNames; private System.Windows.Forms.CheckBox showBoundingBox; + private System.Windows.Forms.CheckBox invalidateDevelopment; private readonly GlobalOptions opts; @@ -34,6 +35,7 @@ msgStatusLength.Value = opts.messageDisplayTime; drawStationNames.Checked = opts.drawStationNames; showBoundingBox.Checked = opts.drawBoundingBox; + invalidateDevelopment.Checked = opts.invalidateDevelopment; } protected override void Dispose( bool disposing ) { @@ -59,6 +61,7 @@ this.radioMsgBox = new System.Windows.Forms.RadioButton(); this.drawStationNames = new System.Windows.Forms.CheckBox(); this.showBoundingBox = new System.Windows.Forms.CheckBox(); + this.invalidateDevelopment = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.msgStatusLength)).BeginInit(); this.SuspendLayout(); @@ -110,7 +113,7 @@ this.msgStatusLength.Location = new System.Drawing.Point(160, 32); this.msgStatusLength.Minimum = 1; this.msgStatusLength.Name = "msgStatusLength"; - this.msgStatusLength.Size = new System.Drawing.Size(224, 45); + this.msgStatusLength.Size = new System.Drawing.Size(224, 42); this.msgStatusLength.TabIndex = 2; this.msgStatusLength.Value = 1; // @@ -152,6 +155,15 @@ this.showBoundingBox.TabIndex = 4; this.showBoundingBox.Text = "描画範囲を表示(デバッグ)"; // + // invalidateDevelopment + // + this.invalidateDevelopment.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.invalidateDevelopment.Location = new System.Drawing.Point(24, 152); + this.invalidateDevelopment.Name = "invalidateDevelopment"; + this.invalidateDevelopment.Size = new System.Drawing.Size(168, 16); + this.invalidateDevelopment.TabIndex = 4; + this.invalidateDevelopment.Text = "発展アルゴリズムを無効化"; + // // ConfigDialog // this.AcceptButton = this.buttonOK; @@ -163,7 +175,8 @@ this.drawStationNames, this.groupBox1, this.buttonCancel, - this.buttonOK}); + this.buttonOK, + this.invalidateDevelopment}); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; @@ -187,6 +200,7 @@ opts.messageDisplayTime = msgStatusLength.Value; opts.drawStationNames = drawStationNames.Checked; opts.drawBoundingBox = showBoundingBox.Checked; + opts.invalidateDevelopment = invalidateDevelopment.Checked; opts.save(); Close(); } Index: DevelopmentAlgorithm.cs =================================================================== RCS file: /cvsroot/freetrain/FreeTrain/core/world/development/DevelopmentAlgorithm.cs,v retrieving revision 1.14 diff -u -r1.14 DevelopmentAlgorithm.cs --- DevelopmentAlgorithm.cs 27 Mar 2003 01:56:14 -0000 1.14 +++ DevelopmentAlgorithm.cs 14 Jul 2003 15:41:54 -0000 @@ -25,6 +25,8 @@ /// Run the development algorithm. /// </summary> public static void handleClock() { + if( Core.options.invalidateDevelopment ) + return; DateTime start = DateTime.Now; new DevelopmentAlgorithm().doClock(); double d = (DateTime.Now - start).TotalMilliseconds; *****CVS はコード 1 で終了しました***** _______________________________________________ FreeTrain-general mailing list FreeTrain-general@lists.sourceforge.jp http://lists.sourceforge.jp/mailman/listinfo/freetrain-general