-- post_effect_color = {a=0, r=0, g=0, b=0},
-- paramtype = "none",
-- is_ground_content = false,
--- light_propagates = false,
-- sunlight_propagates = false,
-- walkable = true,
-- pointable = true,
visual_scale = 1.3,
tile_images = {"default_junglegrass.png"},
inventory_image = "default_junglegrass.png",
- light_propagates = true,
paramtype = "light",
walkable = false,
material = minetest.digprop_leaveslike(1.0),
visual_scale = 1.3,
tile_images = {"default_leaves.png"},
inventory_image = minetest.inventorycube("default_leaves.png"),
- light_propagates = true,
paramtype = "light",
material = minetest.digprop_leaveslike(1.0),
extra_dug_item = 'node "sapling" 1',
drawtype = "plantlike",
tile_images = {"default_papyrus.png"},
inventory_image = "default_papyrus.png",
- light_propagates = true,
paramtype = "light",
is_ground_content = true,
walkable = false,
drawtype = "glasslike",
tile_images = {"default_glass.png"},
inventory_image = minetest.inventorycube("default_glass.png"),
- light_propagates = true,
paramtype = "light",
sunlight_propagates = true,
is_ground_content = true,
drawtype = "fencelike",
tile_images = {"default_wood.png"},
inventory_image = "default_fence.png",
- light_propagates = true,
paramtype = "light",
is_ground_content = true,
selection_box = {
drawtype = "raillike",
tile_images = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
inventory_image = "default_rail.png",
- light_propagates = true,
paramtype = "light",
is_ground_content = true,
walkable = false,
drawtype = "signlike",
tile_images = {"default_ladder.png"},
inventory_image = "default_ladder.png",
- light_propagates = true,
paramtype = "light",
is_ground_content = true,
wall_mounted = true,
alpha = WATER_ALPHA,
inventory_image = minetest.inventorycube("default_water.png"),
paramtype = "light",
- light_propagates = true,
walkable = false,
pointable = false,
diggable = false,
alpha = WATER_ALPHA,
inventory_image = minetest.inventorycube("default_water.png"),
paramtype = "light",
- light_propagates = true,
walkable = false,
pointable = false,
diggable = false,
tile_images = {"default_lava.png"},
inventory_image = minetest.inventorycube("default_lava.png"),
paramtype = "light",
- light_propagates = false,
light_source = LIGHT_MAX - 1,
walkable = false,
pointable = false,
tile_images = {"default_lava.png"},
inventory_image = minetest.inventorycube("default_lava.png"),
paramtype = "light",
- light_propagates = false,
light_source = LIGHT_MAX - 1,
walkable = false,
pointable = false,
tile_images = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"},
inventory_image = "default_torch_on_floor.png",
paramtype = "light",
- light_propagates = true,
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
tile_images = {"default_sign_wall.png"},
inventory_image = "default_sign_wall.png",
paramtype = "light",
- light_propagates = true,
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
tile_images = {"default_sapling.png"},
inventory_image = "default_sapling.png",
paramtype = "light",
- light_propagates = true,
walkable = false,
material = minetest.digprop_constanttime(0.0),
furnace_burntime = 10,
tile_images = {"default_apple.png"},
inventory_image = "default_apple.png",
paramtype = "light",
- light_propagates = true,
sunlight_propagates = true,
walkable = false,
dug_item = 'craft "apple" 1',
lua_setfield(L, table, fieldname);
}
+static void warn_if_field_exists(lua_State *L, int table,
+ const char *fieldname, const std::string &message)
+{
+ lua_getfield(L, table, fieldname);
+ if(!lua_isnil(L, -1)){
+ infostream<<script_get_backtrace(L)<<std::endl;
+ infostream<<"WARNING: field \""<<fieldname<<"\": "
+ <<message<<std::endl;
+ }
+ lua_pop(L, 1);
+}
+
/*
Inventory stuff
*/
// True for all ground-like things like stone and mud, false for eg. trees
getboolfield(L, nodedef_table, "is_ground_content", f.is_ground_content);
- getboolfield(L, nodedef_table, "light_propagates", f.light_propagates);
+ f.light_propagates = (f.param_type == CPT_LIGHT);
+ warn_if_field_exists(L, nodedef_table, "light_propagates",
+ "deprecated: determined from paramtype");
getboolfield(L, nodedef_table, "sunlight_propagates", f.sunlight_propagates);
// This is used for collision detection.
// Also for general solidness queries.