Fixed several entities

This commit is contained in:
Simon Brodtmann 2025-07-13 12:25:10 +02:00
parent b452aea465
commit fe30affb28
6 changed files with 1691 additions and 1680 deletions

View file

@ -247,6 +247,7 @@ return function(mod_name)
-- Rudimentary check of the arguments passed to a function -- Rudimentary check of the arguments passed to a function
common.check_args = function(arg, arg_type, desc) common.check_args = function(arg, arg_type, desc)
if not (arg and type(arg) == arg_type) then 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") common.arg_err(arg or "nil", desc or arg_type or "nil")
end end
end end
@ -596,7 +597,7 @@ return function(mod_name)
common.show("#g_table", g_table and table_size(g_table)) common.show("#g_table", g_table and table_size(g_table))
common.check_args(g_table, "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 if not base_entity.valid then
common.arg_err(base_entity, "base entity") common.arg_err(base_entity, "base entity")

View file

@ -4,8 +4,8 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = BioInd.modRoot .. "/graphics/entities/biofarm/" local ENTITYPATH = BioInd.modRoot .. "/graphics/entities/biofarm/"
require ("prototypes.Bio_Farm.pipeConnectors") require("prototypes.Bio_Farm.pipeConnectors")
require ("util") require("util")
inv_extension2 = { inv_extension2 = {
filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png", filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png",
@ -14,7 +14,7 @@ inv_extension2 = {
height = 320, height = 320,
frame_count = 1, frame_count = 1,
direction_count = 1, direction_count = 1,
shift = {0.75, 0}, shift = { 0.75, 0 },
} }
@ -23,8 +23,8 @@ data:extend({
{ {
type = "simple-entity-with-force", type = "simple-entity-with-force",
name = "seedling", name = "seedling",
localised_name = {"entity-name.seedling"}, localised_name = { "entity-name.seedling" },
localised_description = {"entity-description.seedling"}, localised_description = { "entity-description.seedling" },
icon = ICONPATH .. "Seedling.png", icon = ICONPATH .. "Seedling.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -34,12 +34,12 @@ data:extend({
} }
}, },
order = "x[bi]-a[bi-seedling]", order = "x[bi]-a[bi-seedling]",
flags = {"placeable-neutral", "placeable-player", "player-creation", "breaths-air"}, flags = { "placeable-neutral", "placeable-player", "player-creation", "breaths-air" },
create_ghost_on_death = false, create_ghost_on_death = false,
minable = { minable = {
mining_particle = "wooden-particle", mining_particle = "wooden-particle",
mining_time = 0.25, mining_time = 0.25,
results = {{type="item", name="seedling", amount=1}}, results = { { type = "item", name = "seedling", amount = 1 } },
count = 1 count = 1
}, },
corpse = nil, corpse = nil,
@ -47,8 +47,8 @@ data:extend({
emissions_per_second = { pollution = -0.0006 }, emissions_per_second = { pollution = -0.0006 },
max_health = 5, max_health = 5,
collision_box = {{-0.1, -0.1}, {0.1, 0.1}}, collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } },
selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
subgroup = "trees", subgroup = "trees",
impact_category = "wood", impact_category = "wood",
picture = { picture = {
@ -64,8 +64,8 @@ data:extend({
{ {
type = "simple-entity-with-force", type = "simple-entity-with-force",
name = "seedling-2", name = "seedling-2",
localised_name = {"entity-name.seedling"}, localised_name = { "entity-name.seedling" },
localised_description = {"entity-description.seedling"}, localised_description = { "entity-description.seedling" },
icon = ICONPATH .. "Seedling.png", icon = ICONPATH .. "Seedling.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -75,12 +75,12 @@ data:extend({
} }
}, },
order = "x[bi]-a[bi-seedling]", order = "x[bi]-a[bi-seedling]",
flags = {"placeable-neutral", "placeable-player", "player-creation", "breaths-air"}, flags = { "placeable-neutral", "placeable-player", "player-creation", "breaths-air" },
create_ghost_on_death = false, create_ghost_on_death = false,
minable = { minable = {
mining_particle = "wooden-particle", mining_particle = "wooden-particle",
mining_time = 0.25, mining_time = 0.25,
results = {{type="item", name="seedling", amount=1}}, results = { { type = "item", name = "seedling", amount = 1 } },
count = 1 count = 1
}, },
corpse = nil, corpse = nil,
@ -88,8 +88,8 @@ data:extend({
emissions_per_second = { pollution = -0.0006 }, emissions_per_second = { pollution = -0.0006 },
max_health = 5, max_health = 5,
collision_box = {{-0.1, -0.1}, {0.1, 0.1}}, collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } },
selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
subgroup = "trees", subgroup = "trees",
impact_category = "wood", impact_category = "wood",
picture = { picture = {
@ -104,8 +104,8 @@ data:extend({
{ {
type = "simple-entity-with-force", type = "simple-entity-with-force",
name = "seedling-3", name = "seedling-3",
localised_name = {"entity-name.seedling"}, localised_name = { "entity-name.seedling" },
localised_description = {"entity-description.seedling"}, localised_description = { "entity-description.seedling" },
icon = ICONPATH .. "Seedling.png", icon = ICONPATH .. "Seedling.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -115,12 +115,12 @@ data:extend({
} }
}, },
order = "x[bi]-a[bi-seedling]", order = "x[bi]-a[bi-seedling]",
flags = {"placeable-neutral", "placeable-player", "player-creation", "breaths-air"}, flags = { "placeable-neutral", "placeable-player", "player-creation", "breaths-air" },
create_ghost_on_death = false, create_ghost_on_death = false,
minable = { minable = {
mining_particle = "wooden-particle", mining_particle = "wooden-particle",
mining_time = 0.25, mining_time = 0.25,
results = {{type="item", name="seedling", amount=1}}, results = { { type = "item", name = "seedling", amount = 1 } },
count = 1 count = 1
}, },
corpse = nil, corpse = nil,
@ -128,8 +128,8 @@ data:extend({
emissions_per_second = { pollution = -0.0006 }, emissions_per_second = { pollution = -0.0006 },
max_health = 5, max_health = 5,
collision_box = {{-0.1, -0.1}, {0.1, 0.1}}, collision_box = { { -0.1, -0.1 }, { 0.1, 0.1 } },
selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
subgroup = "trees", subgroup = "trees",
impact_category = "wood", impact_category = "wood",
picture = { picture = {
@ -154,12 +154,12 @@ data:extend({
icon_size = 64, icon_size = 64,
} }
}, },
flags = {"placeable-neutral", "placeable-player", "player-creation"}, flags = { "placeable-neutral", "placeable-player", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-farm"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-farm" },
max_health = 250, max_health = 250,
corpse = "big-remnants", corpse = "big-remnants",
dying_explosion = "medium-explosion", dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 70}}, resistances = { { type = "fire", percent = 70 } },
fluid_boxes = { fluid_boxes = {
{ {
production_type = "input", production_type = "input",
@ -167,7 +167,7 @@ data:extend({
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {-1, -4} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -1, -4 } } }
}, },
{ {
production_type = "input", production_type = "input",
@ -175,34 +175,36 @@ data:extend({
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, -4} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 1, -4 } } }
}, },
}, },
fluid_boxes_off_when_no_fluid_recipe = true, fluid_boxes_off_when_no_fluid_recipe = true,
collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } },
selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } },
graphics_set = {
animation = { animation = {
filename = ENTITYPATH .. "Bio_Farm_Idle.png", filename = ENTITYPATH .. "Bio_Farm_Idle.png",
priority = "high", priority = "high",
width = 348, width = 348,
height = 288, height = 288,
shift = {0.96, 0}, shift = { 0.96, 0 },
frame_count = 1, frame_count = 1,
}, },
working_visualisations = { {
working_visualisations = {
animation = { animation = {
filename = ENTITYPATH .. "Bio_Farm_Working.png", filename = ENTITYPATH .. "Bio_Farm_Working.png",
priority = "high", priority = "high",
width = 348, width = 348,
height = 288, height = 288,
shift = {0.96, 0}, shift = { 0.96, 0 },
frame_count = 1, frame_count = 1,
}, },
} }
}, },
crafting_categories = {"biofarm-mod-farm"},
crafting_categories = { "biofarm-mod-farm" },
crafting_speed = 1, crafting_speed = 1,
energy_source = { energy_source = {
type = "electric", type = "electric",
@ -217,12 +219,12 @@ data:extend({
module_specification = { module_specification = {
module_slots = 3 module_slots = 3
}, },
allowed_effects = {"consumption", "speed", "productivity", "pollution"}, allowed_effects = { "consumption", "speed", "productivity", "pollution" },
}, },
}) })
------- Bio Farm Hidden Electric Pole ------- Bio Farm Hidden Electric Pole
data:extend({ data:extend({
@ -239,14 +241,14 @@ data:extend({
icon_size = 64, icon_size = 64,
} }
}, },
flags = {"placeable-neutral", "placeable-player", "player-creation"}, flags = { "placeable-neutral", "placeable-player", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.25, result = "bi-bio-greenhouse"}, minable = { hardness = 0.2, mining_time = 0.25, result = "bi-bio-greenhouse" },
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 } },
max_health = 250, max_health = 250,
corpse = "medium-remnants", corpse = "medium-remnants",
dying_explosion = "medium-explosion", dying_explosion = "medium-explosion",
crafting_categories = {"biofarm-mod-greenhouse"}, crafting_categories = { "biofarm-mod-greenhouse" },
crafting_speed = 1, crafting_speed = 1,
energy_source = { energy_source = {
type = "electric", type = "electric",
@ -269,34 +271,38 @@ data:extend({
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } }
}, },
}, },
module_specification = { module_specification = {
module_slots = 2 module_slots = 2
}, },
allowed_effects = {"consumption", "speed", "productivity", "pollution"}, allowed_effects = { "consumption", "speed", "productivity", "pollution" },
graphics_set = {
animation = { animation = {
filename = ENTITYPATH .. "bio_greenhouse_off.png", filename = ENTITYPATH .. "bio_greenhouse_off.png",
width = 113, width = 113,
height = 93, height = 93,
frame_count = 1, frame_count = 1,
scale = 1, scale = 1,
shift = {0.3, 0} shift = { 0.3, 0 }
}, },
working_visualisations = { working_visualisations = {
{ {
light = {intensity = 1, size = 6}, light = { intensity = 1, size = 6 },
animation = { animation = {
filename = ENTITYPATH .. "bio_greenhouse_on.png", filename = ENTITYPATH .. "bio_greenhouse_on.png",
width = 113, width = 113,
height = 93, height = 93,
frame_count = 1, frame_count = 1,
scale = 1, scale = 1,
shift = {0.3, 0} shift = { 0.3, 0 }
} }
} }
}, },
},
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 }
}, },
@ -316,18 +322,19 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "placeable-player", "player-creation"}, flags = { "placeable-neutral", "placeable-player", "player-creation" },
order = "a[cokery]", order = "a[cokery]",
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-cokery"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-cokery" },
max_health = 200, max_health = 200,
corpse = "medium-remnants", corpse = "medium-remnants",
resistances = {{type = "fire", percent = 95}}, resistances = { { type = "fire", percent = 95 } },
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 } },
module_specification = { module_specification = {
module_slots = 2 module_slots = 2
}, },
allowed_effects = {"consumption", "speed", "pollution"}, allowed_effects = { "consumption", "speed", "pollution" },
graphics_set = {
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/cokery/cokery_sheet.png", filename = "__Bio_Industries_2__/graphics/entities/cokery/cokery_sheet.png",
frame_count = 28, frame_count = 28,
@ -335,10 +342,11 @@ data:extend({
width = 256, width = 256,
height = 256, height = 256,
scale = 0.5, scale = 0.5,
shift = {0.5, -0.5}, shift = { 0.5, -0.5 },
animation_speed = 0.1 animation_speed = 0.1
}, },
crafting_categories = {"biofarm-mod-smelting"}, },
crafting_categories = { "biofarm-mod-smelting" },
energy_source = { energy_source = {
type = "electric", type = "electric",
input_priority = "secondary", input_priority = "secondary",
@ -359,12 +367,12 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-stone-crusher"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-stone-crusher" },
max_health = 100, max_health = 100,
corpse = "medium-remnants", corpse = "medium-remnants",
module_slots = 1, module_slots = 1,
resistances = {{type = "fire", percent = 70}}, resistances = { { type = "fire", percent = 70 } },
working_sound = { working_sound = {
sound = { sound = {
filename = "__base__/sound/assembling-machine-t1-1.ogg", filename = "__base__/sound/assembling-machine-t1-1.ogg",
@ -372,8 +380,9 @@ data:extend({
}, },
apparent_volume = 1.5 apparent_volume = 1.5
}, },
collision_box = {{-0.8, -0.8}, {0.8, 0.8}}, collision_box = { { -0.8, -0.8 }, { 0.8, 0.8 } },
selection_box = {{-1.0, -1.0}, {1.0, 1.0}}, selection_box = { { -1.0, -1.0 }, { 1.0, 1.0 } },
graphics_set = {
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone_crusher_anim.png", filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone_crusher_anim.png",
priority = "high", priority = "high",
@ -381,18 +390,19 @@ data:extend({
height = 78, height = 78,
frame_count = 11, frame_count = 11,
animation_speed = 0.5, animation_speed = 0.5,
shift = {0.0, -0.1} shift = { 0.0, -0.1 }
}, },
working_visualisations = { working_visualisations = { {
filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone-crusher-anim.png", filename = "__Bio_Industries_2__/graphics/entities/stone-crusher/stone-crusher-anim.png",
priority = "high", priority = "high",
width = 65, width = 65,
height = 78, height = 78,
frame_count = 11, frame_count = 11,
animation_speed = 0.18 / 2.5, animation_speed = 0.18 / 2.5,
shift = {0.0, -0.1} shift = { 0.0, -0.1 }
} },
}, },
crafting_categories = {"biofarm-mod-crushing"}, crafting_categories = { "biofarm-mod-crushing" },
result_inventory_size = 1, result_inventory_size = 1,
source_inventory_size = 1, source_inventory_size = 1,
crafting_speed = 1, crafting_speed = 1,
@ -405,14 +415,14 @@ data:extend({
module_specification = { module_specification = {
module_slots = 2 module_slots = 2
}, },
allowed_effects = {"consumption", "speed", "pollution"}, allowed_effects = { "consumption", "speed", "pollution" },
}, },
--- Seed Bomb Projectile - 1 --- Seed Bomb Projectile - 1
{ {
type = "projectile", type = "projectile",
name = "seed-bomb-projectile-1", name = "seed-bomb-projectile-1",
flags = {"not-on-map"}, flags = { "not-on-map" },
acceleration = 0.005, acceleration = 0.005,
action = { action = {
type = "direct", type = "direct",
@ -436,14 +446,14 @@ data:extend({
} }
} }
}, },
light = {intensity = 0.8, size = 15}, light = { intensity = 0.8, size = 15 },
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/rocket.png", filename = "__Bio_Industries_2__/graphics/entities/rocket.png",
frame_count = 8, frame_count = 8,
line_length = 8, line_length = 8,
width = 9, width = 9,
height = 35, height = 35,
shift = {0, 0}, shift = { 0, 0 },
priority = "high" priority = "high"
}, },
shadow = { shadow = {
@ -452,14 +462,14 @@ data:extend({
width = 7, width = 7,
height = 24, height = 24,
priority = "high", priority = "high",
shift = {0, 0} shift = { 0, 0 }
}, },
smoke = { smoke = {
{ {
name = "smoke-fast", name = "smoke-fast",
deviation = {0.15, 0.15}, deviation = { 0.15, 0.15 },
frequency = 1, frequency = 1,
position = {0, -1}, position = { 0, -1 },
slow_down_factor = 1, slow_down_factor = 1,
starting_frame = 3, starting_frame = 3,
starting_frame_deviation = 5, starting_frame_deviation = 5,
@ -473,7 +483,7 @@ data:extend({
{ {
type = "projectile", type = "projectile",
name = "seed-bomb-projectile-2", name = "seed-bomb-projectile-2",
flags = {"not-on-map"}, flags = { "not-on-map" },
acceleration = 0.005, acceleration = 0.005,
action = { action = {
type = "direct", type = "direct",
@ -497,14 +507,14 @@ data:extend({
} }
} }
}, },
light = {intensity = 0.8, size = 15}, light = { intensity = 0.8, size = 15 },
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/rocket.png", filename = "__Bio_Industries_2__/graphics/entities/rocket.png",
frame_count = 8, frame_count = 8,
line_length = 8, line_length = 8,
width = 9, width = 9,
height = 35, height = 35,
shift = {0, 0}, shift = { 0, 0 },
priority = "high" priority = "high"
}, },
shadow = { shadow = {
@ -513,14 +523,14 @@ data:extend({
width = 7, width = 7,
height = 24, height = 24,
priority = "high", priority = "high",
shift = {0, 0} shift = { 0, 0 }
}, },
smoke = { smoke = {
{ {
name = "smoke-fast", name = "smoke-fast",
deviation = {0.15, 0.15}, deviation = { 0.15, 0.15 },
frequency = 1, frequency = 1,
position = {0, -1}, position = { 0, -1 },
slow_down_factor = 1, slow_down_factor = 1,
starting_frame = 3, starting_frame = 3,
starting_frame_deviation = 5, starting_frame_deviation = 5,
@ -534,7 +544,7 @@ data:extend({
{ {
type = "projectile", type = "projectile",
name = "seed-bomb-projectile-3", name = "seed-bomb-projectile-3",
flags = {"not-on-map"}, flags = { "not-on-map" },
acceleration = 0.005, acceleration = 0.005,
action = { action = {
type = "direct", type = "direct",
@ -558,14 +568,14 @@ data:extend({
} }
} }
}, },
light = {intensity = 0.8, size = 15}, light = { intensity = 0.8, size = 15 },
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/rocket.png", filename = "__Bio_Industries_2__/graphics/entities/rocket.png",
frame_count = 8, frame_count = 8,
line_length = 8, line_length = 8,
width = 9, width = 9,
height = 35, height = 35,
shift = {0, 0}, shift = { 0, 0 },
priority = "high" priority = "high"
}, },
shadow = { shadow = {
@ -574,14 +584,14 @@ data:extend({
width = 7, width = 7,
height = 24, height = 24,
priority = "high", priority = "high",
shift = {0, 0} shift = { 0, 0 }
}, },
smoke = { smoke = {
{ {
name = "smoke-fast", name = "smoke-fast",
deviation = {0.15, 0.15}, deviation = { 0.15, 0.15 },
frequency = 1, frequency = 1,
position = {0, -1}, position = { 0, -1 },
slow_down_factor = 1, slow_down_factor = 1,
starting_frame = 3, starting_frame = 3,
starting_frame_deviation = 5, starting_frame_deviation = 5,
@ -595,7 +605,7 @@ data:extend({
{ {
type = "projectile", type = "projectile",
name = "seed-bomb-wave-1", name = "seed-bomb-wave-1",
flags = {"not-on-map"}, flags = { "not-on-map" },
acceleration = 0, acceleration = 0,
action = { action = {
{ {
@ -633,7 +643,7 @@ data:extend({
{ {
type = "projectile", type = "projectile",
name = "seed-bomb-wave-2", name = "seed-bomb-wave-2",
flags = {"not-on-map"}, flags = { "not-on-map" },
acceleration = 0, acceleration = 0,
action = { action = {
{ {
@ -671,7 +681,7 @@ data:extend({
{ {
type = "projectile", type = "projectile",
name = "seed-bomb-wave-3", name = "seed-bomb-wave-3",
flags = {"not-on-map"}, flags = { "not-on-map" },
acceleration = 0, acceleration = 0,
action = { action = {
{ {
@ -709,8 +719,8 @@ data:extend({
{ {
type = "ammo-turret", type = "ammo-turret",
name = "bi-arboretum-area", name = "bi-arboretum-area",
localised_name = {"entity-name.bi-arboretum"}, localised_name = { "entity-name.bi-arboretum" },
localised_description = {"entity-description.bi-arboretum"}, localised_description = { "entity-description.bi-arboretum" },
icon = ICONPATH .. "Arboretum_Icon.png", icon = ICONPATH .. "Arboretum_Icon.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -719,14 +729,14 @@ data:extend({
icon_size = 64, icon_size = 64,
} }
}, },
flags = {"not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable"}, flags = { "not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable" },
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 },
max_health = 250, max_health = 250,
corpse = "big-remnants", corpse = "big-remnants",
dying_explosion = "medium-explosion", dying_explosion = "medium-explosion",
collision_box = {{-4.5, -4.5}, {4.5, 4.5}}, collision_box = { { -4.5, -4.5 }, { 4.5, 4.5 } },
selection_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]", order = "x[bi]-a[bi-arboretum]",
automated_ammo_count = 1, automated_ammo_count = 1,
resistances = {}, resistances = {},
@ -737,7 +747,7 @@ data:extend({
cooldown = 2, cooldown = 2,
range = 75, range = 75,
projectile_creation_distance = 0.1, projectile_creation_distance = 0.1,
action ={} action = {}
}, },
folding_speed = 0.08, folding_speed = 0.08,
folded_animation = (function() folded_animation = (function()
@ -770,13 +780,13 @@ data:extend({
icon_size = 64, icon_size = 64,
} }
}, },
flags = {"placeable-neutral", "placeable-player", "player-creation"}, flags = { "placeable-neutral", "placeable-player", "player-creation" },
placeable_by = {item ="bi-arboretum-area", count = 1}, -- Fixes that entity couldn't be blueprinted 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"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-arboretum-area" },
max_health = 250, max_health = 250,
corpse = "big-remnants", corpse = "big-remnants",
dying_explosion = "medium-explosion", dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 70}}, resistances = { { type = "fire", percent = 70 } },
fluid_boxes = { fluid_boxes = {
{ {
production_type = "input", production_type = "input",
@ -784,7 +794,7 @@ data:extend({
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {-1, -4} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -1, -4 } } }
}, },
{ {
production_type = "input", production_type = "input",
@ -792,33 +802,36 @@ data:extend({
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, -4} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 1, -4 } } }
}, },
}, },
fluid_boxes_off_when_no_fluid_recipe = true, fluid_boxes_off_when_no_fluid_recipe = true,
collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } },
selection_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]", order = "x[bi]-a[bi-arboretum]",
graphics_set = {
animation = { animation = {
filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png", filename = ENTITYPATH .. "Bio_Farm_Idle_alt.png",
priority = "low", priority = "low",
width = 320, width = 320,
height = 320, height = 320,
frame_count = 1, frame_count = 1,
shift = {0.75, 0}, shift = { 0.75, 0 },
}, },
working_visualisations = { {
working_visualisations = {
animation = { animation = {
filename = ENTITYPATH .. "Bio_Farm_Working_alt.png", filename = ENTITYPATH .. "Bio_Farm_Working_alt.png",
priority = "low", priority = "low",
width = 320, width = 320,
height = 320, height = 320,
frame_count = 1, frame_count = 1,
shift = {0.75, 0}, shift = { 0.75, 0 },
}, },
} },
}, },
crafting_categories = {"bi-arboretum"},
crafting_categories = { "bi-arboretum" },
crafting_speed = 0.000000000001, crafting_speed = 0.000000000001,
energy_source = { energy_source = {
type = "electric", type = "electric",

View file

@ -3,10 +3,10 @@ local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__base__/graphics/entity/boiler/" local ENTITYPATH = "__base__/graphics/entity/boiler/"
require ("util") require("util")
require ("prototypes.Bio_Fuel.pipeConnectors") 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 -- 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 -- unlock the bio-reactor and the most basic recipe for algae biomass even if
@ -27,8 +27,8 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor" },
max_health = 100, max_health = 100,
corpse = "big-remnants", corpse = "big-remnants",
fluid_boxes = { fluid_boxes = {
@ -38,7 +38,7 @@ data:extend({
pipe_covers = pipecoverspicturesBioreactor(), pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } }
}, },
{ {
production_type = "input", production_type = "input",
@ -46,7 +46,7 @@ data:extend({
pipe_covers = pipecoverspicturesBioreactor(), pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, 0} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.east, position = { 1, 0 } } }
}, },
{ {
production_type = "input", production_type = "input",
@ -54,7 +54,7 @@ data:extend({
pipe_covers = pipecoverspicturesBioreactor(), pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, 1} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.south, position = { 0, 1 } } }
}, },
{ {
production_type = "output", production_type = "output",
@ -62,7 +62,7 @@ data:extend({
pipe_covers = pipecoverspicturesBioreactor(), pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000, volume = 1000,
base_level = 1, base_level = 1,
pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, -1} }} pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, -1 } } }
}, },
{ {
production_type = "output", production_type = "output",
@ -70,12 +70,13 @@ data:extend({
pipe_covers = pipecoverspicturesBioreactor(), pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000, volume = 1000,
base_level = 1, base_level = 1,
pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, 1} }} pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, 1 } } }
}, },
}, },
fluid_boxes_off_when_no_fluid_recipe = true, fluid_boxes_off_when_no_fluid_recipe = true,
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 } },
graphics_set = {
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/bioreactor/bioreactor.png", filename = "__Bio_Industries_2__/graphics/entities/bioreactor/bioreactor.png",
priority = "high", priority = "high",
@ -84,20 +85,21 @@ data:extend({
frame_count = 26, frame_count = 26,
line_length = 13, line_length = 13,
animation_speed = 0.4, animation_speed = 0.4,
shift = {0.55, -0.33} shift = { 0.55, -0.33 }
},
}, },
energy_source = { energy_source = {
type = "electric", type = "electric",
usage_priority = "secondary-input" usage_priority = "secondary-input"
}, },
crafting_categories = {"biofarm-mod-bioreactor"}, crafting_categories = { "biofarm-mod-bioreactor" },
ingredient_count = 3, ingredient_count = 3,
crafting_speed = 1, crafting_speed = 1,
energy_usage = "10kW", energy_usage = "10kW",
module_specification = { module_specification = {
module_slots = 3 module_slots = 3
}, },
allowed_effects = {"consumption", "speed", "productivity", "pollution"}, allowed_effects = { "consumption", "speed", "productivity", "pollution" },
}, },
}) })
@ -107,8 +109,8 @@ if BI.Settings.BI_Bio_Fuel then
{ {
type = "boiler", type = "boiler",
name = "bi-bio-boiler", name = "bi-bio-boiler",
localised_name = {"entity-name.bi-bio-boiler"}, localised_name = { "entity-name.bi-bio-boiler" },
localised_description = {"entity-description.bi-bio-boiler"}, localised_description = { "entity-description.bi-bio-boiler" },
icon = ICONPATH .. "bio_boiler.png", icon = ICONPATH .. "bio_boiler.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -120,8 +122,8 @@ if BI.Settings.BI_Bio_Fuel then
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler" },
max_health = 300, max_health = 300,
corpse = "small-remnants", corpse = "small-remnants",
mode = "output-to-separate-pipe", mode = "output-to-separate-pipe",
@ -139,16 +141,16 @@ if BI.Settings.BI_Bio_Fuel then
percent = 35 percent = 35
} }
}, },
collision_box = {{-1.29, -0.79}, {1.29, 0.79}}, collision_box = { { -1.29, -0.79 }, { 1.29, 0.79 } },
selection_box = {{-1.5, -1}, {1.5, 1}}, selection_box = { { -1.5, -1 }, { 1.5, 1 } },
target_temperature = 165, target_temperature = 165,
fluid_box = { fluid_box = {
volume = 200, volume = 200,
base_level = -1, base_level = -1,
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
pipe_connections = { 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 } },
{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", production_type = "input-output",
filter = "water" filter = "water"
@ -158,7 +160,7 @@ if BI.Settings.BI_Bio_Fuel then
base_level = 1, base_level = 1,
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
pipe_connections = { pipe_connections = {
{flow_direction = "output", direction = defines.direction.north, position = {0, -0.5}} { flow_direction = "output", direction = defines.direction.north, position = { 0, -0.5 } }
}, },
production_type = "output", production_type = "output",
filter = "steam" filter = "steam"

View file

@ -2,7 +2,7 @@ local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
require ("util") require("util")
--- Bio Garden --- Bio Garden
@ -18,13 +18,13 @@ data:extend({
icon_size = 64, icon_size = 64,
} }
}, },
flags = {"placeable-neutral", "placeable-player", "player-creation"}, flags = { "placeable-neutral", "placeable-player", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden" },
fast_replaceable_group = "bi-bio-garden", fast_replaceable_group = "bi-bio-garden",
max_health = 150, max_health = 150,
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 } },
fluid_boxes = { fluid_boxes = {
{ {
production_type = "input", production_type = "input",
@ -32,10 +32,11 @@ data:extend({
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
volume = 1000, volume = 1000,
base_level = -1, base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }} pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } }
}, },
}, },
fluid_boxes_off_when_no_fluid_recipe = true, fluid_boxes_off_when_no_fluid_recipe = true,
graphics_set = {
animation = { animation = {
filename = "__Bio_Industries_2__/graphics/entities/biogarden/bio_garden_x.png", filename = "__Bio_Industries_2__/graphics/entities/biogarden/bio_garden_x.png",
width = 160, width = 160,
@ -43,7 +44,8 @@ data:extend({
frame_count = 12, frame_count = 12,
line_length = 4, line_length = 4,
animation_speed = 0.025, animation_speed = 0.025,
shift = {0.45, 0} shift = { 0.45, 0 }
},
}, },
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 },
@ -52,7 +54,7 @@ data:extend({
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,
}, },
crafting_categories = {"clean-air"}, crafting_categories = { "clean-air" },
source_inventory_size = 1, source_inventory_size = 1,
result_inventory_size = 1, result_inventory_size = 1,
crafting_speed = 1.0, crafting_speed = 1.0,
@ -71,9 +73,6 @@ data:extend({
}, },
-- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens -- 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! -- won't be affected by beacons!
allowed_effects = {"consumption", "speed"}, allowed_effects = { "consumption", "speed" },
}, },
}) })

View file

@ -1,6 +1,6 @@
local tile_graphics = require("__base__/prototypes/tile/tile-graphics") local tile_graphics = require("__base__/prototypes/tile/tile-graphics")
local BioInd = require('common')('Bio_Industries_2') local BioInd = require('common')('Bio_Industries_2')
require ("util") require("util")
local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/" local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/"
@ -8,18 +8,16 @@ local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/"
if BI.Settings.BI_Solar_Additions then if BI.Settings.BI_Solar_Additions then
local sounds = {}
sounds.walking_sound = {}
local sounds = {} for i = 1, 11 do
sounds.walking_sound = {}
for i = 1, 11 do
sounds.walking_sound[i] = { sounds.walking_sound[i] = {
filename = "__base__/sound/walking/concrete-" .. i ..".ogg", filename = "__base__/sound/walking/concrete-" .. i .. ".ogg",
volume = 1.2 volume = 1.2
} }
end end
data:extend({ data:extend({
------- Bio Farm Solar Panel ------- Bio Farm Solar Panel
{ {
type = "solar-panel", type = "solar-panel",
@ -35,14 +33,14 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm"}, minable = { hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm" },
max_health = 600, max_health = 600,
corpse = "big-remnants", corpse = "big-remnants",
dying_explosion = "medium-explosion", dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 80}}, resistances = { { type = "fire", percent = 80 } },
collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } },
selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } },
energy_source = { energy_source = {
type = "electric", type = "electric",
usage_priority = "solar" usage_priority = "solar"
@ -55,7 +53,7 @@ data:extend({
frame_count = 1, frame_count = 1,
direction_count = 1, direction_count = 1,
--scale = 3/2, --scale = 3/2,
shift = {0.30, 0} shift = { 0.30, 0 }
}, },
production = "3600kW" production = "3600kW"
}, },
@ -76,12 +74,12 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator" },
max_health = 500, max_health = 500,
corpse = "big-remnants", corpse = "big-remnants",
collision_box = {{-1.75, -1.75}, {1.75, 1.75}}, collision_box = { { -1.75, -1.75 }, { 1.75, 1.75 } },
selection_box = {{-2, -2}, {2, 2}}, selection_box = { { -2, -2 }, { 2, 2 } },
--collision_box = {{-2, -2}, {2, 2}}, --collision_box = {{-2, -2}, {2, 2}},
--selection_box = {{-2.5, -2.5}, {2.5, 2.5}}, --selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
energy_source = { energy_source = {
@ -91,12 +89,13 @@ data:extend({
input_flow_limit = "20MW", input_flow_limit = "20MW",
output_flow_limit = "20MW" output_flow_limit = "20MW"
}, },
chargable_graphics = {
picture = { picture = {
filename = ENTITYPATH .. "bi_LargeAccumulator.png", filename = ENTITYPATH .. "bi_LargeAccumulator.png",
priority = "extra-high", priority = "extra-high",
width = 245, width = 245,
height = 245, height = 245,
shift = {0.75, -0.5}, shift = { 0.75, -0.5 },
scale = 0.75, scale = 0.75,
}, },
charge_animation = { charge_animation = {
@ -105,24 +104,25 @@ data:extend({
height = 250, height = 250,
line_length = 8, line_length = 8,
frame_count = 24, frame_count = 24,
shift = {0.75, -0.5}, shift = { 0.75, -0.5 },
scale = 0.75, scale = 0.75,
animation_speed = 0.5 animation_speed = 0.5
}, },
charge_cooldown = 30, charge_cooldown = 30,
charge_light = {intensity = 0.3, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}}, charge_light = { intensity = 0.3, size = 7, color = { r = 1.0, g = 1.0, b = 1.0 } },
discharge_animation = { discharge_animation = {
filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png", filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png",
width = 250, width = 250,
height = 250, height = 250,
line_length = 8, line_length = 8,
frame_count = 24, frame_count = 24,
shift = {0.75, -0.5}, shift = { 0.75, -0.5 },
scale = 0.75, scale = 0.75,
animation_speed = 0.5 animation_speed = 0.5
}, },
discharge_cooldown = 60, discharge_cooldown = 60,
discharge_light = {intensity = 0.7, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}}, discharge_light = { intensity = 0.7, size = 7, color = { r = 1.0, g = 1.0, b = 1.0 } },
},
working_sound = { working_sound = {
sound = { sound = {
filename = "__base__/sound/accumulator-working.ogg", filename = "__base__/sound/accumulator-working.ogg",
@ -136,17 +136,17 @@ data:extend({
}, },
circuit_wire_connection_point = { circuit_wire_connection_point = {
shadow = { shadow = {
red = {0.984375, 1.10938}, red = { 0.984375, 1.10938 },
green = {0.890625, 1.10938} green = { 0.890625, 1.10938 }
}, },
wire = { wire = {
red = {0.6875, 0.59375}, red = { 0.6875, 0.59375 },
green = {0.6875, 0.71875} green = { 0.6875, 0.71875 }
} }
}, },
--circuit_connector_sprites = get_circuit_connector_sprites({0.46875, 0.5}, {0.46875, 0.8125}, 26), --circuit_connector_sprites = get_circuit_connector_sprites({0.46875, 0.5}, {0.46875, 0.8125}, 26),
circuit_wire_max_distance = 9, circuit_wire_max_distance = 9,
default_output_signal = {type = "virtual", name = "signal-A"} default_output_signal = { type = "virtual", name = "signal-A" }
}, },
@ -154,8 +154,8 @@ data:extend({
{ {
type = "electric-pole", type = "electric-pole",
name = "bi-large-substation", name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"}, localised_name = { "entity-name.bi-large-substation" },
localised_description = {"entity-description.bi-large-substation"}, localised_description = { "entity-description.bi-large-substation" },
icon = ICONPATH .. "bi_LargeSubstation_icon.png", icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -167,8 +167,8 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-large-substation"}, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-large-substation" },
max_health = 600, max_health = 600,
corpse = "big-remnants", corpse = "big-remnants",
dying_explosion = "big-explosion", dying_explosion = "big-explosion",
@ -179,9 +179,9 @@ data:extend({
percent = 90 percent = 90
} }
}, },
collision_box = {{-2.4, -2.4}, {2.4, 2.4}}, collision_box = { { -2.4, -2.4 }, { 2.4, 2.4 } },
selection_box = {{-2.5, -2.5}, {2.5, 2.5}}, selection_box = { { -2.5, -2.5 }, { 2.5, 2.5 } },
drawing_box = {{-2.5, -5}, {2.5, 2.5}}, drawing_box = { { -2.5, -5 }, { 2.5, 2.5 } },
maximum_wire_distance = 25, maximum_wire_distance = 25,
-- Changed for 0.18.34/1.1.4 -- Changed for 0.18.34/1.1.4
supply_area_distance = 50.5, supply_area_distance = 50.5,
@ -190,7 +190,7 @@ data:extend({
priority = "high", priority = "high",
width = 450, width = 450,
height = 380, height = 380,
shift = {1, -0.5}, shift = { 1, -0.5 },
direction_count = 1, direction_count = 1,
scale = 0.5, scale = 0.5,
}, },
@ -203,14 +203,14 @@ data:extend({
connection_points = { connection_points = {
{ {
shadow = { shadow = {
copper = {1.9, -0.6}, copper = { 1.9, -0.6 },
green = {1.3, -0.6}, green = { 1.3, -0.6 },
red = {2.65, -0.6} red = { 2.65, -0.6 }
}, },
wire = { wire = {
copper = {-0.25, -2.71875}, copper = { -0.25, -2.71875 },
green = {-0.84375, -2.71875}, green = { -0.84375, -2.71875 },
red = {0.34375, -2.71875} red = { 0.34375, -2.71875 }
} }
}, },
}, },
@ -229,8 +229,8 @@ data:extend({
{ {
type = "tile", type = "tile",
name = "bi-solar-mat", name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"}, localised_name = { "entity-name.bi-solar-mat" },
localised_description = {"entity-description.bi-solar-mat"}, localised_description = { "entity-description.bi-solar-mat" },
icon = ICONPATH .. "solar-mat.png", icon = ICONPATH .. "solar-mat.png",
icon_size = 64, icon_size = 64,
icons = { icons = {
@ -240,10 +240,10 @@ data:extend({
} }
}, },
needs_correction = false, needs_correction = false,
minable = {hardness = 0.1, mining_time = 0.25, result = "bi-solar-mat"}, minable = { hardness = 0.1, mining_time = 0.25, result = "bi-solar-mat" },
mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" }, mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" },
collision_mask = { layers = { ground_tile = true }}, collision_mask = { layers = { ground_tile = true } },
collision_box = {{-0.5, -0.5}, {0.5, 0.5}}, collision_box = { { -0.5, -0.5 }, { 0.5, 0.5 } },
walking_speed_modifier = 1.45, walking_speed_modifier = 1.45,
layer = 62, layer = 62,
decorative_removal_probability = 1, decorative_removal_probability = 1,
@ -279,12 +279,12 @@ data:extend({
} }
}, },
walking_sound = sounds.walking_sound, walking_sound = sounds.walking_sound,
map_color = {r = 93, g = 138, b = 168}, map_color = { r = 93, g = 138, b = 168 },
vehicle_friction_modifier = dirt_vehicle_speed_modifer vehicle_friction_modifier = dirt_vehicle_speed_modifer
}, },
}) })
data:extend({ data:extend({
------- Boiler for Solar Plant / Boiler ------- Boiler for Solar Plant / Boiler
{ {
type = "boiler", type = "boiler",
@ -300,8 +300,8 @@ data:extend({
-- This is necessary for "Space Exploration" (if not true, the entity can only be -- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)! -- placed on Nauvis)!
se_allow_in_space = true, se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"}, flags = { "placeable-neutral", "player-creation" },
minable = {hardness = 0.2, mining_time = 1, result = "bi-solar-boiler"}, minable = { hardness = 0.2, mining_time = 1, result = "bi-solar-boiler" },
max_health = 400, max_health = 400,
corpse = "small-remnants", corpse = "small-remnants",
vehicle_impact_sound = sounds.generic_impact, vehicle_impact_sound = sounds.generic_impact,
@ -320,16 +320,16 @@ data:extend({
percent = 30 percent = 30
} }
}, },
collision_box = {{-4.2, -4.2}, {4.2, 4.2}}, collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } },
selection_box = {{-4.5, -4.5}, {4.5, 4.5}}, selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } },
target_temperature = 235, target_temperature = 235,
fluid_box = { fluid_box = {
volume = 200, volume = 200,
base_level = -1, base_level = -1,
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
pipe_connections = { pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {4, 0}}, { flow_direction = "input-output", direction = defines.direction.east, position = { 4, 0 } },
{flow_direction = "input-output", direction = defines.direction.north, position = {-4, 0}}, { flow_direction = "input-output", direction = defines.direction.west, position = { -4, 0 } },
}, },
production_type = "input-output", production_type = "input-output",
filter = "water" filter = "water"
@ -339,8 +339,8 @@ data:extend({
base_level = 1, base_level = 1,
pipe_covers = pipecoverspictures(), pipe_covers = pipecoverspictures(),
pipe_connections = { pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {0, 4}}, { flow_direction = "input-output", direction = defines.direction.south, position = { 0, 4 } },
{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", production_type = "output",
filter = "steam" filter = "steam"
@ -359,8 +359,9 @@ data:extend({
}, },
max_sounds_per_type = 3 max_sounds_per_type = 3
}, },
pictures = {
north = {
structure = { structure = {
north = {
layers = { layers = {
{ {
filename = ENTITYPATH .. "Bio_Solar_Boiler.png", filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
@ -370,81 +371,84 @@ data:extend({
}, },
} }
}, },
east = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
},
},
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 = { fire_glow = {
north = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png", filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high", priority = "extra-high",
frame_count = 1, frame_count = 1,
width = 62, width = 62,
height = 62, height = 62,
shift = {0.09, -2.8}, shift = { 0.09, -2.8 },
scale = 1.5, scale = 1.5,
blend_mode = "additive", blend_mode = "additive",
}, },
},
east = { 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", filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high", priority = "extra-high",
frame_count = 1, frame_count = 1,
width = 62, width = 62,
height = 62, height = 62,
shift = {0, -3}, shift = { 0, -3 },
blend_mode = "additive", blend_mode = "additive",
}, },
},
south = { 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", filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high", priority = "extra-high",
frame_count = 1, frame_count = 1,
width = 62, width = 62,
height = 62, height = 62,
shift = {0, -3}, shift = { 0, -3 },
blend_mode = "additive", blend_mode = "additive",
}, },
},
west = { 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", filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high", priority = "extra-high",
frame_count = 1, frame_count = 1,
width = 62, width = 62,
height = 62, height = 62,
shift = {0, -3}, shift = { 0, -3 },
blend_mode = "additive", blend_mode = "additive",
}, },
}
}, },
fire_flicker_enabled = false,
fire_glow_flicker_enabled = false,
burning_cooldown = 20 burning_cooldown = 20
}, },
}) })
end end

View file

@ -1,6 +1,6 @@
-- Add functions that are also used in other files (debugging output etc.) -- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2') 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/" local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
@ -48,29 +48,21 @@ local c_entities = BioInd.compound_entities
for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
panel = table.deepcopy(h_entity) panel = table.deepcopy(h_entity)
panel.name = panel_name panel.name = panel_name
panel.localised_name = {"entity-name." .. locale_name} panel.localised_name = { "entity-name." .. locale_name }
panel.localised_description = {"entity-description." .. locale_name} panel.localised_description = { "entity-description." .. locale_name }
-- Adjust properties for hidden panel of Solar boiler -- Adjust properties for hidden panel of Solar boiler
if c_entities["bi-solar-boiler"] and if c_entities["bi-solar-boiler"] and
panel_name == c_entities["bi-solar-boiler"].hidden[h_key].name then panel_name == c_entities["bi-solar-boiler"].hidden[h_key].name then
panel.icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png" panel.icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png"
panel.icon_size = 64 panel.icon_size = 64
panel.BI_add_icon = true panel.BI_add_icon = true
panel.picture = nil
panel.picture = {} panel.overlay = nil
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)
panel.max_health = 400 panel.max_health = 400
panel.render_no_power_icon = true panel.render_no_power_icon = true
panel.collision_box = {{-4.2, -4.2}, {4.2, 4.2}} panel.collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }
panel.production = "1.8MW" panel.production = "1.8MW"
BioInd.show("Adjusted properties of", panel_name) BioInd.show("Adjusted properties of", panel_name)
@ -93,7 +85,7 @@ for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
BioInd.show("Adjusted properties of", panel_name) BioInd.show("Adjusted properties of", panel_name)
end end
data:extend({panel}) data:extend({ panel })
BioInd.show("Created", panel_name) BioInd.show("Created", panel_name)
end end