equal
deleted
inserted
replaced
37 case WE_PAINT: |
37 case WE_PAINT: |
38 DrawWindowWidgets(w); |
38 DrawWindowWidgets(w); |
39 if (_thd.place_mode == 1 && _thd.window_class == WC_BUILD_INDUSTRY) { |
39 if (_thd.place_mode == 1 && _thd.window_class == WC_BUILD_INDUSTRY) { |
40 int ind_type = _build_industry_types[_opt_ptr->landscape][WP(w, def_d).data_1]; |
40 int ind_type = _build_industry_types[_opt_ptr->landscape][WP(w, def_d).data_1]; |
41 |
41 |
42 SetDParam(0, (_price.build_industry >> 8) * GetIndustrySpec(ind_type)->cost_multiplier); |
42 SetDParam(0, (_price.build_industry >> 8) * (_patches.raw_industry_construction == 1 ? GetIndustrySpec(ind_type)->raw_industry_cost_multiplier : GetIndustrySpec(ind_type)->cost_multiplier)); |
43 DrawStringCentered(85, w->height - 21, STR_482F_COST, 0); |
43 DrawStringCentered(85, w->height - 21, STR_482F_COST, 0); |
44 } |
44 } |
45 break; |
45 break; |
46 |
46 |
47 case WE_CLICK: { |
47 case WE_CLICK: { |
272 }; |
272 }; |
273 |
273 |
274 void ShowBuildIndustryWindow() |
274 void ShowBuildIndustryWindow() |
275 { |
275 { |
276 if (!IsValidPlayer(_current_player)) return; |
276 if (!IsValidPlayer(_current_player)) return; |
277 AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape], 0); |
277 AllocateWindowDescFront(_industry_window_desc[(_patches.raw_industry_construction == 0) ? 0 : 1][_opt_ptr->landscape], 0); |
278 } |
278 } |
279 |
279 |
280 static inline bool isProductionMinimum(const Industry *i, int pt) { |
280 static inline bool isProductionMinimum(const Industry *i, int pt) { |
281 return i->production_rate[pt] == 1; |
281 return i->production_rate[pt] == 1; |
282 } |
282 } |