Convert indentation to tabs

master
Lars Mueller 2022-05-13 12:19:05 +02:00
parent 4e04d6b219
commit 2215e758c9
2 changed files with 38 additions and 38 deletions

View File

@ -4,4 +4,4 @@ read_globals = {
-- Minetest -- Minetest
math = {fields = {"sign"}}, math = {fields = {"sign"}},
"vector", "minetest" "vector", "minetest"
} }

View File

@ -1,17 +1,17 @@
local function angle(description, default) local function angle(description, default)
return { type = "number", range = { min = -180, max = 180 }, description = description, default = default } return { type = "number", range = { min = -180, max = 180 }, description = description, default = default }
end end
local range = function(description, default_min, default_max) local range = function(description, default_min, default_max)
return { return {
type = "table", type = "table",
entries = { entries = {
min = angle(description .. " (min)", default_min), min = angle(description .. " (min)", default_min),
max = angle(description .. " (max)", default_max) max = angle(description .. " (max)", default_max)
}, },
func = function(range) func = function(range)
if range.max < range.min then return "Minimum range value is not <= maximum range value" end if range.max < range.min then return "Minimum range value is not <= maximum range value" end
end end
} }
end end
local model = { local model = {
type = "table", type = "table",
@ -19,13 +19,13 @@ local model = {
body = { body = {
type = "table", type = "table",
entries = { entries = {
turn_speed = { turn_speed = {
type = "number", type = "number",
range = { min_exclusive = 0, max = 1e3 }, range = { min_exclusive = 0, max = 1e3 },
description = "Body turn speed", description = "Body turn speed",
default = 0.2 default = 0.2
} }
} }
}, },
head = { head = {
type = "table", type = "table",
@ -39,27 +39,27 @@ local model = {
arm_right = { arm_right = {
type = "table", type = "table",
entries = { entries = {
radius = angle("Right arm spin radius", 10), radius = angle("Right arm spin radius", 10),
speed = { speed = {
type = "number", type = "number",
range = { min_exclusive = 0, max = 1e4 }, range = { min_exclusive = 0, max = 1e4 },
description = "Right arm spin speed", description = "Right arm spin speed",
default = 1e3 default = 1e3
}, },
yaw = range("Right arm yaw", -30, 160) yaw = range("Right arm yaw", -30, 160)
} }
} }
} }
} }
return { return {
type = "table", type = "table",
entries = { entries = {
default = model, default = model,
models = { models = {
type = "table", type = "table",
keys = { type = "string" }, keys = { type = "string" },
description = "Other models, same format as `default` model" description = "Other models, same format as `default` model"
} }
} }
} }