Compare commits

..

No commits in common. "main" and "2.0.28" have entirely different histories.
main ... 2.0.28

7 changed files with 592 additions and 582 deletions

View file

@ -1,3 +0,0 @@
[*]
indent_style = space
indent_size = 2

View file

@ -1,14 +1,4 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 2.0.30
Date: 05.11.2025
Bug Fixes:
- Fix icon scales
---------------------------------------------------------------------------------------------------
Version: 2.0.29
Date: 02.11.2025
Bug Fixes:
- Remove settings check for wooden rails
---------------------------------------------------------------------------------------------------
Version: 2.0.28 Version: 2.0.28
Date: 01.11.2025 Date: 01.11.2025
Changes: Changes:

View file

@ -1,6 +1,6 @@
{ {
"name": "Bio_Industries_2", "name": "Bio_Industries_2",
"version": "2.0.30", "version": "2.0.28",
"factorio_version": "2.0", "factorio_version": "2.0",
"title": "Bio Industries", "title": "Bio Industries",
"author": "TheSAguy - Had a few Ideas, Pi-C (Programming Genius), Snouz (Graphics Wizard), Cackling Fiend - Conversion to F2.0", "author": "TheSAguy - Had a few Ideas, Pi-C (Programming Genius), Snouz (Graphics Wizard), Cackling Fiend - Conversion to F2.0",

View file

@ -13,10 +13,10 @@ data:extend(
name = "bi-seed", name = "bi-seed",
icons = { {icon = ICONPATH .. "bio_seed.png", icon_size = 64, }}, icons = { {icon = ICONPATH .. "bio_seed.png", icon_size = 64, }},
pictures = { pictures = {
{ size = 64, filename = ICONPATHMIPS.."bio_seed_1.png", scale = 0.48, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."bio_seed_1.png", scale = 0.25, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."bio_seed_2.png", scale = 0.46, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."bio_seed_2.png", scale = 0.25, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."bio_seed_3.png", scale = 0.45, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."bio_seed_3.png", scale = 0.25, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."bio_seed_4.png", scale = 0.43, mipmap_count = 4 } { size = 64, filename = ICONPATHMIPS.."bio_seed_4.png", scale = 0.25, mipmap_count = 4 }
}, },
category = "biofarm-mod-greenhouse", category = "biofarm-mod-greenhouse",
subgroup = "bio-bio-farm", subgroup = "bio-bio-farm",
@ -35,15 +35,15 @@ data:extend(
localised_description = {"entity-description.seedling"}, localised_description = {"entity-description.seedling"},
icons = { {icon = ICONPATH .. "Seedling.png", icon_size = 64, }}, icons = { {icon = ICONPATH .. "Seedling.png", icon_size = 64, }},
pictures = { pictures = {
{ size = 64, filename = ICONPATHMIPS.."seedling_1.png", scale = 0.57, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_1.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_2.png", scale = 0.52, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_2.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_3.png", scale = 0.47, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_3.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_4.png", scale = 0.52, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_4.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_5.png", scale = 0.62, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_5.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_6.png", scale = 0.52, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_6.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_7.png", scale = 0.72, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_7.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_8.png", scale = 0.52, mipmap_count = 9 }, { size = 64, filename = ICONPATHMIPS.."seedling_8.png", scale = 0.25, mipmap_count = 9 },
{ size = 64, filename = ICONPATHMIPS.."seedling_9.png", scale = 0.47, mipmap_count = 9 } { size = 64, filename = ICONPATHMIPS.."seedling_9.png", scale = 0.25, mipmap_count = 9 }
}, },
subgroup = "bio-bio-farm", subgroup = "bio-bio-farm",
order = "x[bi]-b[bi-seedling]", order = "x[bi]-b[bi-seedling]",
@ -114,10 +114,10 @@ data:extend(
name = "bi-woodpulp", name = "bi-woodpulp",
icons = { {icon = ICONPATH .. "woodpulp_64.png", icon_size = 64, }}, icons = { {icon = ICONPATH .. "woodpulp_64.png", icon_size = 64, }},
pictures = { pictures = {
{ size = 64, filename = ICONPATHMIPS.."woodpulp_1.png", scale = 0.55, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."woodpulp_1.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."woodpulp_2.png", scale = 0.53, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."woodpulp_2.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."woodpulp_3.png", scale = 0.51, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."woodpulp_3.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."woodpulp_4.png", scale = 0.49, mipmap_count = 4 } { size = 64, filename = ICONPATHMIPS.."woodpulp_4.png", scale = 0.2, mipmap_count = 4 }
}, },
fuel_value = "1MJ", fuel_value = "1MJ",
fuel_category = "chemical", fuel_category = "chemical",
@ -147,10 +147,10 @@ data:extend(
name = "bi-ash", name = "bi-ash",
icons = { {icon = ICONPATH .. "ash.png", icon_size = 64, }}, icons = { {icon = ICONPATH .. "ash.png", icon_size = 64, }},
pictures = { pictures = {
{ size = 64, filename = ICONPATHMIPS.."ash_1.png", scale = 0.42, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."ash_1.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."ash_2.png", scale = 0.42, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."ash_2.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."ash_3.png", scale = 0.42, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."ash_3.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."ash_4.png", scale = 0.42, mipmap_count = 4 } { size = 64, filename = ICONPATHMIPS.."ash_4.png", scale = 0.2, mipmap_count = 4 }
}, },
subgroup = "raw-material", subgroup = "raw-material",
order = "a[bi]-a-b[bi-ash]", order = "a[bi]-a-b[bi-ash]",
@ -164,10 +164,10 @@ data:extend(
name = "wood-charcoal", name = "wood-charcoal",
icons = { {icon = ICONPATH .. "charcoal.png", icon_size = 64, }}, icons = { {icon = ICONPATH .. "charcoal.png", icon_size = 64, }},
pictures = { pictures = {
{ size = 64, filename = ICONPATHMIPS.."charcoal_1.png", scale = 0.49, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."charcoal_1.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."charcoal_2.png", scale = 0.5, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."charcoal_2.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."charcoal_3.png", scale = 0.5, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."charcoal_3.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."charcoal_4.png", scale = 0.51, mipmap_count = 4 } { size = 64, filename = ICONPATHMIPS.."charcoal_4.png", scale = 0.2, mipmap_count = 4 }
}, },
fuel_value = "6MJ", fuel_value = "6MJ",
fuel_category = "chemical", fuel_category = "chemical",
@ -199,10 +199,10 @@ data:extend(
name = "stone-crushed", name = "stone-crushed",
icons = { {icon = ICONPATH .. "crushed-stone.png", icon_size = 64, }}, icons = { {icon = ICONPATH .. "crushed-stone.png", icon_size = 64, }},
pictures = { pictures = {
{ size = 64, filename = ICONPATHMIPS.."crush_1.png", scale = 0.44, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."crush_1.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."crush_2.png", scale = 0.45, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."crush_2.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."crush_3.png", scale = 0.45, mipmap_count = 4 }, { size = 64, filename = ICONPATHMIPS.."crush_3.png", scale = 0.2, mipmap_count = 4 },
{ size = 64, filename = ICONPATHMIPS.."crush_4.png", scale = 0.46, mipmap_count = 4 } { size = 64, filename = ICONPATHMIPS.."crush_4.png", scale = 0.2, mipmap_count = 4 }
}, },
subgroup = "raw-material", subgroup = "raw-material",
order = "a[bi]-a-z[stone-crushed]", order = "a[bi]-a-z[stone-crushed]",

View file

@ -1,449 +1,445 @@
local BioInd = require('common')('Bio_Industries_2') local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/"
local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/" local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/"
local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/"
require("util") require("util")
local crafting_speed_quality_multiplier = mods["quality"] and {
uncommon = 0.83,
rare = 0.66,
epic = 0.50,
legendary = 0.16
} or nil
--- Bio Garden --- Bio Garden
data:extend({ data:extend({
{ {
type = "assembling-machine", type = "assembling-machine",
name = "bi-bio-garden", name = "bi-bio-garden",
icon = ICONPATH_E .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH_E .. "bio_garden_icon.png", icon = ICONPATH_E .. "bio_garden_icon.png",
icon_size = 64, icon_size = 64,
} icons = {
{
icon = ICONPATH_E .. "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 = "bi-bio-garden-remnant",
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 = {
layers = {
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_anim_trees.png",
width = 256, height = 320,
frame_count = 20, line_length = 5,
animation_speed = 0.15, scale = 0.5, shift = {0, -0.75}
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_shadow.png",
width = 384, height = 320,
frame_count = 1, repeat_count = 20, -- repeat to match
draw_as_shadow = true, scale = 0.5, shift = {1, -0.75}
}
}
}
},
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,
max_sounds_per_type = 3,
},
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 = -1.5 * 60 }, -- 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" }, ---- corpse
fast_replaceable_group = "bi-bio-garden", {
max_health = 150, type = "corpse",
corpse = "bi-bio-garden-remnant", name = "bi-bio-garden-remnant",
collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, localised_name = {"entity-name.bi-bio-garden-remnant"},
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, icon = "__base__/graphics/icons/remnants.png",
fluid_boxes = { icon_size = 64,
{ icon_mipmaps = 4,
production_type = "input", BI_add_icon = true,
pipe_picture = assembler3pipepictures(), flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"},
pipe_covers = pipecoverspictures(), subgroup = "remnants",
volume = 1000, order = "z-z-z",
base_level = -1, selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } } tile_width = 3,
}, tile_height = 3,
}, selectable_in_game = false,
fluid_boxes_off_when_no_fluid_recipe = true, time_before_removed = 60 * 60 * 15, -- 15 minutes
graphics_set = { final_render_layer = "remnants",
animation = { remove_on_tile_placement = false,
layers = { animation =
{ {
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_anim_trees.png", {
width = 256, height = 320, filename = REMNANTSPATH .. "bio_garden_remnant.png",
frame_count = 20, line_length = 5, line_length = 1,
animation_speed = 0.15, scale = 0.5, shift = { 0, -0.75 } width = 256,
}, height = 320,
{ frame_count = 1,
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_shadow.png", direction_count = 1,
width = 384, height = 320, shift = {0, -0.75},
frame_count = 1, repeat_count = 20, -- repeat to match scale = 0.5
draw_as_shadow = true, scale = 0.5, shift = { 1, -0.75 } }
} }
} },
}
},
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, ---- Bio Garden Large
working_sound = { {
sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 0.8 } }, type = "assembling-machine",
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, name = "bi-bio-garden-large",
apparent_volume = 1.5,
max_sounds_per_type = 3,
},
crafting_categories = { "clean-air" },
source_inventory_size = 1,
result_inventory_size = 1,
crafting_speed = 1.0,
crafting_speed_quality_multiplier = crafting_speed_quality_multiplier,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = { pollution = -1.5 * 60 }, -- 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" },
},
---- corpse
{
type = "corpse",
name = "bi-bio-garden-remnant",
localised_name = { "entity-name.bi-bio-garden-remnant" },
icon = "__base__/graphics/icons/remnants.png",
icon_size = 64,
icon_mipmaps = 4,
BI_add_icon = true,
flags = { "placeable-neutral", "building-direction-8-way", "not-on-map" },
subgroup = "remnants",
order = "z-z-z",
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
tile_width = 3,
tile_height = 3,
selectable_in_game = false,
time_before_removed = 60 * 60 * 15, -- 15 minutes
final_render_layer = "remnants",
remove_on_tile_placement = false,
animation = {
{
filename = REMNANTSPATH .. "bio_garden_remnant.png",
line_length = 1,
width = 256,
height = 320,
frame_count = 1,
direction_count = 1,
shift = { 0, -0.75 },
scale = 0.5
}
}
},
---- Bio Garden Large
{
type = "assembling-machine",
name = "bi-bio-garden-large",
icon = ICONPATH_E .. "bio_garden_large_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH_E .. "bio_garden_large_icon.png", icon = ICONPATH_E .. "bio_garden_large_icon.png",
icon_size = 64, icon_size = 64,
} icons = {
}, {
flags = { "placeable-neutral", "placeable-player", "player-creation" }, icon = ICONPATH_E .. "bio_garden_large_icon.png",
minable = { hardness = 0.6, mining_time = 1, result = "bi-bio-garden-large" }, icon_size = 64,
fast_replaceable_group = "bi-bio-garden-large", }
max_health = 1200,
corpse = "bi-bio-garden-large-remnant",
collision_box = { { -4.3, -4.3 }, { 4.3, 4.3 } },
selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } },
scale_entity_info_icon = true,
fluid_boxes = {
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 1,
base_level = -1,
volume = 1000,
filter = "water",
pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -4 } } },
--pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, 4 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -4, 0 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 4, 0 } } },
},
},
off_when_no_fluid_recipe = false,
graphics_set = {
animation = {
layers = {
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_large.png",
width = 640,
height = 704,
scale = 0.5,
shift = { 0, -0.5 },
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_large_shadow.png",
width = 704,
height = 640,
scale = 0.5,
shift = { 0.5, 0 },
draw_as_shadow = true,
}
}
},
working_visualisations = {
{
light = { intensity = 1.2, size = 20 },
draw_as_light = true,
effect = "flicker",
constant_speed = true,
fadeout = true,
animation = {
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_large_light.png",
width = 640,
height = 640,
scale = 0.5,
shift = { 0, 0 },
},
}, },
}, flags = { "placeable-neutral", "placeable-player", "player-creation" },
}, minable = { hardness = 0.6, mining_time = 1, result = "bi-bio-garden-large" },
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, fast_replaceable_group = "bi-bio-garden-large",
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, max_health = 1200,
working_sound = { corpse = "bi-bio-garden-large-remnant",
sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 1 } }, collision_box = {{-4.3, -4.3}, {4.3, 4.3}},
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.8 }, selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
apparent_volume = 1.5, scale_entity_info_icon = true,
max_sounds_per_type = 3, fluid_boxes = {
}, {
crafting_categories = { "clean-air" }, production_type = "input",
source_inventory_size = 1, pipe_covers = pipecoverspictures(),
result_inventory_size = 1, base_area = 1,
crafting_speed = 4.0, base_level = -1,
crafting_speed_quality_multiplier = crafting_speed_quality_multiplier, volume = 1000,
energy_source = { filter = "water",
type = "electric", pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -4 } } },
usage_priority = "secondary-input", --pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, 4 } } },
emissions_per_minute = { pollution = -12 * 60 }, -- Negative value: pollution is absorbed! -- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -4, 0 } } },
}, -- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 4, 0 } } },
energy_usage = "800kW",
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! ) off_when_no_fluid_recipe = false,
module_specification = { graphics_set = {
module_slots = 2 animation = {
}, layers = {
-- 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! filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_large.png",
allowed_effects = { "consumption", "speed" }, width = 640,
}, height = 704,
scale = 0.5,
--- corpse shift = {0, -0.5},
{ },
type = "corpse", {
name = "bi-bio-garden-large-remnant", filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_large_shadow.png",
localised_name = { "entity-name.bi-bio-garden-large-remnant" }, width = 704,
icon = "__base__/graphics/icons/remnants.png", height = 640,
icon_size = 64, scale = 0.5,
icon_mipmaps = 4, shift = {0.5, 0},
BI_add_icon = true, draw_as_shadow = true,
flags = { "placeable-neutral", "building-direction-8-way", "not-on-map" }, }
subgroup = "remnants", }
order = "z-z-z", },
selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } },
tile_width = 9, working_visualisations = {
tile_height = 9, {
selectable_in_game = false, light = {intensity = 1.2, size = 20 },
time_before_removed = 60 * 60 * 15, -- 15 minutes draw_as_light = true,
final_render_layer = "remnants", effect = "flicker",
remove_on_tile_placement = false, constant_speed = true,
animation = { fadeout = true,
{ animation = {
filename = REMNANTSPATH .. "bio_garden_large_remnant.png", filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_large_light.png",
line_length = 1, width = 640,
width = 640, height = 640,
height = 704, scale = 0.5,
frame_count = 1, shift = {0, 0},
direction_count = 1, },
shift = { 0, -0.5 }, },
scale = 0.5 },
} },
} open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
}, close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
---- Bio Garden Huge working_sound = {
{ sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 1 } },
type = "assembling-machine", idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.8 },
name = "bi-bio-garden-huge", apparent_volume = 1.5,
icon = ICONPATH_E .. "bio_garden_huge_icon.png", max_sounds_per_type = 3,
icon_size = 64,
icons = {
{
icon = ICONPATH_E .. "bio_garden_huge_icon.png",
icon_size = 64,
}
},
flags = { "placeable-neutral", "placeable-player", "player-creation" },
minable = { hardness = 1.2, mining_time = 2, result = "bi-bio-garden-huge" },
fast_replaceable_group = "bi-bio-garden-huge",
max_health = 2000,
corpse = "bi-bio-garden-huge-remnant",
collision_box = { { -13.3, -13.3 }, { 13.3, 13.3 } },
selection_box = { { -13.5, -13.5 }, { 13.5, 13.5 } },
scale_entity_info_icon = true,
fluid_boxes = {
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 1,
base_level = -1,
volume = 1000,
filter = "water",
pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -13 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, 13 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -13, 0 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 13, 0 } } },
},
},
off_when_no_fluid_recipe = false,
graphics_set = {
animation = {
layers = {
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge.png",
width = 1792,
height = 1856,
scale = 0.5,
frame_count = 1,
line_length = 1,
repeat_count = 8,
animation_speed = 1,
shift = { 0, -0.5 },
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_shadow.png",
width = 256,
height = 1856,
scale = 0.5,
frame_count = 1,
line_length = 1,
repeat_count = 8,
animation_speed = 1,
shift = { 14, -0.5 },
draw_as_shadow = true,
},
}, },
}, crafting_categories = { "clean-air" },
source_inventory_size = 1,
working_visualisations = { result_inventory_size = 1,
{ crafting_speed = 4.0,
constant_speed = true, energy_source = {
fadeout = true, type = "electric",
animation = { usage_priority = "secondary-input",
layers = { emissions_per_minute = { pollution = -12 * 60 }, -- Negative value: pollution is absorbed!
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = { -4.5, -4.5 },
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = { 4.5, 4.5 },
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = { 4.5, -4.5 },
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = { -4.5, 4.5 },
},
},
},
}, },
}, energy_usage = "800kW",
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 = 2
},
-- 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" },
}, },
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, --- corpse
working_sound = { {
sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 1.8 } }, type = "corpse",
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.9 }, name = "bi-bio-garden-large-remnant",
apparent_volume = 2, localised_name = {"entity-name.bi-bio-garden-large-remnant"},
max_sounds_per_type = 3, icon = "__base__/graphics/icons/remnants.png",
}, icon_size = 64,
crafting_categories = { "clean-air" }, icon_mipmaps = 4,
source_inventory_size = 1, BI_add_icon = true,
result_inventory_size = 1, flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"},
crafting_speed = 16, subgroup = "remnants",
crafting_speed_quality_multiplier = crafting_speed_quality_multiplier, order = "z-z-z",
energy_source = { selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
type = "electric", tile_width = 9,
usage_priority = "secondary-input", tile_height = 9,
emissions_per_minute = { pollution = -96 * 60 }, -- Negative value: pollution is absorbed! selectable_in_game = false,
}, time_before_removed = 60 * 60 * 15, -- 15 minutes
energy_usage = "3200kW", final_render_layer = "remnants",
ingredient_count = 1, remove_on_tile_placement = false,
-- Changed for 0.18.34/1.1.4 -- Modules don't make sense for the gardens! animation =
-- (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 = 4
},
-- 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" },
},
---- corpse
{ {
type = "corpse", {
name = "bi-bio-garden-huge-remnant", filename = REMNANTSPATH .. "bio_garden_large_remnant.png",
localised_name = { "entity-name.bi-bio-garden-huge-remnant" }, line_length = 1,
icon = "__base__/graphics/icons/remnants.png", width = 640,
icon_size = 64, height = 704,
icon_mipmaps = 4, frame_count = 1,
BI_add_icon = true, direction_count = 1,
flags = { "placeable-neutral", "building-direction-8-way", "not-on-map" }, shift = {0, -0.5},
subgroup = "remnants", scale = 0.5
order = "z-z-z",
selection_box = { { -13.5, -13.5 }, { 13.5, 13.5 } },
tile_width = 27,
tile_height = 27,
selectable_in_game = false,
time_before_removed = 60 * 60 * 15, -- 15 minutes
final_render_layer = "remnants",
remove_on_tile_placement = false,
animation = {
{
filename = REMNANTSPATH .. "bio_garden_huge_remnant.png",
line_length = 1,
width = 896,
height = 928,
frame_count = 1,
direction_count = 1,
shift = { 0, -0.5 },
}
} }
} }
},
---- Bio Garden Huge
{
type = "assembling-machine",
name = "bi-bio-garden-huge",
icon = ICONPATH_E .. "bio_garden_huge_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH_E .. "bio_garden_huge_icon.png",
icon_size = 64,
}
},
flags = { "placeable-neutral", "placeable-player", "player-creation" },
minable = { hardness = 1.2, mining_time = 2, result = "bi-bio-garden-huge" },
fast_replaceable_group = "bi-bio-garden-huge",
max_health = 2000,
corpse = "bi-bio-garden-huge-remnant",
collision_box = {{-13.3, -13.3}, {13.3, 13.3}},
selection_box = {{-13.5, -13.5}, {13.5, 13.5}},
scale_entity_info_icon = true,
fluid_boxes = {
{
production_type = "input",
pipe_covers = pipecoverspictures(),
base_area = 1,
base_level = -1,
volume = 1000,
filter = "water",
pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -13 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, 13 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { -13, 0 } } },
-- pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 13, 0 } } },
},
},
off_when_no_fluid_recipe = false,
graphics_set = {
animation = {
layers = {
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge.png",
width = 1792,
height = 1856,
scale = 0.5,
frame_count = 1,
line_length = 1,
repeat_count = 8,
animation_speed = 1,
shift = {0, -0.5},
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_shadow.png",
width = 256,
height = 1856,
scale = 0.5,
frame_count = 1,
line_length = 1,
repeat_count = 8,
animation_speed = 1,
shift = {14, -0.5},
draw_as_shadow = true,
},
},
},
working_visualisations = {
{
constant_speed = true,
fadeout = true,
animation = {
layers = {
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = {-4.5, -4.5},
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = {4.5, 4.5},
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = {4.5, -4.5},
},
{
filename = ENTITYPATH_BIO .. "bio_garden/bio_garden_huge_turbine_anim.png",
width = 128,
height = 96,
scale = 0.5,
frame_count = 8,
line_length = 8,
repeat_count = 1,
animation_speed = 1,
shift = {-4.5, 4.5},
},
},
},
},
},
},
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 = 1.8 } },
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.9 },
apparent_volume = 2,
max_sounds_per_type = 3,
},
crafting_categories = { "clean-air" },
source_inventory_size = 1,
result_inventory_size = 1,
crafting_speed = 16,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = { pollution = -96 * 60 }, -- Negative value: pollution is absorbed!
},
energy_usage = "3200kW",
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 = 4
},
-- 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" },
},
---- corpse
{
type = "corpse",
name = "bi-bio-garden-huge-remnant",
localised_name = {"entity-name.bi-bio-garden-huge-remnant"},
icon = "__base__/graphics/icons/remnants.png",
icon_size = 64,
icon_mipmaps = 4,
BI_add_icon = true,
flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"},
subgroup = "remnants",
order = "z-z-z",
selection_box = {{-13.5, -13.5}, {13.5, 13.5}},
tile_width = 27,
tile_height = 27,
selectable_in_game = false,
time_before_removed = 60 * 60 * 15, -- 15 minutes
final_render_layer = "remnants",
remove_on_tile_placement = false,
animation =
{
{
filename = REMNANTSPATH .. "bio_garden_huge_remnant.png",
line_length = 1,
width = 896,
height = 928,
frame_count = 1,
direction_count = 1,
shift = {0, -0.5},
}
}
}
}) })

View file

@ -5,7 +5,7 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
log("BI.Settings.BI_Game_Tweaks_Disassemble: " .. tostring(BI.Settings.BI_Game_Tweaks_Disassemble)) log("BI.Settings.BI_Game_Tweaks_Disassemble: " .. tostring(BI.Settings.BI_Game_Tweaks_Disassemble))
if BI.Settings.BI_Game_Tweaks_Disassemble then if BI.Settings.BI_Game_Tweaks_Disassemble then
log("Enabling disassemble recipes!") log("Enabling disassemble recipes!")
--- Bio Tweaks --- Bio Tweaks
data:extend({ data:extend({
-- Item subgroup -- Item subgroup
@ -20,8 +20,8 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
{ {
type = "recipe", type = "recipe",
name = "bi-burner-mining-drill-disassemble", name = "bi-burner-mining-drill-disassemble",
localised_description = { "recipe-description.bi-disassemble-recipes" }, localised_description = {"recipe-description.bi-disassemble-recipes"},
icons = { { icon = ICONPATH .. "burner-mining-drill_disassemble.png", icon_size = 64, } }, icons = { {icon = ICONPATH .. "burner-mining-drill_disassemble.png", icon_size = 64, } },
category = "advanced-crafting", category = "advanced-crafting",
subgroup = "bio-disassemble", subgroup = "bio-disassemble",
order = "a[Disassemble]-a[bi-burner-mining-drill-disassemble]", order = "a[Disassemble]-a[bi-burner-mining-drill-disassemble]",
@ -31,19 +31,20 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
allow_decomposition = false, allow_decomposition = false,
energy_required = 2, energy_required = 2,
ingredients = { ingredients = {
{ type = "item", name = "burner-mining-drill", amount = 1 }, {type = "item", name = "burner-mining-drill", amount = 1},
}, },
results = { results = {
{ type = "item", name = "stone", amount = 4 }, {type="item", name="stone", amount=4},
{ type = "item", name = "iron-plate", amount = 4 } {type="item", name="iron-plate", amount=4}
}, },
main_product = "", main_product = "",
}, },
----
{ {
type = "recipe", type = "recipe",
name = "bi-burner-inserter-disassemble", name = "bi-burner-inserter-disassemble",
localised_description = { "recipe-description.bi-disassemble-recipes" }, localised_description = {"recipe-description.bi-disassemble-recipes"},
icons = { { icon = ICONPATH .. "burner_inserter_disassemble.png", icon_size = 64, } }, icons = { {icon = ICONPATH .. "burner_inserter_disassemble.png", icon_size = 64, } },
category = "advanced-crafting", category = "advanced-crafting",
subgroup = "bio-disassemble", subgroup = "bio-disassemble",
order = "a[Disassemble]-b[bi-burner-inserter-disassemble]", order = "a[Disassemble]-b[bi-burner-inserter-disassemble]",
@ -53,18 +54,19 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
allow_decomposition = false, allow_decomposition = false,
energy_required = 2, energy_required = 2,
ingredients = { ingredients = {
{ type = "item", name = "burner-inserter", amount = 1 }, {type = "item", name = "burner-inserter", amount = 1},
}, },
results = { results = {
{ type = "item", name = "iron-plate", amount = 2 }, {type="item", name="iron-plate", amount=2},
}, },
main_product = "", main_product = "",
}, },
----
{ {
type = "recipe", type = "recipe",
name = "bi-long-handed-inserter-disassemble", name = "bi-long-handed-inserter-disassemble",
localised_description = { "recipe-description.bi-disassemble-recipes" }, localised_description = {"recipe-description.bi-disassemble-recipes"},
icons = { { icon = ICONPATH .. "long_handed_inserter_disassemble.png", icon_size = 64, } }, icons = { {icon = ICONPATH .. "long_handed_inserter_disassemble.png", icon_size = 64, } },
category = "advanced-crafting", category = "advanced-crafting",
subgroup = "bio-disassemble", subgroup = "bio-disassemble",
order = "a[Disassemble]-c[bi-long-handed-inserter-disassemble]", order = "a[Disassemble]-c[bi-long-handed-inserter-disassemble]",
@ -74,20 +76,21 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
allow_decomposition = false, allow_decomposition = false,
energy_required = 2, energy_required = 2,
ingredients = { ingredients = {
{ type = "item", name = "long-handed-inserter", amount = 1 }, {type = "item", name = "long-handed-inserter", amount = 1},
}, },
results = { results = {
{ type = "item", name = "iron-gear-wheel", amount = 1 }, {type="item", name="iron-gear-wheel", amount=1},
{ type = "item", name = "iron-plate", amount = 1 }, {type="item", name="iron-plate", amount=1},
{ type = "item", name = "electronic-circuit", amount = 1 }, {type="item", name="electronic-circuit", amount=1},
}, },
main_product = "", main_product = "",
}, },
---
{ {
type = "recipe", type = "recipe",
name = "bi-stone-furnace-disassemble", name = "bi-stone-furnace-disassemble",
localised_description = { "recipe-description.bi-disassemble-recipes" }, localised_description = {"recipe-description.bi-disassemble-recipes"},
icons = { { icon = ICONPATH .. "stone_furnace_disassemble.png", icon_size = 64, } }, icons = { {icon = ICONPATH .. "stone_furnace_disassemble.png", icon_size = 64, } },
category = "advanced-crafting", category = "advanced-crafting",
subgroup = "bio-disassemble", subgroup = "bio-disassemble",
order = "a[Disassemble]-d[bi-stone-furnace-disassemble]", order = "a[Disassemble]-d[bi-stone-furnace-disassemble]",
@ -97,18 +100,19 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
allow_decomposition = false, allow_decomposition = false,
energy_required = 2, energy_required = 2,
ingredients = { ingredients = {
{ type = "item", name = "stone-furnace", amount = 1 }, {type = "item", name = "stone-furnace", amount = 1},
}, },
results = { results = {
{ type = "item", name = "stone", amount = 3 }, {type="item", name="stone", amount=3},
}, },
main_product = "", main_product = "",
}, },
---
{ {
type = "recipe", type = "recipe",
name = "bi-steel-furnace-disassemble", name = "bi-steel-furnace-disassemble",
localised_description = { "recipe-description.bi-disassemble-recipes" }, localised_description = {"recipe-description.bi-disassemble-recipes"},
icons = { { icon = ICONPATH .. "steel-furnace_disassemble.png", icon_size = 64, } }, icons = { {icon = ICONPATH .. "steel-furnace_disassemble.png", icon_size = 64, } },
category = "advanced-crafting", category = "advanced-crafting",
subgroup = "bio-disassemble", subgroup = "bio-disassemble",
order = "a[Disassemble]-e[bi-steel-furnace-disassemble]", order = "a[Disassemble]-e[bi-steel-furnace-disassemble]",
@ -118,15 +122,15 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
allow_decomposition = false, allow_decomposition = false,
energy_required = 2, energy_required = 2,
ingredients = { ingredients = {
{ type = "item", name = "steel-furnace", amount = 1 }, {type = "item", name = "steel-furnace", amount = 1},
}, },
results = { results = {
{ type = "item", name = "steel-plate", amount = 4 }, {type="item", name="steel-plate", amount=4},
{ type = "item", name = "stone-brick", amount = 4 } {type="item", name="stone-brick", amount=4}
}, },
main_product = "", main_product = "",
}, },
}) })
end end
@ -139,17 +143,16 @@ if SET and not mods["Krastorio2"] then
enabled = false, enabled = false,
energy_required = 21, energy_required = 21,
ingredients = { ingredients = {
{ type = "item", name = "electric-furnace", amount = 1 }, {type = "item", name = "electric-furnace", amount = 1},
{ type = "item", name = "productivity-module", amount = 1 }, {type = "item", name = "productivity-module", amount = 1},
{ type = "item", name = "bi-rail-wood", amount = 40 } {type = "item", name = "bi-rail-wood", amount = 40}
}, },
results = { { type = "item", name = "production-science-pack", amount = 3 } }, results = {{type="item", name="production-science-pack", amount=3}},
}, },
}) })
--~ BI_Functions.lib.allow_productivity("bi-production-science-pack") --~ BI_Functions.lib.allow_productivity("bi-production-science-pack")
--~ thxbob.lib.tech.add_recipe_unlock("production-science-pack", "bi-production-science-pack") --~ thxbob.lib.tech.add_recipe_unlock("production-science-pack", "bi-production-science-pack")
BioInd.writeDebug("Added alternative recipe for Production science packs.") BioInd.writeDebug("Added alternative recipe for Production science packs.")
else else
BioInd.writeDebug("Didn't add alternative recipe for Production science packs! (\"Krastorio\": %s\tSetting: %s", BioInd.writeDebug("Didn't add alternative recipe for Production science packs! (\"Krastorio\": %s\tSetting: %s", {(mods["Krastorio2"] and "active" or "not active"), (SET and "enabled" or "disabled")})
{ (mods["Krastorio2"] and "active" or "not active"), (SET and "enabled" or "disabled") }) end
end

View file

@ -1,18 +1,27 @@
require("prototypes.Wood_Products.rail-pictures-wood") require ("prototypes.Wood_Products.rail-pictures-wood")
local BioInd = require('common')('Bio_Industries_2') local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/"
local item_sounds = require("__base__.prototypes.item_sounds") local item_sounds = require("__base__.prototypes.item_sounds")
local hit_effects = require("__base__.prototypes.entity.hit-effects")
local tile_sounds = require("__base__.prototypes.tile.tile-sounds")
data:extend({
---- ITEM local hit_effects = require ("__base__.prototypes.entity.hit-effects")
{ local sounds = require("__base__.prototypes.entity.sounds")
local tile_sounds = require("__base__.prototypes.tile.tile-sounds")
local simulations = require("__base__.prototypes.factoriopedia-simulations")
if BI.Settings.BI_Game_Tweaks_Recipe then
data:extend({
---- ITEM
{
type = "rail-planner", type = "rail-planner",
name = "bi-rail-wood", name = "bi-rail-wood",
icons = { { icon = ICONPATH_E .. "rail-wood.png", icon_size = 64, } }, icons = { {icon = ICONPATH_E .. "rail-wood.png", icon_size = 64, } },
localised_name = { "item-name.bi-rail-wood" }, localised_name = {"item-name.bi-rail-wood"},
subgroup = "train-transport", subgroup = "train-transport",
order = "a[rail]-0[rail]", order = "a[rail]-0[rail]",
inventory_move_sound = item_sounds.train_inventory_move, inventory_move_sound = item_sounds.train_inventory_move,
@ -20,74 +29,78 @@ data:extend({
drop_sound = item_sounds.train_inventory_move, drop_sound = item_sounds.train_inventory_move,
place_result = "bi-straight-rail-wood", place_result = "bi-straight-rail-wood",
stack_size = 100, stack_size = 100,
rails = { rails =
{
"bi-straight-rail-wood", "bi-straight-rail-wood",
"bi-curved-rail-a-wood", "bi-curved-rail-a-wood",
"bi-curved-rail-b-wood", "bi-curved-rail-b-wood",
"bi-half-diagonal-rail-wood" "bi-half-diagonal-rail-wood"
}, },
manual_length_limit = 22.5 -- 2*(Curved-A) + 2*(Curved-B) + their planner penalty + margin manual_length_limit = 22.5 -- 2*(Curved-A) + 2*(Curved-B) + their planner penalty + margin
}, },
---- Recipe ---- Recipe
{ {
type = "recipe", type = "recipe",
name = "bi-rail-wood", name = "bi-rail-wood",
localised_name = { "entity-name.bi-rail-wood" }, localised_name = {"entity-name.bi-rail-wood"},
localised_description = { "entity-description.bi-rail-wood" }, localised_description = {"entity-description.bi-rail-wood"},
icons = { { icon = ICONPATH_E .. "rail-wood.png", icon_size = 64, } }, icons = { { icon = ICONPATH_E .. "rail-wood.png", icon_size = 64, } },
enabled = false, enabled = false,
ingredients = { ingredients = {
{ type = "item", name = "wood", amount = 6 }, {type="item",name="wood",amount=6},
{ type = "item", name = "stone", amount = 1 }, {type="item",name="stone",amount=1},
{ type = "item", name = "steel-plate", amount = 1 }, {type="item",name="steel-plate",amount=1},
{ type = "item", name = "iron-stick", amount = 1 }, {type="item",name="iron-stick",amount=1},
}, },
results = { { type = "item", name = "bi-rail-wood", amount = 2 } }, results={{type="item",name="bi-rail-wood",amount=2}},
main_product = "", main_product = "",
requester_paste_multiplier = 4, requester_paste_multiplier = 4,
--~ always_show_made_in = true, --~ always_show_made_in = true,
--~ allow_decomposition = false, --~ allow_decomposition = false,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Changed for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4
allow_decomposition = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4
subgroup = "transport", subgroup = "transport",
order = "a[train-system]-a[rail]", order = "a[train-system]-a[rail]",
-- This is a custom property for use by "Krastorio 2" (it will change -- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp) -- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries", mod = "Bio_Industries",
}, },
{ {
type = "recipe", type = "recipe",
name = "bi-rail-wood-to-concrete", name = "bi-rail-wood-to-concrete",
icons = { { icon = ICONPATH_E .. "rail-wood-to-concrete.png", icon_size = 64, } }, icons = { {icon = ICONPATH_E .. "rail-wood-to-concrete.png", icon_size = 64, } },
enabled = false, enabled = false,
ingredients = { ingredients =
{ type = "item", name = "bi-rail-wood", amount = 2 }, {
{ type = "item", name = "stone-brick", amount = 6 }, {type = "item", name = "bi-rail-wood", amount = 2},
{type = "item", name = "stone-brick", amount = 6},
},
results = { { type = "item", name = "rail", amount = 2 } }
},
},
results = {{type="item", name="rail", amount=2}}
},
--- Entity --- Entity
{ {
type = "straight-rail", type = "straight-rail",
name = "bi-straight-rail-wood", name = "bi-straight-rail-wood",
order = "a[ground-rail]-a[bi-straight-rail-wood]", order = "a[ground-rail]-a[bi-straight-rail-wood]",
icon = ICONPATH_E .. "straight-rail-wood.png", icon = ICONPATH_E .. "straight-rail-wood.png",
localised_name = { "entity-name.bi-straight-rail-wood" }, localised_name = {"entity-name.bi-straight-rail-wood"},
collision_box = { { -1, -1 }, { 1, 1 } }, -- has custommly generated box, but the prototype needs something that is used to generate building smokes collision_box = {{-1, -1}, {1, 1}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes
flags = { "placeable-neutral", "player-creation", "building-direction-8-way" }, flags = {"placeable-neutral", "player-creation", "building-direction-8-way"},
minable = { mining_time = 0.2, result = "bi-rail-wood", count = 1 }, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 1},
max_health = 200, max_health = 200,
corpse = "straight-rail-remnants", corpse = "straight-rail-remnants",
dying_explosion = { dying_explosion =
{
name = "rail-explosion" name = "rail-explosion"
}, },
resistances = { resistances =
{
{ {
type = "fire", type = "fire",
percent = 100 percent = 100
@ -98,10 +111,10 @@ data:extend({
} }
}, },
-- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged
selection_box = { { -1.7, -0.8 }, { 1.7, 0.8 } }, selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
damaged_trigger_effect = hit_effects.wall(), damaged_trigger_effect = hit_effects.wall(),
pictures = new_rail_pictures_wood("straight"), pictures = new_rail_pictures_wood("straight"),
placeable_by = { item = "bi-rail-wood", count = 1 }, placeable_by = {item = "bi-rail-wood", count = 1},
walking_sound = tile_sounds.walking.rails, walking_sound = tile_sounds.walking.rails,
extra_planner_goal_penalty = -4, extra_planner_goal_penalty = -4,
factoriopedia_alternative = "straight-rail", factoriopedia_alternative = "straight-rail",
@ -109,35 +122,37 @@ data:extend({
next_upgrade = "straight-rail", next_upgrade = "straight-rail",
fast_replaceable_group = "straight-rail", fast_replaceable_group = "straight-rail",
}, },
{ {
type = "half-diagonal-rail", type = "half-diagonal-rail",
name = "bi-half-diagonal-rail-wood", name = "bi-half-diagonal-rail-wood",
order = "a[ground-rail]-b[bi-half-diagonal-rail-wood]", order = "a[ground-rail]-b[bi-half-diagonal-rail-wood]",
deconstruction_alternative = "bi-straight-rail-wood", deconstruction_alternative = "bi-straight-rail-wood",
icon = ICONPATH_E .. "curved-rail-wood.png", icon = ICONPATH_E .. "curved-rail-wood.png",
localised_name = { "entity-name.bi-half-diagonal-rail-wood" }, localised_name = {"entity-name.bi-half-diagonal-rail-wood"},
collision_box = { { -0.75, -2.236 }, { 0.75, 2.236 } }, -- has custommly generated box, but the prototype needs something that is used to generate building smokes collision_box = {{-0.75, -2.236}, {0.75, 2.236}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes
tile_height = 2, tile_height = 2,
extra_planner_goal_penalty = -4, extra_planner_goal_penalty = -4,
flags = { "placeable-neutral", "player-creation", "building-direction-8-way" }, flags = {"placeable-neutral", "player-creation", "building-direction-8-way"},
minable = { mining_time = 0.2, result = "bi-rail-wood", count = 2 }, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 2},
max_health = 200, max_health = 200,
corpse = "half-diagonal-rail-remnants", corpse = "half-diagonal-rail-remnants",
dying_explosion = { dying_explosion =
{
{ {
name = "rail-explosion", name = "rail-explosion",
offset = { 0.9, 2.2 } offset = {0.9, 2.2}
}, },
{ {
name = "rail-explosion" name = "rail-explosion"
}, },
{ {
name = "rail-explosion", name = "rail-explosion",
offset = { -1.2, -2 } offset = {-1.2, -2}
} }
}, },
resistances = { resistances =
{
{ {
type = "fire", type = "fire",
percent = 100 percent = 100
@ -148,10 +163,10 @@ data:extend({
} }
}, },
-- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged
selection_box = { { -1.7, -0.8 }, { 1.7, 0.8 } }, selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
damaged_trigger_effect = hit_effects.wall(), damaged_trigger_effect = hit_effects.wall(),
pictures = new_rail_pictures_wood("half-diagonal"), pictures = new_rail_pictures_wood("half-diagonal"),
placeable_by = { item = "bi-rail-wood", count = 2 }, placeable_by = {item = "bi-rail-wood", count = 2},
walking_sound = tile_sounds.walking.rails, walking_sound = tile_sounds.walking.rails,
extra_planner_penalty = 0, extra_planner_penalty = 0,
factoriopedia_alternative = "straight-rail", factoriopedia_alternative = "straight-rail",
@ -165,26 +180,28 @@ data:extend({
order = "a[ground-rail]-c[bi-curved-rail-a-wood]", order = "a[ground-rail]-c[bi-curved-rail-a-wood]",
deconstruction_alternative = "bi-straight-rail-wood", deconstruction_alternative = "bi-straight-rail-wood",
icon = ICONPATH_E .. "curved-rail-wood.png", icon = ICONPATH_E .. "curved-rail-wood.png",
localised_name = { "entity-name.bi-curved-rail-a-wood" }, localised_name = {"entity-name.bi-curved-rail-a-wood"},
collision_box = { { -0.75, -2.516 }, { 0.75, 2.516 } }, -- has custommly generated box, but the prototype needs something that is used to generate building smokes collision_box = {{-0.75, -2.516}, {0.75, 2.516}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes
flags = { "placeable-neutral", "player-creation", "building-direction-8-way" }, flags = {"placeable-neutral", "player-creation", "building-direction-8-way"},
minable = { mining_time = 0.2, result = "bi-rail-wood", count = 3 }, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 3},
max_health = 200, max_health = 200,
corpse = "curved-rail-a-remnants", corpse = "curved-rail-a-remnants",
dying_explosion = { dying_explosion =
{
{ {
name = "rail-explosion", name = "rail-explosion",
offset = { 0.9, 2.2 } offset = {0.9, 2.2}
}, },
{ {
name = "rail-explosion" name = "rail-explosion"
}, },
{ {
name = "rail-explosion", name = "rail-explosion",
offset = { -1.2, -2 } offset = {-1.2, -2}
} }
}, },
resistances = { resistances =
{
{ {
type = "fire", type = "fire",
percent = 100 percent = 100
@ -195,10 +212,10 @@ data:extend({
} }
}, },
-- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged
selection_box = { { -1.7, -0.8 }, { 1.7, 0.8 } }, selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
damaged_trigger_effect = hit_effects.wall(), damaged_trigger_effect = hit_effects.wall(),
pictures = new_rail_pictures_wood("curved-a"), pictures = new_rail_pictures_wood("curved-a"),
placeable_by = { item = "bi-rail-wood", count = 3 }, placeable_by = {item = "bi-rail-wood", count = 3},
walking_sound = tile_sounds.walking.rails, walking_sound = tile_sounds.walking.rails,
extra_planner_penalty = 0.5, extra_planner_penalty = 0.5,
deconstruction_marker_positions = rail_8shifts_vector(-0.248, -0.533), deconstruction_marker_positions = rail_8shifts_vector(-0.248, -0.533),
@ -213,26 +230,28 @@ data:extend({
order = "a[ground-rail]-d[bi-curved-rail-b-wood]", order = "a[ground-rail]-d[bi-curved-rail-b-wood]",
deconstruction_alternative = "bi-straight-rail-wood", deconstruction_alternative = "bi-straight-rail-wood",
icon = ICONPATH_E .. "curved-rail-wood.png", icon = ICONPATH_E .. "curved-rail-wood.png",
localised_name = { "entity-name.bi-curved-rail-b-wood" }, localised_name = {"entity-name.bi-curved-rail-b-wood"},
collision_box = { { -0.75, -2.441 }, { 0.75, 2.441 } }, -- has custommly generated box, but the prototype needs something that is used to generate building smokes collision_box = {{-0.75, -2.441}, {0.75, 2.441}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes
flags = { "placeable-neutral", "player-creation", "building-direction-8-way" }, flags = {"placeable-neutral", "player-creation", "building-direction-8-way"},
minable = { mining_time = 0.2, result = "bi-rail-wood", count = 3 }, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 3},
max_health = 200, max_health = 200,
corpse = "curved-rail-b-remnants", corpse = "curved-rail-b-remnants",
dying_explosion = { dying_explosion =
{
{ {
name = "rail-explosion", name = "rail-explosion",
offset = { 0.9, 2.2 } offset = {0.9, 2.2}
}, },
{ {
name = "rail-explosion" name = "rail-explosion"
}, },
{ {
name = "rail-explosion", name = "rail-explosion",
offset = { -1.2, -2 } offset = {-1.2, -2}
} }
}, },
resistances = { resistances =
{
{ {
type = "fire", type = "fire",
percent = 100 percent = 100
@ -243,10 +262,10 @@ data:extend({
} }
}, },
-- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged -- collision box is hardcoded for rails as to avoid unexpected changes in the way rail blocks are merged
selection_box = { { -1.7, -0.8 }, { 1.7, 0.8 } }, selection_box = {{-1.7, -0.8}, {1.7, 0.8}},
damaged_trigger_effect = hit_effects.wall(), damaged_trigger_effect = hit_effects.wall(),
pictures = new_rail_pictures_wood("curved-b"), pictures = new_rail_pictures_wood("curved-b"),
placeable_by = { item = "bi-rail-wood", count = 3 }, placeable_by = {item = "bi-rail-wood", count = 3},
walking_sound = tile_sounds.walking.rails, walking_sound = tile_sounds.walking.rails,
extra_planner_penalty = 0.5, extra_planner_penalty = 0.5,
deconstruction_marker_positions = rail_8shifts_vector(-0.309, -0.155), deconstruction_marker_positions = rail_8shifts_vector(-0.309, -0.155),
@ -255,4 +274,9 @@ data:extend({
next_upgrade = "curved-rail-b", next_upgrade = "curved-rail-b",
fast_replaceable_group = "curved-rail-b", fast_replaceable_group = "curved-rail-b",
}, },
}) })
end