A port is a shore cell — land with at least one liquid neighbour — that
ships may enter and land units may embark from. It lives in the map's
per-cell metadata channel under PORT_KEY, so it serializes with the
map (binary, JSON, and .hexpack) and rides the editor's undo stack the
same way ownership and resources do: an editor writes it through
MapTransaction.setCellData(col, row, PORT_KEY, true); a game can use
setPort directly.
Which terrains count as liquid is the caller's to say — the same predicate
HexWorld.isWater or buildWaterTerrainSet gives you — because a lava
shore is not a harbour, and only the game knows which liquids float ships.
Port designation for naval movement.
A port is a shore cell — land with at least one liquid neighbour — that ships may enter and land units may embark from. It lives in the map's per-cell metadata channel under PORT_KEY, so it serializes with the map (binary, JSON, and
.hexpack) and rides the editor's undo stack the same way ownership and resources do: an editor writes it throughMapTransaction.setCellData(col, row, PORT_KEY, true); a game can use setPort directly.Which terrains count as liquid is the caller's to say — the same predicate
HexWorld.isWaterorbuildWaterTerrainSetgives you — because a lava shore is not a harbour, and only the game knows which liquids float ships.