start v0.1.2: fixed tech name, tier 2 is furnace and accepts expendable filters still

This commit is contained in:
Joey De Pauw 2019-10-11 15:48:24 +02:00
parent 8da5bd0d1b
commit debc17df30
6 changed files with 105 additions and 80 deletions

View File

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

View File

@ -25,16 +25,18 @@ polluted-water=Polluted Water
[recipe-name] [recipe-name]
filter-air=Filter air filter-air=Filter air
filter-air2=Filter air filter-air2=Filter air
filter-air-expendable=Filter air
liquid-pollution=Condense pollution liquid-pollution=Condense pollution
air-filter-recycling=Recycle used air filter air-filter-recycling=Recycle used air filter
[technology-name] [technology-name]
air-filtering=Air filtering air-filtering=Air filtering
air-filter-recycling=Recycle used air filters air-filter-recycling=Recycle used air filters
reusable-air-filters=Reusable air filters
[technology-description] [technology-description]
air-filtering-1=Enables the crafting of passive Air Filter Machines to improve air quality by reducing pollution. air-filtering-1=Enables the crafting of passive Air Filter Machines to improve air quality by reducing pollution.
air-filtering-2=A stronger air filter that uses electricity to pull pollution towards it from a 2 chunk radius. 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. 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.

View File

@ -0,0 +1,6 @@
for index, 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

View File

@ -12,26 +12,25 @@ data:extend({
alert_icon_shift = util.by_pixel(-3, -12), alert_icon_shift = util.by_pixel(-3, -12),
collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } },
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
animation = animation = {
{ layers = {
layers =
{
{ {
filename = "__better-air-filtering__/graphics/entity/air-filter-machine-1.png", filename = "__better-air-filtering__/graphics/entity/air-filter-machine-1.png",
priority="medium", priority = "medium",
width = 108, width = 108,
height = 114, height = 114,
frame_count = 32, frame_count = 32,
animation_speed=0.8, animation_speed = 0.8,
line_length = 8, line_length = 8,
shift = util.by_pixel(0, 2) shift = util.by_pixel(0, 2)
}, },
{ {
filename = "__better-air-filtering__/graphics/entity/air-filter-machine-shadow.png", filename = "__better-air-filtering__/graphics/entity/air-filter-machine-shadow.png",
priority="medium", priority = "medium",
width = 95, width = 95,
height = 83, height = 83,
frame_count = 1, frame_count = 1,
animation_speed = 0.8,
line_length = 1, line_length = 1,
repeat_count = 32, repeat_count = 32,
draw_as_shadow = true, draw_as_shadow = true,
@ -42,17 +41,15 @@ data:extend({
match_animation_speed_to_activity = true, match_animation_speed_to_activity = true,
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
working_sound = working_sound = {
{
sound = { { filename = "__base__/sound/electric-furnace.ogg", volume = 0.7 } }, sound = { { filename = "__base__/sound/electric-furnace.ogg", volume = 0.7 } },
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5, apparent_volume = 1.5,
}, },
fluid_boxes = fluid_boxes = {
{
{ {
production_type = "input", production_type = "input",
base_area = 10, base_area = 2,
base_level = -1, base_level = -1,
pipe_connections = {}, pipe_connections = {},
}, },
@ -60,8 +57,7 @@ data:extend({
}, },
crafting_categories = { "air-filtering-basic" }, crafting_categories = { "air-filtering-basic" },
crafting_speed = 0.5, crafting_speed = 0.5,
energy_source = energy_source = {
{
type = "burner", type = "burner",
fuel_category = "pollution-filter", fuel_category = "pollution-filter",
usage_priority = "secondary-input", usage_priority = "secondary-input",
@ -72,14 +68,13 @@ data:extend({
fixed_recipe = "filter-air", fixed_recipe = "filter-air",
ingredient_count = 1, ingredient_count = 1,
return_ingredients_on_change = true, return_ingredients_on_change = true,
module_specification = module_specification = {
{
module_slots = 0 module_slots = 0
}, },
allowed_effects=nil allowed_effects = nil
}, },
{ {
type = "assembling-machine", type = "furnace",
name = "air-filter-machine-2", name = "air-filter-machine-2",
icon = "__better-air-filtering__/graphics/icons/air-filter-machine-2.png", icon = "__better-air-filtering__/graphics/icons/air-filter-machine-2.png",
icon_size = 32, icon_size = 32,
@ -92,10 +87,8 @@ data:extend({
alert_icon_shift = util.by_pixel(-3, -12), alert_icon_shift = util.by_pixel(-3, -12),
collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } },
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
animation = animation = {
{ layers = {
layers =
{
{ {
filename = "__better-air-filtering__/graphics/entity/air-filter-machine-2.png", filename = "__better-air-filtering__/graphics/entity/air-filter-machine-2.png",
priority = "medium", priority = "medium",
@ -107,7 +100,7 @@ data:extend({
}, },
{ {
filename = "__better-air-filtering__/graphics/entity/air-filter-machine-shadow.png", filename = "__better-air-filtering__/graphics/entity/air-filter-machine-shadow.png",
priority="medium", priority = "medium",
width = 95, width = 95,
height = 83, height = 83,
frame_count = 1, frame_count = 1,
@ -119,57 +112,55 @@ data:extend({
} }
}, },
match_animation_speed_to_activity = true, match_animation_speed_to_activity = true,
entity_info_icon_shift={0, -0.3},
scale_entity_info_icon = true,
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
working_sound = working_sound = {
{
sound = { { filename = "__base__/sound/electric-furnace.ogg", volume = 0.7 } }, sound = { { filename = "__base__/sound/electric-furnace.ogg", volume = 0.7 } },
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5, apparent_volume = 1.5,
}, },
fluid_boxes = fluid_boxes = {
{
{ {
production_type = "input", production_type = "input",
base_area = 10, base_area = 2,
base_level = -1, base_level = -1,
pipe_connections= {} pipe_connections = {}
},
{
production_type = "input",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = {{ type="input", position = {0, -2} }}
},
{
production_type = "output",
pipe_picture = assembler2pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = 1,
pipe_connections = { { type = "output", position = { 0, 2 } } },
secondary_draw_orders = { north = -1 }
}, },
--{
-- production_type = "input",
-- pipe_picture = assembler2pipepictures(),
-- pipe_covers = pipecoverspictures(),
-- base_area = 10,
-- base_level = -1,
-- pipe_connections = {{ type="input", position = {0, -2} }}
--},
--{
-- production_type = "output",
-- pipe_picture = assembler2pipepictures(),
-- pipe_covers = pipecoverspictures(),
-- base_area = 10,
-- base_level = 1,
-- pipe_connections = { { type = "output", position = { 0, 2 } } },
-- secondary_draw_orders = { north = -1 }
--},
off_when_no_fluid_recipe = true off_when_no_fluid_recipe = true
}, },
crafting_categories = { "air-filtering-advanced" }, crafting_categories = { "air-filtering-advanced" },
crafting_speed = 1.0, crafting_speed = 1.0,
energy_source = energy_source = {
{
type = "electric", type = "electric",
usage_priority = "secondary-input", usage_priority = "secondary-input",
drain="100kW", drain = "100kW",
}, },
energy_usage = "50kW", energy_usage = "50kW",
fixed_recipe = "filter-air2", result_inventory_size = 1,
ingredient_count = 2, source_inventory_size = 1,
module_specification = module_specification = {
{
module_slots = 2 module_slots = 2
}, },
allowed_effects = {"consumption", "speed"}, allowed_effects = { "consumption", "speed" },
return_ingredients_on_change = true, return_ingredients_on_change = true,
}, },
{ {
@ -184,10 +175,8 @@ data:extend({
corpse = "medium-remnants", corpse = "medium-remnants",
collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } },
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
animation = animation = {
{ layers = {
layers =
{
{ {
filename = "__better-air-filtering__/graphics/entity/air-filter-machine-3.png", filename = "__better-air-filtering__/graphics/entity/air-filter-machine-3.png",
priority = "medium", priority = "medium",
@ -199,7 +188,7 @@ data:extend({
}, },
{ {
filename = "__better-air-filtering__/graphics/entity/air-filter-machine-shadow.png", filename = "__better-air-filtering__/graphics/entity/air-filter-machine-shadow.png",
priority="medium", priority = "medium",
width = 95, width = 95,
height = 83, height = 83,
frame_count = 1, frame_count = 1,
@ -213,33 +202,31 @@ data:extend({
match_animation_speed_to_activity = true, match_animation_speed_to_activity = true,
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
working_sound = working_sound = {
{
sound = { { filename = "__base__/sound/electric-furnace.ogg", volume = 0.7 } }, sound = { { filename = "__base__/sound/electric-furnace.ogg", volume = 0.7 } },
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5, apparent_volume = 1.5,
}, },
fluid_boxes = fluid_boxes = {
{
{ {
production_type = "input", production_type = "input",
base_area = 10, base_area = 2,
base_level = -1, base_level = -1,
pipe_connections= {} pipe_connections = {}
}, },
{ {
production_type = "input", production_type = "input",
pipe_picture = assembler3pipepictures(), pipe_picture = assembler3pipepictures(),
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
base_area = 10, base_area = 2,
base_level = -1, base_level = -1,
pipe_connections = {{ type="input", position = {0, -2} }} pipe_connections = { { type = "input", position = { 0, -2 } } }
}, },
{ {
production_type = "output", production_type = "output",
pipe_picture = assembler3pipepictures(), pipe_picture = assembler3pipepictures(),
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
base_area = 10, base_area = 2,
base_level = 1, base_level = 1,
pipe_connections = { { type = "output", position = { 0, 2 } } }, pipe_connections = { { type = "output", position = { 0, 2 } } },
secondary_draw_orders = { north = -1 } secondary_draw_orders = { north = -1 }
@ -248,20 +235,18 @@ data:extend({
}, },
crafting_categories = { "air-filtering-advanced" }, crafting_categories = { "air-filtering-advanced" },
crafting_speed = 1.25, crafting_speed = 1.25,
energy_source = energy_source = {
{
type = "electric", type = "electric",
usage_priority = "secondary-input", usage_priority = "secondary-input",
drain="200kW", drain = "200kW",
}, },
energy_usage = "100kW", energy_usage = "100kW",
fixed_recipe = "filter-air2", fixed_recipe = "filter-air2",
ingredient_count = 2, ingredient_count = 2,
module_specification = module_specification = {
{
module_slots = 3 module_slots = 3
}, },
allowed_effects = {"consumption", "speed"}, allowed_effects = { "consumption", "speed" },
return_ingredients_on_change = true, return_ingredients_on_change = true,
module_slots = 0, module_slots = 0,
} }

View File

@ -161,6 +161,35 @@ data:extend({
results = { { type = "item", name = "used-air-filter", amount = 1 } }, results = { { type = "item", name = "used-air-filter", amount = 1 } },
main_product = "" main_product = ""
}, },
{
type = "recipe",
name = "filter-air-expendable",
hide_from_player_crafting = true,
hide_from_stats = true,
icons = {
{
icon = "__base__/graphics/icons/fluid/pollution.png"
},
{
icon = "__better-air-filtering__/graphics/icons/recipe/filter-air.png",
scale = 0.6,
shift = { 6, 6 }
},
},
icon_size = 32,
category = "air-filtering-advanced",
subgroup = "raw-material",
order = "b[filter-air]",
energy_required = 3,
enabled = false,
ingredients =
{
{ type = "fluid", name = "pollution", amount = 10, fluidbox_index = 1 },
{ type = "item", name = "expendable-air-filter", amount = 1 },
},
results = {},
main_product = ""
},
{ {
type = "recipe", type = "recipe",
name = "liquid-pollution", name = "liquid-pollution",

View File

@ -2,7 +2,7 @@ data:extend({
{ {
type = "technology", type = "technology",
name = "air-filtering-1", name = "air-filtering-1",
localised_description = {"technology-description.air-filtering-1"}, localised_description = { "technology-description.air-filtering-1" },
icon = "__better-air-filtering__/graphics/technology/air-filtering-1.png", icon = "__better-air-filtering__/graphics/technology/air-filtering-1.png",
icon_size = "64", icon_size = "64",
prerequisites = { "automation", "electronics" }, prerequisites = { "automation", "electronics" },
@ -78,7 +78,7 @@ data:extend({
{ {
type = "technology", type = "technology",
name = "air-filtering-2", name = "air-filtering-2",
localised_description = {"technology-description.air-filtering-2"}, localised_description = { "technology-description.air-filtering-2" },
icon = "__better-air-filtering__/graphics/technology/air-filtering-2.png", icon = "__better-air-filtering__/graphics/technology/air-filtering-2.png",
icon_size = "64", icon_size = "64",
prerequisites = { "air-filtering-1", "reusable-air-filters", "advanced-electronics" }, prerequisites = { "air-filtering-1", "reusable-air-filters", "advanced-electronics" },
@ -87,10 +87,13 @@ data:extend({
type = "unlock-recipe", type = "unlock-recipe",
recipe = "air-filter-machine-2" recipe = "air-filter-machine-2"
}, },
{ {
type = "unlock-recipe", type = "unlock-recipe",
recipe = "filter-air2" recipe = "filter-air2"
},
{
type = "unlock-recipe",
recipe = "filter-air-expendable"
} }
}, },
unit = { unit = {
@ -107,7 +110,7 @@ data:extend({
{ {
type = "technology", type = "technology",
name = "air-filtering-3", name = "air-filtering-3",
localised_description = {"technology-description.air-filtering-3"}, localised_description = { "technology-description.air-filtering-3" },
icon = "__better-air-filtering__/graphics/technology/air-filtering-3.png", icon = "__better-air-filtering__/graphics/technology/air-filtering-3.png",
icon_size = "64", icon_size = "64",
prerequisites = { "air-filtering-2" }, prerequisites = { "air-filtering-2" },