(svn r9656) [0.5] -Backport from trunk (r9602, r9641, r9647): 0.5
authorrubidium
Tue, 17 Apr 2007 18:09:12 +0000
branch0.5
changeset 5488 e867dfe2f2ef
parent 5487 c0eb58d67ce8
child 5489 c5bbd26deb50
(svn r9656) [0.5] -Backport from trunk (r9602, r9641, r9647):
- Fix: Building rail on steep slopes ignored build_on_slopes patch setting (r9602)
- Fix: namegen.cpp was not UTF-8, which caused artefacts in Finnish town names (r9641)
- Fix: Select "Custom" in the difficulty settings gui when changing a setting [FS#733] (r9647)
namegen.c
rail_cmd.c
settings_gui.c
--- a/namegen.c	Tue Apr 10 13:12:15 2007 +0000
+++ b/namegen.c	Tue Apr 17 18:09:12 2007 +0000
@@ -281,7 +281,7 @@
 	if (SeedChance(0, 15, seed) >= 10) {
 		strecat(buf, name_finnish_real[SeedChance(2, lengthof(name_finnish_real), seed)], last);
 	} else if (SeedChance(0, 15, seed) >= 5) {
-		// A two-part name by combining one of name_finnish_1 + "la"/"lä"
+		// A two-part name by combining one of name_finnish_1 + "la"/"lä"
 		// The reason for not having the contents of name_finnish_{1,2} in the same table is
 		// that the ones in name_finnish_2 are not good for this purpose.
 		uint sel = SeedChance( 0, lengthof(name_finnish_1), seed);
@@ -295,7 +295,7 @@
 		{
 			strecat(buf, "la", last);
 		} else {
-			strecat(buf, "lä", last);
+			strecat(buf, "lä", last);
 		}
 	} else {
 		// A two-part name by combining one of name_finnish_{1,2} + name_finnish_3.
--- a/rail_cmd.c	Tue Apr 10 13:12:15 2007 +0000
+++ b/rail_cmd.c	Tue Apr 17 18:09:12 2007 +0000
@@ -187,7 +187,7 @@
 static uint32 CheckRailSlope(Slope tileh, TrackBits rail_bits, TrackBits existing, TileIndex tile)
 {
 	if (IsSteepSlope(tileh)) {
-		if (existing == 0) {
+		if (_patches.build_on_slopes && existing == 0) {
 			TrackBits valid = TRACK_BIT_CROSS | (HASBIT(1 << SLOPE_STEEP_W | 1 << SLOPE_STEEP_E, tileh) ? TRACK_BIT_VERT : TRACK_BIT_HORZ);
 			if (valid & rail_bits) return _price.terraform;
 		}
--- a/settings_gui.c	Tue Apr 10 13:12:15 2007 +0000
+++ b/settings_gui.c	Tue Apr 17 18:09:12 2007 +0000
@@ -497,7 +497,9 @@
 
 			// save value in temporary variable
 			((int*)&_opt_mod_temp.diff)[btn] = val;
+			RaiseWindowWidget(w, _opt_mod_temp.diff_level + 3);
 			SetDifficultyLevel(3, &_opt_mod_temp); // set difficulty level to custom
+			LowerWindowWidget(w, _opt_mod_temp.diff_level + 3);
 			SetWindowDirty(w);
 		}	break;
 		case 3: case 4: case 5: case 6: /* Easy / Medium / Hard / Custom */