(svn r9350) [0.5] -Backport from trunk (r9105, r9115, r9117, r9146): 0.5
authorrubidium
Mon, 19 Mar 2007 20:23:27 +0000
branch0.5
changeset 5467 24a2a4d58223
parent 5466 85b7662d0342
child 5468 10836820b2bc
(svn r9350) [0.5] -Backport from trunk (r9105, r9115, r9117, r9146):
- Fix: disable the ability to make flooding water with the canal build tool. In the scenario editor you can still make both canals and flooding water at height level 0 (r9105)
- Fix: make clear in the tooltips when the canal build tool (in the scenario editor) makes flooding water (r9115)
- Fix: difficulty level button was not selected when opening the difficulty window (r9117)
- Fix: "Train is lost" message is generated incorrectly (r9146)
dock_gui.c
lang/english.txt
settings_gui.c
train_cmd.c
water_cmd.c
--- a/dock_gui.c	Mon Mar 19 20:17:24 2007 +0000
+++ b/dock_gui.c	Mon Mar 19 20:23:27 2007 +0000
@@ -160,7 +160,7 @@
 			if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
 				GUIPlaceProcDragXY(e);
 			} else if (e->we.place.userdata == VPM_X_OR_Y) {
-				DoCommandP(e->we.place.tile, e->we.place.starttile, _ctrl_pressed, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS));
+				DoCommandP(e->we.place.tile, e->we.place.starttile, 0, CcBuildCanal, CMD_BUILD_CANAL | CMD_AUTO | CMD_MSG(STR_CANT_BUILD_CANALS));
 			}
 		}
 		break;
--- a/lang/english.txt	Mon Mar 19 20:17:24 2007 +0000
+++ b/lang/english.txt	Mon Mar 19 20:23:27 2007 +0000
@@ -730,7 +730,7 @@
 STR_028D_PLACE_LIGHTHOUSE                                       :{BLACK}Place lighthouse
 STR_028E_PLACE_TRANSMITTER                                      :{BLACK}Place transmitter
 STR_028F_DEFINE_DESERT_AREA                                     :{BLACK}Define desert area.{}Press and hold CTRL to remove it
-STR_CREATE_LAKE                                                 :{BLACK}Define water area.{}It will flood its surroundings if at sea level
+STR_CREATE_LAKE                                                 :{BLACK}Define water area.{}Make a canal, unless CTRL is held down at sea level, when it will flood the surroundings instead
 STR_0290_DELETE                                                 :{BLACK}Delete
 STR_0291_DELETE_THIS_TOWN_COMPLETELY                            :{BLACK}Delete this town completely
 STR_0292_SAVE_SCENARIO                                          :Save scenario
@@ -1208,7 +1208,7 @@
 STR_TREES_RANDOM_TYPE_TIP                                       :{BLACK}Place trees of random type
 
 STR_CANT_BUILD_CANALS                                           :{WHITE}Can't build canals here...
-STR_BUILD_CANALS_TIP                                            :{BLACK}Build canals. Press CTRL to place sea tiles (at sea-level only.)
+STR_BUILD_CANALS_TIP                                            :{BLACK}Build canals.
 STR_LANDINFO_CANAL                                              :Canal
 
 STR_CANT_BUILD_LOCKS                                            :{WHITE}Can't build locks here...
--- a/settings_gui.c	Mon Mar 19 20:17:24 2007 +0000
+++ b/settings_gui.c	Mon Mar 19 20:23:27 2007 +0000
@@ -391,6 +391,7 @@
 		SetWindowWidgetDisabledState(w,  6, _game_mode == GM_NORMAL);
 		SetWindowWidgetDisabledState(w,  7, _game_mode == GM_EDITOR || _networking); // highscore chart in multiplayer
 		SetWindowWidgetDisabledState(w, 10, _networking && !_network_server); // Save-button in multiplayer (and if client)
+		LowerWindowWidget(w, _opt_mod_temp.diff_level + 3);
 
 		break;
 	case WE_PAINT: {
--- a/train_cmd.c	Mon Mar 19 20:17:24 2007 +0000
+++ b/train_cmd.c	Mon Mar 19 20:23:27 2007 +0000
@@ -2250,6 +2250,7 @@
 		 * approximation of where the station is */
 		// found station
 		ttfd->best_track = track;
+		ttfd->best_bird_dist = 0;
 		return true;
 	} else {
 		uint dist;
--- a/water_cmd.c	Mon Mar 19 20:17:24 2007 +0000
+++ b/water_cmd.c	Mon Mar 19 20:23:27 2007 +0000
@@ -203,7 +203,7 @@
 /** Build a piece of canal.
  * @param tile end tile of stretch-dragging
  * @param p1 start tile of stretch-dragging
- * @param p2 ctrl pressed - toggles ocean / canals at sealevel
+ * @param p2 ctrl pressed - toggles ocean / canals at sealevel (ocean only allowed in the scenario editor)
  */
 int32 CmdBuildCanal(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 {
@@ -214,6 +214,8 @@
 	int sx, sy;
 
 	if (p1 >= MapSize()) return CMD_ERROR;
+	/* Outside of the editor you can only build canals, not oceans */
+	if (HASBIT(p2, 0) && _game_mode != GM_EDITOR) return CMD_ERROR;
 
 	x = TileX(tile);
 	y = TileY(tile);