Reads a Wesnoth-shaped .map file: key=value header lines (border_size=1, usage=map,
and anything else the file carries), then one comma-separated row of terrain codes per line.
The header is split off and kept, and the grid goes through the same parseTerrain an inline
[map] terrain= string does, so a cell is base^overlay exactly as it is there and a
<side> <code> token still marks that side's start.
A file with no header is a bare grid, and the header keys are not interpreted here: what
usage or border_size means to a game is the game's business, the same way this framework
leaves [terrain_graphics] rules to content.
Reads a Wesnoth-shaped
.mapfile:key=valueheader lines (border_size=1,usage=map, and anything else the file carries), then one comma-separated row of terrain codes per line. The header is split off and kept, and the grid goes through the sameparseTerrainan inline[map] terrain=string does, so a cell isbase^overlayexactly as it is there and a<side> <code>token still marks that side's start.A file with no header is a bare grid, and the header keys are not interpreted here: what
usageorborder_sizemeans to a game is the game's business, the same way this framework leaves[terrain_graphics]rules to content.