EmmyLua -> LuaLS
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
---@alias Events.Callback fun(...)
|
||||
|
||||
---@alias Events.Type
|
||||
--- 'ControlsEvents'|
|
||||
--- 'ImmersiveCraftEvents'
|
||||
---|'ControlsEvents'
|
||||
---|'ImmersiveCraftEvents'
|
||||
|
||||
---@class Events : Class
|
||||
---@field registeredEvents table<string, Events.Callback[]>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
---Each instance of such a class registers one or more nodes and implements their logic.
|
||||
---
|
||||
---**Note**: An instance is static for all nodes it registers.
|
||||
---@interface NodeSuperClass
|
||||
---@class NodeSuperClass
|
||||
|
||||
---@type table<string, NodeSuperClass>
|
||||
local nodeSuperClasses = {}
|
||||
|
||||
@@ -40,7 +40,7 @@ end
|
||||
---@param itemName ItemStack|ItemStackString
|
||||
---@return Item.ItemDefinition|Node.NodeDefinition
|
||||
function Smc.getItemDefinition(itemName)
|
||||
if type(itemName) == 'table' or type(itemName) == 'userdata' then
|
||||
if type(itemName) ~= 'string' then
|
||||
itemName = itemName:get_name()
|
||||
end
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
local math = math
|
||||
|
||||
---Limiting the value by minimum and maximum value.
|
||||
---@param value number The value to be limited.
|
||||
---@param min number Minimum limit.
|
||||
---@param max number Maximum limit.
|
||||
---@return number
|
||||
math.clamp = function(value, min, max)
|
||||
function math.clamp(value, min, max)
|
||||
return math.min(math.max(value, min), max)
|
||||
end
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ end
|
||||
function table.contains(t, value)
|
||||
ensureArgType(t, 'table', 1, 'table.contains')
|
||||
|
||||
---@diagnostic disable-next-line: param-type-not-match
|
||||
return tableKeyOf(t, value) ~= nil
|
||||
end
|
||||
|
||||
@@ -415,7 +414,7 @@ end
|
||||
---@generic value any
|
||||
---@param list value[]
|
||||
---@param value value
|
||||
---@param value[]
|
||||
---@return value[]
|
||||
function table.remove_value(list, value)
|
||||
local index = table.indexof(list, value)
|
||||
while index ~= -1 do
|
||||
|
||||
Reference in New Issue
Block a user