reduce fluid capacity of air filters
This commit is contained in:
parent
2509004f80
commit
4ee328a3f4
|
@ -1,6 +1,6 @@
|
|||
# Better Air Filtering
|
||||
#### A mod for Factorio that provides complex air filtering steps to remove pollution.
|
||||
|
||||
Based on the [air filtering mod](https://mods.factorio.com/mod/air-filtering) by [Schorty](https://mods.factorio.com/user/Schorty)
|
||||
|
||||
## Overview
|
||||
![overview](https://github.com/JoeyDP/Factorio-Better-Air-Filtering/blob/master/res/overview.png?raw=true)
|
||||
|
@ -26,6 +26,8 @@ There are currently two types of filters: __expendable filters__ and __recyclabl
|
|||
|
||||
## Technical Details
|
||||
Some things to keep in mind when using this mod:
|
||||
|
||||
- Pollution updates are very UPS efficient. The suction of pollution is implemented per chunk, rather than per machine and updates are spread evenly over an interval of 20 ticks.
|
||||
- The [evolution](https://wiki.factorio.com/Enemies#Evolution) factor of enemies is based on the total amount of produced pollution. Cleaning it back up does not reverse this effect. This means that biters will still get stronger, no matter how proficient you are at cleaning pollution. You can prevent attacks caused by pollution reaching the biter nests however.
|
||||
- Pollution from other chunks is sucked toward air filters at an exponentially decreasing rate depending on the distance. The formula is `suction = base_suction * (1/4)^distance`. This means that filters only pull in approximately as much pollution as they can filter.
|
||||
- When an air filter machine or any other entity containing pollution is destroyed or mined, the pollution inside is dispersed back into the atmosphere.
|
||||
|
@ -37,7 +39,7 @@ Refer to the Factorio mod page for the complete [changelog](https://mods.factori
|
|||
|
||||
## Future Features
|
||||
- A third and more efficient air filtering production chain based on first "dissolving" pollution in water and then treating it in chemical plants.
|
||||
|
||||
- Support for signals, and a potential integration with https://mods.factorio.com/mod/pollution-detector.
|
||||
|
||||
## Bugs / Crashes / Suggestions
|
||||
> Important! This mod is in it's early stages of development and has not yet been extensively tested and balanced.
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.1.2
|
||||
Date: 2019.10.12
|
||||
Features:
|
||||
- Air filters tier 2 and 3 now behave like furnaces. They accept expendable air filters as well as reusable ones.
|
||||
- Fluid capacity of air filter machines reduced to more reasonable amounts.
|
||||
Locale:
|
||||
- EN for reusable air filter tech.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.1.1
|
||||
Date: 2019.10.09
|
||||
Features:
|
||||
|
@ -10,9 +18,9 @@ Date: 2019.10.09
|
|||
Version: 0.1.0
|
||||
Date: 2019.10.08
|
||||
Info:
|
||||
- Initial release
|
||||
- Initial release.
|
||||
Locale:
|
||||
- Only English
|
||||
- English.
|
||||
License:
|
||||
- Using MIT License.
|
||||
- MIT License.
|
||||
|
||||
|
|
|
@ -158,8 +158,8 @@ function absorbChunk(chunk)
|
|||
|
||||
local totalAbsorptionRate = chunk:getTotalAbsorptionRate()
|
||||
|
||||
-- game.print("totalAbsorptionRate: " .. totalAbsorptionRate)
|
||||
-- game.print("filter count: " .. #chunk.filters)
|
||||
--game.print("totalAbsorptionRate: " .. totalAbsorptionRate)
|
||||
--game.print("filter count: " .. #chunk.filters)
|
||||
|
||||
if totalAbsorptionRate == 0 then
|
||||
return
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
"factorio_version": "0.17",
|
||||
"dependencies": [
|
||||
"base >= 0.17",
|
||||
"!air-filtering"
|
||||
"!air-filtering",
|
||||
"!NauvisDay"
|
||||
],
|
||||
"description": "An overhaul of the air filtering mod by Schorty."
|
||||
"description": "An overhaul of the air filtering mod by Schorty. Includes complex air filtering steps to remove pollution."
|
||||
}
|
||||
|
|
|
@ -1,6 +1,40 @@
|
|||
for index, force in pairs(game.forces) do
|
||||
-- Unlock new recipe
|
||||
for _, force in pairs(game.forces) do
|
||||
local technologies = force.technologies
|
||||
local recipes = force.recipes
|
||||
|
||||
recipes["filter-air-expendable"].enabled = technologies["air-filtering-2"].researched
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Doesn't work because migration script is loaded too late
|
||||
|
||||
--local function capAtCapacity(entity, capacity)
|
||||
-- local pollutionFluid = entity.fluidbox[1]
|
||||
-- local pollution = 0
|
||||
-- if pollutionFluid then
|
||||
-- pollution = pollutionFluid.amount
|
||||
-- end
|
||||
-- if pollution > capacity then
|
||||
-- local toRemove = pollution - capacity
|
||||
-- entity.surface.pollute(entity.position, toRemove)
|
||||
-- entity.insert_fluid({ name = "pollution", amount = -toRemove })
|
||||
-- game.print("Removing " .. toRemove .. " pollution")
|
||||
-- end
|
||||
--end
|
||||
--
|
||||
---- Disperse pollution (fluidbox made smaller)
|
||||
--for _, surface in pairs(game.surfaces) do
|
||||
-- local filters1 = surface.find_entities_filtered {
|
||||
-- name = { "air-filter-machine-1" }
|
||||
-- }
|
||||
-- for _, filter in pairs(filters1) do
|
||||
-- capAtCapacity(filter, 4)
|
||||
-- end
|
||||
-- local filters23 = surface.find_entities_filtered {
|
||||
-- name = { "air-filter-machine-2", "air-filter-machine-3" }
|
||||
-- }
|
||||
-- for _, filter in pairs(filters23) do
|
||||
-- capAtCapacity(filter, 40)
|
||||
-- end
|
||||
--end
|
|
@ -49,7 +49,7 @@ data:extend({
|
|||
fluid_boxes = {
|
||||
{
|
||||
production_type = "input",
|
||||
base_area = 2,
|
||||
base_area = 0.2,
|
||||
base_level = -1,
|
||||
pipe_connections = {},
|
||||
},
|
||||
|
@ -124,7 +124,7 @@ data:extend({
|
|||
fluid_boxes = {
|
||||
{
|
||||
production_type = "input",
|
||||
base_area = 2,
|
||||
base_area = 0.4,
|
||||
base_level = -1,
|
||||
pipe_connections = {}
|
||||
},
|
||||
|
@ -164,7 +164,7 @@ data:extend({
|
|||
return_ingredients_on_change = true,
|
||||
},
|
||||
{
|
||||
type = "assembling-machine",
|
||||
type = "furnace",
|
||||
name = "air-filter-machine-3",
|
||||
icon = "__better-air-filtering__/graphics/icons/air-filter-machine-3.png",
|
||||
icon_size = 32,
|
||||
|
@ -210,27 +210,27 @@ data:extend({
|
|||
fluid_boxes = {
|
||||
{
|
||||
production_type = "input",
|
||||
base_area = 2,
|
||||
base_area = 0.4,
|
||||
base_level = -1,
|
||||
pipe_connections = {}
|
||||
},
|
||||
{
|
||||
production_type = "input",
|
||||
pipe_picture = assembler3pipepictures(),
|
||||
pipe_covers = pipecoverspictures(),
|
||||
base_area = 2,
|
||||
base_level = -1,
|
||||
pipe_connections = { { type = "input", position = { 0, -2 } } }
|
||||
},
|
||||
{
|
||||
production_type = "output",
|
||||
pipe_picture = assembler3pipepictures(),
|
||||
pipe_covers = pipecoverspictures(),
|
||||
base_area = 2,
|
||||
base_level = 1,
|
||||
pipe_connections = { { type = "output", position = { 0, 2 } } },
|
||||
secondary_draw_orders = { north = -1 }
|
||||
},
|
||||
--{
|
||||
-- production_type = "input",
|
||||
-- pipe_picture = assembler3pipepictures(),
|
||||
-- pipe_covers = pipecoverspictures(),
|
||||
-- base_area = 2,
|
||||
-- base_level = -1,
|
||||
-- pipe_connections = { { type = "input", position = { 0, -2 } } }
|
||||
--},
|
||||
--{
|
||||
-- production_type = "output",
|
||||
-- pipe_picture = assembler3pipepictures(),
|
||||
-- pipe_covers = pipecoverspictures(),
|
||||
-- base_area = 2,
|
||||
-- base_level = 1,
|
||||
-- pipe_connections = { { type = "output", position = { 0, 2 } } },
|
||||
-- secondary_draw_orders = { north = -1 }
|
||||
--},
|
||||
off_when_no_fluid_recipe = true
|
||||
},
|
||||
crafting_categories = { "air-filtering-advanced" },
|
||||
|
@ -242,12 +242,12 @@ data:extend({
|
|||
},
|
||||
energy_usage = "100kW",
|
||||
fixed_recipe = "filter-air2",
|
||||
ingredient_count = 2,
|
||||
result_inventory_size = 1,
|
||||
source_inventory_size = 1,
|
||||
module_specification = {
|
||||
module_slots = 3
|
||||
},
|
||||
allowed_effects = { "consumption", "speed" },
|
||||
return_ingredients_on_change = true,
|
||||
module_slots = 0,
|
||||
}
|
||||
})
|
||||
|
|
Reference in New Issue