mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-01 03:20:03 -04:00
ref luacheck whitespace warnings
This commit is contained in:
parent
f4d49861f5
commit
cc3664cc82
31 changed files with 38 additions and 45 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
-- Fancy shaped bed
|
-- Fancy shaped bed
|
||||||
|
|
||||||
beds.register_bed("beds:fancy_bed", {
|
beds.register_bed("beds:fancy_bed", {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Helper functions
|
-- Helper functions
|
||||||
--
|
--
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
bones = {}
|
bones = {}
|
||||||
|
|
||||||
|
@ -236,9 +235,7 @@ minetest.register_on_dieplayer(function(player)
|
||||||
minetest.log("action", player_name .. " dies at " .. pos_string ..
|
minetest.log("action", player_name .. " dies at " .. pos_string ..
|
||||||
". Inventory dropped")
|
". Inventory dropped")
|
||||||
if bones_position_message then
|
if bones_position_message then
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name, S("@1 died at @2, and dropped their inventory.", player_name, pos_string))
|
||||||
S("@1 died at @2, and dropped their inventory.",
|
|
||||||
player_name, pos_string))
|
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -249,9 +246,7 @@ minetest.register_on_dieplayer(function(player)
|
||||||
minetest.log("action", player_name .. " dies at " .. pos_string ..
|
minetest.log("action", player_name .. " dies at " .. pos_string ..
|
||||||
". Bones placed")
|
". Bones placed")
|
||||||
if bones_position_message then
|
if bones_position_message then
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name, S("@1 died at @2, and bones were placed.", player_name, pos_string))
|
||||||
S("@1 died at @2, and bones were placed.",
|
|
||||||
player_name, pos_string))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
-- register butterflies
|
-- register butterflies
|
||||||
local butter_list = {
|
local butter_list = {
|
||||||
{"white", S("White")},
|
{"white", S("White")},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
local cart_entity = {
|
local cart_entity = {
|
||||||
initial_properties = {
|
initial_properties = {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
carts:register_rail("carts:rail", {
|
carts:register_rail("carts:rail", {
|
||||||
description = S("Rail"),
|
description = S("Rail"),
|
||||||
tiles = {
|
tiles = {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
creative = {}
|
creative = {}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
local player_inventory = {}
|
local player_inventory = {}
|
||||||
local inventory_cache = {}
|
local inventory_cache = {}
|
||||||
|
|
|
@ -2,7 +2,7 @@ default.chest = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
function default.chest.get_chest_formspec(pos)
|
function default.chest.get_chest_formspec(pos)
|
||||||
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
|
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
|
||||||
local formspec =
|
local formspec =
|
||||||
|
@ -95,8 +95,7 @@ function default.chest.register_chest(name, d)
|
||||||
def.after_place_node = function(pos, placer)
|
def.after_place_node = function(pos, placer)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("owner", placer:get_player_name() or "")
|
meta:set_string("owner", placer:get_player_name() or "")
|
||||||
meta:set_string("infotext", S("Locked Chest (owned by @1)",
|
meta:set_string("infotext", S("Locked Chest (owned by @1)", meta:get_string("owner")))
|
||||||
meta:get_string("owner")))
|
|
||||||
end
|
end
|
||||||
def.can_dig = function(pos,player)
|
def.can_dig = function(pos,player)
|
||||||
local meta = minetest.get_meta(pos);
|
local meta = minetest.get_meta(pos);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
minetest.register_craftitem("default:stick", {
|
minetest.register_craftitem("default:stick", {
|
||||||
description = S("Stick"),
|
description = S("Stick"),
|
||||||
inventory_image = "default_stick.png",
|
inventory_image = "default_stick.png",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Formspecs
|
-- Formspecs
|
||||||
|
@ -250,8 +250,7 @@ local function furnace_node_timer(pos, elapsed)
|
||||||
|
|
||||||
-- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
|
-- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
|
||||||
-- "; Fuel: " .. fuel_state .. ")"
|
-- "; Fuel: " .. fuel_state .. ")"
|
||||||
local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active,
|
local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active, item_state, fuel_state)
|
||||||
item_state, fuel_state)
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Set meta values
|
-- Set meta values
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
--[[ Node name convention:
|
--[[ Node name convention:
|
||||||
|
|
||||||
|
@ -2504,8 +2504,7 @@ local function update_bookshelf(pos)
|
||||||
else
|
else
|
||||||
-- meta:set_string("infotext", "Bookshelf (" .. n_written ..
|
-- meta:set_string("infotext", "Bookshelf (" .. n_written ..
|
||||||
-- " written, " .. n_empty .. " empty books)")
|
-- " written, " .. n_empty .. " empty books)")
|
||||||
meta:set_string("infotext", S("Bookshelf (@1 written, @2 empty books)",
|
meta:set_string("infotext", S("Bookshelf (@1 written, @2 empty books)", n_written, n_empty))
|
||||||
n_written, n_empty))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
-- The hand
|
-- The hand
|
||||||
minetest.register_item(":", {
|
minetest.register_item(":", {
|
||||||
type = "none",
|
type = "none",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
local function on_flood(pos, oldnode, newnode)
|
local function on_flood(pos, oldnode, newnode)
|
||||||
minetest.add_item(pos, ItemStack("default:torch 1"))
|
minetest.add_item(pos, ItemStack("default:torch 1"))
|
||||||
-- Play flame-extinguish sound if liquid is not an 'igniter'
|
-- Play flame-extinguish sound if liquid is not an 'igniter'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
local random = math.random
|
local random = math.random
|
||||||
|
|
||||||
|
@ -569,9 +569,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||||
-- minetest.chat_send_player(player_name,
|
-- minetest.chat_send_player(player_name,
|
||||||
-- itemstack:get_definition().description .. " will intersect protection " ..
|
-- itemstack:get_definition().description .. " will intersect protection " ..
|
||||||
-- "on growth")
|
-- "on growth")
|
||||||
minetest.chat_send_player(player_name,
|
minetest.chat_send_player(player_name, S("@1 will intersect protection on growth.", itemstack:get_definition().description))
|
||||||
S("@1 will intersect protection on growth.",
|
|
||||||
itemstack:get_definition().description))
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ doors.registered_trapdoors = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
local function replace_old_owner_information(pos)
|
local function replace_old_owner_information(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
farming.register_hoe(":farming:hoe_wood", {
|
farming.register_hoe(":farming:hoe_wood", {
|
||||||
description = S("Wooden Hoe"),
|
description = S("Wooden Hoe"),
|
||||||
inventory_image = "farming_tool_woodhoe.png",
|
inventory_image = "farming_tool_woodhoe.png",
|
||||||
|
|
|
@ -15,7 +15,7 @@ dofile(farming.path .. "/hoes.lua")
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
-- WHEAT
|
-- WHEAT
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
minetest.override_item("default:dirt", {
|
minetest.override_item("default:dirt", {
|
||||||
soil = {
|
soil = {
|
||||||
|
|
|
@ -6,7 +6,7 @@ fire = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
-- 'Enable fire' setting
|
-- 'Enable fire' setting
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("fireflies:firefly", {
|
minetest.register_node("fireflies:firefly", {
|
||||||
description = S("Firefly"),
|
description = S("Firefly"),
|
||||||
|
|
|
@ -10,7 +10,7 @@ flowers = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
-- Map Generation
|
-- Map Generation
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
minetest.register_chatcommand("killme", {
|
minetest.register_chatcommand("killme", {
|
||||||
description = S("Kill yourself to respawn"),
|
description = S("Kill yourself to respawn"),
|
||||||
|
|
|
@ -7,7 +7,7 @@ map = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
-- Cache creative mode setting
|
-- Cache creative mode setting
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ screwdriver = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
screwdriver.ROTATE_FACE = 1
|
screwdriver.ROTATE_FACE = 1
|
||||||
screwdriver.ROTATE_AXIS = 2
|
screwdriver.ROTATE_AXIS = 2
|
||||||
|
|
|
@ -10,7 +10,7 @@ stairs = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
-- Register aliases for new pine node names
|
-- Register aliases for new pine node names
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ tnt = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
-- Default to enabled when in singleplayer
|
-- Default to enabled when in singleplayer
|
||||||
local enable_tnt = minetest.settings:get_bool("enable_tnt")
|
local enable_tnt = minetest.settings:get_bool("enable_tnt")
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
local vessels_shelf_formspec =
|
local vessels_shelf_formspec =
|
||||||
"size[8,7;]" ..
|
"size[8,7;]" ..
|
||||||
|
|
|
@ -4,7 +4,7 @@ walls = {}
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds)
|
walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds)
|
||||||
--make wall_texture_table paramenter backwards compatible for mods passing single texture
|
--make wall_texture_table paramenter backwards compatible for mods passing single texture
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
<<<<<<< HEAD
|
||||||
local dyes = dye.dyes
|
local dyes = dye.dyes
|
||||||
|
=======
|
||||||
|
>>>>>>> ref luacheck whitespace warnings
|
||||||
|
|
||||||
for i = 1, #dyes do
|
for i = 1, #dyes do
|
||||||
local name, desc = unpack(dyes[i])
|
local name, desc = unpack(dyes[i])
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator()
|
local S = minetest.get_translator()
|
||||||
|
|
||||||
|
|
||||||
local function is_pane(pos)
|
local function is_pane(pos)
|
||||||
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
|
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue