mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-16 23:40:32 +02:00
Add script for Luacheck
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
local ItemStack = ItemStack
|
||||
local loadstring = loadstring
|
||||
local ESC = core.formspec_escape
|
||||
local translate = core.get_translated_string
|
||||
local vec_new, vec_add, vec_mul = vector.new, vector.add, vector.multiply
|
||||
local sort, concat, insert = table.sort, table.concat, table.insert
|
||||
|
@ -241,9 +241,9 @@ local function get_isometric_view(fs, pos, X, Y)
|
||||
local p = area:position(idx)
|
||||
p = vec_sub(p, pos)
|
||||
|
||||
local size = 0.25
|
||||
local x = 2 + (size / 2 * (p.z - p.x))
|
||||
local y = 1.15 + (size / 4 * (p.x + p.z - 2 * p.y))
|
||||
local size = 0.25
|
||||
|
||||
if plant then
|
||||
size -= 0.05
|
||||
|
@ -1,7 +1,7 @@
|
||||
--[[ All source files have to be preprocessed before loading.
|
||||
This allows implementing custom operators like bitwise ones. ]]
|
||||
|
||||
local fmt = string.format
|
||||
local fmt, split = string.format, string.split
|
||||
local var = "[%w%.%[%]\"\'_]"
|
||||
|
||||
local operators = {
|
||||
@ -53,7 +53,7 @@ end
|
||||
local function _load(path, line, data, t)
|
||||
if line then
|
||||
if not t then
|
||||
t = data:split"\n"
|
||||
t = split(data, "\n")
|
||||
end
|
||||
t[line] = t[line]:gsub("(" .. var .. "+)%s?=%s?(" .. var .. "*)", "%2")
|
||||
data = table.concat(t, "\n")
|
||||
|
Reference in New Issue
Block a user