mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Remove asserts the types already cover
The nil check burn down added guards which turned out redundant once the surrounding annotations landed. `_has_handlers` is set to true when the first handler registers, so it is a boolean rather than the literal false it was inferred as. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -291,7 +291,7 @@ function vlayer.remove_item(item_name, count)
|
||||
|
||||
if not config.unlimited_surface_area and item_properties.required_area and item_properties.required_area > 0 then
|
||||
-- Remove from the unallocated storage first
|
||||
remove_unallocated = math.min(count, assert(vlayer_data.storage.unallocated[item_name]))
|
||||
remove_unallocated = math.min(count, vlayer_data.storage.unallocated[item_name])
|
||||
|
||||
if remove_unallocated > 0 then
|
||||
vlayer_data.storage.items[item_name] = vlayer_data.storage.items[item_name] - count
|
||||
|
||||
Reference in New Issue
Block a user