Changeset - r26189:e56b4eb55a99
[Not reviewed]
master
0 1 0
Patric Stout - 2 years ago 2022-03-11 15:18:09
truebrain@openttd.org
Fix: removing long roads doesn't prioritize refusal of local authority over other errors (#9831)
1 file changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -1113,8 +1113,14 @@ std::tuple<CommandCost, Money> CmdRemove
 
				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;
 
				}
 
			}
 
		}
 

	
0 comments (0 inline, 0 general)