mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-31 21:55:10 +02:00
Fix removed debug funcs
This commit is contained in:
parent
80de95689d
commit
dda25a34b7
@ -127,7 +127,7 @@ function Debug.object_type(object)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---Shows the given message if debug is on.
|
---Shows the given message if debug is on.
|
||||||
---@param position Position
|
---@param position MapPosition
|
||||||
---@param message string
|
---@param message string
|
||||||
function Debug.print_position(position, message)
|
function Debug.print_position(position, message)
|
||||||
Debug.print(format('%s %s', serialize(position), message))
|
Debug.print(format('%s %s', serialize(position), message))
|
||||||
@ -147,6 +147,10 @@ end
|
|||||||
-- @param func<function>
|
-- @param func<function>
|
||||||
-- @return boolean
|
-- @return boolean
|
||||||
function Debug.is_closure(func)
|
function Debug.is_closure(func)
|
||||||
|
if debug_getupvalue == nil then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
while true do
|
while true do
|
||||||
local n = debug_getupvalue(func, i)
|
local n = debug_getupvalue(func, i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user