1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Code style fixes.

This commit is contained in:
SFENCE 2024-09-04 19:15:39 +02:00 committed by sfence
parent 24e9db07ec
commit af3f696423
43 changed files with 493 additions and 484 deletions

View file

@ -389,7 +389,7 @@ function vector.random_direction()
local x, y, z, l2
repeat -- expected less than two attempts on average (volume sphere vs. cube)
x, y, z = math.random() * 2 - 1, math.random() * 2 - 1, math.random() * 2 - 1
l2 = x*x + y*y + z*z
l2 = x*x + y*y + z*z
until l2 <= 1 and l2 >= 1e-6
-- normalize
local l = math.sqrt(l2)

View file

@ -38,7 +38,7 @@ local function buttonbar_formspec(self)
-- `BASE_SPACING` is used as the minimum spacing, like `gap` in CSS Flexbox.
-- The number of buttons per page is always calculated as if the scroll
-- buttons were visible.
-- buttons were visible.
local avail_space = self.size.x - 2*BASE_SPACING - 2*get_scroll_btn_width()
local btns_per_page = math.floor((avail_space - BASE_SPACING) / (btn_size + BASE_SPACING))

View file

@ -78,7 +78,7 @@ core.register_entity(":__builtin:falling_node", {
self.floats = core.get_item_group(node.name, "float") ~= 0
-- Save liquidtype for falling water
self.liquidtype = def.liquidtype
self.liquidtype = def.liquidtype
-- Set entity visuals
if def.drawtype == "torchlike" or def.drawtype == "signlike" then

View file

@ -36,7 +36,7 @@ end
function core.setting_get_pos(name)
return core.settings:get_pos(name)
return core.settings:get_pos(name)
end

View file

@ -32,7 +32,7 @@ end
local function clients_list_buttonhandler(this, fields)
if fields.quit then
this:delete()
this:delete()
return true
end
return false

View file

@ -76,7 +76,7 @@ end
local function buttonhandler(this, fields)
if fields.quit then
this:delete()
this:delete()
return true
end