src/tunnelbridge_cmd.cpp
branchnoai
changeset 10715 6bdf79ffb022
parent 10645 8cbdb511a674
child 10776 07203fc29812
--- a/src/tunnelbridge_cmd.cpp	Mon May 26 11:36:42 2008 +0000
+++ b/src/tunnelbridge_cmd.cpp	Mon May 26 13:52:59 2008 +0000
@@ -169,7 +169,7 @@
 	if (b->avail_year > _cur_year) return false;
 
 	max = b->max_length;
-	if (max >= 16 && _patches.longbridges) max = 100;
+	if (max >= 16 && _settings.construction.longbridges) max = 100;
 
 	return b->min_length <= bridge_len && bridge_len <= max;
 }
@@ -311,7 +311,7 @@
 	} else {
 		/* Build a new bridge. */
 
-		bool allow_on_slopes = _patches.build_on_slopes;
+		bool allow_on_slopes = _settings.construction.build_on_slopes;
 
 		/* Try and clear the start landscape */
 		ret = DoCommand(tile_start, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
@@ -576,7 +576,7 @@
 	/* Obviously if the bridge/tunnel belongs to us, or no-one, we can remove it */
 	if (CheckTileOwnership(tile) || IsTileOwner(tile, OWNER_NONE)) return true;
 	/* Otherwise we can only remove town-owned stuff with extra patch-settings, or cheat */
-	if (IsTileOwner(tile, OWNER_TOWN) && (_patches.extra_dynamite || _cheats.magic_bulldozer.value)) return true;
+	if (IsTileOwner(tile, OWNER_TOWN) && (_settings.construction.extra_dynamite || _cheats.magic_bulldozer.value)) return true;
 	return false;
 }
 
@@ -1123,7 +1123,7 @@
 
 			DrawGroundSpriteAt(image, pal, x, y, z);
 		}
-	} else if (_patches.bridge_pillars) {
+	} else if (_settings.gui.bridge_pillars) {
 		/* draw pillars below for high bridges */
 		DrawBridgePillars(psid, ti, axis, type, x, y, z);
 	}
@@ -1188,7 +1188,7 @@
 	} else { //so it must be a bridge
 		td->str = GetBridgeSpec(GetBridgeType(tile))->transport_name[GetTunnelBridgeTransportType(tile)];
 	}
-	td->owner = GetTileOwner(tile);
+	td->owner[0] = GetTileOwner(tile);
 }
 
 
@@ -1200,7 +1200,7 @@
 static void TileLoop_TunnelBridge(TileIndex tile)
 {
 	bool snow_or_desert = HasTunnelBridgeSnowOrDesert(tile);
-	switch (_opt.landscape) {
+	switch (_settings.game_creation.landscape) {
 		case LT_ARCTIC:
 			if (snow_or_desert != (GetTileZ(tile) > GetSnowLine())) {
 				SetTunnelBridgeSnowOrDesert(tile, !snow_or_desert);
@@ -1388,7 +1388,7 @@
 
 static CommandCost TerraformTile_TunnelBridge(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new)
 {
-	if (_patches.build_on_slopes && AutoslopeEnabled() && IsBridge(tile)) {
+	if (_settings.construction.build_on_slopes && AutoslopeEnabled() && IsBridge(tile)) {
 		DiagDirection direction = GetTunnelBridgeDirection(tile);
 		Axis axis = DiagDirToAxis(direction);
 		CommandCost res;