Example #1
0
void load_hex_tiles(variant node)
{
    if(!get_hex_tile_map().empty()) {
        get_hex_tile_map().clear();
    }
    foreach(const variant& key, node.get_keys().as_list()) {
        std::string keys = key.as_string();
        get_hex_tile_map()[keys] = hex_tile_ptr(new hex_tile(keys, node[key]));
    }

    // get list of all tiles have non-empty "editor_info" blocks.
    if(!get_hex_editor_tiles().empty()) {
        get_hex_editor_tiles().clear();
    }
    load_editor_tiles();

    if(!get_editor_hex_tile_map().empty()) {
        get_editor_hex_tile_map().clear();
    }
    load_hex_editor_tiles();
}
Example #2
0
void init_tables(const variant& doc)
{
	foreach(const variant module, doc.get_keys().as_list()) {
		init_tables_for_module(module.as_string(), doc[module]);
	}
}