minetest/src/script/cpp_api
Auke Kok e58a55aa82 Make plantlike drawtype more fun
Adds several new ways that the plantlike drawtype mesh can be changed.

This requires paramtype2 = "meshoptions" to be set in the node
definition. The drawtype for these nodes should be "plantlike".

These modifications are all done using param2. This field is now
a complex bitfield that allows some or more of the combinations to
be chosen, and the mesh draw code will choose the options based as
neeeded for each plantlike node.

bit layout:
bits 0, 1 and 2 (values 0x1 through 0x7) are for choosing the plant
mesh shape:
  0 - ordinary plantlike plant ("x" shaped)
  1 - ordinary plant, but rotated 45 degrees ("+" shaped)
  2 - a plant with 3 faces ("*" shaped)
  3 - a plant with 4 faces ("#" shaped)
  4 - a plant with 4 faces ("#" shaped, leaning outwards)
  5 through 7 are unused and reserved for future mesh shapes.

bit 3 (0x8) causes the plant to be randomly offset in the x,z
plane. The plant should fall within the 1x1x1 nodebox if regularly
sized.

bit 4 (0x10) causes the plant mesh to grow by sqrt(2), and will cause
the plant mesh to fill out 1x1x1, and appear slightly larger. Texture
makers will want to make their plant texture 23x16 pixels to have the
best visual fit in 1x1x1 size.

bit 5 (0x20) causes each face of the plant to have a slight negative
Y offset in position, descending up to 0.125 downwards into the node
below. Because this is per face, this causes the plant model to be
less symmetric.

bit 6 (0x40) through bit 7 (0x80) are unused and reserved for
future use.

!(https://youtu.be/qWuI664krsI)
2016-08-26 05:26:08 +01:00
..
CMakeLists.txt Add mod security 2015-05-16 18:32:31 -04:00
s_async.cpp Fix server crashing on Lua errors 2015-10-31 13:28:58 -04:00
s_async.h Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
s_base.cpp Fix C++11 compilability 2016-01-23 05:45:29 +01:00
s_base.h Add minetest.register_lbm() to run code on block load only 2016-03-07 19:54:26 +01:00
s_entity.cpp Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
s_entity.h Fix class/struct forward declaration inconsistencies (good on ya, MSVC) 2013-06-06 22:57:38 +02:00
s_env.cpp s_env.{cpp, h} cleanups 2016-03-07 19:54:26 +01:00
s_env.h s_env.{cpp, h} cleanups 2016-03-07 19:54:26 +01:00
s_internal.h Fix C++11 compilability 2016-01-23 05:45:29 +01:00
s_inventory.cpp Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
s_inventory.h Fix class/struct forward declaration inconsistencies (good on ya, MSVC) 2013-06-06 22:57:38 +02:00
s_item.cpp Add on_secondary_use when right clicking an item in the air 2015-12-02 02:18:44 +00:00
s_item.h Add on_secondary_use when right clicking an item in the air 2015-12-02 02:18:44 +00:00
s_mainmenu.cpp Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
s_mainmenu.h Optional reconnect functionality 2015-07-23 07:38:13 +02:00
s_node.cpp Make plantlike drawtype more fun 2016-08-26 05:26:08 +01:00
s_node.h Replace instances of std::map<std::string, std::string> with StringMap 2015-05-19 16:10:49 -04:00
s_nodemeta.cpp Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
s_nodemeta.h Fix class/struct forward declaration inconsistencies (good on ya, MSVC) 2013-06-06 22:57:38 +02:00
s_player.cpp Server: Add reason for leave to on_leaveplayer callbacks 2016-06-11 04:17:04 +01:00
s_player.h Server: Add reason for leave to on_leaveplayer callbacks 2016-06-11 04:17:04 +01:00
s_security.cpp couple of memory leaks fixes. 2016-08-10 16:59:32 +02:00
s_security.h Use LuaErrors in security check macros 2016-03-07 13:37:15 -05:00
s_server.cpp Push error handler afresh each time lua_pcall is used 2015-08-27 01:56:06 +02:00
s_server.h Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00