2013-03-22 18:16:51 +01:00
|
|
|
/*
|
|
|
|
Minetest
|
2015-10-08 06:17:25 +02:00
|
|
|
Copyright (C) 2010-2015 celeron55, Perttu Ahola <celeron55@gmail.com>
|
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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MAPGEN_SINGLENODE_HEADER
|
|
|
|
#define MAPGEN_SINGLENODE_HEADER
|
|
|
|
|
|
|
|
#include "mapgen.h"
|
|
|
|
|
2014-02-04 04:42:10 +01:00
|
|
|
struct MapgenSinglenodeParams : public MapgenSpecificParams {
|
2013-03-22 18:16:51 +01:00
|
|
|
|
2013-05-19 05:26:27 +02:00
|
|
|
MapgenSinglenodeParams() {}
|
|
|
|
~MapgenSinglenodeParams() {}
|
2013-03-22 18:16:51 +01: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
|
|
|
};
|
|
|
|
|
|
|
|
class MapgenSinglenode : public Mapgen {
|
|
|
|
public:
|
2013-06-27 23:06:52 +02:00
|
|
|
u32 flags;
|
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);
|
2013-03-22 18:16:51 +01:00
|
|
|
~MapgenSinglenode();
|
|
|
|
|
|
|
|
void makeChunk(BlockMakeData *data);
|
|
|
|
int getGroundLevelAtPoint(v2s16 p);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct MapgenFactorySinglenode : public MapgenFactory {
|
|
|
|
Mapgen *createMapgen(int mgid, MapgenParams *params, EmergeManager *emerge) {
|
2014-10-30 07:29:37 +01:00
|
|
|
return new MapgenSinglenode(mgid, params, emerge);
|
2013-03-22 18:16:51 +01:00
|
|
|
};
|
|
|
|
|
2014-02-04 04:42:10 +01:00
|
|
|
MapgenSpecificParams *createMapgenParams() {
|
2013-03-22 18:16:51 +01:00
|
|
|
return new MapgenSinglenodeParams();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|