mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Clear the last of the nil checks
Guards now cover the statements that follow them, and a couple of reads are restructured so the narrowing survives. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -551,7 +551,7 @@ function ExpUtil.move_items_to_surface(options)
|
||||
options.item = item
|
||||
entity = ExpUtil.get_storage_for_stack(options)
|
||||
entity.insert(options.item)
|
||||
local item_stack = options.item --[[@as LuaItemStack]]
|
||||
local item_stack = options.item --[[@as LuaItemStack]]
|
||||
item_stack.clear()
|
||||
end
|
||||
end
|
||||
@@ -604,7 +604,7 @@ end
|
||||
--- @param n number
|
||||
--- @return string
|
||||
function ExpUtil.comma_value(n) -- credit http://richard.warburton.it
|
||||
local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$")
|
||||
local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$")
|
||||
assert(left and num and right)
|
||||
return left .. (num:reverse():gsub("(%d%d%d)", "%1, "):reverse()) .. right
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user