1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-17 07:10:29 +02:00

fix most luacheck warnings

This commit is contained in:
OgelGames
2021-12-27 16:11:37 +11:00
parent 92325d69b3
commit 1a841dfba2
14 changed files with 8 additions and 38 deletions

View File

@ -1,7 +1,5 @@
-- 3D Mushroom mod by VanessaE -- 3D Mushroom mod by VanessaE
mushroom = {}
minetest.override_item("flowers:mushroom_fertile_brown", { minetest.override_item("flowers:mushroom_fertile_brown", {
drawtype = "mesh", drawtype = "mesh",
mesh = "3dmushrooms.obj", mesh = "3dmushrooms.obj",

View File

@ -161,17 +161,10 @@ for i, bush_name in ipairs(bushes_classic.bushes) do
groups = { dig_immediate = 3 }, groups = { dig_immediate = 3 },
}) })
local texture_top, texture_bottom
local groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1} local groups = {snappy = 3, bush = 1, flammable = 2, attached_node=1}
if bush_name == "mixed_berry" then if bush_name == "mixed_berry" then
bush_name = "fruitless"; bush_name = "fruitless"
texture_top = "bushes_fruitless_bush_top.png"
texture_bottom = "bushes_fruitless_bush_bottom.png"
groups.not_in_creative_inventory = 1 groups.not_in_creative_inventory = 1
else
texture_top = "bushes_bush_top.png"
texture_bottom = "bushes_bush_bottom.png"
end end
minetest.register_node(":bushes:" .. bush_name .. "_bush", { minetest.register_node(":bushes:" .. bush_name .. "_bush", {

View File

@ -4,11 +4,6 @@ local version = "0.0.3"
local mname = "cavestuff" local mname = "cavestuff"
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
-- support for i18n
local S = minetest.get_translator("cavestuff")
cavestuff = {}
dofile(minetest.get_modpath("cavestuff").."/nodes.lua") dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua") dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")

View File

@ -32,7 +32,6 @@ minetest.register_node("cavestuff:pebble_2",{
mesh = "cavestuff_pebble.obj", mesh = "cavestuff_pebble.obj",
tiles = {"undergrowth_pebble.png"}, tiles = {"undergrowth_pebble.png"},
drop = "cavestuff:pebble_1", drop = "cavestuff:pebble_1",
tiles = {"undergrowth_pebble.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1}, groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
@ -100,7 +99,7 @@ minetest.register_node("cavestuff:stalactite_1",{
if not placer then return end if not placer then return end
local playername = placer:get_player_name() local playername = placer:get_player_name()
if minetest.is_protected(place, playername) if minetest.is_protected(place, playername)
or minetest.is_protected(above, playername) then or minetest.is_protected(above, playername) then
minetest.record_protection_violation(place, playername) minetest.record_protection_violation(place, playername)
return return
end end

View File

@ -65,7 +65,7 @@ abstract_ferns.grow_giant_tree_fern = function(pos)
local brk = false local brk = false
for i = 1, size-3 do for i = 1, size-3 do
pos_aux.y = pos.y + i pos_aux.y = pos.y + i
local name = minetest.get_node(pos_aux).name name = minetest.get_node(pos_aux).name
if not (name == "air" or (i == 1 and name == "ferns:sapling_giant_tree_fern")) then if not (name == "air" or (i == 1 and name == "ferns:sapling_giant_tree_fern")) then
brk = true brk = true
break break

View File

@ -8,8 +8,6 @@ local mname = "ferns" -- former "archaeplantae"
abstract_ferns = {} abstract_ferns = {}
-- support for i18n
local S = minetest.get_translator("ferns")
dofile(minetest.get_modpath("ferns").."/settings.lua") dofile(minetest.get_modpath("ferns").."/settings.lua")

View File

@ -2,7 +2,6 @@
local function process_blossom_queue_item() local function process_blossom_queue_item()
local pos = nature.blossomqueue[1][1] local pos = nature.blossomqueue[1][1]
local node = nature.blossomqueue[1][2]
local replace = nature.blossomqueue[1][3] local replace = nature.blossomqueue[1][3]
if (nature.blossomqueue[1][3] == nature.blossom_node and not nature:is_near_water(pos)) then if (nature.blossomqueue[1][3] == nature.blossom_node and not nature:is_near_water(pos)) then
table.remove(nature.blossomqueue, 1) -- don't grow if it's not near water, pop from queue. table.remove(nature.blossomqueue, 1) -- don't grow if it's not near water, pop from queue.
@ -32,7 +31,7 @@ end)
function nature.enqueue_node(pos, node, replace) function nature.enqueue_node(pos, node, replace)
local idx = #nature.blossomqueue local idx = #nature.blossomqueue
if idx < nature.blossomqueue_max then if idx < nature.blossomqueue_max then
local enqueue_prob = 0 local enqueue_prob
if idx < nature.blossomqueue_max * 0.8 then if idx < nature.blossomqueue_max * 0.8 then
enqueue_prob = 1 enqueue_prob = 1
else else

View File

@ -25,7 +25,7 @@ if minetest.get_modpath("moretrees") then
nature.blossom_node = "moretrees:apple_blossoms" nature.blossom_node = "moretrees:apple_blossoms"
nature.blossom_leaves = "moretrees:apple_tree_leaves" nature.blossom_leaves = "moretrees:apple_tree_leaves"
nature.blossom_textures = { "moretrees_apple_tree_leaves.png^nature_blossom.png" } nature.blossom_textures = { "moretrees_apple_tree_leaves.png^nature_blossom.png" }
nature.blossom_groups = { snappy = 3, leafdecay = 1, leaves = 1, flammable = 2, moretrees_leaves = 1 }, nature.blossom_groups = { snappy = 3, leafdecay = 1, leaves = 1, flammable = 2, moretrees_leaves = 1 }
minetest.register_alias("nature:blossom", "default:leaves") minetest.register_alias("nature:blossom", "default:leaves")
end end
@ -39,10 +39,6 @@ nature.apple_spread = 2
nature.meta_blossom_time = "blossom_time" nature.meta_blossom_time = "blossom_time"
nature.blossom_duration = nature.blossom_delay nature.blossom_duration = nature.blossom_delay
function dumppos(pos)
return "("..pos.x..","..pos.y..","..pos.z..")"
end
dofile(minetest.get_modpath(current_mod_name) .. "/config.lua") dofile(minetest.get_modpath(current_mod_name) .. "/config.lua")
dofile(minetest.get_modpath(current_mod_name) .. "/global_function.lua") dofile(minetest.get_modpath(current_mod_name) .. "/global_function.lua")
dofile(minetest.get_modpath(current_mod_name) .. "/blossom.lua") dofile(minetest.get_modpath(current_mod_name) .. "/blossom.lua")

View File

@ -85,7 +85,6 @@ for i in ipairs(lilies_list) do
local nodename = "default:cobble" -- if this block appears, something went....wrong :-) local nodename = "default:cobble" -- if this block appears, something went....wrong :-)
if not keys["sneak"] then if not keys["sneak"] then
local node = minetest.get_node(pt.under)
local waterlily = math.random(1,8) local waterlily = math.random(1,8)
if waterlily == 1 then if waterlily == 1 then
nodename = "flowers:waterlily" nodename = "flowers:waterlily"

View File

@ -20,7 +20,8 @@ local walls_list = {
"default:jungletree", "default:jungletree",
"default:stone_with_coal", "default:stone_with_coal",
"default:stone_with_iron" "default:stone_with_iron"
}, }
minetest.register_node('poisonivy:seedling', { minetest.register_node('poisonivy:seedling', {
description = S("Poison ivy (seedling)"), description = S("Poison ivy (seedling)"),
drawtype = 'plantlike', drawtype = 'plantlike',

View File

@ -475,8 +475,6 @@ end
if Roots == true then -- see settings.txt if Roots == true then -- see settings.txt
abstract_trunks.grow_roots = function(pos) abstract_trunks.grow_roots = function(pos)
local twig_size = math.random(1,27)
local right_here = {x=pos.x , y=pos.y , z=pos.z } local right_here = {x=pos.x , y=pos.y , z=pos.z }
local below = {x=pos.x , y=pos.y-1, z=pos.z } local below = {x=pos.x , y=pos.y-1, z=pos.z }
local north = {x=pos.x , y=pos.y , z=pos.z+1} local north = {x=pos.x , y=pos.y , z=pos.z+1}

View File

@ -7,9 +7,6 @@ local mname = "trunks"
abstract_trunks = {} abstract_trunks = {}
-- support for i18n
local S = minetest.get_translator("trunks")
dofile(minetest.get_modpath("trunks").."/trunks_settings.txt") dofile(minetest.get_modpath("trunks").."/trunks_settings.txt")
dofile(minetest.get_modpath("trunks").."/generating.lua") dofile(minetest.get_modpath("trunks").."/generating.lua")
dofile(minetest.get_modpath("trunks").."/nodes.lua") dofile(minetest.get_modpath("trunks").."/nodes.lua")

View File

@ -45,7 +45,7 @@ for i in pairs(NoDe) do
if not placer then return end if not placer then return end
local playername = placer:get_player_name() local playername = placer:get_player_name()
if minetest.is_protected(pt.above, playername) then if minetest.is_protected(pt.above, playername) then
minetest.record_protection_violation(pt.above, playername) minetest.record_protection_violation(pt.above, playername)
return return
end end

View File

@ -6,9 +6,6 @@ local mname = "woodsoils" -- former "forestsoils"
abstract_woodsoils = {} abstract_woodsoils = {}
-- support for i18n
local S = minetest.get_translator("woodsoils")
dofile(minetest.get_modpath("woodsoils").."/nodes.lua") dofile(minetest.get_modpath("woodsoils").."/nodes.lua")
dofile(minetest.get_modpath("woodsoils").."/generating.lua") dofile(minetest.get_modpath("woodsoils").."/generating.lua")