fix a few luacheck warnings

This commit is contained in:
wsor 2021-04-27 00:14:46 -04:00
parent c28405b468
commit 5b50fa69bb
3 changed files with 22 additions and 5 deletions

View File

@ -16,5 +16,5 @@ read_globals = {
"dump", "DIR_DELIM", "VoxelArea", "Settings",
--mod produced
"fl_dyes", "fl_hand", "fl_tools"
"fl_dyes", "fl_hand", "fl_tools", "mobkit",
}

View File

@ -40,7 +40,10 @@ minetest.register_globalstep(function(dtime)
for _, player in pairs(minetest.get_connected_players()) do
local pcontrols = player:get_player_control()
player:set_bone_position("Head", vector.new(0, 6.35, 0), vector.new(-math.deg(player:get_look_vertical()), 0, 0))
player:set_bone_position(
"Head",
vector.new(0, 6.35, 0), vector.new(-math.deg(player:get_look_vertical()), 0, 0)
)
if pcontrols.up or pcontrols.down or pcontrols.left or pcontrols.right then
if pcontrols.LMB or pcontrols.RMB then
@ -62,7 +65,9 @@ minetest.register_chatcommand("set_anim", {
params = "<animation>",
description = "set player animation",
func = function(name, param)
if not animations[param] then return minetest.chat_send_player(name, "'" .. param .. "' is not a valid animation") end
if not animations[param] then
return minetest.chat_send_player(name, "'" .. param .. "' is not a valid animation!")
end
minetest.get_player_by_name(name):set_animation(animations[param], 30)
minetest.chat_send_player(name, "animation " .. param .. " set")

View File

@ -10,7 +10,13 @@ minetest.register_node("fl_trees:aspen_sapling", {
groups = {oddly_breakable_by_hand = 3},
on_timer = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x=pos.x-2, y=pos.y, z=pos.z-2}, modpath .. "/schems/aspen_tree_" .. math.random(5) .. ".mts", 0, nil, false)
minetest.place_schematic(
{x=pos.x-2, y=pos.y, z=pos.z-2},
modpath .. "/schems/aspen_tree_" .. math.random(5) .. ".mts",
0,
nil,
false
)
end,
on_costruct = function(pos)
minetest.remove_node(pos)
@ -35,7 +41,13 @@ minetest.register_node("fl_trees:baobab_sapling", {
groups = {oddly_breakable_by_hand = 3},
on_timer = function(pos)
minetest.remove_node(pos)
minetest.place_schematic({x=pos.x-3, y=pos.y, z=pos.z-3}, modpath .. "/schems/baobab_tree_" .. math.random(5) .. ".mts", 0, nil, false)
minetest.place_schematic(
{x=pos.x-3, y=pos.y, z=pos.z-3},
modpath .. "/schems/baobab_tree_" .. math.random(5) .. ".mts",
0,
nil,
false
)
end,
on_costruct = function(pos)
minetest.remove_node(pos)