mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
Fix: removing long roads doesn't prioritize refusal of local authority over other errors (#9831)
This commit is contained in:
parent
d220debc6c
commit
68ec2a7877
@ -1113,8 +1113,14 @@ std::tuple<CommandCost, Money> CmdRemoveLongRoad(DoCommandFlag flags, TileIndex
|
||||
cost.AddCost(ret);
|
||||
had_success = true;
|
||||
} else {
|
||||
/* Ownership errors are more important. */
|
||||
if (last_error.GetErrorMessage() != STR_ERROR_OWNED_BY) last_error = ret;
|
||||
/* Some errors are more equal than others. */
|
||||
switch (last_error.GetErrorMessage()) {
|
||||
case STR_ERROR_OWNED_BY:
|
||||
case STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS:
|
||||
break;
|
||||
default:
|
||||
last_error = ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user