equal
deleted
inserted
replaced
373 return false; |
373 return false; |
374 } |
374 } |
375 |
375 |
376 void GenerateUnmovables() |
376 void GenerateUnmovables() |
377 { |
377 { |
378 if (_opt.landscape == LT_TOYLAND) return; |
378 if (_settings.game_creation.landscape == LT_TOYLAND) return; |
379 |
379 |
380 /* add radio tower */ |
380 /* add radio tower */ |
381 int radiotowser_to_build = ScaleByMapSize(15); // maximum number of radio towers on the map |
381 int radiotowser_to_build = ScaleByMapSize(15); // maximum number of radio towers on the map |
382 int lighthouses_to_build = _opt.landscape == LT_TROPIC ? 0 : ScaleByMapSize1D((Random() & 3) + 7); |
382 int lighthouses_to_build = _settings.game_creation.landscape == LT_TROPIC ? 0 : ScaleByMapSize1D((Random() & 3) + 7); |
383 SetGeneratingWorldProgress(GWP_UNMOVABLE, radiotowser_to_build + lighthouses_to_build); |
383 SetGeneratingWorldProgress(GWP_UNMOVABLE, radiotowser_to_build + lighthouses_to_build); |
384 |
384 |
385 for (uint i = ScaleByMapSize(1000); i != 0; i--) { |
385 for (uint i = ScaleByMapSize(1000); i != 0; i--) { |
386 TileIndex tile = RandomTile(); |
386 TileIndex tile = RandomTile(); |
387 |
387 |
393 IncreaseGeneratingWorldProgress(GWP_UNMOVABLE); |
393 IncreaseGeneratingWorldProgress(GWP_UNMOVABLE); |
394 if (--radiotowser_to_build == 0) break; |
394 if (--radiotowser_to_build == 0) break; |
395 } |
395 } |
396 } |
396 } |
397 |
397 |
398 if (_opt.landscape == LT_TROPIC) return; |
398 if (_settings.game_creation.landscape == LT_TROPIC) return; |
399 |
399 |
400 /* add lighthouses */ |
400 /* add lighthouses */ |
401 uint maxx = MapMaxX(); |
401 uint maxx = MapMaxX(); |
402 uint maxy = MapMaxY(); |
402 uint maxy = MapMaxY(); |
403 for (int loop_count = 0; loop_count < 1000 && lighthouses_to_build != 0; loop_count++) { |
403 for (int loop_count = 0; loop_count < 1000 && lighthouses_to_build != 0; loop_count++) { |