Changeset - r26741:eceaf8782188
[Not reviewed]
master
0 1 0
Tyler Trahan - 17 months ago 2023-01-12 19:03:39
tyler@tylertrahan.com
Fix #10333, c53f29d: Only show industry prospecting errors to local company (#10338)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -2055,25 +2055,25 @@ CommandCost CmdBuildIndustry(DoCommandFl
 
					/* Start with a random layout */
 
					size_t layout = RandomRange((uint32)num_layouts);
 
					/* Check now each layout, starting with the random one */
 
					for (size_t j = 0; j < num_layouts; j++) {
 
						layout = (layout + 1) % num_layouts;
 
						ret = CreateNewIndustryHelper(tile, it, flags, indspec, layout, random_var8f, random_initial_bits, cur_company.GetOriginalValue(), _current_company == OWNER_DEITY ? IACT_RANDOMCREATION : IACT_PROSPECTCREATION, &ind);
 
						if (ret.Succeeded()) break;
 
					}
 
					if (ret.Succeeded()) break;
 
				}
 
				cur_company.Restore();
 
			}
 
			if (ret.Failed()) {
 
			if (ret.Failed() && IsLocalCompany()) {
 
				if (prospect_success) {
 
					ShowErrorMessage(STR_ERROR_CAN_T_PROSPECT_INDUSTRY, STR_ERROR_NO_SUITABLE_PLACES_FOR_PROSPECTING, WL_INFO);
 
				} else {
 
					ShowErrorMessage(STR_ERROR_CAN_T_PROSPECT_INDUSTRY, STR_ERROR_PROSPECTING_WAS_UNLUCKY, WL_INFO);
 
				}
 
			}
 
		}
 
	} else {
 
		size_t layout = first_layout;
 
		if (layout >= num_layouts) return CMD_ERROR;
 

	
 
		/* Check subsequently each layout, starting with the given layout in p1 */
0 comments (0 inline, 0 general)