Use new linter (#294)

* Use new linter

* Luacheck and Sumneko Lua fixes

* Bump CI action versions

* Fix excludes for ldoc
This commit is contained in:
Cooldude2606
2024-05-29 15:39:37 +01:00
committed by GitHub
parent 4fa410e872
commit 8638504550
27 changed files with 96 additions and 92 deletions

View File

@@ -51,10 +51,13 @@ function Game.player_print(str, color)
end
--[[
@param Position String to display at
Creates a floating text entity at a location with the specified color.
Example: "+10 iron" or "-10 coins"
@param surface LuaSurface
@param position String to display at
@param text String to display
@param color table in {r = 0~1, g = 0~1, b = 0~1}, defaults to white.
@param surface LuaSurface
@return the created entity
]]

View File

@@ -25,7 +25,7 @@ global.tpt = global.task_queue_speed
local function get_task_per_tick()
if game.tick % 300 == 0 then
local size = global.total_task_weight
global.tpt = math.floor(math.log10(size + 1)) * global.task_queue_speed
global.tpt = math.floor(math.log(size + 1, 10)) * global.task_queue_speed
if global.tpt < 1 then
global.tpt = 1
end