[mcl_core] fix warnings

This commit is contained in:
AFCMS 2021-05-23 00:09:07 +02:00
parent 30e83088d4
commit f9a86947e5
6 changed files with 13 additions and 14 deletions

View File

@ -990,9 +990,8 @@ for i=1,8 do
local itemcount = itemstack:get_count() local itemcount = itemstack:get_count()
local fakestack = ItemStack(itemstring.." "..itemcount) local fakestack = ItemStack(itemstring.." "..itemcount)
fakestack:set_name("mcl_core:snow_"..math.min(8, (i+g))) fakestack:set_name("mcl_core:snow_"..math.min(8, (i+g)))
local success itemstack = minetest.item_place(fakestack, placer, pointed_thing)
itemstack, success = minetest.item_place(fakestack, placer, pointed_thing) minetest.sound_play(mcl_sounds.node_sound_snow_defaults().place, {pos = pointed_thing.under}, true)
minetest.sound_play(mcl_sounds.node_sound_snow_defaults().place, {pos = below}, true)
itemstack:set_name(itemstring) itemstack:set_name(itemstring)
return itemstack return itemstack
end end

View File

@ -120,7 +120,6 @@ minetest.register_node("mcl_core:vine", {
local node = minetest.get_node(under) local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name] local def = minetest.registered_nodes[node.name]
if not def then return itemstack end if not def then return itemstack end
local groups = def.groups
-- Check special rightclick action of pointed node -- Check special rightclick action of pointed node
if def and def.on_rightclick then if def and def.on_rightclick then

View File

@ -3,7 +3,10 @@
local S = minetest.get_translator("mcl_core") local S = minetest.get_translator("mcl_core")
local N = function(s) return s end local N = function(s) return s end
local WATER_ALPHA = 179 local vector = vector
local math = math
--local WATER_ALPHA = 179
local WATER_VISC = 1 local WATER_VISC = 1
local LAVA_VISC = 7 local LAVA_VISC = 7
local LIGHT_LAVA = minetest.LIGHT_MAX local LIGHT_LAVA = minetest.LIGHT_MAX
@ -215,7 +218,7 @@ local emit_lava_particle = function(pos)
return return
end end
local ppos = vector.add(pos, { x = math.random(-7, 7)/16, y = 0.45, z = math.random(-7, 7)/16}) local ppos = vector.add(pos, { x = math.random(-7, 7)/16, y = 0.45, z = math.random(-7, 7)/16})
local spos = vector.add(ppos, { x = 0, y = -0.2, z = 0 }) --local spos = vector.add(ppos, { x = 0, y = -0.2, z = 0 })
local vel = { x = math.random(-3, 3)/10, y = math.random(4, 7), z = math.random(-3, 3)/10 } local vel = { x = math.random(-3, 3)/10, y = math.random(4, 7), z = math.random(-3, 3)/10 }
local acc = { x = 0, y = -9.81, z = 0 } local acc = { x = 0, y = -9.81, z = 0 }
-- Lava droplet -- Lava droplet

View File

@ -39,7 +39,6 @@ minetest.register_node("mcl_core:slimeblock", {
type = "regular", type = "regular",
}, },
tiles = {"mcl_core_slime.png"}, tiles = {"mcl_core_slime.png"},
paramtype = "light",
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
stack_max = 64, stack_max = 64,
-- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks -- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks

View File

@ -107,7 +107,6 @@ local register_wooden_planks = function(subname, description, tiles)
end end
local register_leaves = function(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance) local register_leaves = function(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance)
local drop
if leafdecay_distance == nil then if leafdecay_distance == nil then
leafdecay_distance = 4 leafdecay_distance = 4
end end