Update map loader to work with grid entities.

This commit is contained in:
Pieter-Jan Briers
2019-12-28 03:19:26 +01:00
parent 472bd67ace
commit cb563c75fd
10 changed files with 239 additions and 177 deletions

View File

@@ -37,10 +37,11 @@ Contains data for all the grids. The section is an ordered sequence. Each sequen
* `tilesize`: An integer representing the length of one side of a grid tile, in world units (meters).
* `chunksize`: An integer representing the tile dimensions of a chunk in this grid. Basically, when chunksize is `x`, a single chunk contains a square region of `x` by `x` tiles.
* `snapsize`: A float representing snap grid size.
* `worldpos`: Position in the world of this grid.
* `chunks`: A sequence containing the actual chunk data for this grid. See below.
Grids also have their **grid entity** serialized like regular entities.
### The `entities` Section
Contains data for all entities on the map. Just like grids these are stored in an indexed list, and an entity declaration is pretty much just like a prototype.