• R/O
  • SSH
  • HTTPS

freetrain-exav: Commit


Commit MetaInfo

Revisión114 (tree)
Tiempo2010-10-17 18:24:12
Autorriorio

Log Message

(empty log message)

Cambiar Resumen

Diferencia incremental

--- trunk/doc/release.txt (revision 113)
+++ trunk/doc/release.txt (revision 114)
@@ -33,6 +33,9 @@
3333 プラグインが足りない場合はエラーになる
3434
3535
36+【2.1.1.11 -> 2.1.1.12 変更箇所】
37+・破産時のメッセージ有無・加算額選択をオプション設定できるように機能追加
38+
3639 【2.1.1.10 -> 2.1.1.11 変更箇所】
3740 ・2.1.1.9でバグを発生させていたので修正
3841
--- trunk/core/AssemblyInfo.cs (revision 113)
+++ trunk/core/AssemblyInfo.cs (revision 114)
@@ -21,7 +21,7 @@
2121 // 下にあるように、'*' を使って、すべての値を指定するか、
2222 // ビルドおよびリビジョン番号を既定値にすることができます :
2323
24-[assembly: AssemblyVersion("2.1.1.11")]
24+[assembly: AssemblyVersion("2.1.1.12")]
2525
2626 //
2727 // アセンブリに署名するには、使用するキーを指定しなければなりません。
--- trunk/core/world/accounting/AccountManager.cs (revision 113)
+++ trunk/core/world/accounting/AccountManager.cs (revision 114)
@@ -64,10 +64,12 @@
6464
6565 private void transact( long delta, AccountGenre genre ) {
6666 _liquidAssets -= delta;
67- if( _liquidAssets < 0 ) {
67+ while( _liquidAssets < 0 ) {
6868 // TODO: go bunkrupt
69+ if( Core.options.bunkruptMessageFlag )
6970 MessageBox.Show( MainWindow.mainWindow, "破産しました。お金を増やして続行します" );
70- _liquidAssets += 10000000000;
71+
72+ _liquidAssets += Core.options.liquidPlusAtBunkrupt;
7173 }
7274 }
7375
--- trunk/core/framework/GlobalOptions.cs (revision 113)
+++ trunk/core/framework/GlobalOptions.cs (revision 114)
@@ -146,6 +146,31 @@
146146 }
147147 }
148148
149+ /// 破産時にメッセージボックスを表示するかしないか
150+ private bool _bunkruptmessageflag = true;
151+
152+ public bool bunkruptMessageFlag {
153+ get {
154+ return _bunkruptmessageflag;
155+ }
156+ set {
157+ _bunkruptmessageflag = value;
158+ }
159+ }
160+
161+ /// 破産時にプラスする資金額
162+
163+ private long _liquidplusatbunkrupt = 10000000000;
164+
165+ public long liquidPlusAtBunkrupt {
166+ get {
167+ return _liquidplusatbunkrupt;
168+ }
169+ set {
170+ _liquidplusatbunkrupt = value;
171+ }
172+ }
173+
149174 /// <summary>
150175 /// If false, draw trees.
151176 /// If true, speed up drawing by ignore drawing trees.
--- trunk/core/framework/ConfigDialog.cs (revision 113)
+++ trunk/core/framework/ConfigDialog.cs (revision 114)
@@ -39,6 +39,12 @@
3939 private Label stationFontSample;
4040
4141 private readonly GlobalOptions opts;
42+ private TabPage bunkruptTabPage;
43+ private Label label3;
44+ private CheckBox showMessageatBunkrupt;
45+ private RadioButton bunkruptplus3;
46+ private RadioButton bunkruptplus2;
47+ private RadioButton bunkruptplus1;
4248 private readonly FontOptions fntopt;
4349
4450 public ConfigDialog() : this(Core.options, Core.fontoptions) {}
@@ -72,6 +78,12 @@
7278 fontDialogTrain.Color = fopt.colorTrainNames;
7379 fontDialogTrain.Font = fopt.fontTrainNames;
7480 comboSurfaceAlloc.SelectedIndex = (int)opts.SurfaceAlloc;
81+
82+ showMessageatBunkrupt.Checked = opts.bunkruptMessageFlag;
83+
84+ if( opts.liquidPlusAtBunkrupt == 10000000000 ) bunkruptplus1.Checked = true;
85+ if( opts.liquidPlusAtBunkrupt == 100000000000 ) bunkruptplus2.Checked = true;
86+ if( opts.liquidPlusAtBunkrupt == 1000000000000 ) bunkruptplus3.Checked = true;
7587 }
7688
7789 protected override void Dispose( bool disposing ) {
@@ -106,19 +118,26 @@
106118 this.toolTip = new System.Windows.Forms.ToolTip(this.components);
107119 this.optionTabControl = new System.Windows.Forms.TabControl();
108120 this.tabPage1 = new System.Windows.Forms.TabPage();
121+ this.bunkruptTabPage = new System.Windows.Forms.TabPage();
109122 this.drawTrainNames = new System.Windows.Forms.CheckBox();
110123 this.drawElectlicPoles = new System.Windows.Forms.CheckBox();
111124 this.fontstabPage = new System.Windows.Forms.TabPage();
125+ this.trainFontSample = new System.Windows.Forms.Label();
126+ this.stationFontSample = new System.Windows.Forms.Label();
127+ this.fontselectTrain = new System.Windows.Forms.Button();
128+ this.fontselectStation = new System.Windows.Forms.Button();
112129 this.fontDialogStation = new System.Windows.Forms.FontDialog();
113130 this.fontDialogTrain = new System.Windows.Forms.FontDialog();
114- this.fontselectStation = new System.Windows.Forms.Button();
115- this.fontselectTrain = new System.Windows.Forms.Button();
116- this.stationFontSample = new System.Windows.Forms.Label();
117- this.trainFontSample = new System.Windows.Forms.Label();
131+ this.showMessageatBunkrupt = new System.Windows.Forms.CheckBox();
132+ this.label3 = new System.Windows.Forms.Label();
133+ this.bunkruptplus1 = new System.Windows.Forms.RadioButton();
134+ this.bunkruptplus2 = new System.Windows.Forms.RadioButton();
135+ this.bunkruptplus3 = new System.Windows.Forms.RadioButton();
118136 this.groupBox1.SuspendLayout();
119137 ((System.ComponentModel.ISupportInitialize)(this.msgStatusLength)).BeginInit();
120138 this.optionTabControl.SuspendLayout();
121139 this.tabPage1.SuspendLayout();
140+ this.bunkruptTabPage.SuspendLayout();
122141 this.fontstabPage.SuspendLayout();
123142 this.SuspendLayout();
124143 //
@@ -245,6 +264,7 @@
245264 // optionTabControl
246265 //
247266 this.optionTabControl.Controls.Add(this.tabPage1);
267+ this.optionTabControl.Controls.Add(this.bunkruptTabPage);
248268 this.optionTabControl.Controls.Add(this.fontstabPage);
249269 this.optionTabControl.Location = new System.Drawing.Point(6, 10);
250270 this.optionTabControl.Name = "optionTabControl";
@@ -298,75 +318,143 @@
298318 this.fontstabPage.Controls.Add(this.fontselectTrain);
299319 this.fontstabPage.Controls.Add(this.fontselectStation);
300320 this.fontstabPage.Location = new System.Drawing.Point(4, 21);
301- this.fontstabPage.Name = "fonts";
321+ this.fontstabPage.Name = "fontstabPage";
302322 this.fontstabPage.Padding = new System.Windows.Forms.Padding(3);
303323 this.fontstabPage.Size = new System.Drawing.Size(401, 202);
304- this.fontstabPage.TabIndex = 1;
324+ this.fontstabPage.TabIndex = 2;
305325 this.fontstabPage.Text = "フォント";
306326 this.fontstabPage.UseVisualStyleBackColor = true;
307327 //
328+ // trainFontSample
329+ //
330+ this.trainFontSample.BackColor = System.Drawing.Color.Black;
331+ this.trainFontSample.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
332+ this.trainFontSample.Location = new System.Drawing.Point(177, 81);
333+ this.trainFontSample.Name = "trainFontSample";
334+ this.trainFontSample.Size = new System.Drawing.Size(197, 60);
335+ this.trainFontSample.TabIndex = 3;
336+ this.trainFontSample.Text = "列車名サンプル";
337+ this.trainFontSample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
338+ //
339+ // stationFontSample
340+ //
341+ this.stationFontSample.BackColor = System.Drawing.Color.Black;
342+ this.stationFontSample.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
343+ this.stationFontSample.Location = new System.Drawing.Point(177, 9);
344+ this.stationFontSample.Name = "stationFontSample";
345+ this.stationFontSample.Size = new System.Drawing.Size(197, 60);
346+ this.stationFontSample.TabIndex = 2;
347+ this.stationFontSample.Text = "駅名サンプル";
348+ this.stationFontSample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
349+ //
350+ // fontselectTrain
351+ //
352+ this.fontselectTrain.Location = new System.Drawing.Point(16, 100);
353+ this.fontselectTrain.Name = "fontselectTrain";
354+ this.fontselectTrain.Size = new System.Drawing.Size(138, 23);
355+ this.fontselectTrain.TabIndex = 1;
356+ this.fontselectTrain.Text = "列車名フォント変更";
357+ this.fontselectTrain.UseVisualStyleBackColor = false;
358+ this.fontselectTrain.Click += new System.EventHandler(this.fontselectTrain_Click);
359+ //
360+ // fontselectStation
361+ //
362+ this.fontselectStation.Location = new System.Drawing.Point(16, 28);
363+ this.fontselectStation.Name = "fontselectStation";
364+ this.fontselectStation.Size = new System.Drawing.Size(138, 23);
365+ this.fontselectStation.TabIndex = 0;
366+ this.fontselectStation.Text = "駅名フォント変更";
367+ this.fontselectStation.UseVisualStyleBackColor = false;
368+ this.fontselectStation.Click += new System.EventHandler(this.fontselectStation_Click);
369+ //
308370 // fontDialogStation
309371 //
310372 this.fontDialogStation.AllowVerticalFonts = false;
311- this.fontDialogStation.Color = stationFontSample.ForeColor;
312- this.fontDialogStation.Font = stationFontSample.Font;
373+ this.fontDialogStation.Color = this.stationFontSample.ForeColor;
374+ this.fontDialogStation.Font = this.stationFontSample.Font;
313375 this.fontDialogStation.FontMustExist = true;
314- this.fontDialogStation.ShowColor = true;
315376 this.fontDialogStation.MaxSize = 16;
316377 this.fontDialogStation.MinSize = 8;
378+ this.fontDialogStation.ShowColor = true;
317379 //
318380 // fontDialogTrain
319381 //
320382 this.fontDialogTrain.AllowVerticalFonts = false;
321- this.fontDialogTrain.Color = trainFontSample.ForeColor;
322- this.fontDialogTrain.Font = trainFontSample.Font;
383+ this.fontDialogTrain.Color = this.trainFontSample.ForeColor;
384+ this.fontDialogTrain.Font = this.trainFontSample.Font;
323385 this.fontDialogTrain.FontMustExist = true;
324- this.fontDialogTrain.ShowColor = true;
325386 this.fontDialogTrain.MaxSize = 16;
326387 this.fontDialogTrain.MinSize = 8;
388+ this.fontDialogTrain.ShowColor = true;
327389 //
328- // fontselectStation
390+ // bunkruptTabPage
329391 //
330- this.fontselectStation.Location = new System.Drawing.Point(16, 28);
331- this.fontselectStation.Name = "fontselectStation";
332- this.fontselectStation.Size = new System.Drawing.Size(138, 23);
333- this.fontselectStation.TabIndex = 0;
334- this.fontselectStation.Text = "駅名フォント変更";
335- this.fontselectStation.UseVisualStyleBackColor = false;
336- this.fontselectStation.Click += new System.EventHandler(fontselectStation_Click);
392+ this.bunkruptTabPage.Controls.Add(this.bunkruptplus3);
393+ this.bunkruptTabPage.Controls.Add(this.bunkruptplus2);
394+ this.bunkruptTabPage.Controls.Add(this.bunkruptplus1);
395+ this.bunkruptTabPage.Controls.Add(this.label3);
396+ this.bunkruptTabPage.Controls.Add(this.showMessageatBunkrupt);
397+ this.bunkruptTabPage.Location = new System.Drawing.Point(4, 21);
398+ this.bunkruptTabPage.Name = "bunkruptTabPage";
399+ this.bunkruptTabPage.Padding = new System.Windows.Forms.Padding(3);
400+ this.bunkruptTabPage.Size = new System.Drawing.Size(401, 202);
401+ this.bunkruptTabPage.TabIndex = 1;
402+ this.bunkruptTabPage.Text = "破産";
403+ this.bunkruptTabPage.UseVisualStyleBackColor = true;
337404 //
338- // fontselectTrain
405+ // showMessageatBunkrupt
339406 //
340- this.fontselectTrain.Location = new System.Drawing.Point(16, 100);
341- this.fontselectTrain.Name = "fontselectTrain";
342- this.fontselectTrain.Size = new System.Drawing.Size(138, 23);
343- this.fontselectTrain.TabIndex = 1;
344- this.fontselectTrain.Text = "列車名フォント変更";
345- this.fontselectTrain.UseVisualStyleBackColor = false;
346- this.fontselectTrain.Click += new System.EventHandler(fontselectTrain_Click);
407+ this.showMessageatBunkrupt.AutoSize = true;
408+ this.showMessageatBunkrupt.Checked = true;
409+ this.showMessageatBunkrupt.CheckState = System.Windows.Forms.CheckState.Checked;
410+ this.showMessageatBunkrupt.Location = new System.Drawing.Point(7, 17);
411+ this.showMessageatBunkrupt.Name = "showMessageatBunkrupt";
412+ this.showMessageatBunkrupt.Size = new System.Drawing.Size(166, 16);
413+ this.showMessageatBunkrupt.TabIndex = 0;
414+ this.showMessageatBunkrupt.Text = "破産時にメッセージを表示する";
415+ this.showMessageatBunkrupt.UseVisualStyleBackColor = true;
347416 //
348- // stationFontSample
417+ // label3
349418 //
350- this.stationFontSample.BackColor = System.Drawing.Color.Black;
351- this.stationFontSample.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
352- this.stationFontSample.Location = new System.Drawing.Point(177, 9);
353- this.stationFontSample.Name = "stationFontSample";
354- this.stationFontSample.Size = new System.Drawing.Size(197, 60);
355- this.stationFontSample.TabIndex = 2;
356- this.stationFontSample.Text = "駅名サンプル";
357- this.stationFontSample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
419+ this.label3.AutoSize = true;
420+ this.label3.Location = new System.Drawing.Point(7, 56);
421+ this.label3.Name = "label3";
422+ this.label3.Size = new System.Drawing.Size(153, 12);
423+ this.label3.TabIndex = 1;
424+ this.label3.Text = "破産時に自動復活する資金額";
358425 //
359- // trainFontSample
426+ // bunkruptplus1
360427 //
361- this.trainFontSample.BackColor = System.Drawing.Color.Black;
362- this.trainFontSample.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
363- this.trainFontSample.Location = new System.Drawing.Point(177, 81);
364- this.trainFontSample.Name = "trainFontSample";
365- this.trainFontSample.Size = new System.Drawing.Size(197, 60);
366- this.trainFontSample.TabIndex = 3;
367- this.trainFontSample.Text = "列車名サンプル";
368- this.trainFontSample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
428+ this.bunkruptplus1.AutoSize = true;
429+ this.bunkruptplus1.Checked = true;
430+ this.bunkruptplus1.Location = new System.Drawing.Point(7, 72);
431+ this.bunkruptplus1.Name = "bunkruptplus1";
432+ this.bunkruptplus1.Size = new System.Drawing.Size(69, 16);
433+ this.bunkruptplus1.TabIndex = 2;
434+ this.bunkruptplus1.TabStop = true;
435+ this.bunkruptplus1.Text = "10,000,000,000";
436+ this.bunkruptplus1.UseVisualStyleBackColor = true;
369437 //
438+ // bunkruptplus2
439+ //
440+ this.bunkruptplus2.AutoSize = true;
441+ this.bunkruptplus2.Location = new System.Drawing.Point(7, 95);
442+ this.bunkruptplus2.Name = "bunkruptplus2";
443+ this.bunkruptplus2.Size = new System.Drawing.Size(75, 16);
444+ this.bunkruptplus2.TabIndex = 3;
445+ this.bunkruptplus2.Text = "100,000,000,000";
446+ this.bunkruptplus2.UseVisualStyleBackColor = true;
447+ //
448+ // bunkruptplus3
449+ //
450+ this.bunkruptplus3.AutoSize = true;
451+ this.bunkruptplus3.Location = new System.Drawing.Point(7, 117);
452+ this.bunkruptplus3.Name = "bunkruptplus3";
453+ this.bunkruptplus3.Size = new System.Drawing.Size(81, 16);
454+ this.bunkruptplus3.TabIndex = 4;
455+ this.bunkruptplus3.Text = "1,000,000,000,000";
456+ this.bunkruptplus3.UseVisualStyleBackColor = true;
457+ //
370458 // ConfigDialog
371459 //
372460 this.AcceptButton = this.buttonOK;
@@ -390,6 +478,8 @@
390478 this.tabPage1.ResumeLayout(false);
391479 this.tabPage1.PerformLayout();
392480 this.fontstabPage.ResumeLayout(false);
481+ this.bunkruptTabPage.ResumeLayout(false);
482+ this.bunkruptTabPage.PerformLayout();
393483 this.ResumeLayout(false);
394484
395485 }
@@ -425,6 +515,12 @@
425515 opts.hideTrees = hideTrees.Checked;
426516 opts.SurfaceAlloc = (DDSurfaceAllocation)comboSurfaceAlloc.SelectedIndex;
427517
518+ opts.bunkruptMessageFlag = showMessageatBunkrupt.Checked;
519+
520+ if( bunkruptplus1.Checked ) opts.liquidPlusAtBunkrupt = 10000000000;
521+ if( bunkruptplus2.Checked ) opts.liquidPlusAtBunkrupt = 100000000000;
522+ if( bunkruptplus3.Checked ) opts.liquidPlusAtBunkrupt = 1000000000000;
523+
428524 fntopt.fontStationNames = stationFontSample.Font;
429525 fntopt.colorStationNames = stationFontSample.ForeColor;
430526 fntopt.fontTrainNames = trainFontSample.Font;
Show on old repository browser