mirror of
https://github.com/Wyrrrd/Autofilter.git
synced 2026-06-30 10:02:27 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 850ad3ef3a | |||
| b20a2f6751 | |||
| 7f2e4b2deb | |||
| 396ac6556f | |||
| 5780d79793 | |||
| 7be1f2f4b0 | |||
| 939d9e3cb6 | |||
| ab77cf1de3 | |||
| ceb17d2949 | |||
| ef61bd94dd | |||
| 461a88e6bd |
@@ -1 +1,2 @@
|
||||
*.zip
|
||||
.vscode/*
|
||||
|
||||
@@ -2,15 +2,27 @@
|
||||
<img src="https://raw.githubusercontent.com/Wyrrrd/Autofilter/master/thumbnail.png" width="128" height="128">
|
||||
|
||||
### Features
|
||||
When you manually place a filter inserter, it reads either the inventory contents or inventory filters on the pickup side and sets its filter to those items. The mode can be changed or disabled in player mod settings on the fly as needed.
|
||||
When you manually place an inserter, it reads the inventory contents, inventory filters or belt contents on the pickup side and enables and sets its filter to those items. There are extensive configuration options.
|
||||
|
||||
### Settings
|
||||
|
||||
There is only one text field to enter configuration into (apart from an enabling checkbox). This can be done on the fly, while ingame. You can add each of the following keywords into the text field, in any order, separated by spaces. They will be processed left to right.
|
||||
|
||||
+ **contents** - Checks for filter candidates in the inventory contents at the inserter's pickup position.
|
||||
+ **filter** - Checks for filter candidates in the inventory's filter settings at the inserter's pickup position.
|
||||
+ **belt** - Checks for filter candidates in the items on a belt at the inserter's pickup position.
|
||||
+ **check** - Checks for the current filter candidates, if they could be inserted in the inventory at the inserter's drop position and removes them from the candidate list, if unsuccessful.
|
||||
+ *anything else* - Gets ignored.
|
||||
|
||||
After those are processed, a deduplication removes all but the first appearance of each item from the filter candidate list, and then the candidates are written to the inserter's filter until it is full.
|
||||
|
||||
### Compatibility
|
||||
This mod should work with all modded filter inserters, but I specifically added compatibility for the following mods:
|
||||
|
||||
+ [Bob's Adjustable Inserters](https://mods.factorio.com/mod/bobinserters) - rotated pickup positions
|
||||
+ [Informatron](https://mods.factorio.com/mod/informatron) - informational page to explain modes
|
||||
+ [Factorio Wiki Mod](https://mods.factorio.com/mod/wiki) - informational topic to explain modes
|
||||
+ [Booktorio](https://mods.factorio.com/mod/Booktorio) - informational thread to explain modes
|
||||
|
||||
### Locale
|
||||
If you want to contribute by translating this mod, you can view the existing translations [here](https://github.com/Wyrrrd/Autofilter/tree/master/locale). I'd be happy to add your language and credits to the next release.
|
||||
If you want to contribute by translating this mod, you can view the existing translations [here](https://github.com/Wyrrrd/Autofilter/tree/master/locale). I'd be happy to add your language and credits to the next release.
|
||||
|
||||
### Credits
|
||||
Thanks to [Friendch](https://mods.factorio.com/user/Friendch) for the french translation.
|
||||
@@ -1,4 +1,37 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.0
|
||||
Date: 2024-10-25
|
||||
Features:
|
||||
- Added option to quickly enable/disable all functions (will be replaced with a shortcut tile in the future)
|
||||
- If enabled, now sets filters for all inserters (since filter inserters don't exist anymore)
|
||||
Changes:
|
||||
- Version bump for base game 2.0
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.3
|
||||
Date: 2021-09-06
|
||||
Locale:
|
||||
- Added french locale (thanks to Friendch)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.2
|
||||
Date: 2021-04-18
|
||||
Changes:
|
||||
- Added tips&tricks page for ingame info
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.1
|
||||
Date: 2021-04-16
|
||||
Features:
|
||||
- Added option to read belt at pickup position
|
||||
- Added option to leave out filter candidates if they cannot enter inventory at drop position
|
||||
Changes:
|
||||
- Changed modus setting format to allow for more customization
|
||||
- Added deduplication to filter candidates (needed for belt transport lines)
|
||||
- Removed integrations for Informatron, Factorio Wiki Mod and Booktorio (feels like bloat)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.0
|
||||
Date: 2020-12-02
|
||||
Changes:
|
||||
- Version bump for base game 1.1
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.10
|
||||
Date: 2020-04-03
|
||||
Features:
|
||||
|
||||
+174
-30
@@ -1,9 +1,21 @@
|
||||
--control.lua
|
||||
require("integrations.informatron.control")
|
||||
require("integrations.wiki.control")
|
||||
require("integrations.Booktorio.control")
|
||||
|
||||
--functions definitions
|
||||
local function concatenate_tables(table1,table2)
|
||||
for i = 1,#table2 do
|
||||
table1[#table1+1]=table2[i]
|
||||
end
|
||||
return table1
|
||||
end
|
||||
|
||||
local function string_to_table(str)
|
||||
local words = {}
|
||||
for word in str:gmatch("([^%s]+)") do
|
||||
words[#words+1] = word
|
||||
end
|
||||
return words
|
||||
end
|
||||
|
||||
local function is_filter_empty(inserter)
|
||||
for slot = 1,inserter.filter_slot_count do
|
||||
if inserter.get_filter(slot) then
|
||||
@@ -13,45 +25,177 @@ local function is_filter_empty(inserter)
|
||||
return true
|
||||
end
|
||||
|
||||
local function get_items_by_contents(inserter,inventory)
|
||||
local items = {}
|
||||
for item,_ in pairs(inventory.get_contents()) do
|
||||
if #items < inserter.filter_slot_count then
|
||||
items[#items+1] = item
|
||||
local function deduplicate_items(items)
|
||||
local dedup_items = {}
|
||||
local marker = false
|
||||
for i=1,#items do
|
||||
for j=i+1,#items do
|
||||
if items[i] == items[j] then
|
||||
marker = true
|
||||
end
|
||||
end
|
||||
if not marker then
|
||||
dedup_items[#dedup_items+1]=items[i]
|
||||
end
|
||||
marker = false
|
||||
end
|
||||
return items
|
||||
return dedup_items
|
||||
end
|
||||
|
||||
local function get_items_by_filter(inserter,inventory)
|
||||
local items = {}
|
||||
for slot = 1,#inventory do
|
||||
if #items < inserter.filter_slot_count and inventory.get_filter(slot) then
|
||||
items[#items+1] = inventory.get_filter(slot)
|
||||
local function remove_noninsertable_items(items,entity)
|
||||
local search_inventories = {
|
||||
defines.inventory.fuel,
|
||||
defines.inventory.chest,
|
||||
defines.inventory.furnace_source,
|
||||
defines.inventory.roboport_robot,
|
||||
defines.inventory.roboport_material,
|
||||
defines.inventory.assembling_machine_input,
|
||||
defines.inventory.lab_input,
|
||||
defines.inventory.item_main,
|
||||
defines.inventory.rocket_silo_rocket,
|
||||
defines.inventory.rocket_silo_input,
|
||||
defines.inventory.cargo_wagon,
|
||||
defines.inventory.turret_ammo,
|
||||
defines.inventory.artillery_turret_ammo,
|
||||
defines.inventory.artillery_wagon_ammo,
|
||||
defines.inventory.spider_ammo,
|
||||
defines.inventory.hub_main,
|
||||
defines.inventory.cargo_landing_pad_main
|
||||
}
|
||||
local insert_items = {}
|
||||
local no_inventory_flag = true
|
||||
local item_insertable_flag = false
|
||||
|
||||
for i=1,#items do
|
||||
for _,search_inventory in pairs(search_inventories) do
|
||||
local inventory = entity.get_inventory(search_inventory)
|
||||
if inventory then
|
||||
no_inventory_flag = false
|
||||
if inventory.can_insert(items[i]) then
|
||||
item_insertable_flag = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if no_inventory_flag then
|
||||
insert_items = items
|
||||
break
|
||||
end
|
||||
if item_insertable_flag then
|
||||
insert_items[#insert_items+1]=items[i]
|
||||
item_insertable_flag = false
|
||||
end
|
||||
end
|
||||
return items
|
||||
return insert_items
|
||||
end
|
||||
|
||||
local function get_items_by_content(inventory)
|
||||
local content_items = {}
|
||||
for _,item in pairs(inventory.get_contents()) do
|
||||
content_items[#content_items+1] = item.name
|
||||
end
|
||||
return content_items
|
||||
end
|
||||
|
||||
local function get_items_by_filter(inventory)
|
||||
local filter_items = {}
|
||||
for slot = 1,#inventory do
|
||||
if inventory.get_filter(slot) then
|
||||
filter_items[#filter_items+1] = inventory.get_filter(slot)
|
||||
end
|
||||
end
|
||||
return filter_items
|
||||
end
|
||||
|
||||
local function get_items_by_transport_line(belt)
|
||||
local belt_items = {}
|
||||
for i = 1,belt.get_max_transport_line_index() do
|
||||
local line = belt.get_transport_line(i)
|
||||
if line and line.valid then
|
||||
belt_items = concatenate_tables(belt_items,get_items_by_content(line))
|
||||
end
|
||||
end
|
||||
return belt_items
|
||||
end
|
||||
|
||||
local function on_built_entity(event)
|
||||
local mode = game.players[event.player_index].mod_settings["autofilter_mode"].value
|
||||
if mode ~= "none" then
|
||||
local inserter = event.created_entity
|
||||
if inserter.type == "inserter" then
|
||||
-- Read settings
|
||||
local enabled = game.players[event.player_index].mod_settings["autofilter_enabled"].value
|
||||
local mode = string_to_table(game.players[event.player_index].mod_settings["autofilter_mode"].value)
|
||||
|
||||
if enabled then
|
||||
local inserter = event.entity
|
||||
if inserter and inserter.valid and inserter.type == "inserter" then
|
||||
if inserter.filter_slot_count then
|
||||
if is_filter_empty(inserter) and inserter.inserter_filter_mode == "whitelist" then
|
||||
local pickup = inserter.surface.find_entities_filtered({position = inserter.pickup_position, limit = 1})
|
||||
if #pickup > 0 then
|
||||
local inventory = pickup[1].get_output_inventory()
|
||||
if inventory then
|
||||
if mode == "contents" and not inventory.is_empty() then
|
||||
for slot,item in pairs(get_items_by_contents(inserter,inventory)) do
|
||||
inserter.set_filter(slot,item)
|
||||
if not inserter.use_filters and is_filter_empty(inserter) and inserter.inserter_filter_mode == "whitelist" then
|
||||
-- Read pickup and drop position entity
|
||||
local pickup = inserter.surface.find_entities_filtered({
|
||||
position = inserter.pickup_position,
|
||||
force = inserter.force,
|
||||
surface = inserter.surface,
|
||||
collision_mask_layer= "is_object",
|
||||
to_be_deconstructed = false,
|
||||
limit = 1
|
||||
})
|
||||
local drop = inserter.surface.find_entities_filtered({
|
||||
position = inserter.drop_position,
|
||||
force = inserter.force,
|
||||
surface = inserter.surface,
|
||||
collision_mask= "is_object",
|
||||
to_be_deconstructed = false,
|
||||
limit = 1
|
||||
})
|
||||
|
||||
if pickup[1] and pickup[1].valid then
|
||||
-- Prequisites
|
||||
local inventory_pickup = pickup[1].get_output_inventory()
|
||||
|
||||
if (pickup[1].type == "transport-belt" or pickup[1].type == "underground-belt" or pickup[1].type == "splitter") then
|
||||
local maxlines = pickup[1].get_max_transport_line_index()
|
||||
end
|
||||
local items = {}
|
||||
local check = false
|
||||
|
||||
-- Read each mode element
|
||||
for _,step in pairs(mode) do
|
||||
if step == "contents" then
|
||||
-- Read inventory contents at pickup, write to filter
|
||||
if inventory_pickup and not inventory_pickup.is_empty() then
|
||||
items = concatenate_tables(items,get_items_by_content(inventory_pickup))
|
||||
end
|
||||
elseif mode == "filter" and inventory.is_filtered() then
|
||||
for slot,item in pairs(get_items_by_filter(inserter,inventory)) do
|
||||
inserter.set_filter(slot,item)
|
||||
elseif step == "filter" then
|
||||
-- Read inventory filter at pickup, write to filter
|
||||
if inventory_pickup and inventory_pickup.is_filtered() then
|
||||
items = concatenate_tables(items,get_items_by_filter(inventory_pickup))
|
||||
end
|
||||
elseif step == "belt" then
|
||||
-- Read belt transport lines at pickup, write to filter
|
||||
if (pickup[1].type == "transport-belt" or pickup[1].type == "underground-belt" or pickup[1].type == "splitter") and pickup[1].get_max_transport_line_index() then
|
||||
items = concatenate_tables(items,get_items_by_transport_line(pickup[1]))
|
||||
end
|
||||
elseif step == "check" then
|
||||
-- Drop inventory insertion check
|
||||
if drop[1] and drop[1].valid then
|
||||
items = remove_noninsertable_items(items,drop[1])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Filter candidate cleanup
|
||||
if #items > 0 then
|
||||
-- Debug message
|
||||
if __DebugAdapter then
|
||||
__DebugAdapter.print("[Autofilter] Inserter at (" .. inserter.position.x .. "," .. inserter.position.y .. ") had its filter set to: " .. table.concat(items,", "))
|
||||
end
|
||||
|
||||
-- Deduplication
|
||||
items = deduplicate_items(items)
|
||||
|
||||
-- Enable filters
|
||||
inserter.use_filters = true
|
||||
|
||||
-- Writing filters until full
|
||||
for slot = 1, inserter.filter_slot_count do
|
||||
inserter.set_filter(slot,items[slot])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
--data.lua
|
||||
require("integrations.informatron.data")
|
||||
require("integrations.wiki.data")
|
||||
require("integrations.Booktorio.data")
|
||||
|
||||
data:extend(
|
||||
{
|
||||
{
|
||||
type = "tips-and-tricks-item",
|
||||
name = "autofilter",
|
||||
tag = "[entity=inserter]",
|
||||
category = "inserters",
|
||||
indent = 1,
|
||||
order = "g",
|
||||
dependencies = {"inserters"},
|
||||
},
|
||||
})
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
@@ -1,15 +1,12 @@
|
||||
{
|
||||
"name": "Autofilter",
|
||||
"version": "0.18.10",
|
||||
"version": "2.0.0",
|
||||
"title": "Autofilter",
|
||||
"author": "Wyrrrd",
|
||||
"dependencies": [
|
||||
"base >= 0.18.0",
|
||||
"(?) bobinserters >= 0.18.0",
|
||||
"? Booktorio >= 1.1.0",
|
||||
"? informatron >= 0.1.5",
|
||||
"? wiki >= 0.18.01"
|
||||
"base >= 2.0.0",
|
||||
"(?) bobinserters >= 1.3.0"
|
||||
],
|
||||
"description": "Automatically set inserter filters based on adjacent inventory.",
|
||||
"factorio_version": "0.18"
|
||||
"description": "Automatically set inserter filters based on adjacent inventory/belt.",
|
||||
"factorio_version": "2.0"
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
local autofilter_thread =
|
||||
{
|
||||
name = {"autofilter.menu_autofilter"},
|
||||
specified_version = 0,
|
||||
topics =
|
||||
{
|
||||
{
|
||||
name = {"autofilter.title_autofilter"},
|
||||
topic =
|
||||
{
|
||||
{type = "image", spritename = "autofilter-logo"},
|
||||
{type = "text", text = "info.page_autofilter_text"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = {"info.page_modes_heading"},
|
||||
topic =
|
||||
{
|
||||
{type = "title", title = {"info.page_modes_heading"}},
|
||||
{type = "subtitle", subtitle = {"info.page_contents_heading"}},
|
||||
{type = "image", spritename = "autofilter-settings-contents"},
|
||||
{type = "text", text = "info.page_contents_text"},
|
||||
{type = "subtitle", subtitle = {"info.page_filter_heading"}},
|
||||
{type = "image", spritename = "autofilter-settings-filter"},
|
||||
{type = "text", text = "info.page_filter_text"},
|
||||
{type = "subtitle", subtitle = {"info.page_none_heading"}},
|
||||
{type = "image", spritename = "autofilter-settings-none"},
|
||||
{type = "text", text = "info.page_none_text"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local function registerThread()
|
||||
if remote.interfaces["Booktorio"] then
|
||||
remote.call("Booktorio", "add_thread", autofilter_thread)
|
||||
end
|
||||
end
|
||||
|
||||
script.on_init(registerThread)
|
||||
script.on_configuration_changed(registerThread)
|
||||
@@ -1,37 +0,0 @@
|
||||
if mods["Booktorio"] then
|
||||
data:extend(
|
||||
{
|
||||
{
|
||||
type = "sprite",
|
||||
name = "autofilter-logo",
|
||||
filename = "__Autofilter__/graphics/logo.png",
|
||||
width = 360,
|
||||
height = 156,
|
||||
scale = 1
|
||||
},
|
||||
{
|
||||
type = "sprite",
|
||||
name = "autofilter-settings-contents",
|
||||
filename = "__Autofilter__/graphics/settings_contents.png",
|
||||
width = 400,
|
||||
height = 128,
|
||||
scale = 1
|
||||
},
|
||||
{
|
||||
type = "sprite",
|
||||
name = "autofilter-settings-filter",
|
||||
filename = "__Autofilter__/graphics/settings_filter.png",
|
||||
width = 400,
|
||||
height = 128,
|
||||
scale = 1
|
||||
},
|
||||
{
|
||||
type = "sprite",
|
||||
name = "autofilter-settings-none",
|
||||
filename = "__Autofilter__/graphics/settings_none.png",
|
||||
width = 400,
|
||||
height = 128,
|
||||
scale = 1
|
||||
}
|
||||
})
|
||||
end
|
||||
@@ -1,31 +0,0 @@
|
||||
if script.active_mods["informatron"] then
|
||||
remote.add_interface("autofilter", {
|
||||
informatron_menu = function(data)
|
||||
return autofilter_menu(data.player_index)
|
||||
end,
|
||||
informatron_page_content = function(data)
|
||||
return autofilter_page_content(data.page_name, data.player_index, data.element)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
function autofilter_menu(player_index)
|
||||
return {}
|
||||
end
|
||||
|
||||
function autofilter_page_content(page_name, player_index, element)
|
||||
if page_name == "autofilter" then
|
||||
element.add{type="button", name="image_autofilter", style="autofilter_logo"}
|
||||
element.add{type="label", name="text_autofilter", caption={"info.page_autofilter_text"}}
|
||||
element.add{type="label", name="heading_modes", caption={"info.page_modes_heading"}, style="heading_1_label"}
|
||||
element.add{type="label", name="heading_contents", caption={"info.page_contents_heading"}, style="heading_2_label"}
|
||||
element.add{type="button", name="image_contents", style="autofilter_settings_contents"}
|
||||
element.add{type="label", name="text_contents", caption={"info.page_contents_text"}}
|
||||
element.add{type="label", name="heading_filter", caption={"info.page_filter_heading"}, style="heading_2_label"}
|
||||
element.add{type="button", name="image_filter", style="autofilter_settings_filter"}
|
||||
element.add{type="label", name="text_filter", caption={"info.page_filter_text"}}
|
||||
element.add{type="label", name="heading_none", caption={"info.page_none_heading"}, style="heading_2_label"}
|
||||
element.add{type="button", name="image_none", style="autofilter_settings_none"}
|
||||
element.add{type="label", name="text_none", caption={"info.page_none_text"}}
|
||||
end
|
||||
end
|
||||
@@ -1,6 +0,0 @@
|
||||
if mods["informatron"] then
|
||||
informatron_make_image("autofilter_logo", "__Autofilter__/graphics/logo.png", 360, 156)
|
||||
informatron_make_image("autofilter_settings_contents", "__Autofilter__/graphics/settings_contents.png", 400, 128)
|
||||
informatron_make_image("autofilter_settings_filter", "__Autofilter__/graphics/settings_filter.png", 400, 128)
|
||||
informatron_make_image("autofilter_settings_none", "__Autofilter__/graphics/settings_none.png", 400, 128)
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
require("integrations.wiki.wiki")
|
||||
|
||||
if script.active_mods["wiki"] then
|
||||
local initialize_wiki = function()
|
||||
remote.call("wiki","register_mod_wiki",autofilter_wiki)
|
||||
end
|
||||
|
||||
script.on_init(function() initialize_wiki() end)
|
||||
script.on_load(function() initialize_wiki() end)
|
||||
end
|
||||
@@ -1,5 +0,0 @@
|
||||
require("integrations.wiki.wiki")
|
||||
|
||||
if mods["wiki"] then
|
||||
wiki_register_mod_wiki(autofilter_wiki)
|
||||
end
|
||||
@@ -1,25 +0,0 @@
|
||||
autofilter_wiki =
|
||||
{
|
||||
name = "Autofilter",
|
||||
title = "Autofilter",
|
||||
mod_path = "__Autofilter__",
|
||||
{
|
||||
name = {"autofilter.title_autofilter"},
|
||||
topic = {
|
||||
{type = "image", name = "image_autofilter", filepath = "__Autofilter__/graphics/logo.png", width = 360, height = 156, scale = 1},
|
||||
{type = "text", text = {"info.page_autofilter_text"} },
|
||||
{type = "line"},
|
||||
{type = "title", title = {"info.page_contents_heading"} },
|
||||
{type = "image", name = "image_contents", filepath = "__Autofilter__/graphics/settings_contents.png", width = 400, height = 128, scale = 0.9},
|
||||
{type = "text", text = {"info.page_contents_text"} },
|
||||
{type = "line"},
|
||||
{type = "title", title = {"info.page_filter_heading"} },
|
||||
{type = "image", name = "image_filter", filepath = "__Autofilter__/graphics/settings_filter.png", width = 400, height = 128, scale = 0.9},
|
||||
{type = "text", text = {"info.page_filter_text"} },
|
||||
{type = "line"},
|
||||
{type = "title", title = {"info.page_none_heading"} },
|
||||
{type = "image", name = "image_none", filepath = "__Autofilter__/graphics/settings_none.png", width = 400, height = 128, scale = 0.9},
|
||||
{type = "text", text = {"info.page_none_text"} },
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
-20
@@ -1,27 +1,16 @@
|
||||
[mod-description]
|
||||
Autofilter=Setzt Greifarmfilter automatisch, basierend auf dem angrenzenden Inventar.
|
||||
Autofilter=Setzt Greifarmfilter automatisch, basierend auf angrenzenden Inventaren/Fließbändern.
|
||||
|
||||
[mod-setting-name]
|
||||
autofilter_mode=Autofilter-Modus
|
||||
autofilter_enabled=Automatische Filter aktivieren
|
||||
autofilter_mode=Automatischer-Filter-Modus
|
||||
|
||||
[mod-setting-description]
|
||||
autofilter_mode=Ändere, ob Greifarmfilter durch Inventarinhalt, Inventarfilter oder gar nicht gesetzt werden sollen.
|
||||
autofilter_enabled=Aktiviert und setzt Filter beim Bauen von Greifarmen automatisch.
|
||||
autofilter_mode=Bestimmt die Reihenfolge der Auslesevorgänge (contents = Inventarinhalt, filter = Inventarfilter, belt = Fließbandinhalt, check = Zielinventarprüfung).
|
||||
|
||||
[string-mod-setting]
|
||||
autofilter_mode-contents=Inhalt
|
||||
autofilter_mode-filter=Filter
|
||||
autofilter_mode-none=Keiner
|
||||
[tips-and-tricks-item-name]
|
||||
autofilter=Autofilter
|
||||
|
||||
[autofilter]
|
||||
menu_autofilter=Autofilter
|
||||
title_autofilter=Autofilter
|
||||
|
||||
[info]
|
||||
page_autofilter_text=Diese Mod sorgt dafür, dass Greifarmfilter beim manuellen Platzieren automatischgesetzt werden, basierend auf dem angrenzenden Inventar. Der Modus, nachdem die Gegenstände für den Filter ausgewählt werden, kann in den Spieler-Mod-Einstellungen während des Spiels angepasst werden.
|
||||
page_modes_heading=Modus
|
||||
page_contents_heading=Inhalt
|
||||
page_contents_text=Bei Verwendung des Inhaltsmodus wird der Filter manuell platzierter Filtergreifarme auf die Gegenstände gesetzt, die sich am Aufnahmepunkt in einem Inventar (Kiste, Wagon, etc.) befinden. Es können natürlich maximal so viele verschiedene Gegenstände als Filter gesetzt werden, wie Platz im Greifarmfilter ist.
|
||||
page_filter_heading=Filter
|
||||
page_filter_text=Bei Verwendung des Filtermodus wird der Filter manuell platzierter Filtergreifarme auf die Gegenstände gesetzt, auf die das am Aufnahmepunkt befindliche Inventar (Kiste, Wagon, etc.) gefiltert ist. Hierbei ist irrelevant, ob das Inventar komplett oder nur teilweise gefiltert ist.
|
||||
page_none_heading=Keiner
|
||||
page_none_text=Bei Deaktivierung des Modus funktioniert die Platzierung von Filtergreifarmen normal. Der Greifarmfilter wird nicht automatisch gesetzt.
|
||||
[tips-and-tricks-item-description]
|
||||
autofilter=Wenn du einen [entity=inserter] von Hand platzierst (und automatische Filter in den Optionen aktiviert sind), liest er den Inventarinhalt, die Inventarfilter oder den Fließbandinhalt and der Aufnahmeposition aus und setzt seinen Filter auf diese Gegenstände.\n\nFür die Konfiguration dieses Verhaltens gibt es nur ein Textfeld. Dieses kann während des Spiels angepasst werden. Du kannst jedes der folgenden Schlüsselworte in beliebiger Reihenfolge getrennt durch Leerzeichen in das Textfeld eintragen. Sie werden von links nach rechts abgearbeitet.\n\n - contents : Überprüft den Inventarinhalt an der [entity=filter-inserter]-Aufnahmeposition nach Filterkandidaten.\n - filter : Überprüft den Inventarfilter an der [entity=filter-inserter]-Aufnahmeposition nach Filterkandidaten.\n - belt : Überprüft die Gegenstände auf einem [entity=transport-belt] oder [entity=splitter] an der [entity=filter-inserter]-Aufnahmeposition nach Filterkandidaten.\n - check : Überprüft, ob die aktuellen Filterkandidaten in ein Inventar an der [entity=filter-inserter]-Ablageposition gelegt werden können, und entfernt sie aus der Kandidatenliste, wenn nicht.\n - Alles andere wird ignoriert. Wenn du alle Funktionen von Autofilter abschalten willst, schreibe einfach irgendetwas in das Textfeld.\n\nNachdem diese Punkte verarbeitet wurden, entfernt eine Deduplikation alle mehrfachen Vorkommen von Gegenständen aus der Filterkandidatenliste, und dann werden die Kandidaten in den [entity=inserter]-Filter geschrieben, bis er voll ist.
|
||||
+9
-20
@@ -1,27 +1,16 @@
|
||||
[mod-description]
|
||||
Autofilter=Automatically set inserter filters based on adjacent inventory.
|
||||
Autofilter=Automatically set inserter filters based on adjacent inventory/belt.
|
||||
|
||||
[mod-setting-name]
|
||||
autofilter_mode=Autofilter Mode
|
||||
autofilter_enabled=Enable automatic filters
|
||||
autofilter_mode=Automatic filter mode
|
||||
|
||||
[mod-setting-description]
|
||||
autofilter_mode=Change if inserter filters should be set from inventory items, inventory filter or not at all.
|
||||
autofilter_enabled=Automatically enable and set filters when building inserters.
|
||||
autofilter_mode=Configure the priority of reading sources (contents = inventory contents, filter = inventory filter, belt = belt contents, check = check for insertability at drop position).
|
||||
|
||||
[string-mod-setting]
|
||||
autofilter_mode-contents=Contents
|
||||
autofilter_mode-filter=Filter
|
||||
autofilter_mode-none=None
|
||||
[tips-and-tricks-item-name]
|
||||
autofilter=Autofilter
|
||||
|
||||
[Autofilter]
|
||||
menu_autofilter=Autofilter
|
||||
title_autofilter=Autofilter
|
||||
|
||||
[info]
|
||||
page_autofilter_text=This mod causes inserter filters to be set automatically on manual placement, based on the adjacent inventory. The modus, which specifies the items used for the filter, can be changed on the fly in player mod settings.
|
||||
page_modes_heading=Modus
|
||||
page_contents_heading=Contents
|
||||
page_contents_text=When using contents mode, the filter of manually placed filter inserters is set to the items in an inventory (chest, waggon, etc.) at the pickup point. Naturally, the filter can only be set to as many items as there are filter slots in the inserter.
|
||||
page_filter_heading=Filter
|
||||
page_filter_text=When using filter mode, the filter of manually placed filter inserters is set to the filtered slots of an inventory (chest, waggon, etc.) at the pickup point. It is irrelevant, if the inventory is partially or completely filtered.
|
||||
page_none_heading=None
|
||||
page_none_text=When disabling the mode, manual placement of filter inserters works as usual. The inserter filter is not set automatically.
|
||||
[tips-and-tricks-item-description]
|
||||
autofilter=When you manually place a [entity=inserter] (and if automatic filters are enabled in settings), it reads the inventory contents, inventory filters or belt contents on the pickup side and sets its filter to those items.\n\nThere is only one text field to enter configuration of this behaviour into. This can be done on the fly, while ingame. You can add each of the following keywords into the text field, in any order, separated by spaces. They will be processed left to right.\n\n - contents : Checks for filter candidates in the inventory contents at the pickup position of the [entity=filter-inserter].\n - filter : Checks for filter candidates in the inventory's filter settings at the pickup position of the [entity=filter-inserter].\n - belt : Checks for filter candidates in the items on a [entity=transport-belt] or [entity=splitter] at the pickup position of the [entity=filter-inserter].\n - check : Checks for the current filter candidates, if they could be inserted in the inventory at the drop position of the [entity=filter-inserter] and removes them from the candidate list, if unsuccessful.\n - Anything else gets ignored. If you want to disable all functionality of Autofilter, just write anything into the text field.\n\nAfter those are processed, a deduplication removes all but the first appearance of each item from the filter candidate list, and then the candidates are written to the filter of the [entity=inserter] until it is full.
|
||||
@@ -0,0 +1,16 @@
|
||||
[mod-description]
|
||||
Autofilter=Configuration automatique du filtre des bras robotisés en fonction des inventaires et convoyeurs adjacents.
|
||||
|
||||
[mod-setting-name]
|
||||
autofilter_enabled=Activer les filtres automatiques
|
||||
autofilter_mode=Mode du filtre automatique
|
||||
|
||||
[mod-setting-description]
|
||||
autofilter_enabled=Activer et définir automatiquement des filtres lors de la construction des bras robotisés.
|
||||
autofilter_mode=Sélectionner la priorité de la source (contents = contenu de l'inventaire, filter = filtre de l'inventaire, belt = contenu du convoyeur, check = s'assurer qu'il y a de la place dans la zone de dépôt).
|
||||
|
||||
[tips-and-tricks-item-name]
|
||||
autofilter=Autofilter
|
||||
|
||||
[tips-and-tricks-item-description]
|
||||
autofilter=Permet à un [entity=inserter] placé manuellement (si les filtres automatiques sont activés dans les paramètres) de reconnaître le contenu des inventaires, des filtres d'inventaire et des convoyeurs côté ramassage, pour pouvoir configurer automatiquement son propre filtre avec le même objet.\n\nCette zone de texte sert de configuration, et peut être changée en temps réel pendant le jeu. Pour se faire, ajoutez-y ces mots clefs, séparés par un espace et dans l'ordre souhaité, en fonction de vos choix : (L'odre de priorité ira de gauche à droite.)\n\n - contents : Recherche d'un objet filtrable dans l'inventaire situé côté ramassage du [entity=filter-inserter].\n - filter : Recherche d'un objet filtrable dans le filtre d'inventaire situé côté ramassage du [entity=filter-inserter].\n - belt : Recherche d'un objet filtrable dans le [entity=transport-belt] ou le [entity=splitter] situé côté ramassage du [entity=filter-inserter].\n - check : S'assurer que le [entity=filter-inserter] pourra transmettre l'objet envisagé par le filtre dans l'inventaire visé, ou le retirer de la liste des candidats dans le cas contraire.\nToute autre chose ajoutée sera ignorée, et si aucune de ces options n'est désirée il suffira de ne pas les y ajouter.\n\nLe filtre automatique fonctionne en faisant une liste provisoire de tous les candidats possibles, suivant les options choisies, puis élimine les doublons avant de transférer cette liste provisoire à celle du [entity=filter-inserter]. (Auquel cas, jusqu'à complétion.)
|
||||
+9
-3
@@ -1,10 +1,16 @@
|
||||
data:extend({
|
||||
{
|
||||
type = "bool-setting",
|
||||
name = "autofilter_enabled",
|
||||
default_value = true,
|
||||
setting_type = "runtime-per-user",
|
||||
order = "autofilter-a",
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "autofilter_mode",
|
||||
default_value = "contents",
|
||||
allowed_values = {"contents","filter","none"},
|
||||
default_value = "contents belt",
|
||||
setting_type = "runtime-per-user",
|
||||
order = "a",
|
||||
order = "autofilter-b",
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user