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

@ -183,6 +183,7 @@ data:extend({
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",
@ -191,8 +192,7 @@ data:extend({
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",
@ -201,7 +201,9 @@ data:extend({
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 = {
@ -276,6 +278,8 @@ data:extend({
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,
@ -297,6 +301,8 @@ data:extend({
} }
} }
}, },
},
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 }
}, },
@ -328,6 +334,7 @@ data:extend({
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,
@ -338,6 +345,7 @@ data:extend({
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",
@ -374,6 +382,7 @@ data:extend({
}, },
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",
@ -383,7 +392,7 @@ data:extend({
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,
@ -391,6 +400,7 @@ data:extend({
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,
@ -799,6 +809,8 @@ data:extend({
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",
@ -807,8 +819,7 @@ data:extend({
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",
@ -817,7 +828,9 @@ data:extend({
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 = {

View file

@ -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",
@ -86,6 +87,7 @@ data:extend({
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"

View file

@ -36,6 +36,7 @@ data:extend({
}, },
}, },
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,
@ -45,6 +46,7 @@ data:extend({
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 },
working_sound = { working_sound = {
@ -74,6 +76,3 @@ data:extend({
allowed_effects = { "consumption", "speed" }, allowed_effects = { "consumption", "speed" },
}, },
}) })

View file

@ -8,8 +8,6 @@ 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 = {} local sounds = {}
sounds.walking_sound = {} sounds.walking_sound = {}
for i = 1, 11 do for i = 1, 11 do
@ -91,6 +89,7 @@ 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",
@ -123,6 +122,7 @@ data:extend({
}, },
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",
@ -328,8 +328,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 = {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,7 +339,7 @@ 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",
@ -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,42 +371,7 @@ 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,
@ -415,7 +381,19 @@ data:extend({
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,
@ -424,7 +402,19 @@ data:extend({
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,
@ -433,7 +423,19 @@ data:extend({
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,
@ -442,9 +444,11 @@ data:extend({
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

@ -55,19 +55,11 @@ for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
-- 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 } }