3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef CONTENT_MAPNODE_HEADER
21 #define CONTENT_MAPNODE_HEADER
26 Legacy node definitions
29 // Backwards compatibility for non-extended content types in v19
30 extern content_t trans_table_19[21][2];
31 MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
33 // Get legacy node name mapping for loading old blocks
35 void content_mapnode_get_name_id_mapping(NameIdMapping *nimap);
37 // Convert "CONTENT_STONE"-style names to dynamic ids
38 std::string content_mapnode_get_new_name(const std::string &oldname);
39 class INodeDefManager;
40 content_t legacy_get_id(const std::string &oldname, INodeDefManager *ndef);
41 #define LEGN(ndef, oldname) legacy_get_id(oldname, ndef)