1
0
Fork 0

Fix: removing long roads doesn't prioritize refusal of local authority over other errors (#9831)

pull/9844/head
Patric Stout 2022-03-11 16:18:09 +01:00 committed by Patric Stout
parent b076369469
commit 9a20c47b42
1 changed files with 8 additions and 2 deletions

View File

@ -1137,8 +1137,14 @@ CommandCost CmdRemoveLongRoad(TileIndex start_tile, DoCommandFlag flags, uint32
cost.AddCost(ret); cost.AddCost(ret);
had_success = true; had_success = true;
} else { } else {
/* Ownership errors are more important. */ /* Some errors are more equal than others. */
if (last_error.GetErrorMessage() != STR_ERROR_OWNED_BY) last_error = ret; switch (last_error.GetErrorMessage()) {
case STR_ERROR_OWNED_BY:
case STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS:
break;
default:
last_error = ret;
}
} }
} }