]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Make GitHub Actions Happy try 2
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 12 Dec 2020 13:06:41 +0000 (14:06 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sat, 12 Dec 2020 13:06:41 +0000 (14:06 +0100)
builtin/common/chatcommands.lua
builtin/common/misc_helpers.lua
builtin/mainmenu/dlg_settings_advanced.lua

index bf989db7d1f8fd53349a18f20a421a974fea2758..fb593e8399619859296b6d5a57a87516f3bf7c9c 100644 (file)
@@ -49,7 +49,7 @@ if INIT == "client" then
                                        local i = table.indexof(list, item)
                                        if i == -1 then
                                                return false, item .. " is not on the list."
-                                       else    
+                                       else
                                                table.remove(list, i)
                                                core.settings:set(setting, table.concat(list, ","))
                                                return true, "Removed " .. item .. " from the list."
index db94e7073ced454c3b6b4e9a879b45273c39d5f8..0fbb8fba866f0626da51330ac053ac56ea85b3fe 100644 (file)
@@ -596,22 +596,21 @@ function core.colorize(color, message)
 end
 
 local function rgb_to_hex(rgb)
-       local hexadecimal = '#'
+       local hexadecimal = "#"
 
        for key, value in pairs(rgb) do
-               local hex = ''
+               local hex = ""
 
                while(value > 0)do
                        local index = math.fmod(value, 16) + 1
                        value = math.floor(value / 16)
-                       hex = string.sub('0123456789ABCDEF', index, index) .. hex
+                       hex = string.sub("0123456789ABCDEF", index, index) .. hex
                end
 
                if(string.len(hex) == 0)then
-                       hex = '00'
-
+                       hex = "00"
                elseif(string.len(hex) == 1)then
-                       hex = '0' .. hex
+                       hex = "0" .. hex
                end
 
                hexadecimal = hexadecimal .. hex
@@ -623,21 +622,21 @@ end
 local function color_from_hue(hue)
        local h = hue / 60
        local c = 255
-       local x = (1 - math.abs(h%2 - 1)) * 255
+       local x = (1 - math.abs(h % 2 - 1)) * 255
 
-       local i = math.floor(h);
-       if (i == 0) then
+       local i = math.floor(h)
+       if i == 0 then
                return rgb_to_hex({c, x, 0})
-       elseif (i == 1) then 
+       elseif i == 1 then
                return rgb_to_hex({x, c, 0})
-       elseif (i == 2) then 
+       elseif i == 2 then
                return rgb_to_hex({0, c, x})
-       elseif (i == 3) then
-               return rgb_to_hex({0, x, c});
-       elseif (i == 4) then
-               return rgb_to_hex({x, 0, c});
-       else 
-               return rgb_to_hex({c, 0, x});
+       elseif i == 3 then
+               return rgb_to_hex({0, x, c})
+       elseif i == 4 then
+               return rgb_to_hex({x, 0, c})
+       else
+               return rgb_to_hex({c, 0, x})
        end
 end
 
@@ -646,11 +645,11 @@ function core.rainbow(input)
        local hue = 0
        local output = ""
        for i = 1, input:len() do
-               local char = input:sub(i,i)
+               local char = input:sub(i, i)
                if char:match("%s") then
                        output = output .. char
                else
-                       output = output  .. core.get_color_escape_sequence(color_from_hue(hue)) .. char 
+                       output = output  .. core.get_color_escape_sequence(color_from_hue(hue)) .. char
                end
                hue = hue + step
        end
index d82ae62639da8949f81fc742dc36de939ee88508..26f4fa4a72c1c141e6032e1469f107539d7e7033 100644 (file)
@@ -400,7 +400,7 @@ local function parse_config_file(read_all, parse_mods)
                                file:close()
                        end
                end
-               
+
                -- Parse clientmods
                local clientmods_category_initialized = false
                local clientmods = {}