17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-07 20:16:08 +01:00

Add a list of the terrain chunks to the editor

This commit is contained in:
2026-10-21 13:15:44 +02:00
parent 7d0f76aaa9
commit ae3e063df0
9 changed files with 579 additions and 19 deletions

View File

@@ -271,6 +271,8 @@ class pack_file
bool has(chunk_key const &Key) const;
// chunks the file holds
std::vector<chunk_key> chunks() const;
// the same, each with the cells along a side of the chunk, read from its header alone; 0 where the header can't be read
std::vector<std::pair<chunk_key, int>> chunk_cells() const;
// reads specified chunk. returns: the chunk, or null on failure
std::shared_ptr<chunk_data> read(chunk_key const &Key, std::string *Error = nullptr) const;
pack_key key() const { return m_key; }