Browse Source

Remove trailing spaces

master
luk3yx 1 year ago
parent
commit
fb4b80940d
No known key found for this signature in database GPG Key ID: EA6CAD7077F31A37
3 changed files with 7 additions and 4 deletions
  1. +1
    -0
      core.lua
  2. +2
    -2
      extras.lua
  3. +4
    -2
      objects.lua

+ 1
- 0
core.lua View File

@@ -15,7 +15,7 @@ formspeclib.version = 0.1

--
-- formspeclib.render(): Renders a formspeclib object into a formspec.
--
-- Syntax: formspeclib.render(formspeclib_object, safe_mode, no_iterations)
--
-- formspeclib_object: The formspeclib object to render.


+ 2
- 2
extras.lua View File

@@ -58,12 +58,12 @@ end)
--
formspeclib.register_object('formspeclib:chest', function(obj, safe_mode)
local r = not obj.x and not obj.y
if type(obj.x) ~= 'number' then obj.x = 0 end
if type(obj.y) ~= 'number' then obj.y = 0 end
if type(obj.width) ~= 'number' then obj.width = 8 end
if type(obj.height) ~= 'number' then obj.height = 4 end
return {
width = r and obj.width,
height = r and obj.height + 5,


+ 4
- 2
objects.lua View File

@@ -71,7 +71,7 @@ end)
--
-- An image
--
-- Parameters: x, y, width(?), height(?), image
--
-- Example 'image[1,1;1,1;default_dirt.png]':
-- {
@@ -256,7 +256,7 @@ end)
--
-- A semitransparent box
--
-- Parameters: x, y, width, height, colour/color
--
-- Example 'box[1,1;1,1;black]':
-- {
@@ -306,10 +306,10 @@ formspeclib.register_object('formspeclib:container_start', function(obj, safe_mo
end
local x = formspeclib.escape(obj.x)
local y = formspeclib.escape(obj.y)
obj.x = nil
obj.y = nil
return 'container[' .. x .. ',' .. y .. ']'
end)