2013-03-22 18:16:51 +01:00
|
|
|
/*
|
|
|
|
Minetest
|
|
|
|
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
|
|
|
|
|
|
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
|
|
|
|
2014-02-04 04:42:10 +01:00
|
|
|
void readParams(Settings *settings);
|
2013-03-22 18:16:51 +01:00
|
|
|
void writeParams(Settings *settings);
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
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
|