mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-13 02:52:37 +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);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user