MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / TryFindTreeInList

Function TryFindTreeInList

src/openrct2/world/map_generator/TreePlacement.cpp:106–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105 template<typename T>
106 static bool TryFindTreeInList(std::string_view id, const T& treeList)
107 {
108 for (size_t j = 0; j < std::size(treeList); j++)
109 {
110 if (treeList[j] == id)
111 return true;
112 }
113 return false;
114 }
115
116 /**
117 * Randomly places a selection of preset trees on the map. Picks the right tree for the terrain it is placing it on.

Callers 1

placeTreesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected