Changeset - r26607:9ef6fa47c216
[Not reviewed]
master
0 2 0
Tyler Trahan - 2 years ago 2022-11-23 22:48:19
tyler@tylertrahan.com
Change: Allow building canal by area outside editor (#10173)
2 files changed with 1 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/dock_gui.cpp
Show inline comments
 
@@ -192,7 +192,7 @@ struct BuildDocksToolbarWindow : Window 
 
	{
 
		switch (this->last_clicked_widget) {
 
			case WID_DT_CANAL: // Build canal button
 
				VpStartPlaceSizing(tile, (_game_mode == GM_EDITOR) ? VPM_X_AND_Y : VPM_X_OR_Y, DDSP_CREATE_WATER);
 
				VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_CREATE_WATER);
 
				break;
 

	
 
			case WID_DT_LOCK: // Build lock button
src/water_cmd.cpp
Show inline comments
 
@@ -443,12 +443,6 @@ CommandCost CmdBuildCanal(DoCommandFlag 
 
	/* Outside of the editor you can only build canals, not oceans */
 
	if (wc != WATER_CLASS_CANAL && _game_mode != GM_EDITOR) return CMD_ERROR;
 

	
 
	/* Outside the editor you can only drag canals, and not areas */
 
	if (_game_mode != GM_EDITOR) {
 
		TileArea ta(tile, start_tile);
 
		if (ta.w != 1 && ta.h != 1) return CMD_ERROR;
 
	}
 

	
 
	CommandCost cost(EXPENSES_CONSTRUCTION);
 

	
 
	std::unique_ptr<TileIterator> iter;
0 comments (0 inline, 0 general)