2013-03-22 18:16:51 +01:00
|
|
|
/*
|
|
|
|
Minetest
|
2018-01-15 03:26:15 +01:00
|
|
|
Copyright (C) 2013-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
|
|
Copyright (C) 2013-2018 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
|
|
|
|
Copyright (C) 2015-2018 paramat
|
2013-03-22 18:16:51 +01:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2017-08-17 22:19:39 +02:00
|
|
|
#pragma once
|
2013-03-22 18:16:51 +01:00
|
|
|
|
|
|
|
#include "mapgen.h"
|
|
|
|
|
2017-04-23 09:52:40 +02:00
|
|
|
struct MapgenSinglenodeParams : public MapgenParams
|
|
|
|
{
|
2017-08-18 18:18:25 +02:00
|
|
|
MapgenSinglenodeParams() = default;
|
|
|
|
~MapgenSinglenodeParams() = default;
|
2016-06-14 06:10:55 +02:00
|
|
|
|
2015-01-26 12:44:49 +01:00
|
|
|
void readParams(const Settings *settings) {}
|
|
|
|
void writeParams(Settings *settings) const {}
|
2013-03-22 18:16:51 +01:00
|
|
|
};
|
|
|
|
|
2017-04-23 09:52:40 +02:00
|
|
|
class MapgenSinglenode : public Mapgen
|
|
|
|
{
|
2013-03-22 18:16:51 +01:00
|
|
|
public:
|
2014-10-30 07:29:37 +01:00
|
|
|
content_t c_node;
|
2015-12-02 04:28:03 +01:00
|
|
|
u8 set_light;
|
2013-06-27 23:06:52 +02:00
|
|
|
|
2014-10-30 07:29:37 +01:00
|
|
|
MapgenSinglenode(int mapgenid, MapgenParams *params, EmergeManager *emerge);
|
2017-08-18 18:18:25 +02:00
|
|
|
~MapgenSinglenode() = default;
|
2016-06-14 06:10:55 +02:00
|
|
|
|
|
|
|
virtual MapgenType getType() const { return MAPGEN_SINGLENODE; }
|
|
|
|
|
2013-03-22 18:16:51 +01:00
|
|
|
void makeChunk(BlockMakeData *data);
|
2016-02-04 02:03:31 +01:00
|
|
|
int getSpawnLevelAtPoint(v2s16 p);
|
2013-03-22 18:16:51 +01:00
|
|
|
};
|