mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Patch MapPosition and BoundingBox to the named form
The api documents both as a union with a positional array because both are accepted as input, which makes every read of `.x` or `.left_top` optional. Everything read back from the game uses the named form, so the positional variant is removed and we now always write it that way too. The spawn area config offsets and the mine depletion search areas were the only positional writes left, and apply_offset no longer needs its fallback. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,8 +73,8 @@ local function try_deconstruct_output_chest(entity)
|
||||
type = { "mining-drill", "inserter" },
|
||||
to_be_deconstructed = false,
|
||||
area = {
|
||||
{ target_position.x - 1, target_position.y - 1 },
|
||||
{ target_position.x + 1, target_position.y + 1 }
|
||||
left_top = { x = target_position.x - 1, y = target_position.y - 1 },
|
||||
right_bottom = { x = target_position.x + 1, y = target_position.y + 1 },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -251,8 +251,8 @@ local function on_resource_depleted(event)
|
||||
local drills = resource.surface.find_entities_filtered{
|
||||
type = "mining-drill",
|
||||
area = {
|
||||
{ position.x - max_mining_radius, position.y - max_mining_radius },
|
||||
{ position.x + max_mining_radius, position.y + max_mining_radius },
|
||||
left_top = { x = position.x - max_mining_radius, y = position.y - max_mining_radius },
|
||||
right_bottom = { x = position.x + max_mining_radius, y = position.y + max_mining_radius },
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user