1
0
mirror of https://github.com/Wyrrrd/Autofilter.git synced 2026-03-25 16:09:49 +01:00

Added integration with Booktorio

This commit is contained in:
Wyrrrd
2020-04-03 13:42:39 +02:00
parent c36e55c961
commit bfc4e6aa3d
11 changed files with 108 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ This mod should work with all modded filter inserters, but I specifically added
+ [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.

View File

@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.18.10
Date: 2020-04-03
Features:
- Added integration with Booktorio (for german and english locales)
---------------------------------------------------------------------------------------------------
Version: 0.18.9
Date: 2020-03-29
Features:

View File

@@ -1,6 +1,7 @@
--control.lua
require("integrations.informatron.control")
require("integrations.wiki.control")
require("integrations.Booktorio.control")
--functions definitions
local function is_filter_empty(inserter)

View File

@@ -1,3 +1,4 @@
--data.lua
require("integrations.informatron.data")
require("integrations.wiki.data")
require("integrations.wiki.data")
require("integrations.Booktorio.data")

View File

@@ -1,11 +1,12 @@
{
"name": "Autofilter",
"version": "0.18.9",
"version": "0.18.10",
"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"
],

View File

@@ -0,0 +1,41 @@
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)

View File

@@ -0,0 +1,37 @@
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

View File

@@ -16,16 +16,16 @@ 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={"autofilter.page_autofilter_text"}}
element.add{type="label", name="heading_modes", caption={"autofilter.page_modes_heading"}, style="heading_1_label"}
element.add{type="label", name="heading_contents", caption={"autofilter.page_contents_heading"}, style="heading_2_label"}
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={"autofilter.page_contents_text"}}
element.add{type="label", name="heading_filter", caption={"autofilter.page_filter_heading"}, style="heading_2_label"}
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={"autofilter.page_filter_text"}}
element.add{type="label", name="heading_none", caption={"autofilter.page_none_heading"}, style="heading_2_label"}
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={"autofilter.page_none_text"}}
element.add{type="label", name="text_none", caption={"info.page_none_text"}}
end
end

View File

@@ -7,19 +7,19 @@ autofilter_wiki =
name = {"autofilter.title_autofilter"},
topic = {
{type = "image", name = "image_autofilter", filepath = "__Autofilter__/graphics/logo.png", width = 360, height = 156, scale = 1},
{type = "text", text = {"autofilter.page_autofilter_text"} },
{type = "text", text = {"info.page_autofilter_text"} },
{type = "line"},
{type = "title", title = {"autofilter.page_contents_heading"} },
{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 = {"autofilter.page_contents_text"} },
{type = "text", text = {"info.page_contents_text"} },
{type = "line"},
{type = "title", title = {"autofilter.page_filter_heading"} },
{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 = {"autofilter.page_filter_text"} },
{type = "text", text = {"info.page_filter_text"} },
{type = "line"},
{type = "title", title = {"autofilter.page_none_heading"} },
{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 = {"autofilter.page_none_text"} },
{type = "text", text = {"info.page_none_text"} },
}
}
}

View File

@@ -15,6 +15,8 @@ autofilter_mode-none=Keiner
[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

View File

@@ -15,6 +15,8 @@ autofilter_mode-none=None
[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