Move files to subdirectories (#6599)
[oweals/minetest.git] / src / mapgen / mapgen_singlenode.h
1 /*
2 Minetest
3 Copyright (C) 2013-2015 celeron55, Perttu Ahola <celeron55@gmail.com>
4 Copyright (C) 2013-2016 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
5 Copyright (C) 2015-2017 paramat
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation; either version 2.1 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #pragma once
23
24 #include "mapgen.h"
25
26 struct MapgenSinglenodeParams : public MapgenParams
27 {
28         MapgenSinglenodeParams() = default;
29         ~MapgenSinglenodeParams() = default;
30
31         void readParams(const Settings *settings) {}
32         void writeParams(Settings *settings) const {}
33 };
34
35 class MapgenSinglenode : public Mapgen
36 {
37 public:
38         u32 flags;
39         content_t c_node;
40         u8 set_light;
41
42         MapgenSinglenode(int mapgenid, MapgenParams *params, EmergeManager *emerge);
43         ~MapgenSinglenode() = default;
44
45         virtual MapgenType getType() const { return MAPGEN_SINGLENODE; }
46
47         void makeChunk(BlockMakeData *data);
48         int getSpawnLevelAtPoint(v2s16 p);
49 };