This commit is contained in:
Joey De Pauw 2019-12-06 20:11:47 +01:00
parent 33dd2b9bfd
commit 86afc16a04
6 changed files with 29 additions and 34 deletions

View File

@ -1,8 +1,11 @@
---------------------------------------------------------------------------------------------------
Version: 0.1.4
Version: 0.2.0
Date: 2019.11.16
Features:
Performance:
- Improved performance thanks to Elrood (https://mods.factorio.com/mod/better-air-filtering/discussion/5de458a8b40f56000b3ca43c)
Features:
- Recycling now has a slight chance of breaking the filter.
- Increased power consumption of mk2 and mk3 machines.
- Setting for update interval (can be changed for better UPS).
---------------------------------------------------------------------------------------------------
Version: 0.1.3

View File

@ -231,8 +231,6 @@ end
function generateFunctions()
local functions = {}
table.insert(functions, function(event) game.print(event.tick) end)
table.insert(functions, absorbPollution)
for radius = 1, 4 do
@ -581,12 +579,8 @@ script.on_configuration_changed(init)
function onSettingsChanged(event)
game.print("Settings changed")
game.print(serpent.line(event))
INTERVAL = settings.global["baf-update-interval"].value
game.print("Interval: " .. INTERVAL)
local onTick = spreadOverTicks(functions, INTERVAL)
script.on_event(defines.events.on_tick, onTick)
end

View File

@ -1,6 +1,6 @@
{
"name": "better-air-filtering",
"version": "0.1.4",
"version": "0.2.0",
"title": "Better Air Filtering",
"author": "Joey De Pauw",
"contact": "joeydepauw@gmail.com",

View File

@ -44,7 +44,7 @@ air-filtering-1=Enables the crafting of passive Air Filter Machines to improve a
air-filtering-2=A stronger air filter that uses electricity to pull pollution towards it from a 2 chunk radius.
air-filtering-3=An even stronger air filter, capable of cleaning pollution in a 3 chunk radius.
reusable-air-filters=More strudy air filters that can be recycled with future technology.
air-filter-recycling=Used air filters can be reused after being recycled by using a bit of coal to refill them.
air-filter-recycling=Used air filters can be reused after being recycled by using a bit of coal to refill them. Beware that there is a slight chance the filter breaks in the recycling process.
[mod-setting-name]

View File

@ -152,9 +152,9 @@ data:extend({
energy_source = {
type = "electric",
usage_priority = "secondary-input",
drain = "100kW",
drain = "200kW",
},
energy_usage = "50kW",
energy_usage = "100kW",
result_inventory_size = 1,
source_inventory_size = 1,
module_specification = {
@ -238,9 +238,9 @@ data:extend({
energy_source = {
type = "electric",
usage_priority = "secondary-input",
drain = "200kW",
drain = "300kW",
},
energy_usage = "100kW",
energy_usage = "200kW",
fixed_recipe = "filter-air2",
result_inventory_size = 1,
source_inventory_size = 1,

View File

@ -12,8 +12,7 @@ data:extend({
name = "air-filter-machine-1",
energy_required = 10.0,
enabled = false,
ingredients =
{
ingredients = {
{ "assembling-machine-1", 1 },
{ "electronic-circuit", 5 }
},
@ -24,8 +23,7 @@ data:extend({
name = "air-filter-machine-2",
energy_required = 10.0,
enabled = false,
ingredients =
{
ingredients = {
{ "air-filter-machine-1", 2 },
{ "steel-plate", 10 },
{ "advanced-circuit", 10 }
@ -37,8 +35,7 @@ data:extend({
name = "air-filter-machine-3",
energy_required = 10.0,
enabled = false,
ingredients =
{
ingredients = {
{ "air-filter-machine-2", 2 },
{ "processing-unit", 10 }
},
@ -52,8 +49,7 @@ data:extend({
order = "f[plastic-bar]-a[expendable-air-filter]",
energy_required = 2,
enabled = false,
ingredients =
{
ingredients = {
{ "coal", 5 },
{ "iron-plate", 2 },
},
@ -67,8 +63,7 @@ data:extend({
order = "f[plastic-bar]-b[air-filter]",
energy_required = 5,
enabled = false,
ingredients =
{
ingredients = {
{ "coal", 10 },
{ "plastic-bar", 4 },
{ "steel-plate", 2 }
@ -97,12 +92,19 @@ data:extend({
order = "f[plastic-bar]-c[air-filter-recycling]",
energy_required = 2,
enabled = false,
ingredients =
{
ingredients = {
{ "used-air-filter", 1 },
{ "coal", 5 }
},
result = "air-filter",
results = {
{ type = "item",
name = "air-filter",
amount = 1,
probability = 0.95,
catalyst_amount = 1
}
},
main_product = ""
},
{
@ -126,8 +128,7 @@ data:extend({
order = "a[filter-air]",
energy_required = 1,
enabled = false,
ingredients =
{
ingredients = {
{ type = "fluid", name = "pollution", amount = 2, fluidbox_index = 1 }
},
results = {}
@ -153,8 +154,7 @@ data:extend({
order = "b[filter-air]",
energy_required = 5,
enabled = false,
ingredients =
{
ingredients = {
{ type = "fluid", name = "pollution", amount = 20, fluidbox_index = 1 },
{ type = "item", name = "air-filter", amount = 1 },
},
@ -182,8 +182,7 @@ data:extend({
order = "b[filter-air]",
energy_required = 3,
enabled = false,
ingredients =
{
ingredients = {
{ type = "fluid", name = "pollution", amount = 10, fluidbox_index = 1 },
{ type = "item", name = "expendable-air-filter", amount = 1 },
},
@ -200,8 +199,7 @@ data:extend({
order = "c[filter-air]",
energy_required = 1,
enabled = false,
ingredients =
{
ingredients = {
{ type = "fluid", name = "pollution", amount = 6, fluidbox_index = 1 },
{ type = "fluid", name = "water", amount = 10, fluidbox_index = 2 }
},