Skip to content

Commit

Permalink
Rename logistics category to logistics and power
Browse files Browse the repository at this point in the history
  • Loading branch information
ahicks92 committed Oct 21, 2024
1 parent e188ff5 commit d3e22e9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion locale/en/factorio-access.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ scanner-refreshed-directional=Refreshed __1__ scan.
scanner-category-all=All
scanner-category-enemies=Enemies
scanner-category-ghosts=Ghosts
scanner-category-logistics=Logistics
scanner-category-logistics_and_power=Logistics and power
scanner-category-military=Military
scanner-category-other=Other
scanner-category-players=Players
Expand Down
8 changes: 4 additions & 4 deletions scripts/scanner/backends/single-entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ mod.Spawner = decl("fa.scanner.backends.Spawner", {
-- There are so many logistics items that we will make one generic backend and
-- list them off in the LUT instead (inserters, transport belts, splitters, so
-- on).
mod.Logistics = decl_bound_category("fa.scanner.backends.Logistics", SC.CATEGORIES.LOGISTICS)
mod.LogisticsAndPower = decl_bound_category("fa.scanner.backends.LogisticsAndPower", SC.CATEGORIES.LOGISTICSAndPower)
mod.Production = decl_bound_category("fa.scanner.backends.Production", SC.CATEGORIES.PRODUCTION)
mod.Military = decl_bound_category("fa.scanner.backends.Military", SC.CATEGORIES.MILITARY)
mod.Other = decl_bound_category("fa.scanner.backends.Other", SC.CATEGORIES.OTHER)
Expand Down Expand Up @@ -173,7 +173,7 @@ mod.Rock = decl_bound_category("fa.scanner.backends.ResourceSingle", SC.CATEGORI
-- rare case of multiple fluids, will group by one arbitrarily, not necessarily
-- the same one each time.
mod.LogisticsWithFluid = decl("fa.scanner.backends.LogisticsWithFluid", {
category_callback = functionize(SC.CATEGORIES.LOGISTICS),
category_callback = functionize(SC.CATEGORIES.LOGISTICSAndPower),

---@param ent LuaEntity
subcategory_callback = function(ent)
Expand All @@ -185,7 +185,7 @@ mod.LogisticsWithFluid = decl("fa.scanner.backends.LogisticsWithFluid", {

-- Roboports are categorized by network name.
mod.Roboport = decl("fa.scanner.backends.Roboport", {
category_callback = functionize(SC.CATEGORIES.LOGISTICS),
category_callback = functionize(SC.CATEGORIES.LOGISTICSAndPower),

---@param ent LuaEntity
subcategory_callback = function(ent)
Expand All @@ -194,7 +194,7 @@ mod.Roboport = decl("fa.scanner.backends.Roboport", {
})

mod.Pipe = decl("fa.scanner.backends.Pipe", {
category_callback = functionize(SC.CATEGORIES.LOGISTICS),
category_callback = functionize(SC.CATEGORIES.LOGISTICSAndPower),

---@param ent LuaEntity
subcategory_callback = function(ent)
Expand Down
4 changes: 2 additions & 2 deletions scripts/scanner/scanner-consts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod.CATEGORIES = {
ALL = "all",
RESOURCES = "resources",
ENEMIES = "enemies",
LOGISTICS = "logistics",
LOGISTICSAndPower = "logistics_and_power",
PRODUCTION = "production",
VEHICLES = "vehicles",
TRAINS = "trains",
Expand All @@ -25,7 +25,7 @@ mod.CATEGORY_ORDER = {
mod.CATEGORIES.ENEMIES,
mod.CATEGORIES.REMNANTS,
mod.CATEGORIES.PRODUCTION,
mod.CATEGORIES.LOGISTICS,
mod.CATEGORIES.LOGISTICSAndPower,
mod.CATEGORIES.CONTAINERS,
mod.CATEGORIES.MILITARY,
mod.CATEGORIES.VEHICLES,
Expand Down
58 changes: 29 additions & 29 deletions scripts/scanner/surface-scanner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,30 @@ for things like that.
]]
---@type table<string, fa.scanner.ScannerBackend>
local BACKEND_LUT = {
["accumulator"] = SEB.Logistics,
["accumulator"] = SEB.LogisticsAndPower,
["ammo-turret"] = SEB.Military,
["arithmetic-combinator"] = SEB.Logistics,
["arithmetic-combinator"] = SEB.LogisticsAndPower,
["artillery-flare"] = SEB.Military,
["artillery-turret"] = SEB.Military,
["artillery-wagon"] = SEB.TrainsNamed,
["assembling-machine"] = SEB.CraftingMachine,
["beacon"] = SEB.Production,
["boiler"] = SEB.Logistics,
["burner-generator"] = SEB.Logistics,
["boiler"] = SEB.LogisticsAndPower,
["burner-generator"] = SEB.LogisticsAndPower,
["car"] = SEB.Vehicle,
["cargo-wagon"] = SEB.TrainsNamed,
["character-corpse"] = SEB.Other,
["character"] = SEB.Character,
["cliff"] = SEB.Other,
["combat-robot"] = SEB.Military,
["constant-combinator"] = SEB.Logistics,
["construction-robot"] = SEB.Logistics,
["constant-combinator"] = SEB.LogisticsAndPower,
["construction-robot"] = SEB.LogisticsAndPower,
["container"] = SEB.Containers,
["corpse"] = SEB.Corpses,
["curved-rail"] = SEB.TrainsSimple,
["decider-combinator"] = SEB.Logistics,
["electric-energy-interface"] = SEB.Logistics,
["electric-pole"] = SEB.Logistics,
["decider-combinator"] = SEB.LogisticsAndPower,
["electric-energy-interface"] = SEB.LogisticsAndPower,
["electric-pole"] = SEB.LogisticsAndPower,
["electric-turret"] = SEB.Military,
["entity-ghost"] = SEB.Ghosts,
["fire"] = SEB.Other,
Expand All @@ -64,38 +64,38 @@ local BACKEND_LUT = {
["fluid-wagon"] = SEB.TrainsNamed,
["furnace"] = SEB.Furnace,
["gate"] = SEB.Military,
["generator"] = SEB.Logistics,
["heat-interface"] = SEB.Logistics,
["heat-pipe"] = SEB.Logistics,
["generator"] = SEB.LogisticsAndPower,
["heat-interface"] = SEB.LogisticsAndPower,
["heat-pipe"] = SEB.LogisticsAndPower,
["infinity-container"] = SEB.Containers,
["infinity-pipe"] = SEB.LogisticsWithFluid,
["inserter"] = SEB.Logistics,
["inserter"] = SEB.LogisticsAndPower,
["item-entity"] = SEB.Other,
["lab"] = SEB.Production,
["lamp"] = SEB.Logistics,
["lamp"] = SEB.LogisticsAndPower,
["land-mine"] = SEB.Military,
["linked-belt"] = SEB.Logistics,
["linked-container"] = SEB.Logistics,
["loader-1x1"] = SEB.Logistics,
["loader"] = SEB.Logistics,
["linked-belt"] = SEB.LogisticsAndPower,
["linked-container"] = SEB.LogisticsAndPower,
["loader-1x1"] = SEB.LogisticsAndPower,
["loader"] = SEB.LogisticsAndPower,
["locomotive"] = SEB.TrainsNamed,
["logistic-container"] = SEB.Containers,
["logistic-robot"] = SEB.Logistics,
["market"] = SEB.Logistics,
["logistic-robot"] = SEB.LogisticsAndPower,
["market"] = SEB.LogisticsAndPower,
["mining-drill"] = SEB.MiningDrill,
["offshore-pump"] = SEB.Production,
["pipe-to-ground"] = SEB.LogisticsWithFluid,
["pipe"] = SEB.Pipe,
["player-port"] = SEB.Other,
["power-switch"] = SEB.Logistics,
["programmable-speaker"] = SEB.Logistics,
["power-switch"] = SEB.LogisticsAndPower,
["programmable-speaker"] = SEB.LogisticsAndPower,
["projectile"] = SEB.Other,
["pump"] = SEB.Logistics,
["pump"] = SEB.LogisticsAndPower,
["radar"] = SEB.Military,
["rail-chain-signal"] = SEB.TrainsSimple,
["rail-remmnants"] = SEB.Remnants,
["rail-signal"] = SEB.TrainsSimple,
["reactor"] = SEB.Logistics,
["reactor"] = SEB.LogisticsAndPower,
["resource"] = ResourcePatchesBackend.ResourcePatchesBackend,
["roboport"] = SEB.Roboport,
["rocket-silo-rocket-shadow"] = SEB.Other,
Expand All @@ -104,17 +104,17 @@ local BACKEND_LUT = {
["simple-entity-with-force"] = SEB.Other,
["simple-entity-with-owner"] = SEB.Other,
["simple-entity"] = SEB.Other,
["solar-panel"] = SEB.Logistics,
["solar-panel"] = SEB.LogisticsAndPower,
["spider-vehicle"] = SEB.Vehicle,
["splitter"] = SEB.Logistics,
["splitter"] = SEB.LogisticsAndPower,
["storage-tank"] = SEB.LogisticsWithFluid,
["straight-rail"] = SEB.TrainsSimple,
["tile-ghost"] = SEB.Ghosts,
["train-stop"] = SEB.TrainsSimple,
["transport-belt"] = SEB.Logistics,
["transport-belt"] = SEB.LogisticsAndPower,
["tree"] = TreeBackend.TreeBackend,
["turret"] = SEB.Unit,
["underground-belt"] = SEB.Logistics,
["underground-belt"] = SEB.LogisticsAndPower,
["unit-spawner"] = SEB.Spawner,
["unit"] = SEB.Unit,
["wall"] = SEB.Military,
Expand Down Expand Up @@ -200,7 +200,7 @@ end
local surface_state = GlobalManager.declare_global_module(
"scanner",
new_empty_surface,
{ root_field = "surfaces", ephemeral_state_version = 5 }
{ root_field = "surfaces", ephemeral_state_version = 6 }
)

-- Given a backend setup and an array of entities, dispatch the entities to the
Expand Down

0 comments on commit d3e22e9

Please sign in to comment.