From 2e69711613c18e1075f245d196823ea23675f027 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 6 Dec 2016 16:39:33 -0800 Subject: Simple deco: Allow setting param2 value on placement Schematics can already be placed with a param2 value, but not simple 1-node plant decorations of the simple type. This adds a `param2` field to the simple deco type that is checked to be between 0 and 255, and put to the placed node at mapgen. This can be used to put a degrotate value in, or e.g. a fill value for leveltype nodes, or a place_param2 value at mapgen placement, or vary the shape of meshoptions plantlike drawtype. --- src/mg_decoration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mg_decoration.cpp') diff --git a/src/mg_decoration.cpp b/src/mg_decoration.cpp index 92483abc3..51e4fbbcc 100644 --- a/src/mg_decoration.cpp +++ b/src/mg_decoration.cpp @@ -315,7 +315,7 @@ size_t DecoSimple::generate(MMVManip *vm, PcgRandom *pr, v3s16 p) !force_placement) break; - vm->m_data[vi] = MapNode(c_place); + vm->m_data[vi] = MapNode(c_place, 0, deco_param2); } return 1; -- cgit v1.2.3