forked from MineClone5/MineClone5
[mcl_core] fix missing warnings
This commit is contained in:
parent
f9a86947e5
commit
b8488ce55e
|
@ -28,7 +28,6 @@ minetest.register_craftitem("mcl_core:coal_lump", {
|
||||||
description = S("Coal"),
|
description = S("Coal"),
|
||||||
_doc_items_longdesc = S("“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things."),
|
_doc_items_longdesc = S("“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things."),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
groups = { coal=1 },
|
|
||||||
inventory_image = "default_coal_lump.png",
|
inventory_image = "default_coal_lump.png",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { craftitem=1, coal=1 },
|
groups = { craftitem=1, coal=1 },
|
||||||
|
@ -38,7 +37,6 @@ minetest.register_craftitem("mcl_core:charcoal_lump", {
|
||||||
description = S("Charcoal"),
|
description = S("Charcoal"),
|
||||||
_doc_items_longdesc = S("Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks."),
|
_doc_items_longdesc = S("Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks."),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
groups = { coal=1 },
|
|
||||||
inventory_image = "mcl_core_charcoal.png",
|
inventory_image = "mcl_core_charcoal.png",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { craftitem=1, coal=1 },
|
groups = { craftitem=1, coal=1 },
|
||||||
|
|
|
@ -24,7 +24,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
for w=1, #water do
|
for w=1, #water do
|
||||||
local waternode = minetest.get_node(water[w])
|
local waternode = minetest.get_node(water[w])
|
||||||
local watertype = minetest.registered_nodes[waternode.name].liquidtype
|
--local watertype = minetest.registered_nodes[waternode.name].liquidtype
|
||||||
-- Lava on top of water: Water turns into stone
|
-- Lava on top of water: Water turns into stone
|
||||||
if water[w].y < pos.y and water[w].x == pos.x and water[w].z == pos.z then
|
if water[w].y < pos.y and water[w].x == pos.x and water[w].z == pos.z then
|
||||||
minetest.set_node(water[w], {name="mcl_core:stone"})
|
minetest.set_node(water[w], {name="mcl_core:stone"})
|
||||||
|
@ -336,13 +336,12 @@ end
|
||||||
-- oak tree.
|
-- oak tree.
|
||||||
function mcl_core.generate_tree(pos, tree_type, options)
|
function mcl_core.generate_tree(pos, tree_type, options)
|
||||||
pos.y = pos.y-1
|
pos.y = pos.y-1
|
||||||
local nodename = minetest.get_node(pos).name
|
--local nodename = minetest.get_node(pos).name
|
||||||
|
|
||||||
pos.y = pos.y+1
|
pos.y = pos.y+1
|
||||||
if not minetest.get_node_light(pos) then
|
if not minetest.get_node_light(pos) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local node
|
|
||||||
|
|
||||||
local two_by_two = options and options.two_by_two
|
local two_by_two = options and options.two_by_two
|
||||||
local balloon = options and options.balloon
|
local balloon = options and options.balloon
|
||||||
|
@ -390,7 +389,7 @@ end
|
||||||
function mcl_core.generate_v6_oak_tree(pos)
|
function mcl_core.generate_v6_oak_tree(pos)
|
||||||
local trunk = "mcl_core:tree"
|
local trunk = "mcl_core:tree"
|
||||||
local leaves = "mcl_core:leaves"
|
local leaves = "mcl_core:leaves"
|
||||||
local node = {name = ""}
|
local node
|
||||||
for dy=1,4 do
|
for dy=1,4 do
|
||||||
pos.y = pos.y+dy
|
pos.y = pos.y+dy
|
||||||
if minetest.get_node(pos).name ~= "air" then
|
if minetest.get_node(pos).name ~= "air" then
|
||||||
|
@ -409,10 +408,10 @@ function mcl_core.generate_v6_oak_tree(pos)
|
||||||
|
|
||||||
node = {name = leaves}
|
node = {name = leaves}
|
||||||
pos.y = pos.y+3
|
pos.y = pos.y+3
|
||||||
local rarity = 0
|
--[[local rarity = 0
|
||||||
if math.random(0, 10) == 3 then
|
if math.random(0, 10) == 3 then
|
||||||
rarity = 1
|
rarity = 1
|
||||||
end
|
end]]
|
||||||
for dx=-2,2 do
|
for dx=-2,2 do
|
||||||
for dz=-2,2 do
|
for dz=-2,2 do
|
||||||
for dy=0,3 do
|
for dy=0,3 do
|
||||||
|
@ -787,7 +786,6 @@ minetest.register_abm({
|
||||||
if pos == nil then
|
if pos == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local can_change = false
|
|
||||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||||
local abovenode = minetest.get_node(above)
|
local abovenode = minetest.get_node(above)
|
||||||
if minetest.get_item_group(abovenode.name, "liquid") ~= 0 or minetest.get_item_group(abovenode.name, "opaque") == 1 then
|
if minetest.get_item_group(abovenode.name, "liquid") ~= 0 or minetest.get_item_group(abovenode.name, "opaque") == 1 then
|
||||||
|
@ -1021,7 +1019,7 @@ local sapling_grow_action = function(tree_id, soil_needed, one_by_one, two_by_tw
|
||||||
if one_by_one and check_tree_growth(pos, tree_id) then
|
if one_by_one and check_tree_growth(pos, tree_id) then
|
||||||
-- Single sapling
|
-- Single sapling
|
||||||
minetest.set_node(pos, {name="air"})
|
minetest.set_node(pos, {name="air"})
|
||||||
local r = math.random(1, 12)
|
--local r = math.random(1, 12)
|
||||||
mcl_core.generate_tree(pos, tree_id)
|
mcl_core.generate_tree(pos, tree_id)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -1418,7 +1416,7 @@ minetest.register_abm({
|
||||||
for s=1, #surround do
|
for s=1, #surround do
|
||||||
local spos = vector.add(p0, surround[s])
|
local spos = vector.add(p0, surround[s])
|
||||||
local maybe_vine = minetest.get_node(spos)
|
local maybe_vine = minetest.get_node(spos)
|
||||||
local surround_inverse = vector.multiply(surround[s], -1)
|
--local surround_inverse = vector.multiply(surround[s], -1)
|
||||||
if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then
|
if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then
|
||||||
minetest.remove_node(spos)
|
minetest.remove_node(spos)
|
||||||
vinedecay_particles(spos, maybe_vine)
|
vinedecay_particles(spos, maybe_vine)
|
||||||
|
|
Loading…
Reference in New Issue