3 Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
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 MG_DECORATION_HEADER
21 #define MG_DECORATION_HEADER
28 class ManualMapVoxelManipulator;
45 CutoffData(s16 x, s16 y, s16 z, s16 h) {
54 INodeDefManager *ndef;
57 std::vector<content_t> c_place_on;
63 //std::list<CutoffData> cutoffs;
64 //JMutex cutoff_mutex;
67 virtual ~Decoration();
69 void placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
70 void placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
72 virtual void generate(Mapgen *mg, PseudoRandom *pr, s16 max_y, v3s16 p) = 0;
73 virtual int getHeight() = 0;
74 virtual std::string getName() = 0;
77 class DecoSimple : public Decoration {
79 std::vector<content_t> c_decos;
80 std::vector<content_t> c_spawnby;
87 bool canPlaceDecoration(ManualMapVoxelManipulator *vm, v3s16 p);
88 virtual void generate(Mapgen *mg, PseudoRandom *pr, s16 max_y, v3s16 p);
89 virtual int getHeight();
90 virtual std::string getName();
94 class DecoLSystem : public Decoration {
96 virtual void generate(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
100 Decoration *createDecoration(DecorationType type);