From fe30affb28ab9524ee0b67a853256a24ff144a6d Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sun, 13 Jul 2025 12:25:10 +0200 Subject: [PATCH] Fixed several entities --- Bio_Industries_2/common.lua | 3 +- .../prototypes/Bio_Farm/entities.lua | 1549 +++++++++-------- .../prototypes/Bio_Fuel/entities.lua | 734 ++++---- .../prototypes/Bio_Garden/entities.lua | 133 +- .../prototypes/Bio_Solar_Farm/entities.lua | 870 ++++----- .../compound_entities/hidden_panels.lua | 82 +- 6 files changed, 1691 insertions(+), 1680 deletions(-) diff --git a/Bio_Industries_2/common.lua b/Bio_Industries_2/common.lua index 08fd075..267ac21 100644 --- a/Bio_Industries_2/common.lua +++ b/Bio_Industries_2/common.lua @@ -247,6 +247,7 @@ return function(mod_name) -- Rudimentary check of the arguments passed to a function common.check_args = function(arg, arg_type, desc) if not (arg and type(arg) == arg_type) then + game.print(type(arg) .. " = " .. arg_type) common.arg_err(arg or "nil", desc or arg_type or "nil") end end @@ -596,7 +597,7 @@ return function(mod_name) common.show("#g_table", g_table and table_size(g_table)) common.check_args(g_table, "table") - common.check_args(base_entity, "table") + common.check_args(base_entity, "userdata") if not base_entity.valid then common.arg_err(base_entity, "base entity") diff --git a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua index 6fcb455..1003a95 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua @@ -4,833 +4,846 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ENTITYPATH = BioInd.modRoot .. "/graphics/entities/biofarm/" -require ("prototypes.Bio_Farm.pipeConnectors") -require ("util") +require("prototypes.Bio_Farm.pipeConnectors") +require("util") inv_extension2 = { - filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png", - priority = "high", - width = 320, - height = 320, - frame_count = 1, - direction_count = 1, - shift = {0.75, 0}, + filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png", + priority = "high", + width = 320, + height = 320, + frame_count = 1, + direction_count = 1, + shift = { 0.75, 0 }, } data:extend({ - ------- Seedling - { - type = "simple-entity-with-force", - name = "seedling", - localised_name = {"entity-name.seedling"}, - localised_description = {"entity-description.seedling"}, - icon = ICONPATH .. "Seedling.png", - icon_size = 64, - icons = { - { + ------- Seedling + { + type = "simple-entity-with-force", + name = "seedling", + localised_name = { "entity-name.seedling" }, + localised_description = { "entity-description.seedling" }, icon = ICONPATH .. "Seedling.png", icon_size = 64, - } - }, - order = "x[bi]-a[bi-seedling]", - flags = {"placeable-neutral", "placeable-player", "player-creation", "breaths-air"}, - create_ghost_on_death = false, - minable = { - mining_particle = "wooden-particle", - mining_time = 0.25, - results = {{type="item", name="seedling", amount=1}}, - count = 1 - }, - corpse = nil, - remains_when_mined = nil, - emissions_per_second = { pollution = -0.0006 }, - max_health = 5, + icons = { + { + icon = ICONPATH .. "Seedling.png", + icon_size = 64, + } + }, + order = "x[bi]-a[bi-seedling]", + flags = { "placeable-neutral", "placeable-player", "player-creation", "breaths-air" }, + create_ghost_on_death = false, + minable = { + mining_particle = "wooden-particle", + mining_time = 0.25, + results = { { type = "item", name = "seedling", amount = 1 } }, + count = 1 + }, + corpse = nil, + remains_when_mined = nil, + emissions_per_second = { pollution = -0.0006 }, + max_health = 5, - collision_box = {{-0.1, -0.1}, {0.1, 0.1}}, - selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, - subgroup = "trees", - impact_category = "wood", - picture = { - filename = ICONPATH .. "Seedling_b.png", - priority = "extra-high", - width = 64, - height = 64, + collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } }, + selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + subgroup = "trees", + impact_category = "wood", + picture = { + filename = ICONPATH .. "Seedling_b.png", + priority = "extra-high", + width = 64, + height = 64, scale = 0.3 + }, }, - }, - ------- Seedling - Dummy for Seed Bomb - { - type = "simple-entity-with-force", - name = "seedling-2", - localised_name = {"entity-name.seedling"}, - localised_description = {"entity-description.seedling"}, - icon = ICONPATH .. "Seedling.png", - icon_size = 64, - icons = { - { + ------- Seedling - Dummy for Seed Bomb + { + type = "simple-entity-with-force", + name = "seedling-2", + localised_name = { "entity-name.seedling" }, + localised_description = { "entity-description.seedling" }, icon = ICONPATH .. "Seedling.png", icon_size = 64, - } - }, - order = "x[bi]-a[bi-seedling]", - flags = {"placeable-neutral", "placeable-player", "player-creation", "breaths-air"}, - create_ghost_on_death = false, - minable = { - mining_particle = "wooden-particle", - mining_time = 0.25, - results = {{type="item", name="seedling", amount=1}}, - count = 1 - }, - corpse = nil, - remains_when_mined = nil, - emissions_per_second = { pollution = -0.0006 }, - max_health = 5, + icons = { + { + icon = ICONPATH .. "Seedling.png", + icon_size = 64, + } + }, + order = "x[bi]-a[bi-seedling]", + flags = { "placeable-neutral", "placeable-player", "player-creation", "breaths-air" }, + create_ghost_on_death = false, + minable = { + mining_particle = "wooden-particle", + mining_time = 0.25, + results = { { type = "item", name = "seedling", amount = 1 } }, + count = 1 + }, + corpse = nil, + remains_when_mined = nil, + emissions_per_second = { pollution = -0.0006 }, + max_health = 5, - collision_box = {{-0.1, -0.1}, {0.1, 0.1}}, - selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, - subgroup = "trees", - impact_category = "wood", - picture = { - filename = ICONPATH .. "Seedling_b.png", - priority = "extra-high", - width = 64, - height = 64, + collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } }, + selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + subgroup = "trees", + impact_category = "wood", + picture = { + filename = ICONPATH .. "Seedling_b.png", + priority = "extra-high", + width = 64, + height = 64, scale = 0.3 + }, }, - }, - { - type = "simple-entity-with-force", - name = "seedling-3", - localised_name = {"entity-name.seedling"}, - localised_description = {"entity-description.seedling"}, - icon = ICONPATH .. "Seedling.png", - icon_size = 64, - icons = { - { + { + type = "simple-entity-with-force", + name = "seedling-3", + localised_name = { "entity-name.seedling" }, + localised_description = { "entity-description.seedling" }, icon = ICONPATH .. "Seedling.png", icon_size = 64, - } - }, - order = "x[bi]-a[bi-seedling]", - flags = {"placeable-neutral", "placeable-player", "player-creation", "breaths-air"}, - create_ghost_on_death = false, - minable = { - mining_particle = "wooden-particle", - mining_time = 0.25, - results = {{type="item", name="seedling", amount=1}}, - count = 1 - }, - corpse = nil, - remains_when_mined = nil, - emissions_per_second = { pollution = -0.0006 }, - max_health = 5, + icons = { + { + icon = ICONPATH .. "Seedling.png", + icon_size = 64, + } + }, + order = "x[bi]-a[bi-seedling]", + flags = { "placeable-neutral", "placeable-player", "player-creation", "breaths-air" }, + create_ghost_on_death = false, + minable = { + mining_particle = "wooden-particle", + mining_time = 0.25, + results = { { type = "item", name = "seedling", amount = 1 } }, + count = 1 + }, + corpse = nil, + remains_when_mined = nil, + emissions_per_second = { pollution = -0.0006 }, + max_health = 5, - collision_box = {{-0.1, -0.1}, {0.1, 0.1}}, - selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, - subgroup = "trees", - impact_category = "wood", - picture = { - filename = ICONPATH .. "Seedling_b.png", - priority = "extra-high", - width = 64, - height = 64, + collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } }, + selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + subgroup = "trees", + impact_category = "wood", + picture = { + filename = ICONPATH .. "Seedling_b.png", + priority = "extra-high", + width = 64, + height = 64, scale = 0.3 + }, }, - }, - ------- Bio Farm - { - type = "assembling-machine", - name = "bi-bio-farm", - icon = ICONPATH .. "Bio_Farm_Icon.png", - icon_size = 64, - icons = { - { + ------- Bio Farm + { + type = "assembling-machine", + name = "bi-bio-farm", icon = ICONPATH .. "Bio_Farm_Icon.png", icon_size = 64, - } - }, - flags = {"placeable-neutral", "placeable-player", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-farm"}, - max_health = 250, - corpse = "big-remnants", - dying_explosion = "medium-explosion", - resistances = {{type = "fire", percent = 70}}, - fluid_boxes = { - { - production_type = "input", - pipe_picture = assembler3pipepictures(), - pipe_covers = pipecoverspictures(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {-1, -4} }} - }, - { - production_type = "input", - pipe_picture = assembler3pipepictures(), - pipe_covers = pipecoverspictures(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, -4} }} - }, - }, - fluid_boxes_off_when_no_fluid_recipe = true, + icons = { + { + icon = ICONPATH .. "Bio_Farm_Icon.png", + icon_size = 64, + } + }, + flags = { "placeable-neutral", "placeable-player", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-farm" }, + max_health = 250, + corpse = "big-remnants", + dying_explosion = "medium-explosion", + resistances = { { type = "fire", percent = 70 } }, + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -1, -4 } } } + }, + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 1, -4 } } } + }, + }, + fluid_boxes_off_when_no_fluid_recipe = true, - collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, - selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, + collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, + selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, - animation = { - filename = ENTITYPATH .. "Bio_Farm_Idle.png", - priority = "high", - width = 348, - height = 288, - shift = {0.96, 0}, - frame_count = 1, + graphics_set = { + animation = { + filename = ENTITYPATH .. "Bio_Farm_Idle.png", + priority = "high", + width = 348, + height = 288, + shift = { 0.96, 0 }, + frame_count = 1, + }, + working_visualisations = { { + animation = { + filename = ENTITYPATH .. "Bio_Farm_Working.png", + priority = "high", + width = 348, + height = 288, + shift = { 0.96, 0 }, + frame_count = 1, + }, + } } + }, + + crafting_categories = { "biofarm-mod-farm" }, + crafting_speed = 1, + energy_source = { + type = "electric", + usage_priority = "primary-input", + drain = "50kW", + emissions_per_minute = { pollution = -9 }, -- the "-" means it Absorbs pollution. + }, + energy_usage = "100kW", + ingredient_count = 3, + open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, + close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, + module_specification = { + module_slots = 3 + }, + allowed_effects = { "consumption", "speed", "productivity", "pollution" }, }, - working_visualisations = { - animation = { - filename = ENTITYPATH .. "Bio_Farm_Working.png", - priority = "high", - width = 348, - height = 288, - shift = {0.96, 0}, - frame_count = 1, - }, - }, - crafting_categories = {"biofarm-mod-farm"}, - crafting_speed = 1, - energy_source = { - type = "electric", - usage_priority = "primary-input", - drain = "50kW", - emissions_per_minute = { pollution = -9 }, -- the "-" means it Absorbs pollution. - }, - energy_usage = "100kW", - ingredient_count = 3, - open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, - close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, - module_specification = { - module_slots = 3 - }, - allowed_effects = {"consumption", "speed", "productivity", "pollution"}, - }, +}) - }) - - ------- Bio Farm Hidden Electric Pole +------- Bio Farm Hidden Electric Pole data:extend({ - ------ Greenhouse - { - type = "assembling-machine", - name = "bi-bio-greenhouse", - icon = ICONPATH .. "bio_greenhouse.png", - icon_size = 64, - icons = { - { + ------ Greenhouse + { + type = "assembling-machine", + name = "bi-bio-greenhouse", icon = ICONPATH .. "bio_greenhouse.png", icon_size = 64, - } - }, - flags = {"placeable-neutral", "placeable-player", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.25, result = "bi-bio-greenhouse"}, - collision_box = {{-1.2, -1.2}, {1.2, 1.2}}, - selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, - max_health = 250, - corpse = "medium-remnants", - dying_explosion = "medium-explosion", - crafting_categories = {"biofarm-mod-greenhouse"}, - crafting_speed = 1, - energy_source = { - type = "electric", - usage_priority = "primary-input", - drain = "15kW", - emissions_per_minute = { pollution = -6 }, -- the "-" means it Absorbs pollution. - }, - energy_usage = "50kW", - ingredient_count = 3, - resistances = { - { - type = "fire", - percent = 70 - } - }, - fluid_boxes = { - { - production_type = "input", - pipe_picture = assembler3pipepictures(), - pipe_covers = pipecoverspictures(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }} - }, - }, - module_specification = { - module_slots = 2 - }, - allowed_effects = {"consumption", "speed", "productivity", "pollution"}, - animation = { - filename = ENTITYPATH .. "bio_greenhouse_off.png", - width = 113, - height = 93, - frame_count = 1, - scale = 1, - shift = {0.3, 0} - }, - working_visualisations = { - { - light = {intensity = 1, size = 6}, - animation = { - filename = ENTITYPATH .. "bio_greenhouse_on.png", - width = 113, - height = 93, - frame_count = 1, - scale = 1, - shift = {0.3, 0} - } - } - }, - open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, - close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 } - }, + icons = { + { + icon = ICONPATH .. "bio_greenhouse.png", + icon_size = 64, + } + }, + flags = { "placeable-neutral", "placeable-player", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.25, result = "bi-bio-greenhouse" }, + collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, + selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, + max_health = 250, + corpse = "medium-remnants", + dying_explosion = "medium-explosion", + crafting_categories = { "biofarm-mod-greenhouse" }, + crafting_speed = 1, + energy_source = { + type = "electric", + usage_priority = "primary-input", + drain = "15kW", + emissions_per_minute = { pollution = -6 }, -- the "-" means it Absorbs pollution. + }, + energy_usage = "50kW", + ingredient_count = 3, + resistances = { + { + type = "fire", + percent = 70 + } + }, + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } } + }, + }, + module_specification = { + module_slots = 2 + }, + allowed_effects = { "consumption", "speed", "productivity", "pollution" }, - -- COKERY - { - type = "assembling-machine", - name = "bi-cokery", - icon = ICONPATH .. "cokery.png", - icon_size = 64, - icons = { - { + graphics_set = { + animation = { + filename = ENTITYPATH .. "bio_greenhouse_off.png", + width = 113, + height = 93, + frame_count = 1, + scale = 1, + shift = { 0.3, 0 } + }, + working_visualisations = { + { + light = { intensity = 1, size = 6 }, + animation = { + filename = ENTITYPATH .. "bio_greenhouse_on.png", + width = 113, + height = 93, + frame_count = 1, + scale = 1, + shift = { 0.3, 0 } + } + } + }, + }, + + open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, + close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 } + }, + + -- COKERY + { + type = "assembling-machine", + name = "bi-cokery", icon = ICONPATH .. "cokery.png", icon_size = 64, - } - }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "placeable-player", "player-creation"}, - order = "a[cokery]", - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-cokery"}, - max_health = 200, - corpse = "medium-remnants", - resistances = {{type = "fire", percent = 95}}, - collision_box = {{-1.2, -1.2}, {1.2, 1.2}}, - selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, - module_specification = { - module_slots = 2 - }, - allowed_effects = {"consumption", "speed", "pollution"}, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/cokery/cokery_sheet.png", - frame_count = 28, - line_length = 7, - width = 256, - height = 256, - scale = 0.5, - shift = {0.5, -0.5}, - animation_speed = 0.1 - }, - crafting_categories = {"biofarm-mod-smelting"}, - energy_source = { - type = "electric", - input_priority = "secondary", - usage_priority = "secondary-input", - emissions_per_minute = { pollution = 2.5 }, - }, - energy_usage = "180kW", - crafting_speed = 2, - ingredient_count = 1 - }, - - -- STONECRUSHER - { - type = "furnace", - name = "bi-stone-crusher", - icon = ICONPATH .. "stone_crusher.png", - icon_size = 64, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-stone-crusher"}, - max_health = 100, - corpse = "medium-remnants", - module_slots = 1, - resistances = {{type = "fire", percent = 70}}, - working_sound = { - sound = { - filename = "__base__/sound/assembling-machine-t1-1.ogg", - volume = 0.7 - }, - apparent_volume = 1.5 - }, - collision_box = {{-0.8, -0.8}, {0.8, 0.8}}, - selection_box = {{-1.0, -1.0}, {1.0, 1.0}}, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone_crusher_anim.png", - priority = "high", - width = 65, - height = 78, - frame_count = 11, - animation_speed = 0.5, - shift = {0.0, -0.1} - }, - working_visualisations = { - filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone-crusher-anim.png", - priority = "high", - width = 65, - height = 78, - frame_count = 11, - animation_speed = 0.18 / 2.5, - shift = {0.0, -0.1} - }, - crafting_categories = {"biofarm-mod-crushing"}, - result_inventory_size = 1, - source_inventory_size = 1, - crafting_speed = 1, - energy_source = { - type = "electric", - usage_priority = "secondary-input", - emissions_per_minute = { pollution = 0.25 }, - }, - energy_usage = "50kW", - module_specification = { - module_slots = 2 - }, - allowed_effects = {"consumption", "speed", "pollution"}, - }, - - --- Seed Bomb Projectile - 1 - { - type = "projectile", - name = "seed-bomb-projectile-1", - flags = {"not-on-map"}, - acceleration = 0.005, - action = { - type = "direct", - action_delivery = { - type = "instant", - target_effects = { - { - type = "nested-result", - action = { - type = "area", - target_entities = false, - repeat_count = 600, - radius = 24, - action_delivery = { - type = "projectile", - projectile = "seed-bomb-wave-1", - starting_speed = 0.5 - } - } - } - } - } - }, - light = {intensity = 0.8, size = 15}, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/rocket.png", - frame_count = 8, - line_length = 8, - width = 9, - height = 35, - shift = {0, 0}, - priority = "high" - }, - shadow = { - filename = "__Bio_Industries_2__/graphics/entities/rocket-shadow.png", - frame_count = 1, - width = 7, - height = 24, - priority = "high", - shift = {0, 0} - }, - smoke = { - { - name = "smoke-fast", - deviation = {0.15, 0.15}, - frequency = 1, - position = {0, -1}, - slow_down_factor = 1, - starting_frame = 3, - starting_frame_deviation = 5, - starting_frame_speed = 0, - starting_frame_speed_deviation = 5 - } - } - }, - - --- Seed Bomb Projectile - 2 - { - type = "projectile", - name = "seed-bomb-projectile-2", - flags = {"not-on-map"}, - acceleration = 0.005, - action = { - type = "direct", - action_delivery = { - type = "instant", - target_effects = { - { - type = "nested-result", - action = { - type = "area", - target_entities = false, - repeat_count = 800, - radius = 27, - action_delivery = { - type = "projectile", - projectile = "seed-bomb-wave-2", - starting_speed = 0.5 - } - } - } - } - } - }, - light = {intensity = 0.8, size = 15}, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/rocket.png", - frame_count = 8, - line_length = 8, - width = 9, - height = 35, - shift = {0, 0}, - priority = "high" - }, - shadow = { - filename = "__Bio_Industries_2__/graphics/entities/rocket-shadow.png", - frame_count = 1, - width = 7, - height = 24, - priority = "high", - shift = {0, 0} - }, - smoke = { - { - name = "smoke-fast", - deviation = {0.15, 0.15}, - frequency = 1, - position = {0, -1}, - slow_down_factor = 1, - starting_frame = 3, - starting_frame_deviation = 5, - starting_frame_speed = 0, - starting_frame_speed_deviation = 5 - } - } - }, - - --- Seed Bomb Projectile - 3 - { - type = "projectile", - name = "seed-bomb-projectile-3", - flags = {"not-on-map"}, - acceleration = 0.005, - action = { - type = "direct", - action_delivery = { - type = "instant", - target_effects = { - { - type = "nested-result", - action = { - type = "area", - target_entities = false, - repeat_count = 1000, - radius = 30, - action_delivery = { - type = "projectile", - projectile = "seed-bomb-wave-3", - starting_speed = 0.5 - } - } - } - } - } - }, - light = {intensity = 0.8, size = 15}, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/rocket.png", - frame_count = 8, - line_length = 8, - width = 9, - height = 35, - shift = {0, 0}, - priority = "high" - }, - shadow = { - filename = "__Bio_Industries_2__/graphics/entities/rocket-shadow.png", - frame_count = 1, - width = 7, - height = 24, - priority = "high", - shift = {0, 0} - }, - smoke = { - { - name = "smoke-fast", - deviation = {0.15, 0.15}, - frequency = 1, - position = {0, -1}, - slow_down_factor = 1, - starting_frame = 3, - starting_frame_deviation = 5, - starting_frame_speed = 0, - starting_frame_speed_deviation = 5 - } - } - }, - - --- Seed Bomb Wave - 1 - { - type = "projectile", - name = "seed-bomb-wave-1", - flags = {"not-on-map"}, - acceleration = 0, - action = { - { - type = "direct", - action_delivery = { - type = "instant", - target_effects = { + icons = { { - type = "create-entity", - entity_name = "seedling", - check_buildability = true, - trigger_created_entity = true, + icon = ICONPATH .. "cokery.png", + icon_size = 64, } - } - } - }, - }, - animation = { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - }, - shadow = { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - } - }, - - --- Seed Bomb Wave - 2 - { - type = "projectile", - name = "seed-bomb-wave-2", - flags = {"not-on-map"}, - acceleration = 0, - action = { - { - type = "direct", - action_delivery = { - type = "instant", - target_effects = { - { - type = "create-entity", - entity_name = "seedling-2", - check_buildability = true, - trigger_created_entity = true, - } - } - } - }, - }, - animation = { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - }, - shadow = { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - } - }, - - --- Seed Bomb Wave - 3 - { - type = "projectile", - name = "seed-bomb-wave-3", - flags = {"not-on-map"}, - acceleration = 0, - action = { - { - type = "direct", - action_delivery = { - type = "instant", - target_effects = { - { - type = "create-entity", - entity_name = "seedling-3", - check_buildability = true, - trigger_created_entity = true, + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "placeable-player", "player-creation" }, + order = "a[cokery]", + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-cokery" }, + max_health = 200, + corpse = "medium-remnants", + resistances = { { type = "fire", percent = 95 } }, + collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, + selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, + module_specification = { + module_slots = 2 + }, + allowed_effects = { "consumption", "speed", "pollution" }, + graphics_set = { + animation = { + filename = "__Bio_Industries_2__/graphics/entities/cokery/cokery_sheet.png", + frame_count = 28, + line_length = 7, + width = 256, + height = 256, + scale = 0.5, + shift = { 0.5, -0.5 }, + animation_speed = 0.1 }, - } + }, + crafting_categories = { "biofarm-mod-smelting" }, + energy_source = { + type = "electric", + input_priority = "secondary", + usage_priority = "secondary-input", + emissions_per_minute = { pollution = 2.5 }, + }, + energy_usage = "180kW", + crafting_speed = 2, + ingredient_count = 1 + }, + + -- STONECRUSHER + { + type = "furnace", + name = "bi-stone-crusher", + icon = ICONPATH .. "stone_crusher.png", + icon_size = 64, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-stone-crusher" }, + max_health = 100, + corpse = "medium-remnants", + module_slots = 1, + resistances = { { type = "fire", percent = 70 } }, + working_sound = { + sound = { + filename = "__base__/sound/assembling-machine-t1-1.ogg", + volume = 0.7 + }, + apparent_volume = 1.5 + }, + collision_box = { { -0.8, -0.8 }, { 0.8, 0.8 } }, + selection_box = { { -1.0, -1.0 }, { 1.0, 1.0 } }, + graphics_set = { + animation = { + filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone_crusher_anim.png", + priority = "high", + width = 65, + height = 78, + frame_count = 11, + animation_speed = 0.5, + shift = { 0.0, -0.1 } + }, + working_visualisations = { { + filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone-crusher-anim.png", + priority = "high", + width = 65, + height = 78, + frame_count = 11, + animation_speed = 0.18 / 2.5, + shift = { 0.0, -0.1 } + } }, + }, + crafting_categories = { "biofarm-mod-crushing" }, + result_inventory_size = 1, + source_inventory_size = 1, + crafting_speed = 1, + energy_source = { + type = "electric", + usage_priority = "secondary-input", + emissions_per_minute = { pollution = 0.25 }, + }, + energy_usage = "50kW", + module_specification = { + module_slots = 2 + }, + allowed_effects = { "consumption", "speed", "pollution" }, + }, + + --- Seed Bomb Projectile - 1 + { + type = "projectile", + name = "seed-bomb-projectile-1", + flags = { "not-on-map" }, + acceleration = 0.005, + action = { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + { + type = "nested-result", + action = { + type = "area", + target_entities = false, + repeat_count = 600, + radius = 24, + action_delivery = { + type = "projectile", + projectile = "seed-bomb-wave-1", + starting_speed = 0.5 + } + } + } + } + } + }, + light = { intensity = 0.8, size = 15 }, + animation = { + filename = "__Bio_Industries_2__/graphics/entities/rocket.png", + frame_count = 8, + line_length = 8, + width = 9, + height = 35, + shift = { 0, 0 }, + priority = "high" + }, + shadow = { + filename = "__Bio_Industries_2__/graphics/entities/rocket-shadow.png", + frame_count = 1, + width = 7, + height = 24, + priority = "high", + shift = { 0, 0 } + }, + smoke = { + { + name = "smoke-fast", + deviation = { 0.15, 0.15 }, + frequency = 1, + position = { 0, -1 }, + slow_down_factor = 1, + starting_frame = 3, + starting_frame_deviation = 5, + starting_frame_speed = 0, + starting_frame_speed_deviation = 5 + } } - }, }, - animation = { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - }, - shadow = { - filename = "__core__/graphics/empty.png", - frame_count = 1, - width = 1, - height = 1, - priority = "high" - } - }, - ---- Arboretum Area Overlay - { - type = "ammo-turret", - name = "bi-arboretum-area", - localised_name = {"entity-name.bi-arboretum"}, - localised_description = {"entity-description.bi-arboretum"}, - icon = ICONPATH .. "Arboretum_Icon.png", - icon_size = 64, - icons = { - { + --- Seed Bomb Projectile - 2 + { + type = "projectile", + name = "seed-bomb-projectile-2", + flags = { "not-on-map" }, + acceleration = 0.005, + action = { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + { + type = "nested-result", + action = { + type = "area", + target_entities = false, + repeat_count = 800, + radius = 27, + action_delivery = { + type = "projectile", + projectile = "seed-bomb-wave-2", + starting_speed = 0.5 + } + } + } + } + } + }, + light = { intensity = 0.8, size = 15 }, + animation = { + filename = "__Bio_Industries_2__/graphics/entities/rocket.png", + frame_count = 8, + line_length = 8, + width = 9, + height = 35, + shift = { 0, 0 }, + priority = "high" + }, + shadow = { + filename = "__Bio_Industries_2__/graphics/entities/rocket-shadow.png", + frame_count = 1, + width = 7, + height = 24, + priority = "high", + shift = { 0, 0 } + }, + smoke = { + { + name = "smoke-fast", + deviation = { 0.15, 0.15 }, + frequency = 1, + position = { 0, -1 }, + slow_down_factor = 1, + starting_frame = 3, + starting_frame_deviation = 5, + starting_frame_speed = 0, + starting_frame_speed_deviation = 5 + } + } + }, + + --- Seed Bomb Projectile - 3 + { + type = "projectile", + name = "seed-bomb-projectile-3", + flags = { "not-on-map" }, + acceleration = 0.005, + action = { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + { + type = "nested-result", + action = { + type = "area", + target_entities = false, + repeat_count = 1000, + radius = 30, + action_delivery = { + type = "projectile", + projectile = "seed-bomb-wave-3", + starting_speed = 0.5 + } + } + } + } + } + }, + light = { intensity = 0.8, size = 15 }, + animation = { + filename = "__Bio_Industries_2__/graphics/entities/rocket.png", + frame_count = 8, + line_length = 8, + width = 9, + height = 35, + shift = { 0, 0 }, + priority = "high" + }, + shadow = { + filename = "__Bio_Industries_2__/graphics/entities/rocket-shadow.png", + frame_count = 1, + width = 7, + height = 24, + priority = "high", + shift = { 0, 0 } + }, + smoke = { + { + name = "smoke-fast", + deviation = { 0.15, 0.15 }, + frequency = 1, + position = { 0, -1 }, + slow_down_factor = 1, + starting_frame = 3, + starting_frame_deviation = 5, + starting_frame_speed = 0, + starting_frame_speed_deviation = 5 + } + } + }, + + --- Seed Bomb Wave - 1 + { + type = "projectile", + name = "seed-bomb-wave-1", + flags = { "not-on-map" }, + acceleration = 0, + action = { + { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + { + type = "create-entity", + entity_name = "seedling", + check_buildability = true, + trigger_created_entity = true, + } + } + } + }, + }, + animation = { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + }, + shadow = { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + } + }, + + --- Seed Bomb Wave - 2 + { + type = "projectile", + name = "seed-bomb-wave-2", + flags = { "not-on-map" }, + acceleration = 0, + action = { + { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + { + type = "create-entity", + entity_name = "seedling-2", + check_buildability = true, + trigger_created_entity = true, + } + } + } + }, + }, + animation = { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + }, + shadow = { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + } + }, + + --- Seed Bomb Wave - 3 + { + type = "projectile", + name = "seed-bomb-wave-3", + flags = { "not-on-map" }, + acceleration = 0, + action = { + { + type = "direct", + action_delivery = { + type = "instant", + target_effects = { + { + type = "create-entity", + entity_name = "seedling-3", + check_buildability = true, + trigger_created_entity = true, + }, + } + } + }, + }, + animation = { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + }, + shadow = { + filename = "__core__/graphics/empty.png", + frame_count = 1, + width = 1, + height = 1, + priority = "high" + } + }, + + ---- Arboretum Area Overlay + { + type = "ammo-turret", + name = "bi-arboretum-area", + localised_name = { "entity-name.bi-arboretum" }, + localised_description = { "entity-description.bi-arboretum" }, icon = ICONPATH .. "Arboretum_Icon.png", icon_size = 64, - } - }, - flags = {"not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable"}, - open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, - close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, - max_health = 250, - corpse = "big-remnants", - dying_explosion = "medium-explosion", - collision_box = {{-4.5, -4.5}, {4.5, 4.5}}, - selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, - order = "x[bi]-a[bi-arboretum]", - automated_ammo_count = 1, - resistances = {}, - inventory_size = 1, - attack_parameters = { - type = "projectile", - ammo_category = "bullet", - cooldown = 2, - range = 75, - projectile_creation_distance = 0.1, - action ={} - }, - folding_speed = 0.08, - folded_animation = (function() - local res = util.table.deepcopy(inv_extension2) - res.frame_count = 1 - res.line_length = 1 - return res + icons = { + { + icon = ICONPATH .. "Arboretum_Icon.png", + icon_size = 64, + } + }, + flags = { "not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable" }, + open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, + close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, + max_health = 250, + corpse = "big-remnants", + dying_explosion = "medium-explosion", + collision_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, + selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, + order = "x[bi]-a[bi-arboretum]", + automated_ammo_count = 1, + resistances = {}, + inventory_size = 1, + attack_parameters = { + type = "projectile", + ammo_category = "bullet", + cooldown = 2, + range = 75, + projectile_creation_distance = 0.1, + action = {} + }, + folding_speed = 0.08, + folded_animation = (function() + local res = util.table.deepcopy(inv_extension2) + res.frame_count = 1 + res.line_length = 1 + return res end)(), - folding_animation = (function() - local res = util.table.deepcopy(inv_extension2) - res.run_mode = "backward" - return res + folding_animation = (function() + local res = util.table.deepcopy(inv_extension2) + res.run_mode = "backward" + return res end)(), - call_for_help_radius = 1, - graphics_set = {} - }, + call_for_help_radius = 1, + graphics_set = {} + }, - --- Assembling-Machine Arboretum - { - type = "assembling-machine", - name = "bi-arboretum", - icon = ICONPATH .. "Arboretum_Icon.png", - icon_size = 64, - icons = { - { + --- Assembling-Machine Arboretum + { + type = "assembling-machine", + name = "bi-arboretum", icon = ICONPATH .. "Arboretum_Icon.png", icon_size = 64, - } - }, - flags = {"placeable-neutral", "placeable-player", "player-creation"}, - placeable_by = {item ="bi-arboretum-area", count = 1}, -- Fixes that entity couldn't be blueprinted - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-arboretum-area"}, - max_health = 250, - corpse = "big-remnants", - dying_explosion = "medium-explosion", - resistances = {{type = "fire", percent = 70}}, - fluid_boxes = { - { - production_type = "input", - pipe_picture = assembler3pipepictures(), - pipe_covers = pipecoverspictures(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {-1, -4} }} - }, - { - production_type = "input", - pipe_picture = assembler3pipepictures(), - pipe_covers = pipecoverspictures(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, -4} }} - }, - }, - fluid_boxes_off_when_no_fluid_recipe = true, - collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, - selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, - order = "x[bi]-a[bi-arboretum]", - animation = { - filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png", - priority = "low", - width = 320, - height = 320, - frame_count = 1, - shift = {0.75, 0}, - }, + icons = { + { + icon = ICONPATH .. "Arboretum_Icon.png", + icon_size = 64, + } + }, + flags = { "placeable-neutral", "placeable-player", "player-creation" }, + placeable_by = { item = "bi-arboretum-area", count = 1 }, -- Fixes that entity couldn't be blueprinted + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-arboretum-area" }, + max_health = 250, + corpse = "big-remnants", + dying_explosion = "medium-explosion", + resistances = { { type = "fire", percent = 70 } }, + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -1, -4 } } } + }, + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 1, -4 } } } + }, + }, + fluid_boxes_off_when_no_fluid_recipe = true, + collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, + selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, + order = "x[bi]-a[bi-arboretum]", - working_visualisations = { - animation = { - filename = ENTITYPATH .. "Bio_Farm_Working_alt.png", - priority = "low", - width = 320, - height = 320, - frame_count = 1, - shift = {0.75, 0}, - }, + graphics_set = { + animation = { + filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png", + priority = "low", + width = 320, + height = 320, + frame_count = 1, + shift = { 0.75, 0 }, + }, + working_visualisations = { { + animation = { + filename = ENTITYPATH .. "Bio_Farm_Working_alt.png", + priority = "low", + width = 320, + height = 320, + frame_count = 1, + shift = { 0.75, 0 }, + }, + } }, + }, + + crafting_categories = { "bi-arboretum" }, + crafting_speed = 0.000000000001, + energy_source = { + type = "electric", + usage_priority = "primary-input", + emissions_per_minute = { pollution = -8 }, -- the "-" means it Absorbs pollution. + }, + energy_usage = "150kW", + ingredient_count = 3, + open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, + close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, + module_specification = {}, }, - crafting_categories = {"bi-arboretum"}, - crafting_speed = 0.000000000001, - energy_source = { - type = "electric", - usage_priority = "primary-input", - emissions_per_minute = { pollution = -8 }, -- the "-" means it Absorbs pollution. - }, - energy_usage = "150kW", - ingredient_count = 3, - open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, - close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, - module_specification = {}, - }, }) diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua b/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua index 71091f3..fa3a434 100644 --- a/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua @@ -3,385 +3,387 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ENTITYPATH = "__base__/graphics/entity/boiler/" -require ("util") -require ("prototypes.Bio_Fuel.pipeConnectors") +require("util") +require("prototypes.Bio_Fuel.pipeConnectors") -bio_boiler_tint = {r = 0.5, g = 0.5, b = 0.1, a = 0.7} +bio_boiler_tint = { r = 0.5, g = 0.5, b = 0.1, a = 0.7 } -- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to -- unlock the bio-reactor and the most basic recipe for algae biomass even if -- BI.Settings.BI_Bio_Fuel has been turned off! data:extend({ - -- BIOREACTOR - { - type = "assembling-machine", - name = "bi-bio-reactor", - icon = ICONPATH .. "bioreactor.png", - icon_size = 64, - icons = { - { + -- BIOREACTOR + { + type = "assembling-machine", + name = "bi-bio-reactor", icon = ICONPATH .. "bioreactor.png", icon_size = 64, - } + icons = { + { + icon = ICONPATH .. "bioreactor.png", + icon_size = 64, + } + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor" }, + max_health = 100, + corpse = "big-remnants", + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspicturesBioreactor(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } } + }, + { + production_type = "input", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspicturesBioreactor(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.east, position = { 1, 0 } } } + }, + { + production_type = "input", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspicturesBioreactor(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.south, position = { 0, 1 } } } + }, + { + production_type = "output", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspicturesBioreactor(), + volume = 1000, + base_level = 1, + pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, -1 } } } + }, + { + production_type = "output", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspicturesBioreactor(), + volume = 1000, + base_level = 1, + pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, 1 } } } + }, + }, + fluid_boxes_off_when_no_fluid_recipe = true, + collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, + selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, + graphics_set = { + animation = { + filename = "__Bio_Industries_2__/graphics/entities/bioreactor/bioreactor.png", + priority = "high", + width = 128, + height = 150, + frame_count = 26, + line_length = 13, + animation_speed = 0.4, + shift = { 0.55, -0.33 } + }, + }, + energy_source = { + type = "electric", + usage_priority = "secondary-input" + }, + crafting_categories = { "biofarm-mod-bioreactor" }, + ingredient_count = 3, + crafting_speed = 1, + energy_usage = "10kW", + module_specification = { + module_slots = 3 + }, + allowed_effects = { "consumption", "speed", "productivity", "pollution" }, }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor"}, - max_health = 100, - corpse = "big-remnants", - fluid_boxes = { - { - production_type = "input", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }} - }, - { - production_type = "input", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, 0} }} - }, - { - production_type = "input", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, 1} }} - }, - { - production_type = "output", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = 1, - pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, -1} }} - }, - { - production_type = "output", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = 1, - pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, 1} }} - }, - }, - fluid_boxes_off_when_no_fluid_recipe = true, - collision_box = {{-1.2, -1.2}, {1.2, 1.2}}, - selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/bioreactor/bioreactor.png", - priority = "high", - width = 128, - height = 150, - frame_count = 26, - line_length = 13, - animation_speed = 0.4, - shift = {0.55, -0.33} - }, - energy_source = { - type = "electric", - usage_priority = "secondary-input" - }, - crafting_categories = {"biofarm-mod-bioreactor"}, - ingredient_count = 3, - crafting_speed = 1, - energy_usage = "10kW", - module_specification = { - module_slots = 3 - }, - allowed_effects = {"consumption", "speed", "productivity", "pollution"}, - }, }) if BI.Settings.BI_Bio_Fuel then - data:extend({ - --- Bio Boiler - { - type = "boiler", - name = "bi-bio-boiler", - localised_name = {"entity-name.bi-bio-boiler"}, - localised_description = {"entity-description.bi-bio-boiler"}, - icon = ICONPATH .. "bio_boiler.png", - icon_size = 64, - icons = { + data:extend({ + --- Bio Boiler { - icon = ICONPATH .. "bio_boiler.png", - icon_size = 64, - } - }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler"}, - max_health = 300, - corpse = "small-remnants", - mode = "output-to-separate-pipe", - resistances = { - { - type = "fire", - percent = 100 + type = "boiler", + name = "bi-bio-boiler", + localised_name = { "entity-name.bi-bio-boiler" }, + localised_description = { "entity-description.bi-bio-boiler" }, + icon = ICONPATH .. "bio_boiler.png", + icon_size = 64, + icons = { + { + icon = ICONPATH .. "bio_boiler.png", + icon_size = 64, + } + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler" }, + max_health = 300, + corpse = "small-remnants", + mode = "output-to-separate-pipe", + resistances = { + { + type = "fire", + percent = 100 + }, + { + type = "explosion", + percent = 100 + }, + { + type = "impact", + percent = 35 + } + }, + collision_box = { { -1.29, -0.79 }, { 1.29, 0.79 } }, + selection_box = { { -1.5, -1 }, { 1.5, 1 } }, + target_temperature = 165, + fluid_box = { + volume = 200, + base_level = -1, + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "input-output", direction = defines.direction.north, position = { -1, 0.5 } }, + { flow_direction = "input-output", direction = defines.direction.north, position = { 1, 0.5 } } + }, + production_type = "input-output", + filter = "water" + }, + output_fluid_box = { + volume = 200, + base_level = 1, + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "output", direction = defines.direction.north, position = { 0, -0.5 } } + }, + production_type = "output", + filter = "steam" + }, + energy_consumption = "3.6MW", + energy_source = { + type = "burner", + fuel_categories = { "chemical" }, + effectivity = 1, + fuel_inventory_size = 2, + emissions_per_minute = { pollution = 15 }, + smoke = { + { + name = "smoke", + north_position = util.by_pixel(-38, -47.5), + south_position = util.by_pixel(38.5, -32), + east_position = util.by_pixel(20, -70), + west_position = util.by_pixel(-19, -8.5), + frequency = 20, + starting_vertical_speed = 0.0, + starting_frame_deviation = 60 + } + } + }, + working_sound = { + sound = { + filename = "__base__/sound/boiler.ogg", + volume = 0.8 + }, + max_sounds_per_type = 3 + }, + structure = { + north = { + layers = { + { + filename = ENTITYPATH .. "boiler-N-idle.png", + priority = "extra-high", + width = 269, + height = 221, + shift = util.by_pixel(-1.25, 5.25), + scale = 0.5, + tint = bio_boiler_tint, + }, + { + filename = ENTITYPATH .. "boiler-N-shadow.png", + priority = "extra-high", + width = 274, + height = 164, + scale = 0.5, + shift = util.by_pixel(20.5, 9), + draw_as_shadow = true, + } + } + }, + east = { + layers = { + { + filename = ENTITYPATH .. "boiler-E-idle.png", + priority = "extra-high", + width = 216, + height = 301, + shift = util.by_pixel(-3, 1.25), + scale = 0.5, + tint = bio_boiler_tint, + }, + { + filename = ENTITYPATH .. "boiler-E-shadow.png", + priority = "extra-high", + width = 184, + height = 194, + scale = 0.5, + shift = util.by_pixel(30, 9.5), + draw_as_shadow = true, + } + } + }, + south = { + layers = { + { + filename = ENTITYPATH .. "boiler-S-idle.png", + priority = "extra-high", + width = 260, + height = 192, + shift = util.by_pixel(4, 13), + scale = 0.5, + tint = bio_boiler_tint, + }, + { + filename = ENTITYPATH .. "boiler-S-shadow.png", + priority = "extra-high", + width = 311, + height = 131, + scale = 0.5, + shift = util.by_pixel(29.75, 15.75), + draw_as_shadow = true, + } + } + }, + west = { + layers = { + { + filename = ENTITYPATH .. "boiler-W-idle.png", + priority = "extra-high", + width = 196, + height = 273, + shift = util.by_pixel(1.5, 7.75), + scale = 0.5, + tint = bio_boiler_tint, + }, + { + filename = ENTITYPATH .. "boiler-W-shadow.png", + priority = "extra-high", + width = 206, + height = 218, + scale = 0.5, + shift = util.by_pixel(19.5, 6.5), + draw_as_shadow = true, + } + } + } + }, + patch = { + east = { + filename = ENTITYPATH .. "boiler-E-patch.png", + width = 6, + height = 36, + shift = util.by_pixel(33.5, -13.5), + scale = 0.5, + tint = bio_boiler_tint, + }, + }, + fire_flicker_enabled = true, + fire = { + north = { + filename = ENTITYPATH .. "boiler-N-fire.png", + priority = "extra-high", + frame_count = 64, + line_length = 8, + width = 26, + height = 26, + animation_speed = 0.5, + shift = util.by_pixel(0, -8.5), + scale = 0.5 + }, + east = { + filename = ENTITYPATH .. "boiler-E-fire.png", + priority = "extra-high", + frame_count = 64, + line_length = 8, + width = 28, + height = 28, + animation_speed = 0.5, + shift = util.by_pixel(-9.5, -22), + scale = 0.5 + }, + south = { + filename = ENTITYPATH .. "boiler-S-fire.png", + priority = "extra-high", + frame_count = 64, + line_length = 8, + width = 26, + height = 16, + animation_speed = 0.5, + shift = util.by_pixel(-1, -26.5), + scale = 0.5 + }, + west = { + filename = ENTITYPATH .. "boiler-W-fire.png", + priority = "extra-high", + frame_count = 64, + line_length = 8, + width = 30, + height = 29, + animation_speed = 0.5, + shift = util.by_pixel(13, -23.25), + scale = 0.5 + } + }, + fire_glow_flicker_enabled = true, + fire_glow = { + north = { + filename = ENTITYPATH .. "boiler-N-light.png", + priority = "extra-high", + frame_count = 1, + width = 200, + height = 173, + shift = util.by_pixel(-1, -6.75), + blend_mode = "additive", + scale = 0.5 + }, + east = { + filename = ENTITYPATH .. "boiler-E-light.png", + priority = "extra-high", + frame_count = 1, + width = 139, + height = 244, + shift = util.by_pixel(0.25, -13), + blend_mode = "additive", + scale = 0.5 + }, + south = { + filename = ENTITYPATH .. "boiler-S-light.png", + priority = "extra-high", + frame_count = 1, + width = 200, + height = 162, + shift = util.by_pixel(1, 5.5), + blend_mode = "additive", + scale = 0.5 + }, + west = { + filename = ENTITYPATH .. "boiler-W-light.png", + priority = "extra-high", + frame_count = 1, + width = 136, + height = 217, + shift = util.by_pixel(2, -6.25), + blend_mode = "additive", + scale = 0.5 + } + }, + burning_cooldown = 20 }, - { - type = "explosion", - percent = 100 - }, - { - type = "impact", - percent = 35 - } - }, - collision_box = {{-1.29, -0.79}, {1.29, 0.79}}, - selection_box = {{-1.5, -1}, {1.5, 1}}, - target_temperature = 165, - fluid_box = { - volume = 200, - base_level = -1, - pipe_covers = pipecoverspictures(), - pipe_connections = { - {flow_direction = "input-output", direction = defines.direction.north, position = {-1, 0.5}}, - {flow_direction = "input-output", direction = defines.direction.north, position = {1, 0.5}} - }, - production_type = "input-output", - filter = "water" - }, - output_fluid_box = { - volume = 200, - base_level = 1, - pipe_covers = pipecoverspictures(), - pipe_connections = { - {flow_direction = "output", direction = defines.direction.north, position = {0, -0.5}} - }, - production_type = "output", - filter = "steam" - }, - energy_consumption = "3.6MW", - energy_source = { - type = "burner", - fuel_categories = { "chemical" }, - effectivity = 1, - fuel_inventory_size = 2, - emissions_per_minute = { pollution = 15 }, - smoke = { - { - name = "smoke", - north_position = util.by_pixel(-38, -47.5), - south_position = util.by_pixel(38.5, -32), - east_position = util.by_pixel(20, -70), - west_position = util.by_pixel(-19, -8.5), - frequency = 20, - starting_vertical_speed = 0.0, - starting_frame_deviation = 60 - } - } - }, - working_sound = { - sound = { - filename = "__base__/sound/boiler.ogg", - volume = 0.8 - }, - max_sounds_per_type = 3 - }, - structure = { - north = { - layers = { - { - filename = ENTITYPATH .. "boiler-N-idle.png", - priority = "extra-high", - width = 269, - height = 221, - shift = util.by_pixel(-1.25, 5.25), - scale = 0.5, - tint = bio_boiler_tint, - }, - { - filename = ENTITYPATH .. "boiler-N-shadow.png", - priority = "extra-high", - width = 274, - height = 164, - scale = 0.5, - shift = util.by_pixel(20.5, 9), - draw_as_shadow = true, - } - } - }, - east = { - layers = { - { - filename = ENTITYPATH .. "boiler-E-idle.png", - priority = "extra-high", - width = 216, - height = 301, - shift = util.by_pixel(-3, 1.25), - scale = 0.5, - tint = bio_boiler_tint, - }, - { - filename = ENTITYPATH .. "boiler-E-shadow.png", - priority = "extra-high", - width = 184, - height = 194, - scale = 0.5, - shift = util.by_pixel(30, 9.5), - draw_as_shadow = true, - } - } - }, - south = { - layers = { - { - filename = ENTITYPATH .. "boiler-S-idle.png", - priority = "extra-high", - width = 260, - height = 192, - shift = util.by_pixel(4, 13), - scale = 0.5, - tint = bio_boiler_tint, - }, - { - filename = ENTITYPATH .. "boiler-S-shadow.png", - priority = "extra-high", - width = 311, - height = 131, - scale = 0.5, - shift = util.by_pixel(29.75, 15.75), - draw_as_shadow = true, - } - } - }, - west = { - layers = { - { - filename = ENTITYPATH .. "boiler-W-idle.png", - priority = "extra-high", - width = 196, - height = 273, - shift = util.by_pixel(1.5, 7.75), - scale = 0.5, - tint = bio_boiler_tint, - }, - { - filename = ENTITYPATH .. "boiler-W-shadow.png", - priority = "extra-high", - width = 206, - height = 218, - scale = 0.5, - shift = util.by_pixel(19.5, 6.5), - draw_as_shadow = true, - } - } - } - }, - patch = { - east = { - filename = ENTITYPATH .. "boiler-E-patch.png", - width = 6, - height = 36, - shift = util.by_pixel(33.5, -13.5), - scale = 0.5, - tint = bio_boiler_tint, - }, - }, - fire_flicker_enabled = true, - fire = { - north = { - filename = ENTITYPATH .. "boiler-N-fire.png", - priority = "extra-high", - frame_count = 64, - line_length = 8, - width = 26, - height = 26, - animation_speed = 0.5, - shift = util.by_pixel(0, -8.5), - scale = 0.5 - }, - east = { - filename = ENTITYPATH .. "boiler-E-fire.png", - priority = "extra-high", - frame_count = 64, - line_length = 8, - width = 28, - height = 28, - animation_speed = 0.5, - shift = util.by_pixel(-9.5, -22), - scale = 0.5 - }, - south = { - filename = ENTITYPATH .. "boiler-S-fire.png", - priority = "extra-high", - frame_count = 64, - line_length = 8, - width = 26, - height = 16, - animation_speed = 0.5, - shift = util.by_pixel(-1, -26.5), - scale = 0.5 - }, - west = { - filename = ENTITYPATH .. "boiler-W-fire.png", - priority = "extra-high", - frame_count = 64, - line_length = 8, - width = 30, - height = 29, - animation_speed = 0.5, - shift = util.by_pixel(13, -23.25), - scale = 0.5 - } - }, - fire_glow_flicker_enabled = true, - fire_glow = { - north = { - filename = ENTITYPATH .. "boiler-N-light.png", - priority = "extra-high", - frame_count = 1, - width = 200, - height = 173, - shift = util.by_pixel(-1, -6.75), - blend_mode = "additive", - scale = 0.5 - }, - east = { - filename = ENTITYPATH .. "boiler-E-light.png", - priority = "extra-high", - frame_count = 1, - width = 139, - height = 244, - shift = util.by_pixel(0.25, -13), - blend_mode = "additive", - scale = 0.5 - }, - south = { - filename = ENTITYPATH .. "boiler-S-light.png", - priority = "extra-high", - frame_count = 1, - width = 200, - height = 162, - shift = util.by_pixel(1, 5.5), - blend_mode = "additive", - scale = 0.5 - }, - west = { - filename = ENTITYPATH .. "boiler-W-light.png", - priority = "extra-high", - frame_count = 1, - width = 136, - height = 217, - shift = util.by_pixel(2, -6.25), - blend_mode = "additive", - scale = 0.5 - } - }, - burning_cooldown = 20 - }, - }) + }) end diff --git a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua index a64ef10..fa16456 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua @@ -2,78 +2,77 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/icons/" -require ("util") +require("util") --- Bio Garden data:extend({ - { - type = "assembling-machine", - name = "bi-bio-garden", - icon = ICONPATH .. "bio_garden_icon.png", - icon_size = 64, - icons = { - { + { + type = "assembling-machine", + name = "bi-bio-garden", icon = ICONPATH .. "bio_garden_icon.png", icon_size = 64, - } + icons = { + { + icon = ICONPATH .. "bio_garden_icon.png", + icon_size = 64, + } + }, + flags = { "placeable-neutral", "placeable-player", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden" }, + fast_replaceable_group = "bi-bio-garden", + max_health = 150, + corpse = "medium-remnants", + collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, + selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } } + }, + }, + fluid_boxes_off_when_no_fluid_recipe = true, + graphics_set = { + animation = { + filename = "__Bio_Industries_2__/graphics/entities/biogarden/bio_garden_x.png", + width = 160, + height = 160, + frame_count = 12, + line_length = 4, + animation_speed = 0.025, + shift = { 0.45, 0 } + }, + }, + open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, + close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, + working_sound = { + sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 0.8 } }, + idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, + apparent_volume = 1.5, + }, + crafting_categories = { "clean-air" }, + source_inventory_size = 1, + result_inventory_size = 1, + crafting_speed = 1.0, + energy_source = { + type = "electric", + usage_priority = "secondary-input", + emissions_per_minute = { pollution = -45 }, -- Negative value: pollution is absorbed! + }, + energy_usage = "200kW", + ingredient_count = 1, + -- Changed for 0.18.34/1.1.4 -- Modules don't make sense for the gardens! + -- (Efficiency modules are also meant to reduce pollution, but as the base value + -- is negative, the resulting value is greater than the base value! ) + module_specification = { + module_slots = 1 + }, + -- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens + -- won't be affected by beacons! + allowed_effects = { "consumption", "speed" }, }, - flags = {"placeable-neutral", "placeable-player", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden"}, - fast_replaceable_group = "bi-bio-garden", - max_health = 150, - corpse = "medium-remnants", - collision_box = {{-1.2, -1.2}, {1.2, 1.2}}, - selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, - fluid_boxes = { - { - production_type = "input", - pipe_picture = assembler3pipepictures(), - pipe_covers = pipecoverspictures(), - volume = 1000, - base_level = -1, - pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }} - }, - }, - fluid_boxes_off_when_no_fluid_recipe = true, - animation = { - filename = "__Bio_Industries_2__/graphics/entities/biogarden/bio_garden_x.png", - width = 160, - height = 160, - frame_count = 12, - line_length = 4, - animation_speed = 0.025, - shift = {0.45, 0} - }, - open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, - close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, - working_sound = { - sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 0.8 } }, - idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, - apparent_volume = 1.5, - }, - crafting_categories = {"clean-air"}, - source_inventory_size = 1, - result_inventory_size = 1, - crafting_speed = 1.0, - energy_source = { - type = "electric", - usage_priority = "secondary-input", - emissions_per_minute = { pollution = -45 }, -- Negative value: pollution is absorbed! - }, - energy_usage = "200kW", - ingredient_count = 1, - -- Changed for 0.18.34/1.1.4 -- Modules don't make sense for the gardens! - -- (Efficiency modules are also meant to reduce pollution, but as the base value - -- is negative, the resulting value is greater than the base value! ) - module_specification = { - module_slots = 1 - }, - -- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens - -- won't be affected by beacons! - allowed_effects = {"consumption", "speed"}, - }, }) - - - diff --git a/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua index 76664ae..ac48b85 100644 --- a/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua @@ -1,6 +1,6 @@ local tile_graphics = require("__base__/prototypes/tile/tile-graphics") local BioInd = require('common')('Bio_Industries_2') -require ("util") +require("util") local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/" @@ -8,443 +8,447 @@ local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/" if BI.Settings.BI_Solar_Additions then - - -local sounds = {} -sounds.walking_sound = {} -for i = 1, 11 do - sounds.walking_sound[i] = { - filename = "__base__/sound/walking/concrete-" .. i ..".ogg", - volume = 1.2 - } -end - -data:extend({ - ------- Bio Farm Solar Panel - { - type = "solar-panel", - name = "bi-bio-solar-farm", - icon = ICONPATH .. "Bio_Solar_Farm_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "Bio_Solar_Farm_Icon.png", - icon_size = 64, - } - }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm"}, - max_health = 600, - corpse = "big-remnants", - dying_explosion = "medium-explosion", - resistances = {{type = "fire", percent = 80}}, - collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, - selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, - energy_source = { - type = "electric", - usage_priority = "solar" - }, - picture = { - filename = ENTITYPATH .. "Bio_Solar_Farm_On.png", - priority = "low", - width = 312, - height = 289, - frame_count = 1, - direction_count = 1, - --scale = 3/2, - shift = {0.30, 0} - }, - production = "3600kW" - }, - - - ---- BI Accumulator - { - type = "accumulator", - name = "bi-bio-accumulator", - icon = ICONPATH .. "bi_LargeAccumulator.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_LargeAccumulator.png", - icon_size = 64, - } - }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator"}, - max_health = 500, - corpse = "big-remnants", - collision_box = {{-1.75, -1.75}, {1.75, 1.75}}, - selection_box = {{-2, -2}, {2, 2}}, - --collision_box = {{-2, -2}, {2, 2}}, - --selection_box = {{-2.5, -2.5}, {2.5, 2.5}}, - energy_source = { - type = "electric", - buffer_capacity = "300MJ", - usage_priority = "tertiary", - input_flow_limit = "20MW", - output_flow_limit = "20MW" - }, - picture = { - filename = ENTITYPATH .. "bi_LargeAccumulator.png", - priority = "extra-high", - width = 245, - height = 245, - shift = {0.75, -0.5}, - scale = 0.75, - }, - charge_animation = { - filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png", - width = 250, - height = 250, - line_length = 8, - frame_count = 24, - shift = {0.75, -0.5}, - scale = 0.75, - animation_speed = 0.5 - }, - charge_cooldown = 30, - charge_light = {intensity = 0.3, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}}, - discharge_animation = { - filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png", - width = 250, - height = 250, - line_length = 8, - frame_count = 24, - shift = {0.75, -0.5}, - scale = 0.75, - animation_speed = 0.5 - }, - discharge_cooldown = 60, - discharge_light = {intensity = 0.7, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}}, - working_sound = { - sound = { - filename = "__base__/sound/accumulator-working.ogg", - volume = 1 - }, - idle_sound = { - filename = "__base__/sound/accumulator-idle.ogg", - volume = 0.4 - }, - max_sounds_per_type = 5 - }, - circuit_wire_connection_point = { - shadow = { - red = {0.984375, 1.10938}, - green = {0.890625, 1.10938} - }, - wire = { - red = {0.6875, 0.59375}, - green = {0.6875, 0.71875} - } - }, - --circuit_connector_sprites = get_circuit_connector_sprites({0.46875, 0.5}, {0.46875, 0.8125}, 26), - circuit_wire_max_distance = 9, - default_output_signal = {type = "virtual", name = "signal-A"} - }, - - - ---- Large Substation - { - type = "electric-pole", - name = "bi-large-substation", - localised_name = {"entity-name.bi-large-substation"}, - localised_description = {"entity-description.bi-large-substation"}, - icon = ICONPATH .. "bi_LargeSubstation_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_LargeSubstation_icon.png", - icon_size = 64, - } - }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 0.5, result = "bi-large-substation"}, - max_health = 600, - corpse = "big-remnants", - dying_explosion = "big-explosion", - track_coverage_during_build_by_moving = true, - resistances = { - { - type = "fire", - percent = 90 - } - }, - collision_box = {{-2.4, -2.4}, {2.4, 2.4}}, - selection_box = {{-2.5, -2.5}, {2.5, 2.5}}, - drawing_box = {{-2.5, -5}, {2.5, 2.5}}, - maximum_wire_distance = 25, - -- Changed for 0.18.34/1.1.4 - supply_area_distance = 50.5, - pictures = { - filename = ENTITYPATH .. "bi_LargeSubstation.png", - priority = "high", - width = 450, - height = 380, - shift = {1, -0.5}, - direction_count = 1, - scale = 0.5, - }, - working_sound = { - sound = { filename = "__base__/sound/substation.ogg" }, - apparent_volume = 1.8, - audible_distance_modifier = 0.5, - probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds - }, - connection_points = { - { - shadow = { - copper = {1.9, -0.6}, - green = {1.3, -0.6}, - red = {2.65, -0.6} - }, - wire = { - copper = {-0.25, -2.71875}, - green = {-0.84375, -2.71875}, - red = {0.34375, -2.71875} + local sounds = {} + sounds.walking_sound = {} + for i = 1, 11 do + sounds.walking_sound[i] = { + filename = "__base__/sound/walking/concrete-" .. i .. ".ogg", + volume = 1.2 } - }, - }, - radius_visualisation_picture = { - filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", - width = 12, - height = 12, - --scale = 3, - --shift = {0.6, -0.6}, - priority = "extra-high-no-scale" - }, - }, + end - - ---- Solar Floor - { - type = "tile", - name = "bi-solar-mat", - localised_name = {"entity-name.bi-solar-mat"}, - localised_description = {"entity-description.bi-solar-mat"}, - icon = ICONPATH .. "solar-mat.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "solar-mat.png", - icon_size = 64, - } - }, - needs_correction = false, - minable = {hardness = 0.1, mining_time = 0.25, result = "bi-solar-mat"}, - mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" }, - collision_mask = { layers = { ground_tile = true }}, - collision_box = {{-0.5, -0.5}, {0.5, 0.5}}, - walking_speed_modifier = 1.45, - layer = 62, - decorative_removal_probability = 1, - variants = { - transition = tile_graphics.generic_masked_tile_transitions1, - main = { + data:extend({ + ------- Bio Farm Solar Panel { - picture = ENTITYPATH .. "solar1.png", - count = 1, - size = 1, - probability = 1, + type = "solar-panel", + name = "bi-bio-solar-farm", + icon = ICONPATH .. "Bio_Solar_Farm_Icon.png", + icon_size = 64, + icons = { + { + icon = ICONPATH .. "Bio_Solar_Farm_Icon.png", + icon_size = 64, + } + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm" }, + max_health = 600, + corpse = "big-remnants", + dying_explosion = "medium-explosion", + resistances = { { type = "fire", percent = 80 } }, + collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, + selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, + energy_source = { + type = "electric", + usage_priority = "solar" + }, + picture = { + filename = ENTITYPATH .. "Bio_Solar_Farm_On.png", + priority = "low", + width = 312, + height = 289, + frame_count = 1, + direction_count = 1, + --scale = 3/2, + shift = { 0.30, 0 } + }, + production = "3600kW" }, - }, - inner_corner = { - picture = ENTITYPATH .. "solar-inner-corner.png", - count = 8 - }, - outer_corner = { - picture = ENTITYPATH .. "solar-outer-corner.png", - count = 8 - }, - side = { - picture = ENTITYPATH .. "solar-side.png", - count = 8 - }, - u_transition = { - picture = ENTITYPATH .. "solar-u.png", - count = 8 - }, - o_transition = { - picture = ENTITYPATH .. "solar-o.png", - count = 1 - } - }, - walking_sound = sounds.walking_sound, - map_color = {r = 93, g = 138, b = 168}, - vehicle_friction_modifier = dirt_vehicle_speed_modifer - }, -}) -data:extend({ - ------- Boiler for Solar Plant / Boiler - { - type = "boiler", - name = "bi-solar-boiler", - icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png", - icon_size = 64, - } - }, - -- This is necessary for "Space Exploration" (if not true, the entity can only be - -- placed on Nauvis)! - se_allow_in_space = true, - flags = {"placeable-neutral", "player-creation"}, - minable = {hardness = 0.2, mining_time = 1, result = "bi-solar-boiler"}, - max_health = 400, - corpse = "small-remnants", - vehicle_impact_sound = sounds.generic_impact, - mode = "output-to-separate-pipe", - resistances = { - { - type = "fire", - percent = 100 - }, - { - type = "explosion", - percent = 30 - }, - { - type = "impact", - percent = 30 - } - }, - collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, - selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, - target_temperature = 235, - fluid_box = { - volume = 200, - base_level = -1, - pipe_covers = pipecoverspictures(), - pipe_connections = { - {flow_direction = "input-output", direction = defines.direction.north, position = {4, 0}}, - {flow_direction = "input-output", direction = defines.direction.north, position = {-4, 0}}, - }, - production_type = "input-output", - filter = "water" - }, - output_fluid_box = { - volume = 200, - base_level = 1, - pipe_covers = pipecoverspictures(), - pipe_connections = { - {flow_direction = "input-output", direction = defines.direction.north, position = {0, 4}}, - {flow_direction = "input-output", direction = defines.direction.north, position = {0, -4}}, - }, - production_type = "output", - filter = "steam" - }, - energy_consumption = "1.799MW", - energy_source = { - type = "electric", - input_priority = "primary", - usage_priority = "primary-input", - --emissions_per_minute = 0 -- NO Emmisions - }, - working_sound = { - sound = { - filename = "__base__/sound/boiler.ogg", - volume = 0.9 - }, - max_sounds_per_type = 3 - }, - structure = { - north = { - layers = { - { - filename = ENTITYPATH .. "Bio_Solar_Boiler.png", - priority = "high", - width = 288, - height = 288, - }, - } - }, - east = { - layers = { - { - filename = ENTITYPATH .. "Bio_Solar_Boiler.png", - priority = "high", - width = 288, - height = 288, - }, + + ---- BI Accumulator + { + type = "accumulator", + name = "bi-bio-accumulator", + icon = ICONPATH .. "bi_LargeAccumulator.png", + icon_size = 64, + icons = { + { + icon = ICONPATH .. "bi_LargeAccumulator.png", + icon_size = 64, + } + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator" }, + max_health = 500, + corpse = "big-remnants", + collision_box = { { -1.75, -1.75 }, { 1.75, 1.75 } }, + selection_box = { { -2, -2 }, { 2, 2 } }, + --collision_box = {{-2, -2}, {2, 2}}, + --selection_box = {{-2.5, -2.5}, {2.5, 2.5}}, + energy_source = { + type = "electric", + buffer_capacity = "300MJ", + usage_priority = "tertiary", + input_flow_limit = "20MW", + output_flow_limit = "20MW" + }, + chargable_graphics = { + picture = { + filename = ENTITYPATH .. "bi_LargeAccumulator.png", + priority = "extra-high", + width = 245, + height = 245, + shift = { 0.75, -0.5 }, + scale = 0.75, + }, + charge_animation = { + filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png", + width = 250, + height = 250, + line_length = 8, + frame_count = 24, + shift = { 0.75, -0.5 }, + scale = 0.75, + animation_speed = 0.5 + }, + charge_cooldown = 30, + charge_light = { intensity = 0.3, size = 7, color = { r = 1.0, g = 1.0, b = 1.0 } }, + discharge_animation = { + filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png", + width = 250, + height = 250, + line_length = 8, + frame_count = 24, + shift = { 0.75, -0.5 }, + scale = 0.75, + animation_speed = 0.5 + }, + discharge_cooldown = 60, + discharge_light = { intensity = 0.7, size = 7, color = { r = 1.0, g = 1.0, b = 1.0 } }, + }, + working_sound = { + sound = { + filename = "__base__/sound/accumulator-working.ogg", + volume = 1 + }, + idle_sound = { + filename = "__base__/sound/accumulator-idle.ogg", + volume = 0.4 + }, + max_sounds_per_type = 5 + }, + circuit_wire_connection_point = { + shadow = { + red = { 0.984375, 1.10938 }, + green = { 0.890625, 1.10938 } + }, + wire = { + red = { 0.6875, 0.59375 }, + green = { 0.6875, 0.71875 } + } + }, + --circuit_connector_sprites = get_circuit_connector_sprites({0.46875, 0.5}, {0.46875, 0.8125}, 26), + circuit_wire_max_distance = 9, + default_output_signal = { type = "virtual", name = "signal-A" } }, - }, - south = { - layers = { - { - filename = ENTITYPATH .. "Bio_Solar_Boiler.png", - priority = "high", - width = 288, - height = 288, - }, - } - }, - west = { - layers = { - { - filename = ENTITYPATH .. "Bio_Solar_Boiler.png", - priority = "high", - width = 288, - height = 288, - }, - } - } - }, - fire_flicker_enabled = false, - fire = {}, - fire_glow_flicker_enabled = false, - fire_glow = { - north = { - filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", - priority = "extra-high", - frame_count = 1, - width = 62, - height = 62, - shift = {0.09, -2.8}, - scale = 1.5, - blend_mode = "additive", - }, - east = { - filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", - priority = "extra-high", - frame_count = 1, - width = 62, - height = 62, - shift = {0, -3}, - blend_mode = "additive", - }, - south = { - filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", - priority = "extra-high", - frame_count = 1, - width = 62, - height = 62, - shift = {0, -3}, - blend_mode = "additive", - }, - west = { - filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", - priority = "extra-high", - frame_count = 1, - width = 62, - height = 62, - shift = {0, -3}, - blend_mode = "additive", - }, - }, - burning_cooldown = 20 - }, -}) + + ---- Large Substation + { + type = "electric-pole", + name = "bi-large-substation", + localised_name = { "entity-name.bi-large-substation" }, + localised_description = { "entity-description.bi-large-substation" }, + icon = ICONPATH .. "bi_LargeSubstation_icon.png", + icon_size = 64, + icons = { + { + icon = ICONPATH .. "bi_LargeSubstation_icon.png", + icon_size = 64, + } + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 0.5, result = "bi-large-substation" }, + max_health = 600, + corpse = "big-remnants", + dying_explosion = "big-explosion", + track_coverage_during_build_by_moving = true, + resistances = { + { + type = "fire", + percent = 90 + } + }, + collision_box = { { -2.4, -2.4 }, { 2.4, 2.4 } }, + selection_box = { { -2.5, -2.5 }, { 2.5, 2.5 } }, + drawing_box = { { -2.5, -5 }, { 2.5, 2.5 } }, + maximum_wire_distance = 25, + -- Changed for 0.18.34/1.1.4 + supply_area_distance = 50.5, + pictures = { + filename = ENTITYPATH .. "bi_LargeSubstation.png", + priority = "high", + width = 450, + height = 380, + shift = { 1, -0.5 }, + direction_count = 1, + scale = 0.5, + }, + working_sound = { + sound = { filename = "__base__/sound/substation.ogg" }, + apparent_volume = 1.8, + audible_distance_modifier = 0.5, + probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds + }, + connection_points = { + { + shadow = { + copper = { 1.9, -0.6 }, + green = { 1.3, -0.6 }, + red = { 2.65, -0.6 } + }, + wire = { + copper = { -0.25, -2.71875 }, + green = { -0.84375, -2.71875 }, + red = { 0.34375, -2.71875 } + } + }, + }, + radius_visualisation_picture = { + filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png", + width = 12, + height = 12, + --scale = 3, + --shift = {0.6, -0.6}, + priority = "extra-high-no-scale" + }, + }, + + + ---- Solar Floor + { + type = "tile", + name = "bi-solar-mat", + localised_name = { "entity-name.bi-solar-mat" }, + localised_description = { "entity-description.bi-solar-mat" }, + icon = ICONPATH .. "solar-mat.png", + icon_size = 64, + icons = { + { + icon = ICONPATH .. "solar-mat.png", + icon_size = 64, + } + }, + needs_correction = false, + minable = { hardness = 0.1, mining_time = 0.25, result = "bi-solar-mat" }, + mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" }, + collision_mask = { layers = { ground_tile = true } }, + collision_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, + walking_speed_modifier = 1.45, + layer = 62, + decorative_removal_probability = 1, + variants = { + transition = tile_graphics.generic_masked_tile_transitions1, + main = { + { + picture = ENTITYPATH .. "solar1.png", + count = 1, + size = 1, + probability = 1, + }, + }, + inner_corner = { + picture = ENTITYPATH .. "solar-inner-corner.png", + count = 8 + }, + outer_corner = { + picture = ENTITYPATH .. "solar-outer-corner.png", + count = 8 + }, + side = { + picture = ENTITYPATH .. "solar-side.png", + count = 8 + }, + u_transition = { + picture = ENTITYPATH .. "solar-u.png", + count = 8 + }, + o_transition = { + picture = ENTITYPATH .. "solar-o.png", + count = 1 + } + }, + walking_sound = sounds.walking_sound, + map_color = { r = 93, g = 138, b = 168 }, + vehicle_friction_modifier = dirt_vehicle_speed_modifer + }, + }) + + data:extend({ + ------- Boiler for Solar Plant / Boiler + { + type = "boiler", + name = "bi-solar-boiler", + icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png", + icon_size = 64, + icons = { + { + icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png", + icon_size = 64, + } + }, + -- This is necessary for "Space Exploration" (if not true, the entity can only be + -- placed on Nauvis)! + se_allow_in_space = true, + flags = { "placeable-neutral", "player-creation" }, + minable = { hardness = 0.2, mining_time = 1, result = "bi-solar-boiler" }, + max_health = 400, + corpse = "small-remnants", + vehicle_impact_sound = sounds.generic_impact, + mode = "output-to-separate-pipe", + resistances = { + { + type = "fire", + percent = 100 + }, + { + type = "explosion", + percent = 30 + }, + { + type = "impact", + percent = 30 + } + }, + collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, + selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, + target_temperature = 235, + fluid_box = { + volume = 200, + base_level = -1, + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "input-output", direction = defines.direction.east, position = { 4, 0 } }, + { flow_direction = "input-output", direction = defines.direction.west, position = { -4, 0 } }, + }, + production_type = "input-output", + filter = "water" + }, + output_fluid_box = { + volume = 200, + base_level = 1, + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "input-output", direction = defines.direction.south, position = { 0, 4 } }, + { flow_direction = "input-output", direction = defines.direction.north, position = { 0, -4 } }, + }, + production_type = "output", + filter = "steam" + }, + energy_consumption = "1.799MW", + energy_source = { + type = "electric", + input_priority = "primary", + usage_priority = "primary-input", + --emissions_per_minute = 0 -- NO Emmisions + }, + working_sound = { + sound = { + filename = "__base__/sound/boiler.ogg", + volume = 0.9 + }, + max_sounds_per_type = 3 + }, + pictures = { + north = { + structure = { + layers = { + { + filename = ENTITYPATH .. "Bio_Solar_Boiler.png", + priority = "high", + width = 288, + height = 288, + }, + } + }, + fire_glow = { + filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", + priority = "extra-high", + frame_count = 1, + width = 62, + height = 62, + shift = { 0.09, -2.8 }, + scale = 1.5, + blend_mode = "additive", + }, + }, + east = { + structure = { + layers = { + { + filename = ENTITYPATH .. "Bio_Solar_Boiler.png", + priority = "high", + width = 288, + height = 288, + }, + }, + }, + fire_glow = { + filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", + priority = "extra-high", + frame_count = 1, + width = 62, + height = 62, + shift = { 0, -3 }, + blend_mode = "additive", + }, + }, + south = { + structure = { + layers = { + { + filename = ENTITYPATH .. "Bio_Solar_Boiler.png", + priority = "high", + width = 288, + height = 288, + }, + } + }, + fire_glow = { + filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", + priority = "extra-high", + frame_count = 1, + width = 62, + height = 62, + shift = { 0, -3 }, + blend_mode = "additive", + }, + }, + west = { + structure = { + layers = { + { + filename = ENTITYPATH .. "Bio_Solar_Boiler.png", + priority = "high", + width = 288, + height = 288, + }, + } + }, + fire_glow = { + filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", + priority = "extra-high", + frame_count = 1, + width = 62, + height = 62, + shift = { 0, -3 }, + blend_mode = "additive", + }, + } + }, + fire_flicker_enabled = false, + fire_glow_flicker_enabled = false, + burning_cooldown = 20 + }, + }) end diff --git a/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua b/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua index 1725804..55d3b89 100644 --- a/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua +++ b/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua @@ -1,6 +1,6 @@ -- Add functions that are also used in other files (debugging output etc.) local BioInd = require('common')('Bio_Industries_2') -BioInd.writeDebug("Entered prototypes.hidden_panels.lua of \"%s\".", {BioInd.modName}) +BioInd.writeDebug("Entered prototypes.hidden_panels.lua of \"%s\".", { BioInd.modName }) local ICONPATH = BioInd.modRoot .. "/graphics/icons/" @@ -46,56 +46,48 @@ local tmp, panel local c_entities = BioInd.compound_entities for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do - panel = table.deepcopy(h_entity) - panel.name = panel_name - panel.localised_name = {"entity-name." .. locale_name} - panel.localised_description = {"entity-description." .. locale_name} + panel = table.deepcopy(h_entity) + panel.name = panel_name + panel.localised_name = { "entity-name." .. locale_name } + panel.localised_description = { "entity-description." .. locale_name } - -- Adjust properties for hidden panel of Solar boiler - if c_entities["bi-solar-boiler"] and - panel_name == c_entities["bi-solar-boiler"].hidden[h_key].name then + -- Adjust properties for hidden panel of Solar boiler + if c_entities["bi-solar-boiler"] and + panel_name == c_entities["bi-solar-boiler"].hidden[h_key].name then + panel.icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png" + panel.icon_size = 64 + panel.BI_add_icon = true + panel.picture = nil + panel.overlay = nil + panel.max_health = 400 + panel.render_no_power_icon = true + panel.collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } } + panel.production = "1.8MW" + BioInd.show("Adjusted properties of", panel_name) - panel.icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png" - panel.icon_size = 64 - panel.BI_add_icon = true + -- Adjust properties for hidden panel of bio farms + elseif c_entities["bi-bio-farm"] and + c_entities["bi-bio-farm"].hidden[h_key] and + panel_name == c_entities["bi-bio-farm"].hidden[h_key].name then + panel.icon = ICONPATH .. "Bio_Farm_Solar.png" + panel.icon_size = 64 + panel.BI_add_icon = true + panel.production = "100kW" + BioInd.show("Adjusted properties of", panel_name) - panel.picture = {} - panel.picture = BI.add_layer(panel.picture, { - name = BioInd.modRoot .. "/graphics/entities/bio_solar_farm/Bio_Solar_Boiler.png", - size = 288 - }) - panel.overlay = {} - panel.overlay = table.deepcopy(panel.picture) + -- Adjust properties for hidden panel of Musk floor + elseif panel_name == Musk_name then + panel.icon = ICONPATH .. "solar-mat.png" + panel.icon_size = 64 + panel.BI_add_icon = true + panel.production = "10kW" + BioInd.show("Adjusted properties of", panel_name) + end - panel.max_health = 400 - panel.render_no_power_icon = true - panel.collision_box = {{-4.2, -4.2}, {4.2, 4.2}} - panel.production = "1.8MW" - BioInd.show("Adjusted properties of", panel_name) + data:extend({ panel }) - -- Adjust properties for hidden panel of bio farms - elseif c_entities["bi-bio-farm"] and - c_entities["bi-bio-farm"].hidden[h_key] and - panel_name == c_entities["bi-bio-farm"].hidden[h_key].name then - panel.icon = ICONPATH .. "Bio_Farm_Solar.png" - panel.icon_size = 64 - panel.BI_add_icon = true - panel.production = "100kW" - BioInd.show("Adjusted properties of", panel_name) - - -- Adjust properties for hidden panel of Musk floor - elseif panel_name == Musk_name then - panel.icon = ICONPATH .. "solar-mat.png" - panel.icon_size = 64 - panel.BI_add_icon = true - panel.production = "10kW" - BioInd.show("Adjusted properties of", panel_name) - end - - data:extend({panel}) - - BioInd.show("Created", panel_name) + BioInd.show("Created", panel_name) end