1
0
Fork 0

(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)
release/0.5
rubidium 2007-03-19 20:23:27 +00:00
parent 6ad4716dc1
commit d2ce2009b5
5 changed files with 8 additions and 4 deletions

View File

@ -160,7 +160,7 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e)
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;

View File

@ -730,7 +730,7 @@ STR_028C_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place ro
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 :{BLACK}Trees of
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...

View File

@ -391,6 +391,7 @@ static void GameDifficultyWndProc(Window *w, WindowEvent *e)
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: {

View File

@ -2250,6 +2250,7 @@ static bool NtpCallbFindStation(TileIndex tile, TrainTrackFollowerData *ttfd, in
* approximation of where the station is */
// found station
ttfd->best_track = track;
ttfd->best_bird_dist = 0;
return true;
} else {
uint dist;

View File

@ -203,7 +203,7 @@ int32 CmdBuildLock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/** 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 @@ int32 CmdBuildCanal(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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);