MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getStationEl

Function getStationEl

src/OpenLoco/src/GameCommands/Docks/RemovePort.cpp:18–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace OpenLoco::GameCommands
17{
18 static World::StationElement* getStationEl(const World::Pos3& pos)
19 {
20 auto tile = World::TileManager::get(pos);
21 for (auto& el : tile)
22 {
23 auto* stationEl = el.as<World::StationElement>();
24 if (stationEl == nullptr)
25 {
26 continue;
27 }
28
29 if (stationEl->baseHeight() == pos.z)
30 {
31 return stationEl;
32 }
33 }
34
35 return nullptr;
36 }
37
38 // 0x00494706
39 static bool removePortTileElements(const World::Pos3& pos, const uint8_t flags)

Callers 2

removePortTileElementsFunction · 0.70
removePortFunction · 0.70

Calls 2

baseHeightMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected