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

Function tileHasWater

src/OpenLoco/src/GameCommands/Docks/CreatePort.cpp:399–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 };
398
399 static bool tileHasWater(World::Pos2 pos)
400 {
401 if (!World::validCoords(pos))
402 {
403 return false;
404 }
405 auto* elSurface = World::TileManager::get(pos).surface();
406 if (elSurface->water() == 0)
407 {
408 return false;
409 }
410 return true;
411 }
412
413 static currency32_t createPort(const PortPlacementArgs& args, const uint8_t flags)
414 {

Callers 1

createPortFunction · 0.85

Calls 4

validCoordsFunction · 0.85
surfaceMethod · 0.80
waterMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected