diff --git a/scripts/scanner/backends/single-entity.lua b/scripts/scanner/backends/single-entity.lua index f738d524..902cf3ba 100644 --- a/scripts/scanner/backends/single-entity.lua +++ b/scripts/scanner/backends/single-entity.lua @@ -181,4 +181,14 @@ mod.LogisticsWithFluid = decl("fa.scanner.backends.LogisticsWithFluid", { return cat2(ent.name, fluid_name) end, }) + +-- Roboports are categorized by network name. +mod.Roboport = decl("fa.scanner.backends.Roboport", { + category_callback = functionize(SC.CATEGORIES.LOGISTICS), + + ---@param ent LuaEntity + subcategory_callback = function(ent) + return cat2(ent.name, ent.backer_name) + end, +}) return mod diff --git a/scripts/scanner/surface-scanner.lua b/scripts/scanner/surface-scanner.lua index f61249be..7ba287fe 100644 --- a/scripts/scanner/surface-scanner.lua +++ b/scripts/scanner/surface-scanner.lua @@ -97,7 +97,7 @@ local BACKEND_LUT = { ["rail-signal"] = SEB.TrainsSimple, ["reactor"] = SEB.Logistics, ["resource"] = ResourcePatchesBackend.ResourcePatchesBackend, - ["roboport"] = SEB.Logistics, + ["roboport"] = SEB.Roboport, ["rocket-silo-rocket-shadow"] = SEB.Other, ["rocket-silo-rocket"] = SEB.Other, ["rocket-silo"] = SEB.Production, @@ -200,7 +200,7 @@ end local surface_state = GlobalManager.declare_global_module( "scanner", new_empty_surface, - { root_field = "surfaces", ephemeral_state_version = 3 } + { root_field = "surfaces", ephemeral_state_version = 4 } ) -- Given a backend setup and an array of entities, dispatch the entities to the