-- default (Minetest 0.4 mod) -- Most default stuff -- The API documentation in here was moved into doc/lua_api.txt WATER_ALPHA = 160 WATER_VISC = 1 LAVA_VISC = 7 LIGHT_MAX = 14 -- Definitions made by this mod that other mods can use too default = {} -- Load other files dofile(minetest.get_modpath("default").."/mapgen.lua") -- Set a noticeable inventory formspec for players minetest.register_on_joinplayer(function(player) local cb = function(player) minetest.chat_send_player(player:get_player_name(), "This is the [minimal] \"Minimal Development Test\" game. Use [minetest_game] for the real thing.") end minetest.after(2.0, cb, player) end) -- -- Tool definition -- -- The hand minetest.register_item(":", { type = "none", wield_image = "wieldhand.png", wield_scale = {x=1,y=1,z=2.5}, tool_capabilities = { full_punch_interval = 1.0, max_drop_level = 0, groupcaps = { fleshy = {times={[2]=2.00, [3]=1.00}, uses=0, maxlevel=1}, crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1}, snappy = {times={[3]=0.40}, uses=0, maxlevel=1}, oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40}, uses=0, maxlevel=3}, } } }) minetest.register_tool("default:pick_wood", { description = "Wooden Pickaxe", inventory_image = "default_tool_woodpick.png", tool_capabilities = { max_drop_level=0, groupcaps={ cracky={times={[2]=2.00, [3]=1.20}, uses=10, maxlevel=1} } }, }) minetest.register_tool("default:pick_stone", { description = "Stone Pickaxe", inventory_image = "default_tool_stonepick.png", tool_capabilities = { max_drop_level=0, groupcaps={ cracky={times={[1]=2.00, [2]=1.20, [3]=0.80}, uses=20, maxlevel=1} } }, }) minetest.register_tool("default:pick_steel", { description = "Steel Pickaxe", inventory_image = "default_tool_steelpick.png", tool_capabilities = { max_drop_level=1, groupcaps={ cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=10, maxlevel=2} } }, }) minetest.register_tool("default:pick_mese", { description = "Mese Pickaxe", inventory_image = "default_tool_mesepick.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=3, groupcaps={ cracky={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3}, crumbly={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3}, snappy={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3} } }, }) minetest.register_tool("default:shovel_wood", { description = "Wooden Shovel", inventory_image = "default_tool_woodshovel.png", tool_capabilities = { max_drop_level=0, groupcaps={ crumbly={times={[1]=2.00, [2]=0.80, [3]=0.50}, uses=10, maxlevel=1} } }, }) minetest.register_tool("default:shovel_stone", { description = "Stone Shovel", inventory_image = "default_tool_stoneshovel.png", tool_capabilities = { max_drop_level=0, groupcaps={ crumbly={times={[1]=1.20, [2]=0.50, [3]=0.30}, uses=20, maxlevel=1} } }, }) minetest.register_tool("default:shovel_steel", { description = "Steel Shovel", inventory_image = "default_tool_steelshovel.png", tool_capabilities = { max_drop_level=1, groupcaps={ crumbly={times={[1]=1.00, [2]=0.70, [3]=0.60}, uses=10, maxlevel=2} } }, }) minetest.register_tool("default:axe_wood", { description = "Wooden Axe", inventory_image = "default_tool_woodaxe.png", tool_capabilities = { max_drop_level=0, groupcaps={ choppy={times={[2]=1.40, [3]=0.80}, uses=10, maxlevel=1}, fleshy={times={[2]=1.50, [3]=0.80}, uses=10, maxlevel=1} } }, }) minetest.register_tool("default:axe_stone", { description = "Stone Axe", inventory_image = "default_tool_stoneaxe.png", tool_capabilities = { max_drop_level=0, groupcaps={ choppy={times={[1]=1.50, [2]=1.00, [3]=0.60}, uses=20, maxlevel=1}, fleshy={times={[2]=1.30, --- a/srclib/stdio.in.h 2011-08-07 15:42:06.000000000 +0200 +++ b/srclib/stdio.in.h 2015-06-10 09:27:58.129056262 +0200 @@ -695,8 +696,9 @@ _GL_CXXALIASWARN (gets); /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning. Assume it is always declared, since it is required by C89. */ -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); +/*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");*/ +#define gets(a) fgets( a, sizeof(*(a)), stdin) #endif #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@