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

pull/379/head
Patric Stout 2 years ago committed by GitHub
parent d220debc6c
commit 68ec2a7877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save