Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Allow locks under bridges #7200

Closed
wants to merge 1 commit into from

Conversation

@PeterN
Copy link
Member

PeterN commented Feb 9, 2019

WIP due to sprite ordering issues.

@PeterN PeterN added the wip label Feb 9, 2019
@@ -423,7 +423,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u

switch (GetTileType(tile)) {
case MP_WATER:
if (!IsWater(tile) && !IsCoast(tile)) goto not_valid_below;
if (!IsWater(tile) && !IsCoast(tile) && !IsLock(tile)) goto not_valid_below;

This comment has been minimized.

Copy link
@SamuXarick

SamuXarick Feb 20, 2019

Contributor
Suggested change
if (!IsWater(tile) && !IsCoast(tile) && !IsLock(tile)) goto not_valid_below;
if (!IsWater(tile) && !IsCoast(tile) && !IsLock(tile)) goto not_valid_below;
if (IsLock(tile) && GetLockPart(tile) == LOCK_PART_LOWER && GetTileMaxZ(tile) + 1 > z_start) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN);
@@ -286,10 +286,6 @@ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag
}
WaterClass wc_upper = IsWaterTile(tile + delta) ? GetWaterClass(tile + delta) : WATER_CLASS_CANAL;

if (IsBridgeAbove(tile) || IsBridgeAbove(tile - delta) || IsBridgeAbove(tile + delta)) {

This comment has been minimized.

Copy link
@SamuXarick

SamuXarick Feb 20, 2019

Contributor
if (IsBridgeAbove(tile - delta)) {
	int z_lower_bridge = GetBridgeHeight(GetNorthernBridgeEnd(tile - delta));
	if (z_lower_bridge <= GetTileMaxZ(tile - delta) + 1) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN);
}
@stale

This comment has been minimized.

Copy link

stale bot commented Mar 22, 2019

This pull request has been automatically marked as stale because it has not had any activity in the last month.
Please feel free to give a status update now, ping for review, or re-open when it's ready.
It will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

@stale stale bot added the stale label Mar 22, 2019
@stale stale bot closed this Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.