MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetClimateMaskForLandscape

Function GetClimateMaskForLandscape

src/town_cmd.cpp:2366–2375  ·  view source on GitHub ↗

* Get the HouseZones climate mask for the current landscape type. * @return HouseZones climate mask. */

Source from the content-addressed store, hash-verified

2364 * @return HouseZones climate mask.
2365 */
2366HouseZones GetClimateMaskForLandscape()
2367{
2368 switch (_settings_game.game_creation.landscape) {
2369 case LandscapeType::Temperate: return HouseZone::ClimateTemperate;
2370 case LandscapeType::Arctic: return {HouseZone::ClimateSubarcticAboveSnow, HouseZone::ClimateSubarcticBelowSnow};
2371 case LandscapeType::Tropic: return HouseZone::ClimateSubtropic;
2372 case LandscapeType::Toyland: return HouseZone::ClimateToyland;
2373 default: NOT_REACHED();
2374 }
2375}
2376
2377/**
2378 * Create a random town somewhere in the world.

Callers 3

FinaliseHouseArrayFunction · 0.85
HousesCanAcceptMethod · 0.85
SetClimateMaskMethod · 0.85

Calls 1

NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected