From cf8213ea827f38ae5d4b8ef16c396545e3e59657 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Fri, 12 Dec 2014 14:07:49 -0500 Subject: Add minetest.clear_registered_decorations() and clear_registered_ores() --- src/mg_decoration.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mg_decoration.h') diff --git a/src/mg_decoration.h b/src/mg_decoration.h index f360e3b76..dffb524f3 100644 --- a/src/mg_decoration.h +++ b/src/mg_decoration.h @@ -81,6 +81,7 @@ public: virtual size_t generate(Mapgen *mg, PseudoRandom *pr, s16 max_y, v3s16 p) = 0; virtual int getHeight() = 0; + virtual void dropResolverEntries(NodeResolver *resolver) {} }; class DecoSimple : public Decoration { @@ -96,6 +97,7 @@ public: bool canPlaceDecoration(ManualMapVoxelManipulator *vm, v3s16 p); virtual size_t generate(Mapgen *mg, PseudoRandom *pr, s16 max_y, v3s16 p); virtual int getHeight(); + virtual void dropResolverEntries(NodeResolver *resolver); }; class DecoSchematic : public Decoration { @@ -123,7 +125,7 @@ public: static const char *ELEMENT_TITLE; static const size_t ELEMENT_LIMIT = 0x10000; - DecorationManager(IGameDef *gamedef) {} + DecorationManager(IGameDef *gamedef); ~DecorationManager() {} Decoration *create(int type) @@ -140,6 +142,8 @@ public: } } + void clear(); + size_t placeAllDecos(Mapgen *mg, u32 seed, v3s16 nmin, v3s16 nmax); }; -- cgit v1.2.3