Default/nodes.lua: Add missing spaces, shorten lines
This commit is contained in:
parent
a0d7644a86
commit
908d8e5f90
@ -143,7 +143,9 @@ default:chest_locked
|
||||
default:bookshelf
|
||||
|
||||
default:sign_wall
|
||||
|
||||
default:ladder
|
||||
|
||||
default:fence_wood
|
||||
|
||||
default:glass
|
||||
@ -201,7 +203,6 @@ minetest.register_node("default:mossycobble", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:desert_stone", {
|
||||
description = "Desert Stone",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
@ -228,7 +229,6 @@ minetest.register_node("default:desert_stonebrick", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:sandstone", {
|
||||
description = "Sandstone",
|
||||
tiles = {"default_sandstone.png"},
|
||||
@ -245,7 +245,6 @@ minetest.register_node("default:sandstonebrick", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:obsidian", {
|
||||
description = "Obsidian",
|
||||
tiles = {"default_obsidian.png"},
|
||||
@ -337,7 +336,6 @@ minetest.register_node("default:desert_sand", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:gravel", {
|
||||
description = "Gravel",
|
||||
tiles = {"default_gravel.png"},
|
||||
@ -349,7 +347,6 @@ minetest.register_node("default:gravel", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:clay", {
|
||||
description = "Clay",
|
||||
tiles = {"default_clay.png"},
|
||||
@ -359,7 +356,6 @@ minetest.register_node("default:clay", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:snow", {
|
||||
description = "Snow",
|
||||
tiles = {"default_snow.png"},
|
||||
@ -388,7 +384,6 @@ minetest.register_node("default:snow", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:snowblock", {
|
||||
description = "Snow Block",
|
||||
tiles = {"default_snow.png"},
|
||||
@ -400,7 +395,6 @@ minetest.register_node("default:snowblock", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:ice", {
|
||||
description = "Ice",
|
||||
tiles = {"default_ice.png"},
|
||||
@ -447,7 +441,8 @@ minetest.register_node("default:sapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
@ -495,7 +490,8 @@ minetest.register_node("default:apple", {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||
},
|
||||
groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1},
|
||||
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
|
||||
leafdecay = 3, leafdecay_drop = 1},
|
||||
on_use = minetest.item_eat(2),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
@ -507,10 +503,10 @@ minetest.register_node("default:apple", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:jungletree", {
|
||||
description = "Jungle Tree",
|
||||
tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
|
||||
tiles = {"default_jungletree_top.png", "default_jungletree_top.png",
|
||||
"default_jungletree.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
@ -540,16 +536,8 @@ minetest.register_node("default:jungleleaves", {
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
-- player will get sapling with 1/20 chance
|
||||
items = {'default:junglesapling'},
|
||||
rarity = 20,
|
||||
},
|
||||
{
|
||||
-- player will get leaves only if he get no saplings,
|
||||
-- this is because max_items is 1
|
||||
items = {'default:jungleleaves'},
|
||||
}
|
||||
{items = {'default:junglesapling'}, rarity = 20},
|
||||
{items = {'default:jungleleaves'}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
@ -571,12 +559,12 @@ minetest.register_node("default:junglesapling", {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
|
||||
},
|
||||
groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:pine_tree", {
|
||||
description = "Pine Tree",
|
||||
tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
|
||||
@ -637,6 +625,7 @@ minetest.register_node("default:pine_sapling", {
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:acacia_tree", {
|
||||
description = "Acacia Tree",
|
||||
tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
|
||||
@ -717,7 +706,6 @@ minetest.register_node("default:coalblock", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:stone_with_iron", {
|
||||
description = "Iron Ore",
|
||||
tiles = {"default_stone.png^default_mineral_iron.png"},
|
||||
@ -735,7 +723,6 @@ minetest.register_node("default:steelblock", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:stone_with_copper", {
|
||||
description = "Copper Ore",
|
||||
tiles = {"default_stone.png^default_mineral_copper.png"},
|
||||
@ -761,7 +748,6 @@ minetest.register_node("default:bronzeblock", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:stone_with_mese", {
|
||||
description = "Mese Ore",
|
||||
tiles = {"default_stone.png^default_mineral_mese.png"},
|
||||
@ -782,8 +768,6 @@ minetest.register_node("default:mese", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:stone_with_gold", {
|
||||
description = "Gold Ore",
|
||||
tiles = {"default_stone.png^default_mineral_gold.png"},
|
||||
@ -801,7 +785,6 @@ minetest.register_node("default:goldblock", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:stone_with_diamond", {
|
||||
description = "Diamond Ore",
|
||||
tiles = {"default_stone.png^default_mineral_diamond.png"},
|
||||
@ -824,7 +807,8 @@ minetest.register_node("default:diamondblock", {
|
||||
|
||||
minetest.register_node("default:cactus", {
|
||||
description = "Cactus",
|
||||
tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
|
||||
tiles = {"default_cactus_top.png", "default_cactus_top.png",
|
||||
"default_cactus_side.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy = 1, choppy = 3, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -896,6 +880,7 @@ minetest.register_node("default:junglegrass", {
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:grass_1", {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
@ -919,7 +904,8 @@ minetest.register_node("default:grass_1", {
|
||||
-- place a random grass node
|
||||
local stack = ItemStack("default:grass_" .. math.random(1,5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
return ItemStack("default:grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -936,7 +922,8 @@ for i=2,5 do
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "default:grass_1",
|
||||
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
|
||||
groups = {snappy = 3, flammable = 3, flora = 1,
|
||||
attached_node = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
@ -945,6 +932,7 @@ for i=2,5 do
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("default:dry_grass_1", {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
@ -967,7 +955,8 @@ minetest.register_node("default:dry_grass_1", {
|
||||
-- place a random dry grass node
|
||||
local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:dry_grass_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
return ItemStack("default:dry_grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -983,7 +972,8 @@ for i=2,5 do
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
|
||||
groups = {snappy = 3, flammable = 3, flora = 1,
|
||||
attached_node = 1, not_in_creative_inventory=1},
|
||||
drop = "default:dry_grass_1",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
@ -1084,7 +1074,8 @@ minetest.register_node("default:water_flowing", {
|
||||
liquid_alternative_source = "default:water_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 120, r = 30, g = 60, b = 90},
|
||||
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
|
||||
@ -1178,11 +1169,11 @@ minetest.register_node("default:river_water_flowing", {
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 120, r = 30, g = 76, b = 90},
|
||||
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:lava_source", {
|
||||
description = "Lava Source",
|
||||
inventory_image = minetest.inventorycube("default_lava.png"),
|
||||
@ -1274,7 +1265,8 @@ minetest.register_node("default:lava_flowing", {
|
||||
liquid_renewable = false,
|
||||
damage_per_second = 4 * 2,
|
||||
post_effect_color = {a = 192, r = 255, g = 64, b = 0},
|
||||
groups = {lava=3, liquid=2, hot=3, igniter=1, not_in_creative_inventory=1},
|
||||
groups = {lava = 3, liquid = 2, hot = 3, igniter = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
--
|
||||
@ -1333,7 +1325,6 @@ minetest.register_node("default:torch", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
local chest_formspec =
|
||||
"size[8,9]" ..
|
||||
default.gui_bg ..
|
||||
@ -1391,7 +1382,8 @@ minetest.register_node("default:chest", {
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff in chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
@ -1405,8 +1397,6 @@ minetest.register_node("default:chest", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:chest_locked", {
|
||||
description = "Locked Chest",
|
||||
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
|
||||
@ -1435,7 +1425,8 @@ minetest.register_node("default:chest_locked", {
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
|
||||
end,
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if not has_locked_chest_privilege(meta, player) then
|
||||
return 0
|
||||
@ -1478,7 +1469,6 @@ minetest.register_node("default:chest_locked", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
local bookshelf_formspec =
|
||||
"size[8,7;]" ..
|
||||
default.gui_bg ..
|
||||
@ -1524,7 +1514,8 @@ minetest.register_node("default:bookshelf", {
|
||||
end
|
||||
end,
|
||||
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stack = inv:get_stack(from_list, from_index)
|
||||
@ -1539,7 +1530,8 @@ minetest.register_node("default:bookshelf", {
|
||||
end
|
||||
end,
|
||||
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
on_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff in bookshelf at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
@ -1554,7 +1546,6 @@ minetest.register_node("default:bookshelf", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:sign_wall", {
|
||||
description = "Sign",
|
||||
drawtype = "nodebox",
|
||||
@ -1590,13 +1581,14 @@ minetest.register_node("default:sign_wall", {
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
if not fields.text then return end
|
||||
minetest.log("action", (sender:get_player_name() or "").." wrote \""..fields.text..
|
||||
"\" to sign at "..minetest.pos_to_string(pos))
|
||||
minetest.log("action", (sender:get_player_name() or "") .. " wrote \"" ..
|
||||
fields.text .. "\" to sign at " .. minetest.pos_to_string(pos))
|
||||
meta:set_string("text", fields.text)
|
||||
meta:set_string("infotext", '"' .. fields.text .. '"')
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:ladder", {
|
||||
description = "Ladder",
|
||||
drawtype = "signlike",
|
||||
@ -1620,7 +1612,9 @@ minetest.register_node("default:ladder", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
local fence_texture = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
|
||||
|
||||
local fence_texture =
|
||||
"default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
|
||||
minetest.register_node("default:fence_wood", {
|
||||
description = "Wooden Fence",
|
||||
drawtype = "fencelike",
|
||||
@ -1639,7 +1633,6 @@ minetest.register_node("default:fence_wood", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:glass", {
|
||||
description = "Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
@ -1664,11 +1657,11 @@ minetest.register_node("default:obsidian_glass", {
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:rail", {
|
||||
description = "Rail",
|
||||
drawtype = "raillike",
|
||||
tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
|
||||
tiles = {"default_rail.png", "default_rail_curved.png",
|
||||
"default_rail_t_junction.png", "default_rail_crossing.png"},
|
||||
inventory_image = "default_rail.png",
|
||||
wield_image = "default_rail.png",
|
||||
paramtype = "light",
|
||||
@ -1680,11 +1673,11 @@ minetest.register_node("default:rail", {
|
||||
-- but how to specify the dimensions for curved and sideways rails?
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
groups = {bendy=2,dig_immediate=2,attached_node=1,connect_to_raillike=minetest.raillike_group("rail")},
|
||||
groups = {bendy = 2, dig_immediate = 2, attached_node = 1,
|
||||
connect_to_raillike = minetest.raillike_group("rail")},
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_node("default:brick", {
|
||||
description = "Brick Block",
|
||||
tiles = {"default_brick.png"},
|
||||
|
Loading…
Reference in New Issue
Block a user