Compare commits

..

3 commits
main ... main

96 changed files with 38012 additions and 36902 deletions

View file

@ -1,85 +1,85 @@
----- Just used for Testing
function Test_Spawn()
local surface = game.surfaces['nauvis']
surface.create_entity({name = "tree-01", position = {2, 10}, force = game.forces.player})
surface.create_entity({name = "tree-02", position = {4, 10}, force = game.forces.player})
surface.create_entity({name = "tree-02-red", position = {6, 10}, force = game.forces.player})
surface.create_entity({name = "tree-03", position = {8, 10}, force = game.forces.player})
surface.create_entity({name = "tree-04", position = {10, 10}, force = game.forces.player})
surface.create_entity({name = "tree-05", position = {12, 10}, force = game.forces.player})
surface.create_entity({name = "tree-06", position = {14, 10}, force = game.forces.player})
surface.create_entity({name = "tree-06-brown", position = {16, 10}, force = game.forces.player})
surface.create_entity({name = "tree-07", position = {18, 10}, force = game.forces.player})
surface.create_entity({name = "tree-08", position = {20, 10}, force = game.forces.player})
surface.create_entity({name = "tree-08-brown", position = {22, 10}, force = game.forces.player})
surface.create_entity({name = "tree-09", position = {24, 10}, force = game.forces.player})
surface.create_entity({name = "tree-09-brown", position = {26, 10}, force = game.forces.player})
surface.create_entity({name = "tree-09-red", position = {28, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-a", position = {30, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-b", position = {32, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-c", position = {34, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-d", position = {36, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-e", position = {38, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-f", position = {40, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-g", position = {42, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-h", position = {44, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-i", position = {46, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-j", position = {48, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-k", position = {50, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-l", position = {52, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-m", position = {54, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-n", position = {56, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-a", position = {58, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-b", position = {60, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-c", position = {62, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-d", position = {64, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-e", position = {66, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-f", position = {68, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-g", position = {70, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-h", position = {72, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-i", position = {74, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-j", position = {76, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-k", position = {78, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-l", position = {80, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-m", position = {82, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-n", position = {84, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-o", position = {86, 10}, force = game.forces.player})
--surface.create_entity({name = "tree-grassland-0", position = {88, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-a", position = {90, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-b", position = {92, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-c", position = {94, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-d", position = {96, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-e", position = {98, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-f", position = {100, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-g", position = {102, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-h", position = {104, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-h2", position = {106, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-h3", position = {108, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-i", position = {110, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-k", position = {112, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-l", position = {114, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-m", position = {116, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-n", position = {118, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-p", position = {120, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-q", position = {122, 10}, force = game.forces.player})
surface.create_entity({name = "tree-snow-a", position = {124, 10}, force = game.forces.player})
surface.create_entity({name = "tree-volcanic-a", position = {126, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-a", position = {128, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-b", position = {130, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-c", position = {132, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-d", position = {134, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-e", position = {136, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-f", position = {138, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-g", position = {140, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-h", position = {142, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-i", position = {144, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-j", position = {146, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-k", position = {148, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-l", position = {150, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-m", position = {152, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-n", position = {154, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-o", position = {156, 10}, force = game.forces.player})
end
----- Just used for Testing
function Test_Spawn()
local surface = game.surfaces['nauvis']
surface.create_entity({name = "tree-01", position = {2, 10}, force = game.forces.player})
surface.create_entity({name = "tree-02", position = {4, 10}, force = game.forces.player})
surface.create_entity({name = "tree-02-red", position = {6, 10}, force = game.forces.player})
surface.create_entity({name = "tree-03", position = {8, 10}, force = game.forces.player})
surface.create_entity({name = "tree-04", position = {10, 10}, force = game.forces.player})
surface.create_entity({name = "tree-05", position = {12, 10}, force = game.forces.player})
surface.create_entity({name = "tree-06", position = {14, 10}, force = game.forces.player})
surface.create_entity({name = "tree-06-brown", position = {16, 10}, force = game.forces.player})
surface.create_entity({name = "tree-07", position = {18, 10}, force = game.forces.player})
surface.create_entity({name = "tree-08", position = {20, 10}, force = game.forces.player})
surface.create_entity({name = "tree-08-brown", position = {22, 10}, force = game.forces.player})
surface.create_entity({name = "tree-09", position = {24, 10}, force = game.forces.player})
surface.create_entity({name = "tree-09-brown", position = {26, 10}, force = game.forces.player})
surface.create_entity({name = "tree-09-red", position = {28, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-a", position = {30, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-b", position = {32, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-c", position = {34, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-d", position = {36, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-e", position = {38, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-f", position = {40, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-g", position = {42, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-h", position = {44, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-i", position = {46, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-j", position = {48, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-k", position = {50, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-l", position = {52, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-m", position = {54, 10}, force = game.forces.player})
surface.create_entity({name = "tree-desert-n", position = {56, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-a", position = {58, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-b", position = {60, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-c", position = {62, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-d", position = {64, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-e", position = {66, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-f", position = {68, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-g", position = {70, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-h", position = {72, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-i", position = {74, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-j", position = {76, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-k", position = {78, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-l", position = {80, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-m", position = {82, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-n", position = {84, 10}, force = game.forces.player})
surface.create_entity({name = "tree-dryland-o", position = {86, 10}, force = game.forces.player})
--surface.create_entity({name = "tree-grassland-0", position = {88, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-a", position = {90, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-b", position = {92, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-c", position = {94, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-d", position = {96, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-e", position = {98, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-f", position = {100, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-g", position = {102, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-h", position = {104, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-h2", position = {106, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-h3", position = {108, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-i", position = {110, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-k", position = {112, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-l", position = {114, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-m", position = {116, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-n", position = {118, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-p", position = {120, 10}, force = game.forces.player})
surface.create_entity({name = "tree-grassland-q", position = {122, 10}, force = game.forces.player})
surface.create_entity({name = "tree-snow-a", position = {124, 10}, force = game.forces.player})
surface.create_entity({name = "tree-volcanic-a", position = {126, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-a", position = {128, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-b", position = {130, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-c", position = {132, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-d", position = {134, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-e", position = {136, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-f", position = {138, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-g", position = {140, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-h", position = {142, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-i", position = {144, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-j", position = {146, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-k", position = {148, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-l", position = {150, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-m", position = {152, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-n", position = {154, 10}, force = game.forces.player})
surface.create_entity({name = "tree-wetland-o", position = {156, 10}, force = game.forces.player})
end

View file

@ -1,6 +1,4 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.1
Date: 06.07.2025
Bug Fixes:
- Fix locales
- Fix Musk floor
---------------------------------------------------------------------------------------------------
Version: 2.0.0
Date: 05.07.2025
Initial 2.0 release

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,261 +1,261 @@
BioInd.writeDebug("Entered control_arboretum.lua")
---Arboretum Stuff
local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(false)
-- If a recipe with NORMAL FERTILIZER is used, don't fertilize tiles set have "true"
-- set! (Fertile tiles set to true in this table can't be made more fertile with
-- normal fertilizer, and nothing should grow on the other tiles.)
local Terrain_Check_1 = {
["grass-1"] = true, -- Fertility: 100%
["grass-3"] = true, -- Fertility: 85%
["vegetation-green-grass-1"] = true, -- Fertility: 100%
["vegetation-green-grass-3"] = true, -- Fertility: 85%
}
-- If a recipe with ADVANCED FERTILIZER is used, don't fertilize tiles set have "true" set!
-- (Fertile tiles in this table can't be made more fertile, and nothing should grow on the
-- the others tiles!)
local Terrain_Check_2 = {
["grass-1"] = true, -- Fertility: 100%
["vegetation-green-grass-1"] = true, -- Fertility: 100%
}
local plant_radius = 75
-- Different tiles are used if AlienBiomes is active
local AB, terrain_name_g1, terrain_name_g3
-- OmniFluid replaces all fluids with items, so the arboretum won't have a fluidbox!
local function get_new_position(pos)
pos = BioInd.normalize_position(pos) or BioInd.arg_err("nil", position)
local xxx = math.random(-plant_radius, plant_radius)
local yyy = math.random(-plant_radius, plant_radius)
return {x = pos.x + xxx, y = pos.y + yyy}
end
-- Check that all ingredients are available!
local function check_ingredients(arboretum)
local recipe = arboretum.get_recipe()
local need = recipe and storage.bi_arboretum_recipe_table[recipe.name]
local function check(need, have)
for name, amount in pairs(need or {}) do
if not (have and have[name]) or (have[name] < amount) then
BioInd.writeDebug("Missing ingredient %s (have %s of %s)", {name, have[name] or 0, amount})
return false
end
end
return true
end
local inventory = arboretum.get_inventory(defines.inventory.assembling_machine_input)
return need and
check(need.items, inventory and inventory.get_contents()) and
check(need.fluids, arboretum.get_fluid_contents()) and
{ingredients = need, name = recipe.name} or nil
end
local function consume_ingredients(arboretum, need)
local inventory = arboretum.get_inventory(defines.inventory.assembling_machine_input)
for item, i in pairs(need.items or {}) do
inventory.remove({name = item, count = i})
BioInd.writeDebug("Removed %s (%s)", {item, i})
end
BioInd.show("Inventory", inventory.get_contents() or "nil")
for fluid, f in pairs(need.fluids or {}) do
arboretum.remove_fluid({name = fluid, amount = f})
BioInd.writeDebug("Removed %s (%s)", {fluid, f})
end
BioInd.show("Fluid contents", arboretum.get_fluid_contents() or "nil")
end
local function set_tile(current, target, surface, position)
if current ~= target then
surface.set_tiles(
{{name = target, position = position}},
true, -- correct_tiles
true, -- remove_colliding_entities
true, -- remove_colliding_decoratives
true -- raise_event
)
end
end
function Get_Arboretum_Recipe(ArboretumTable, event)
BioInd.writeDebug("Entered function Get_Arboretum_Recipe(%s, %s)", {ArboretumTable, event})
if not ArboretumTable then
BioInd.writeDebug("%s is not a valid ArboretumTable. Leaving immediately!")
return
end
local arboretum = ArboretumTable.base
local new_position, currentTilename
local pos, surface, Inventory, stack
-- 'AlienBiomes' is a bool value -- we don't want to read it again if it's false,
-- but only if it hasn't been set yet!
AB = storage.compatible.AlienBiomes
terrain_name_g1 = terrain_name_g1 or (AB and "vegetation-green-grass-1" or "grass-1")
terrain_name_g3 = terrain_name_g3 or (AB and "vegetation-green-grass-3" or "grass-3")
local check = check_ingredients(arboretum)
local ingredients, recipe_name
if check then
ingredients, recipe_name = check.ingredients, check.name
end
if ingredients then
local create_seedling, new_plant
pos = BioInd.normalize_position(arboretum.position) or
BioInd.arg_err("nil", "position")
surface = arboretum.surface
-- Just plant a tree and hope the ground is fertile!
if recipe_name == "bi-arboretum-r1" then
BioInd.writeDebug(tostring(recipe_name) .. ": Just plant a tree")
--- 10 attempts to find a random spot to plant a tree and/or change terrain
for k = 1, 10 do
new_position = get_new_position(pos)
new_plant = {
name= "seedling",
position = new_position,
force = "neutral"
}
if surface.can_place_entity(new_plant) then
consume_ingredients(arboretum, ingredients)
create_seedling = surface.create_entity(new_plant)
seed_planted_arboretum(event, create_seedling)
--- After sucessfully planting a tree, break out of the loop.
break
else
BioInd.writeDebug("Can't plant here (attempt %s)", k)
end
end
-- Fertilize the ground with normal fertilizer. Ignore tiles listed in Terrain_Check_1!
elseif recipe_name == "bi-arboretum-r2" then
BioInd.writeDebug(tostring(recipe_name) .. ": Just change terrain to grass-3 (basic)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
-- We need to fertilize the ground!
if Bi_Industries.fertility[currentTilename] and not Terrain_Check_1[currentTilename] then
consume_ingredients(arboretum, ingredients)
BioInd.writeDebug("%s: Changing terrain from %s to %s (%s)",
{k, currentTilename or "unknown tile",
terrain_name_g3, serpent.line(new_position)})
set_tile(currentTilename, terrain_name_g3, surface, new_position)
--- After sucessfully changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain (%s)",
{k, currentTilename or "unknown tile"})
end
end
-- Fertilize the ground with advanced fertilizer. Ignore tiles listed in Terrain_Check_2!
elseif recipe_name == "bi-arboretum-r3" then
BioInd.writeDebug(tostring(recipe_name) .. ": Just change terrain to grass-1 (advanced)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
if Bi_Industries.fertility[currentTilename] and currentTilename ~= terrain_name_g1 then
consume_ingredients(arboretum, ingredients)
BioInd.writeDebug("%s: Changing terrain from %s to %s (%s)",
{k, currentTilename or "unknown tile",
terrain_name_g1, serpent.line(new_position)})
set_tile(currentTilename, terrain_name_g1, surface, new_position)
--- After sucessfully changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain (%s)",
{k, currentTilename or "unknown tile"})
end
end
-- Fertilize the ground with normal fertilizer. Ignore tiles listed in Terrain_Check_1!
-- Also plant a tree.
elseif recipe_name == "bi-arboretum-r4" then
BioInd.writeDebug(tostring(recipe_name) .. ": Plant Tree AND change the terrain to grass-3 (basic)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
new_plant = {
name= "seedling",
position = new_position,
force = "neutral"
}
-- Test to see if we can plant
if surface.can_place_entity(new_plant) and Bi_Industries.fertility[currentTilename] then
consume_ingredients(arboretum, ingredients)
-- Refund fertilizer -- no need to waste it on fertile ground!
if Terrain_Check_1[currentTilename] then
arboretum.insert({name = "fertilizer", count = ingredients.items.fertilizer})
BioInd.writeDebug("Refunded fertilizer!")
end
set_tile(currentTilename, terrain_name_g3, surface, new_position)
create_seedling = surface.create_entity(new_plant)
seed_planted_arboretum(event, create_seedling)
--- After sucessfully planting a tree or changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain and plant a tree (%s)",
{k, currentTilename or "unknown tile"})
end
end
-- Fertilize the ground with advanced fertilizer. Ignore tiles listed in Terrain_Check_2!
-- Also plant a tree.
elseif recipe_name == "bi-arboretum-r5" then
BioInd.writeDebug(tostring(recipe_name) .. ": Plant Tree and change the terrain to grass-1 (advanced)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
new_plant = {
name= "seedling",
position = new_position,
force = "neutral"
}
if surface.can_place_entity(new_plant) and Bi_Industries.fertility[currentTilename] then
consume_ingredients(arboretum, ingredients)
-- Refund fertilizer -- no need to waste it on fertile ground!
if Terrain_Check_2[currentTilename] then
arboretum.insert({
name = "bi-adv-fertilizer", count = ingredients.items["bi-adv-fertilizer"]
})
BioInd.writeDebug("Refunded advanced fertilizer!")
end
set_tile(currentTilename, terrain_name_g1, surface, new_position)
create_seedling = surface.create_entity(new_plant)
seed_planted_arboretum (event, create_seedling)
--- After sucessfully planting a tree or changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain and plant a tree (%s)",
{k, currentTilename or "unknown tile"})
end
end
else
BioInd.writeDebug("Terraformer has no recipe!")
end
end
end
BioInd.writeDebug("Entered control_arboretum.lua")
---Arboretum Stuff
local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(false)
-- If a recipe with NORMAL FERTILIZER is used, don't fertilize tiles set have "true"
-- set! (Fertile tiles set to true in this table can't be made more fertile with
-- normal fertilizer, and nothing should grow on the other tiles.)
local Terrain_Check_1 = {
["grass-1"] = true, -- Fertility: 100%
["grass-3"] = true, -- Fertility: 85%
["vegetation-green-grass-1"] = true, -- Fertility: 100%
["vegetation-green-grass-3"] = true, -- Fertility: 85%
}
-- If a recipe with ADVANCED FERTILIZER is used, don't fertilize tiles set have "true" set!
-- (Fertile tiles in this table can't be made more fertile, and nothing should grow on the
-- the others tiles!)
local Terrain_Check_2 = {
["grass-1"] = true, -- Fertility: 100%
["vegetation-green-grass-1"] = true, -- Fertility: 100%
}
local plant_radius = 75
-- Different tiles are used if AlienBiomes is active
local AB, terrain_name_g1, terrain_name_g3
-- OmniFluid replaces all fluids with items, so the arboretum won't have a fluidbox!
local function get_new_position(pos)
pos = BioInd.normalize_position(pos) or BioInd.arg_err("nil", position)
local xxx = math.random(-plant_radius, plant_radius)
local yyy = math.random(-plant_radius, plant_radius)
return {x = pos.x + xxx, y = pos.y + yyy}
end
-- Check that all ingredients are available!
local function check_ingredients(arboretum)
local recipe = arboretum.get_recipe()
local need = recipe and storage.bi_arboretum_recipe_table[recipe.name]
local function check(need, have)
for name, amount in pairs(need or {}) do
if not (have and have[name]) or (have[name] < amount) then
BioInd.writeDebug("Missing ingredient %s (have %s of %s)", {name, have[name] or 0, amount})
return false
end
end
return true
end
local inventory = arboretum.get_inventory(defines.inventory.assembling_machine_input)
return need and
check(need.items, inventory and inventory.get_contents()) and
check(need.fluids, arboretum.get_fluid_contents()) and
{ingredients = need, name = recipe.name} or nil
end
local function consume_ingredients(arboretum, need)
local inventory = arboretum.get_inventory(defines.inventory.assembling_machine_input)
for item, i in pairs(need.items or {}) do
inventory.remove({name = item, count = i})
BioInd.writeDebug("Removed %s (%s)", {item, i})
end
BioInd.show("Inventory", inventory.get_contents() or "nil")
for fluid, f in pairs(need.fluids or {}) do
arboretum.remove_fluid({name = fluid, amount = f})
BioInd.writeDebug("Removed %s (%s)", {fluid, f})
end
BioInd.show("Fluid contents", arboretum.get_fluid_contents() or "nil")
end
local function set_tile(current, target, surface, position)
if current ~= target then
surface.set_tiles(
{{name = target, position = position}},
true, -- correct_tiles
true, -- remove_colliding_entities
true, -- remove_colliding_decoratives
true -- raise_event
)
end
end
function Get_Arboretum_Recipe(ArboretumTable, event)
BioInd.writeDebug("Entered function Get_Arboretum_Recipe(%s, %s)", {ArboretumTable, event})
if not ArboretumTable then
BioInd.writeDebug("%s is not a valid ArboretumTable. Leaving immediately!")
return
end
local arboretum = ArboretumTable.base
local new_position, currentTilename
local pos, surface, Inventory, stack
-- 'AlienBiomes' is a bool value -- we don't want to read it again if it's false,
-- but only if it hasn't been set yet!
AB = storage.compatible.AlienBiomes
terrain_name_g1 = terrain_name_g1 or (AB and "vegetation-green-grass-1" or "grass-1")
terrain_name_g3 = terrain_name_g3 or (AB and "vegetation-green-grass-3" or "grass-3")
local check = check_ingredients(arboretum)
local ingredients, recipe_name
if check then
ingredients, recipe_name = check.ingredients, check.name
end
if ingredients then
local create_seedling, new_plant
pos = BioInd.normalize_position(arboretum.position) or
BioInd.arg_err("nil", "position")
surface = arboretum.surface
-- Just plant a tree and hope the ground is fertile!
if recipe_name == "bi-arboretum-r1" then
BioInd.writeDebug(tostring(recipe_name) .. ": Just plant a tree")
--- 10 attempts to find a random spot to plant a tree and/or change terrain
for k = 1, 10 do
new_position = get_new_position(pos)
new_plant = {
name= "seedling",
position = new_position,
force = "neutral"
}
if surface.can_place_entity(new_plant) then
consume_ingredients(arboretum, ingredients)
create_seedling = surface.create_entity(new_plant)
seed_planted_arboretum(event, create_seedling)
--- After sucessfully planting a tree, break out of the loop.
break
else
BioInd.writeDebug("Can't plant here (attempt %s)", k)
end
end
-- Fertilize the ground with normal fertilizer. Ignore tiles listed in Terrain_Check_1!
elseif recipe_name == "bi-arboretum-r2" then
BioInd.writeDebug(tostring(recipe_name) .. ": Just change terrain to grass-3 (basic)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
-- We need to fertilize the ground!
if Bi_Industries.fertility[currentTilename] and not Terrain_Check_1[currentTilename] then
consume_ingredients(arboretum, ingredients)
BioInd.writeDebug("%s: Changing terrain from %s to %s (%s)",
{k, currentTilename or "unknown tile",
terrain_name_g3, serpent.line(new_position)})
set_tile(currentTilename, terrain_name_g3, surface, new_position)
--- After sucessfully changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain (%s)",
{k, currentTilename or "unknown tile"})
end
end
-- Fertilize the ground with advanced fertilizer. Ignore tiles listed in Terrain_Check_2!
elseif recipe_name == "bi-arboretum-r3" then
BioInd.writeDebug(tostring(recipe_name) .. ": Just change terrain to grass-1 (advanced)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
if Bi_Industries.fertility[currentTilename] and currentTilename ~= terrain_name_g1 then
consume_ingredients(arboretum, ingredients)
BioInd.writeDebug("%s: Changing terrain from %s to %s (%s)",
{k, currentTilename or "unknown tile",
terrain_name_g1, serpent.line(new_position)})
set_tile(currentTilename, terrain_name_g1, surface, new_position)
--- After sucessfully changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain (%s)",
{k, currentTilename or "unknown tile"})
end
end
-- Fertilize the ground with normal fertilizer. Ignore tiles listed in Terrain_Check_1!
-- Also plant a tree.
elseif recipe_name == "bi-arboretum-r4" then
BioInd.writeDebug(tostring(recipe_name) .. ": Plant Tree AND change the terrain to grass-3 (basic)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
new_plant = {
name= "seedling",
position = new_position,
force = "neutral"
}
-- Test to see if we can plant
if surface.can_place_entity(new_plant) and Bi_Industries.fertility[currentTilename] then
consume_ingredients(arboretum, ingredients)
-- Refund fertilizer -- no need to waste it on fertile ground!
if Terrain_Check_1[currentTilename] then
arboretum.insert({name = "fertilizer", count = ingredients.items.fertilizer})
BioInd.writeDebug("Refunded fertilizer!")
end
set_tile(currentTilename, terrain_name_g3, surface, new_position)
create_seedling = surface.create_entity(new_plant)
seed_planted_arboretum(event, create_seedling)
--- After sucessfully planting a tree or changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain and plant a tree (%s)",
{k, currentTilename or "unknown tile"})
end
end
-- Fertilize the ground with advanced fertilizer. Ignore tiles listed in Terrain_Check_2!
-- Also plant a tree.
elseif recipe_name == "bi-arboretum-r5" then
BioInd.writeDebug(tostring(recipe_name) .. ": Plant Tree and change the terrain to grass-1 (advanced)")
for k = 1, 10 do --- 10 attempts to find a random spot to plant a tree and / or change terrain
new_position = get_new_position(pos)
currentTilename = surface.get_tile(new_position.x, new_position.y).name
new_plant = {
name= "seedling",
position = new_position,
force = "neutral"
}
if surface.can_place_entity(new_plant) and Bi_Industries.fertility[currentTilename] then
consume_ingredients(arboretum, ingredients)
-- Refund fertilizer -- no need to waste it on fertile ground!
if Terrain_Check_2[currentTilename] then
arboretum.insert({
name = "bi-adv-fertilizer", count = ingredients.items["bi-adv-fertilizer"]
})
BioInd.writeDebug("Refunded advanced fertilizer!")
end
set_tile(currentTilename, terrain_name_g1, surface, new_position)
create_seedling = surface.create_entity(new_plant)
seed_planted_arboretum (event, create_seedling)
--- After sucessfully planting a tree or changing the terrain, break out of the loop.
break
else
BioInd.writeDebug("%s: Can't change terrain and plant a tree (%s)",
{k, currentTilename or "unknown tile"})
end
end
else
BioInd.writeDebug("Terraformer has no recipe!")
end
end
end

File diff suppressed because it is too large Load diff

View file

@ -1,448 +1,448 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = "__Bio_Industries_2__/graphics/icons/"
-- If OwnlyMe's or Tral'a "Robot Tree Farm" mods are active, they will create variatons
-- of our variations of tree prototypes. Remove them!
local ignore_trees = BioInd.get_tree_ignore_list()
local removed = 0
for name, _ in pairs(ignore_trees or {}) do
if name:match("rtf%-bio%-tree%-.+%-%d-%d+") then
data.raw.tree[name] = nil
ignore_trees[name] = nil
removed = removed + 1
BioInd.show("Removed tree prototype", name)
end
end
BioInd.writeDebug("Removed %g tree prototypes. Number of trees to ignore now: %g", {removed, table_size(ignore_trees)})
BI.Settings.BI_Game_Tweaks_Emissions_Multiplier = settings.startup["BI_Game_Tweaks_Emissions_Multiplier"].value
---- Game Tweaks ---- Tree
if BI.Settings.BI_Game_Tweaks_Tree then
local new_results = {
{
type = "item",
name = "wood",
amount_min = 1,
amount_max = 6
}
}
for tree_name, tree in pairs(data.raw["tree"] or {}) do
if tree.minable and not ignore_trees[tree_name] then
BioInd.writeDebug("Tree name: %s\tminable.result: %s\tminable.count: %s", {tree.name, (tree.minable and tree.minable.result or "nil"), (tree.minable and tree.minable.count or "nil")}, "line")
BioInd.writeDebug("Tree name: %s\tminable.results: %s", {tree.name, (tree.minable and tree.minable.results or "nil")}, "line")
--CHECK FOR SINGLE RESULTS
-- mining.result may be set although mining.results exists (mining.result
-- will be ignored in that case; happens, for example with IR2's rubber
-- trees). In this case, overwriting mining.results with the data from
-- mining.result could break other mods (e.g. IR2's rubber trees should
-- yield "rubber-wood" instead of "wood").
if tree.minable.result and not tree.minable.results then
BioInd.writeDebug("Tree has minable.result")
--CHECK FOR VANILLA TREES WOOD x 4
if tree.minable.result == "wood" and tree.minable.count == 4 then
BioInd.writeDebug("Changing wood yield of %s to random value.", {tree.name})
tree.minable.mining_particle = "wooden-particle"
tree.minable.mining_time = 1.5
tree.minable.results = new_results
-- CONVERT RESULT TO RESULTS
else
BioInd.writeDebug("Converting tree.minable.result to tree.minable.results!")
tree.minable.mining_particle = "wooden-particle"
tree.minable.results = {
{
type = "item",
name = tree.minable.result,
amount = tree.minable.count,
}
}
end
--CHECK FOR RESULTS TABLE
elseif tree.minable.results then
BioInd.writeDebug("Checking minable.results!")
for r, result in pairs(tree.minable.results) do
--CHECK FOR RESULT WOOD x 4
if result.name == "wood" and result.amount == 4 then
BioInd.writeDebug("Changing result %s: %s", {r, result}, "line")
result.amount = nil
result.amount_min = 1
result.amount_max = 6
end
end
tree.minable.result = nil
tree.minable.count = nil
-- NEITHER RESULT NOR RESULTS EXIST -- CREATE RESULTS!
else
BioInd.writeDebug("Creating minable.results!")
tree.minable.results = new_results
end
BioInd.writeDebug("New minable.results: %s",
{tree.minable and tree.minable.results or "nil"}, "line")
else
BioInd.writeDebug("Won't change results of %s!", {tree.name})
end
end
end
---- Game Tweaks ---- Player (Changed for 0.18.34/1.1.4!)
if BI.Settings.BI_Game_Tweaks_Player then
-- There may be more than one character in the game! Here's a list of
-- the character prototype names or patterns matching character prototype
-- names we want to ignore.
local blacklist = {
------------------------------------------------------------------------------------
-- Known dummies --
------------------------------------------------------------------------------------
-- Autodrive
"autodrive-passenger",
-- AAI Programmable Vehicles
"^.+%-_%-driver$",
-- Minime
"minime_character_dummy",
-- Water Turret (currently the dummies are not characters -- but things may change!)
"^WT%-.+%-dummy$",
------------------------------------------------------------------------------------
-- Other characters --
------------------------------------------------------------------------------------
-- Bob's Classes and Multiple characters mod
"^.*bob%-character%-.+$",
}
local whitelist = {
-- Default character
"^character$",
-- Characters compatible with Minime
"^.*skin.*$",
}
local tweaks = {
loot_pickup_distance = 5, -- default 2
build_distance = 20, -- Vanilla 6
drop_item_distance = 20, -- Vanilla 6
reach_distance = 20, -- Vanilla 6
item_pickup_distance = 6, -- Vanilla 1
reach_resource_distance = 6, -- Vanilla 2.7
}
local found, ignore
for char_name, character in pairs(data.raw.character) do
BioInd.show("Checking character", char_name)
found = false
for w, w_pattern in ipairs(whitelist) do
if char_name == w_pattern or char_name:match(w_pattern) then
ignore = false
BioInd.show("Found whitelisted character name", char_name)
for b, b_pattern in ipairs(blacklist) do
if char_name == b_pattern or char_name:match(b_pattern) then
BioInd.writeDebug("%s is on the ignore list!", char_name)
-- Mark character as found
ignore = true
break
end
end
if not ignore then
found = true
break
end
end
if found then
break
end
end
-- Apply tweaks
if found then
for tweak_name, tweak in pairs(tweaks) do
if character[tweak_name] < tweak then
BioInd.writeDebug("Changing %s from %s to %s", {tweak_name, character[tweak_name], tweak})
character[tweak_name] = tweak
end
end
end
end
end
-- Moved to data-updates.lua for 0.18.34/1.1.4!
---- Game Tweaks ---- Production science pack recipe
if data.raw.recipe["bi-production-science-pack"] then
BI_Functions.lib.allow_productivity("bi-production-science-pack")
thxbob.lib.tech.add_recipe_unlock("production-science-pack", "bi-production-science-pack")
BioInd.writeDebug("Unlock for recipe \"bi-production-science-pack\" added.")
end
---- Game Tweaks ---- Bots
if BI.Settings.BI_Game_Tweaks_Bot then
-- Logistic & Construction bots can't catch fire or be mined
local function immunify(bot)
-- Changed for 0.18.34/1.1.4!
local can_insert = true
bot.flags = bot.flags or {}
bot.resistances = bot.resistances or {}
for f, flag in pairs(bot.flags) do
if flag == "not-flammable" then
can_insert = false
break
end
end
if can_insert then
table.insert(bot.flags, "not-flammable")
BioInd.writeDebug("Added flag \"not-flammable\" to %s", {bot.name})
end
can_insert = true
for r, resistance in pairs(bot.resistances) do
if resistance.type == "fire" and resistance.percent ~= 100 then
BioInd.writeDebug("Change resistance against \"fire\" from %s to 100 %% for %s", {resistance.percent or "nil", bot.name})
bot.resistances[r] = {type = "fire", percent = 100}
can_insert = false
break
end
end
if can_insert then
table.insert(bot.resistances, {type = "fire", percent = 100})
BioInd.writeDebug("Added resistance against \"fire\" to %s", {bot.name})
end
bot.minable = nil
BioInd.writeDebug("Made %s unminable", {bot.name})
end
--catches modded bots too
for _, bot in pairs(data.raw['construction-robot']) do
immunify(bot)
end
for _, bot in pairs(data.raw['logistic-robot']) do
immunify(bot)
end
end
---- Game Tweaks stack size ----
if BI.Settings.BI_Game_Tweaks_Stack_Size then
-- Changed for 0.18.34/1.1.4
local tweaks = {
["wood"] = {value = 400, se_limit = 200},
["stone"] = {value = 400, se_limit = 50},
["stone-crushed"] = {value = 800, se_limit = 200},
["concrete"] = {value = 400, se_limit = 200},
["slag"] = {value = 800, se_limit = 200},
}
local item
local five_dim = BioInd.get_startup_setting("5d-change-stack")
for tweak_name, tweak in pairs(tweaks) do
item = data.raw.item[tweak_name]
if item then
-- Only adjust stack_size if 5Dim sets multiplier of 1 or is not active!
if item.stack_size < tweak.value and (five_dim == 1 or not five_dim) then
BioInd.writeDebug("Changing stacksize of %s from %s to %s",
{item.name, item.stack_size, tweak.value})
item.stack_size = tweak.value
end
if mods["space-exploration"] then
item.stack_size = math.min(tweak.se_limit, item.stack_size)
BioInd.show("Adjusted stack_size on account of SE", item.stack_size )
end
end
end
end
--- Update fuel_emissions_multiplier values
if BI.Settings.BI_Game_Tweaks_Emissions_Multiplier then
for item, factor in pairs({
["pellet-coke"] = 0.80,
["enriched-fuel"] = 0.90,
["solid-fuel"] = 1.00,
["solid-carbon"] = 1.05,
["carbon"] = 1.05,
["wood-bricks"] = 1.20,
["rocket-fuel"] = 1.20,
["bi-seed"] = 1.30,
["seedling"] = 1.30,
["bi-wooden-pole-big"] = 1.30,
["bi-wooden-pole-huge"] = 1.30,
["bi-wooden-fence"] = 1.30,
["bi-wood-pipe"] = 1.30,
["bi-wood-pipe-to-ground"] = 1.30,
["bi-wooden-chest-large"] = 1.30,
["bi-wooden-chest-huge"] = 1.30,
["bi-wooden-chest-giga"] = 1.30,
["bi-ash"] = 1.30,
["ash"] = 1.30,
["wood-charcoal"] = 1.25,
["cellulose-fiber"] = 1.40,
["bi-woodpulp"] = 1.40,
["solid-coke"] = 1.40,
["wood-pellets"] = 1.40,
["coal-crushed"] = 1.50,
["wood"] = 1.60,
["coal"] = 2.00,
-- Removed in 0.17.48/0.18.16
}) do
BI_Functions.lib.fuel_emissions_multiplier_update(item, factor)
end
end
-- Make vanilla and Bio boilers exchangeable
if BI.Settings.BI_Bio_Fuel then
local boiler = data.raw["boiler"]["boiler"]
local boiler_group = boiler.fast_replaceable_group or "boiler"
boiler.fast_replaceable_group = boiler_group
data.raw["boiler"]["bi-bio-boiler"].fast_replaceable_group = boiler_group
end
if mods["Krastorio2"] then
-- Krastorio² needs much more wood than usually provided by Bio Industries. If Krastorio² is
-- active, BI should produce much more wood/wood pulp. For better baĺancing, our recipes should
-- also be changed to require more wood/wood pulp as ingredients.
-- Recipes for making wood should also use/produce more seeds, seedlings, and water. It shouldn't
-- be necessary to increase the input of ash and fertilizer in these recipes as they already
-- require more wood/wood pulp.
local update = {
"wood", "bi-woodpulp",
"bi-seed", "seedling", "water",
}
for _, recipe in pairs(data.raw.recipe) do
BioInd.writeDebug("Recipe has \"mod\" property: %s", {recipe.mod and true or false})
if recipe.mod == "Bio_Industries_2" then
krastorio.recipes.multiplyIngredients(recipe.name, update, 4)
krastorio.recipes.multiplyProducts(recipe.name, update, 4)
BioInd.writeDebug("Changed ingredients for %s: %s", {recipe and recipe.name or "nil", recipe and recipe.ingredients or "nil"})
BioInd.writeDebug("Changed results for %s: %s", {recipe and recipe.name or "nil", recipe and recipe.results or "nil"})
end
end
end
-- Make sure fertilizers have the "place_as_tile" property!
local AlienBiomes = data.raw.tile["vegetation-green-grass-3"] and
data.raw.tile["vegetation-green-grass-1"] and true or false
-- We've already set place_as_tile. If it doesn't exist, our fertilizer definition has
-- been overwritten by some other mod, so we restore icons and localization and add
-- place_as_tile again!
local fertilizer = data.raw.item["fertilizer"]
if not fertilizer.place_as_tile then
fertilizer.place_as_tile = {
result = AlienBiomes and "vegetation-green-grass-3" or "grass-3",
condition_size = 1,
condition = { layers = { water_tile = true }}
}
fertilizer.icon = ICONPATH .. "fertilizer_64.png"
fertilizer.icon_size = 64
fertilizer.icons = {
{
icon = ICONPATH .. "fertilizer_64.png",
icon_size = 64,
}
}
fertilizer.localised_name = {"BI-item-name.fertilizer"}
fertilizer.localised_description = {"BI-item-description.fertilizer"}
end
data.raw.item["bi-adv-fertilizer"].place_as_tile = {
result = AlienBiomes and "vegetation-green-grass-1" or "grass-1",
condition_size = 1,
condition = { layers = { water_tile = true }}
}
if mods["pycoalprocessing"] and BI.Settings.BI_Bio_Fuel then
-- Bio_Fuel/recipe.lua:30: {type = "item", name = "bi-ash", amount = 15}
thxbob.lib.recipe.remove_result ("bi-basic-gas-processing", "bi-ash")
thxbob.lib.recipe.add_result("bi-basic-gas-processing", {
type = "item",
name = "ash",
amount = 15
})
end
-- Moved to data-updates.lua for 0.18.34/1.1.4!
--- If Space Exploration Mod is installed.
if mods["space-exploration"] then
-- Space Exploration Mod likes Stack Sizes to be 200 max.
-- Changed in 1.1.11
local tweaks = {
["bi-solar-mat"] = 400,
["bi-seed"] = 800,
["seedling"] = 400,
["bi-woodpulp"] = 800,
["bi-ash"] = 400,
["wood-charcoal"] = 400,
["pellet-coke"] = 400,
["stone-crushed"] = 400,
}
local item
for tweak_name, tweak in pairs(tweaks) do
item = data.raw.item[tweak_name]
if item and item.stack_size then
item.stack_size = 200
end
end
if not mods["Natural_Evolution_Buildings"] then
local ammo_tweaks = {
["bi-dart-magazine-basic"] = 400,
["bi-dart-magazine-standard"] = 400,
["bi-dart-magazine-enhanced"] = 400,
["bi-dart-magazine-poison"] = 400,
}
local item
for tweak_name, tweak in pairs(ammo_tweaks) do
item = data.raw.ammo[tweak_name]
item.stack_size = 200
end
end
end
if BI.Settings.Bio_Cannon then
local default_target_masks = data.raw["utility-constants"].default.default_trigger_target_mask_by_type
default_target_masks["unit-spawner"] = default_target_masks["unit-spawner"] or {"common"} -- everything should have "common", unless there is specific reason not to
table.insert(default_target_masks["unit-spawner"], "Bio_Cannon_Ammo")
for w, worm in pairs(data.raw.turret) do
worm.trigger_target_mask = worm.trigger_target_mask or default_target_masks["turret"] or {"common"}
table.insert(worm.trigger_target_mask, "Bio_Cannon_Ammo")
end
end
------------------------------------------------------------------------------------
-- Add icons to our prototypes
BioInd.BI_add_icons()
---TESTING!
for k, v in pairs(data.raw) do
for t, p in pairs(v) do
if p.se_allow_in_space then
BioInd.writeDebug("%s (%s) can be built in space!", {p.name, t})
end
end
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = "__Bio_Industries_2__/graphics/icons/"
-- If OwnlyMe's or Tral'a "Robot Tree Farm" mods are active, they will create variatons
-- of our variations of tree prototypes. Remove them!
local ignore_trees = BioInd.get_tree_ignore_list()
local removed = 0
for name, _ in pairs(ignore_trees or {}) do
if name:match("rtf%-bio%-tree%-.+%-%d-%d+") then
data.raw.tree[name] = nil
ignore_trees[name] = nil
removed = removed + 1
BioInd.show("Removed tree prototype", name)
end
end
BioInd.writeDebug("Removed %g tree prototypes. Number of trees to ignore now: %g", {removed, table_size(ignore_trees)})
BI.Settings.BI_Game_Tweaks_Emissions_Multiplier = settings.startup["BI_Game_Tweaks_Emissions_Multiplier"].value
---- Game Tweaks ---- Tree
if BI.Settings.BI_Game_Tweaks_Tree then
local new_results = {
{
type = "item",
name = "wood",
amount_min = 1,
amount_max = 6
}
}
for tree_name, tree in pairs(data.raw["tree"] or {}) do
if tree.minable and not ignore_trees[tree_name] then
BioInd.writeDebug("Tree name: %s\tminable.result: %s\tminable.count: %s", {tree.name, (tree.minable and tree.minable.result or "nil"), (tree.minable and tree.minable.count or "nil")}, "line")
BioInd.writeDebug("Tree name: %s\tminable.results: %s", {tree.name, (tree.minable and tree.minable.results or "nil")}, "line")
--CHECK FOR SINGLE RESULTS
-- mining.result may be set although mining.results exists (mining.result
-- will be ignored in that case; happens, for example with IR2's rubber
-- trees). In this case, overwriting mining.results with the data from
-- mining.result could break other mods (e.g. IR2's rubber trees should
-- yield "rubber-wood" instead of "wood").
if tree.minable.result and not tree.minable.results then
BioInd.writeDebug("Tree has minable.result")
--CHECK FOR VANILLA TREES WOOD x 4
if tree.minable.result == "wood" and tree.minable.count == 4 then
BioInd.writeDebug("Changing wood yield of %s to random value.", {tree.name})
tree.minable.mining_particle = "wooden-particle"
tree.minable.mining_time = 1.5
tree.minable.results = new_results
-- CONVERT RESULT TO RESULTS
else
BioInd.writeDebug("Converting tree.minable.result to tree.minable.results!")
tree.minable.mining_particle = "wooden-particle"
tree.minable.results = {
{
type = "item",
name = tree.minable.result,
amount = tree.minable.count,
}
}
end
--CHECK FOR RESULTS TABLE
elseif tree.minable.results then
BioInd.writeDebug("Checking minable.results!")
for r, result in pairs(tree.minable.results) do
--CHECK FOR RESULT WOOD x 4
if result.name == "wood" and result.amount == 4 then
BioInd.writeDebug("Changing result %s: %s", {r, result}, "line")
result.amount = nil
result.amount_min = 1
result.amount_max = 6
end
end
tree.minable.result = nil
tree.minable.count = nil
-- NEITHER RESULT NOR RESULTS EXIST -- CREATE RESULTS!
else
BioInd.writeDebug("Creating minable.results!")
tree.minable.results = new_results
end
BioInd.writeDebug("New minable.results: %s",
{tree.minable and tree.minable.results or "nil"}, "line")
else
BioInd.writeDebug("Won't change results of %s!", {tree.name})
end
end
end
---- Game Tweaks ---- Player (Changed for 0.18.34/1.1.4!)
if BI.Settings.BI_Game_Tweaks_Player then
-- There may be more than one character in the game! Here's a list of
-- the character prototype names or patterns matching character prototype
-- names we want to ignore.
local blacklist = {
------------------------------------------------------------------------------------
-- Known dummies --
------------------------------------------------------------------------------------
-- Autodrive
"autodrive-passenger",
-- AAI Programmable Vehicles
"^.+%-_%-driver$",
-- Minime
"minime_character_dummy",
-- Water Turret (currently the dummies are not characters -- but things may change!)
"^WT%-.+%-dummy$",
------------------------------------------------------------------------------------
-- Other characters --
------------------------------------------------------------------------------------
-- Bob's Classes and Multiple characters mod
"^.*bob%-character%-.+$",
}
local whitelist = {
-- Default character
"^character$",
-- Characters compatible with Minime
"^.*skin.*$",
}
local tweaks = {
loot_pickup_distance = 5, -- default 2
build_distance = 20, -- Vanilla 6
drop_item_distance = 20, -- Vanilla 6
reach_distance = 20, -- Vanilla 6
item_pickup_distance = 6, -- Vanilla 1
reach_resource_distance = 6, -- Vanilla 2.7
}
local found, ignore
for char_name, character in pairs(data.raw.character) do
BioInd.show("Checking character", char_name)
found = false
for w, w_pattern in ipairs(whitelist) do
if char_name == w_pattern or char_name:match(w_pattern) then
ignore = false
BioInd.show("Found whitelisted character name", char_name)
for b, b_pattern in ipairs(blacklist) do
if char_name == b_pattern or char_name:match(b_pattern) then
BioInd.writeDebug("%s is on the ignore list!", char_name)
-- Mark character as found
ignore = true
break
end
end
if not ignore then
found = true
break
end
end
if found then
break
end
end
-- Apply tweaks
if found then
for tweak_name, tweak in pairs(tweaks) do
if character[tweak_name] < tweak then
BioInd.writeDebug("Changing %s from %s to %s", {tweak_name, character[tweak_name], tweak})
character[tweak_name] = tweak
end
end
end
end
end
-- Moved to data-updates.lua for 0.18.34/1.1.4!
---- Game Tweaks ---- Production science pack recipe
if data.raw.recipe["bi-production-science-pack"] then
BI_Functions.lib.allow_productivity("bi-production-science-pack")
thxbob.lib.tech.add_recipe_unlock("production-science-pack", "bi-production-science-pack")
BioInd.writeDebug("Unlock for recipe \"bi-production-science-pack\" added.")
end
---- Game Tweaks ---- Bots
if BI.Settings.BI_Game_Tweaks_Bot then
-- Logistic & Construction bots can't catch fire or be mined
local function immunify(bot)
-- Changed for 0.18.34/1.1.4!
local can_insert = true
bot.flags = bot.flags or {}
bot.resistances = bot.resistances or {}
for f, flag in pairs(bot.flags) do
if flag == "not-flammable" then
can_insert = false
break
end
end
if can_insert then
table.insert(bot.flags, "not-flammable")
BioInd.writeDebug("Added flag \"not-flammable\" to %s", {bot.name})
end
can_insert = true
for r, resistance in pairs(bot.resistances) do
if resistance.type == "fire" and resistance.percent ~= 100 then
BioInd.writeDebug("Change resistance against \"fire\" from %s to 100 %% for %s", {resistance.percent or "nil", bot.name})
bot.resistances[r] = {type = "fire", percent = 100}
can_insert = false
break
end
end
if can_insert then
table.insert(bot.resistances, {type = "fire", percent = 100})
BioInd.writeDebug("Added resistance against \"fire\" to %s", {bot.name})
end
bot.minable = nil
BioInd.writeDebug("Made %s unminable", {bot.name})
end
--catches modded bots too
for _, bot in pairs(data.raw['construction-robot']) do
immunify(bot)
end
for _, bot in pairs(data.raw['logistic-robot']) do
immunify(bot)
end
end
---- Game Tweaks stack size ----
if BI.Settings.BI_Game_Tweaks_Stack_Size then
-- Changed for 0.18.34/1.1.4
local tweaks = {
["wood"] = {value = 400, se_limit = 200},
["stone"] = {value = 400, se_limit = 50},
["stone-crushed"] = {value = 800, se_limit = 200},
["concrete"] = {value = 400, se_limit = 200},
["slag"] = {value = 800, se_limit = 200},
}
local item
local five_dim = BioInd.get_startup_setting("5d-change-stack")
for tweak_name, tweak in pairs(tweaks) do
item = data.raw.item[tweak_name]
if item then
-- Only adjust stack_size if 5Dim sets multiplier of 1 or is not active!
if item.stack_size < tweak.value and (five_dim == 1 or not five_dim) then
BioInd.writeDebug("Changing stacksize of %s from %s to %s",
{item.name, item.stack_size, tweak.value})
item.stack_size = tweak.value
end
if mods["space-exploration"] then
item.stack_size = math.min(tweak.se_limit, item.stack_size)
BioInd.show("Adjusted stack_size on account of SE", item.stack_size )
end
end
end
end
--- Update fuel_emissions_multiplier values
if BI.Settings.BI_Game_Tweaks_Emissions_Multiplier then
for item, factor in pairs({
["pellet-coke"] = 0.80,
["enriched-fuel"] = 0.90,
["solid-fuel"] = 1.00,
["solid-carbon"] = 1.05,
["carbon"] = 1.05,
["wood-bricks"] = 1.20,
["rocket-fuel"] = 1.20,
["bi-seed"] = 1.30,
["seedling"] = 1.30,
["bi-wooden-pole-big"] = 1.30,
["bi-wooden-pole-huge"] = 1.30,
["bi-wooden-fence"] = 1.30,
["bi-wood-pipe"] = 1.30,
["bi-wood-pipe-to-ground"] = 1.30,
["bi-wooden-chest-large"] = 1.30,
["bi-wooden-chest-huge"] = 1.30,
["bi-wooden-chest-giga"] = 1.30,
["bi-ash"] = 1.30,
["ash"] = 1.30,
["wood-charcoal"] = 1.25,
["cellulose-fiber"] = 1.40,
["bi-woodpulp"] = 1.40,
["solid-coke"] = 1.40,
["wood-pellets"] = 1.40,
["coal-crushed"] = 1.50,
["wood"] = 1.60,
["coal"] = 2.00,
-- Removed in 0.17.48/0.18.16
}) do
BI_Functions.lib.fuel_emissions_multiplier_update(item, factor)
end
end
-- Make vanilla and Bio boilers exchangeable
if BI.Settings.BI_Bio_Fuel then
local boiler = data.raw["boiler"]["boiler"]
local boiler_group = boiler.fast_replaceable_group or "boiler"
boiler.fast_replaceable_group = boiler_group
data.raw["boiler"]["bi-bio-boiler"].fast_replaceable_group = boiler_group
end
if mods["Krastorio2"] then
-- Krastorio² needs much more wood than usually provided by Bio Industries. If Krastorio² is
-- active, BI should produce much more wood/wood pulp. For better baĺancing, our recipes should
-- also be changed to require more wood/wood pulp as ingredients.
-- Recipes for making wood should also use/produce more seeds, seedlings, and water. It shouldn't
-- be necessary to increase the input of ash and fertilizer in these recipes as they already
-- require more wood/wood pulp.
local update = {
"wood", "bi-woodpulp",
"bi-seed", "seedling", "water",
}
for _, recipe in pairs(data.raw.recipe) do
BioInd.writeDebug("Recipe has \"mod\" property: %s", {recipe.mod and true or false})
if recipe.mod == "Bio_Industries_2" then
krastorio.recipes.multiplyIngredients(recipe.name, update, 4)
krastorio.recipes.multiplyProducts(recipe.name, update, 4)
BioInd.writeDebug("Changed ingredients for %s: %s", {recipe and recipe.name or "nil", recipe and recipe.ingredients or "nil"})
BioInd.writeDebug("Changed results for %s: %s", {recipe and recipe.name or "nil", recipe and recipe.results or "nil"})
end
end
end
-- Make sure fertilizers have the "place_as_tile" property!
local AlienBiomes = data.raw.tile["vegetation-green-grass-3"] and
data.raw.tile["vegetation-green-grass-1"] and true or false
-- We've already set place_as_tile. If it doesn't exist, our fertilizer definition has
-- been overwritten by some other mod, so we restore icons and localization and add
-- place_as_tile again!
local fertilizer = data.raw.item["fertilizer"]
if not fertilizer.place_as_tile then
fertilizer.place_as_tile = {
result = AlienBiomes and "vegetation-green-grass-3" or "grass-3",
condition_size = 1,
condition = { layers = { water_tile = true }}
}
fertilizer.icon = ICONPATH .. "fertilizer_64.png"
fertilizer.icon_size = 64
fertilizer.icons = {
{
icon = ICONPATH .. "fertilizer_64.png",
icon_size = 64,
}
}
fertilizer.localised_name = {"BI-item-name.fertilizer"}
fertilizer.localised_description = {"BI-item-description.fertilizer"}
end
data.raw.item["bi-adv-fertilizer"].place_as_tile = {
result = AlienBiomes and "vegetation-green-grass-1" or "grass-1",
condition_size = 1,
condition = { layers = { water_tile = true }}
}
if mods["pycoalprocessing"] and BI.Settings.BI_Bio_Fuel then
-- Bio_Fuel/recipe.lua:30: {type = "item", name = "bi-ash", amount = 15}
thxbob.lib.recipe.remove_result ("bi-basic-gas-processing", "bi-ash")
thxbob.lib.recipe.add_result("bi-basic-gas-processing", {
type = "item",
name = "ash",
amount = 15
})
end
-- Moved to data-updates.lua for 0.18.34/1.1.4!
--- If Space Exploration Mod is installed.
if mods["space-exploration"] then
-- Space Exploration Mod likes Stack Sizes to be 200 max.
-- Changed in 1.1.11
local tweaks = {
["bi-solar-mat"] = 400,
["bi-seed"] = 800,
["seedling"] = 400,
["bi-woodpulp"] = 800,
["bi-ash"] = 400,
["wood-charcoal"] = 400,
["pellet-coke"] = 400,
["stone-crushed"] = 400,
}
local item
for tweak_name, tweak in pairs(tweaks) do
item = data.raw.item[tweak_name]
if item and item.stack_size then
item.stack_size = 200
end
end
if not mods["Natural_Evolution_Buildings"] then
local ammo_tweaks = {
["bi-dart-magazine-basic"] = 400,
["bi-dart-magazine-standard"] = 400,
["bi-dart-magazine-enhanced"] = 400,
["bi-dart-magazine-poison"] = 400,
}
local item
for tweak_name, tweak in pairs(ammo_tweaks) do
item = data.raw.ammo[tweak_name]
item.stack_size = 200
end
end
end
if BI.Settings.Bio_Cannon then
local default_target_masks = data.raw["utility-constants"].default.default_trigger_target_mask_by_type
default_target_masks["unit-spawner"] = default_target_masks["unit-spawner"] or {"common"} -- everything should have "common", unless there is specific reason not to
table.insert(default_target_masks["unit-spawner"], "Bio_Cannon_Ammo")
for w, worm in pairs(data.raw.turret) do
worm.trigger_target_mask = worm.trigger_target_mask or default_target_masks["turret"] or {"common"}
table.insert(worm.trigger_target_mask, "Bio_Cannon_Ammo")
end
end
------------------------------------------------------------------------------------
-- Add icons to our prototypes
BioInd.BI_add_icons()
---TESTING!
for k, v in pairs(data.raw) do
for t, p in pairs(v) do
if p.se_allow_in_space then
BioInd.writeDebug("%s (%s) can be built in space!", {p.name, t})
end
end
end

File diff suppressed because it is too large Load diff

View file

@ -1,126 +1,126 @@
local BioInd = require('common')('Bio_Industries_2')
if not BI then BI = {} end
if not BI.Settings then BI.Settings = {} end
if not BI_Functions then BI_Functions = {} end
if not BI_Functions.lib then BI_Functions.lib = {} end
if not thxbob then thxbob = {} end
if not thxbob.lib then thxbob.lib = {} end
for var, name in pairs({
Bio_Cannon = "BI_Bio_Cannon",
BI_Bio_Fuel = "BI_Bio_Fuel",
BI_Easy_Bio_Gardens = "BI_Easy_Bio_Gardens",
BI_Bigger_Wooden_Chests = "BI_Bigger_Wooden_Chests",
BI_Game_Tweaks_Stack_Size = "BI_Game_Tweaks_Stack_Size",
BI_Game_Tweaks_Recipe = "BI_Game_Tweaks_Recipe",
BI_Game_Tweaks_Tree = "BI_Game_Tweaks_Tree",
BI_Game_Tweaks_Small_Tree_Collisionbox = "BI_Game_Tweaks_Small_Tree_Collisionbox",
BI_Game_Tweaks_Player = "BI_Game_Tweaks_Player",
BI_Game_Tweaks_Disassemble = "BI_Game_Tweaks_Disassemble",
BI_Game_Tweaks_Bot = "BI_Game_Tweaks_Bot",
BI_Solar_Additions = "BI_Solar_Additions"
}) do
BI.Settings[var] = BioInd.get_startup_setting(name)
end
--- Help Files
require ("libs.item-functions") -- From Bob's Libary
require ("libs.recipe-functions") -- From Bob's Libary
require ("libs.technology-functions") -- From Bob's Libary
require ("libs.functions") -- From Bob's Libary
require ("libs.category-functions") -- From Bob's Libary
require ("libs.bi_functions") -- Functions
require ("prototypes.category")
--- Bio Farm
require ("prototypes.Bio_Farm.entities")
require ("prototypes.Bio_Farm.item")
require ("prototypes.Bio_Farm.recipe")
require ("prototypes.Bio_Farm.liquids")
require ("prototypes.Bio_Farm.recipe-categories")
require ("prototypes.Bio_Farm.pipeConnectors")
require ("prototypes.Bio_Farm.technology")
require ("prototypes.Bio_Farm.tree_entities")
-- Bio Garden
require ("prototypes.Bio_Garden.entities")
require ("prototypes.Bio_Garden.item")
require ("prototypes.Bio_Garden.recipe")
require ("prototypes.Bio_Garden.recipe-categories")
--- Bio Solar Farm
require ("prototypes.Bio_Solar_Farm.entities")
require ("prototypes.Bio_Solar_Farm.item")
require ("prototypes.Bio_Solar_Farm.recipe")
--- Wood Products
require ("prototypes.Wood_Products.entities")
require ("prototypes.Wood_Products.item")
require ("prototypes.Wood_Products.recipe")
require ("prototypes.Wood_Products.containers-entities")
require ("prototypes.Wood_Products.containers-item")
require ("prototypes.Wood_Products.containers-recipe")
if not mods["Natural_Evolution_Buildings"] then
--- Dart Turret (Bio turret)
require ("prototypes.Bio_Turret.item-group")
require ("prototypes.Bio_Turret.damage-type")
require ("prototypes.Bio_Turret.item")
require ("prototypes.Bio_Turret.recipe")
require ("prototypes.Bio_Turret.entity")
--- Bio Cannon
-- Items Groups
require ("prototypes.Bio_Cannon.item-group")
-- Cannon
require ("prototypes.Bio_Cannon.item")
require ("prototypes.Bio_Cannon.recipe")
require ("prototypes.Bio_Cannon.entity")
require ("prototypes.Bio_Cannon.technology")
-- Projectiles
require ("prototypes.Bio_Cannon.projectiles-item")
require ("prototypes.Bio_Cannon.projectiles-recipe")
require ("prototypes.Bio_Cannon.projectiles-entity")
end
---- Add Bio Fuel & Plastic, etc.
require("prototypes.Bio_Fuel.item")
require("prototypes.Bio_Fuel.recipe")
require("prototypes.Bio_Fuel.entities")
require("prototypes.Bio_Fuel.technology")
-- Create the hidden entities (Moved here so we can be sure the base
-- entities already exist and their properties can be read.)
require("prototypes.compound_entities.hidden_entities")
------------------------------------------------------------------------------------
-- Alien Biomes will degrade tiles to "landfill" if more than 255 tiles are defined
-- in the game. We can register the musk-floor tiles with Alien Biomes so it will
-- try to prioritize the tiles if they exist.
alien_biomes_priority_tiles = alien_biomes_priority_tiles or {}
table.insert(alien_biomes_priority_tiles, "bi-solar-mat")
------------------------------------------------------------------------------------
-- Add icons to our prototypes
BioInd.BI_add_icons()
local BioInd = require('common')('Bio_Industries_2')
if not BI then BI = {} end
if not BI.Settings then BI.Settings = {} end
if not BI_Functions then BI_Functions = {} end
if not BI_Functions.lib then BI_Functions.lib = {} end
if not thxbob then thxbob = {} end
if not thxbob.lib then thxbob.lib = {} end
for var, name in pairs({
Bio_Cannon = "BI_Bio_Cannon",
BI_Bio_Fuel = "BI_Bio_Fuel",
BI_Easy_Bio_Gardens = "BI_Easy_Bio_Gardens",
BI_Bigger_Wooden_Chests = "BI_Bigger_Wooden_Chests",
BI_Game_Tweaks_Stack_Size = "BI_Game_Tweaks_Stack_Size",
BI_Game_Tweaks_Recipe = "BI_Game_Tweaks_Recipe",
BI_Game_Tweaks_Tree = "BI_Game_Tweaks_Tree",
BI_Game_Tweaks_Small_Tree_Collisionbox = "BI_Game_Tweaks_Small_Tree_Collisionbox",
BI_Game_Tweaks_Player = "BI_Game_Tweaks_Player",
BI_Game_Tweaks_Disassemble = "BI_Game_Tweaks_Disassemble",
BI_Game_Tweaks_Bot = "BI_Game_Tweaks_Bot",
BI_Solar_Additions = "BI_Solar_Additions"
}) do
BI.Settings[var] = BioInd.get_startup_setting(name)
end
--- Help Files
require ("libs.item-functions") -- From Bob's Libary
require ("libs.recipe-functions") -- From Bob's Libary
require ("libs.technology-functions") -- From Bob's Libary
require ("libs.functions") -- From Bob's Libary
require ("libs.category-functions") -- From Bob's Libary
require ("libs.bi_functions") -- Functions
require ("prototypes.category")
--- Bio Farm
require ("prototypes.Bio_Farm.entities")
require ("prototypes.Bio_Farm.item")
require ("prototypes.Bio_Farm.recipe")
require ("prototypes.Bio_Farm.liquids")
require ("prototypes.Bio_Farm.recipe-categories")
require ("prototypes.Bio_Farm.pipeConnectors")
require ("prototypes.Bio_Farm.technology")
require ("prototypes.Bio_Farm.tree_entities")
-- Bio Garden
require ("prototypes.Bio_Garden.entities")
require ("prototypes.Bio_Garden.item")
require ("prototypes.Bio_Garden.recipe")
require ("prototypes.Bio_Garden.recipe-categories")
--- Bio Solar Farm
require ("prototypes.Bio_Solar_Farm.entities")
require ("prototypes.Bio_Solar_Farm.item")
require ("prototypes.Bio_Solar_Farm.recipe")
--- Wood Products
require ("prototypes.Wood_Products.entities")
require ("prototypes.Wood_Products.item")
require ("prototypes.Wood_Products.recipe")
require ("prototypes.Wood_Products.containers-entities")
require ("prototypes.Wood_Products.containers-item")
require ("prototypes.Wood_Products.containers-recipe")
if not mods["Natural_Evolution_Buildings"] then
--- Dart Turret (Bio turret)
require ("prototypes.Bio_Turret.item-group")
require ("prototypes.Bio_Turret.damage-type")
require ("prototypes.Bio_Turret.item")
require ("prototypes.Bio_Turret.recipe")
require ("prototypes.Bio_Turret.entity")
--- Bio Cannon
-- Items Groups
require ("prototypes.Bio_Cannon.item-group")
-- Cannon
require ("prototypes.Bio_Cannon.item")
require ("prototypes.Bio_Cannon.recipe")
require ("prototypes.Bio_Cannon.entity")
require ("prototypes.Bio_Cannon.technology")
-- Projectiles
require ("prototypes.Bio_Cannon.projectiles-item")
require ("prototypes.Bio_Cannon.projectiles-recipe")
require ("prototypes.Bio_Cannon.projectiles-entity")
end
---- Add Bio Fuel & Plastic, etc.
require("prototypes.Bio_Fuel.item")
require("prototypes.Bio_Fuel.recipe")
require("prototypes.Bio_Fuel.entities")
require("prototypes.Bio_Fuel.technology")
-- Create the hidden entities (Moved here so we can be sure the base
-- entities already exist and their properties can be read.)
require("prototypes.compound_entities.hidden_entities")
------------------------------------------------------------------------------------
-- Alien Biomes will degrade tiles to "landfill" if more than 255 tiles are defined
-- in the game. We can register the musk-floor tiles with Alien Biomes so it will
-- try to prioritize the tiles if they exist.
alien_biomes_priority_tiles = alien_biomes_priority_tiles or {}
table.insert(alien_biomes_priority_tiles, "bi-solar-mat")
------------------------------------------------------------------------------------
-- Add icons to our prototypes
BioInd.BI_add_icons()

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -0,0 +1,9 @@
Icons:
======
cokery.png bi_cokery.png
stone_crusher.png bi_stone_crusher.png
liquid-air.png bi_liquid_air.png
liquid-nitrogen.png bi_liquid_nitrogen.png
bi-recipe-battery bi-battery

View file

@ -1,20 +1,20 @@
{
"name": "Bio_Industries_2",
"version": "2.0.1",
"factorio_version": "2.0",
"title": "Bio Industries",
"author": "cackling fiend",
"homepage": "https://discord.gg/5bevXf5W",
"description": "Provides useful buildings and items, like the Bio Farm for growing trees. Solar Farm and Large Accumulator to make your electric setup easier. Bio Fuel section to produce organic plastic and batteries. Lots of New Wood Products, like the big electric pole, wooden pipes, dart turret. Plant trees using seedlings. Change terrain from deserts to grasslands using Fertilizer - helps trees grow better. And a lot more… Please visit the homepage on the forums for more information and feedback.",
"dependencies": [
"base >= 2.0.55",
"? space-age",
"kry_stdlib >= 2.0.6",
"? alien-biomes",
"? Krastorio2",
"(?) angelspetrochem",
"(?) Transport_Drones",
"(?) Natural_Evolution_Buildings",
"(?) Natural_Evolution_Enemies"
]
}
{
"name": "Bio_Industries_2",
"version": "2.0.0",
"factorio_version": "2.0",
"title": "Bio Industries",
"author": "cackling fiend",
"homepage": "https://discord.gg/5bevXf5W",
"description": "Provides useful buildings and items, like the Bio Farm for growing trees. Solar Farm and Large Accumulator to make your electric setup easier. Bio Fuel section to produce organic plastic and batteries. Lots of New Wood Products, like the big electric pole, wooden pipes, dart turret. Plant trees using seedlings. Change terrain from deserts to grasslands using Fertilizer - helps trees grow better. And a lot more… Please visit the homepage on the forums for more information and feedback.",
"dependencies": [
"base >= 2.0.55",
"? space-age",
"kry_stdlib >= 2.0.6",
"? alien-biomes",
"? Krastorio2",
"(?) angelspetrochem",
"(?) Transport_Drones",
"(?) Natural_Evolution_Buildings",
"(?) Natural_Evolution_Enemies"
]
}

View file

@ -1,25 +1,25 @@
function BI_Functions.lib.allow_productivity(recipe_name)
if data.raw.recipe[recipe_name] then
for i, module in pairs(data.raw.module) do
if module.limitation and module.effect.productivity then
table.insert(module.limitation, recipe_name)
end
end
end
end
function BI_Functions.lib.remove_from_blueprint(check_tile)
if data.raw.tile[check_tile] then
data.raw.tile[check_tile].can_be_part_of_blueprint = false
end
end
function BI_Functions.lib.fuel_emissions_multiplier_update(item2update, value)
local target = data.raw.item[item2update]
if target and target.fuel_value then
target.fuel_emissions_multiplier = value
end
end
function BI_Functions.lib.allow_productivity(recipe_name)
if data.raw.recipe[recipe_name] then
for i, module in pairs(data.raw.module) do
if module.limitation and module.effect.productivity then
table.insert(module.limitation, recipe_name)
end
end
end
end
function BI_Functions.lib.remove_from_blueprint(check_tile)
if data.raw.tile[check_tile] then
data.raw.tile[check_tile].can_be_part_of_blueprint = false
end
end
function BI_Functions.lib.fuel_emissions_multiplier_update(item2update, value)
local target = data.raw.item[item2update]
if target and target.fuel_value then
target.fuel_emissions_multiplier = value
end
end

View file

@ -1,117 +1,117 @@
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.machine then thxbob.lib.machine = {} end
function thxbob.lib.machine.has_category(machine, category_in)
local hasit = false
if machine and machine.crafting_categories then
for i, category in pairs(machine.crafting_categories) do
if category == category_in then
hasit = true
end
end
end
return hasit
end
function thxbob.lib.machine.add_category(machine, category)
if machine and data.raw["recipe-category"][category] then
if not machine.crafting_categories then
machine.crafting_categories = {category}
elseif not thxbob.lib.machine.has_category(machine, category) then
table.insert(machine.crafting_categories, category)
end
else
if not data.raw["recipe-category"][category] then
BioInd.writeDebug("Crafting category %s does not exist.", {category})
end
end
end
function thxbob.lib.machine.if_add_category(machine, category, category_to_add)
if machine and data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then
if thxbob.lib.machine.has_category(machine, category) then
thxbob.lib.machine.add_category(machine, category_to_add)
end
else
if not data.raw["recipe-category"][category] then
BioInd.writeDebug("Crafting category %s does not exist.", {category})
end
if not data.raw["recipe-category"][category_to_add] then
BioInd.writeDebug("Crafting category %s does not exist.", {category_to_add})
end
end
end
function thxbob.lib.machine.type_if_add_category(machine_type, category, category_to_add)
if data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then
for i, machine in pairs(data.raw[machine_type]) do
thxbob.lib.machine.if_add_category(machine, category, category_to_add)
end
else
if not data.raw["recipe-category"][category] then
BioInd.writeDebug("Crafting category %s does not exist.", {category})
end
if not data.raw["recipe-category"][category_to_add] then
BioInd.writeDebug("Crafting category %s does not exist.", {category_to_add})
end
end
end
function thxbob.lib.machine.has_resource_category(machine, category_in)
local hasit = false
if machine and machine.resource_categories then
for i, category in pairs(machine.resource_categories) do
if category == category_in then
hasit = true
end
end
end
return hasit
end
function thxbob.lib.machine.add_resource_category(machine, category)
if machine and data.raw["resource-category"][category] then
if not machine.resource_categories then
machine.resource_categories = {category}
elseif not thxbob.lib.machine.has_resource_category(machine, category) then
table.insert(machine.resource_categories, category)
end
else
if not data.raw["resource-category"][category] then
BioInd.writeDebug("Resource category %s does not exist.", {category})
end
end
end
function thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add)
if machine and data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then
if thxbob.lib.machine.has_resource_category(machine, category) then
thxbob.lib.machine.add_resource_category(machine, category_to_add)
end
else
if not data.raw["resource-category"][category] then
BioInd.writeDebug("Resource category %s does not exist.", {category})
end
if not data.raw["resource-category"][category_to_add] then
BioInd.writeDebug("Resource category %s does not exist.", {category_to_add})
end
end
end
function thxbob.lib.machine.type_if_add_resource_category(machine_type, category, category_to_add)
if data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then
for i, machine in pairs(data.raw[machine_type]) do
thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add)
end
else
if not data.raw["resource-category"][category] then
BioInd.writeDebug("Resource category %s does not exist.", {category})
end
if not data.raw["resource-category"][category_to_add] then
BioInd.writeDebug("Resource category %s does not exist.", {category_to_add})
end
end
end
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.machine then thxbob.lib.machine = {} end
function thxbob.lib.machine.has_category(machine, category_in)
local hasit = false
if machine and machine.crafting_categories then
for i, category in pairs(machine.crafting_categories) do
if category == category_in then
hasit = true
end
end
end
return hasit
end
function thxbob.lib.machine.add_category(machine, category)
if machine and data.raw["recipe-category"][category] then
if not machine.crafting_categories then
machine.crafting_categories = {category}
elseif not thxbob.lib.machine.has_category(machine, category) then
table.insert(machine.crafting_categories, category)
end
else
if not data.raw["recipe-category"][category] then
BioInd.writeDebug("Crafting category %s does not exist.", {category})
end
end
end
function thxbob.lib.machine.if_add_category(machine, category, category_to_add)
if machine and data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then
if thxbob.lib.machine.has_category(machine, category) then
thxbob.lib.machine.add_category(machine, category_to_add)
end
else
if not data.raw["recipe-category"][category] then
BioInd.writeDebug("Crafting category %s does not exist.", {category})
end
if not data.raw["recipe-category"][category_to_add] then
BioInd.writeDebug("Crafting category %s does not exist.", {category_to_add})
end
end
end
function thxbob.lib.machine.type_if_add_category(machine_type, category, category_to_add)
if data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then
for i, machine in pairs(data.raw[machine_type]) do
thxbob.lib.machine.if_add_category(machine, category, category_to_add)
end
else
if not data.raw["recipe-category"][category] then
BioInd.writeDebug("Crafting category %s does not exist.", {category})
end
if not data.raw["recipe-category"][category_to_add] then
BioInd.writeDebug("Crafting category %s does not exist.", {category_to_add})
end
end
end
function thxbob.lib.machine.has_resource_category(machine, category_in)
local hasit = false
if machine and machine.resource_categories then
for i, category in pairs(machine.resource_categories) do
if category == category_in then
hasit = true
end
end
end
return hasit
end
function thxbob.lib.machine.add_resource_category(machine, category)
if machine and data.raw["resource-category"][category] then
if not machine.resource_categories then
machine.resource_categories = {category}
elseif not thxbob.lib.machine.has_resource_category(machine, category) then
table.insert(machine.resource_categories, category)
end
else
if not data.raw["resource-category"][category] then
BioInd.writeDebug("Resource category %s does not exist.", {category})
end
end
end
function thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add)
if machine and data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then
if thxbob.lib.machine.has_resource_category(machine, category) then
thxbob.lib.machine.add_resource_category(machine, category_to_add)
end
else
if not data.raw["resource-category"][category] then
BioInd.writeDebug("Resource category %s does not exist.", {category})
end
if not data.raw["resource-category"][category_to_add] then
BioInd.writeDebug("Resource category %s does not exist.", {category_to_add})
end
end
end
function thxbob.lib.machine.type_if_add_resource_category(machine_type, category, category_to_add)
if data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then
for i, machine in pairs(data.raw[machine_type]) do
thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add)
end
else
if not data.raw["resource-category"][category] then
BioInd.writeDebug("Resource category %s does not exist.", {category})
end
if not data.raw["resource-category"][category_to_add] then
BioInd.writeDebug("Resource category %s does not exist.", {category_to_add})
end
end
end

View file

@ -1,80 +1,80 @@
local BioInd = require('common')('Bio_Industries_2')
-- Merges table2's contents into table1.
function thxbob.lib.table_merge(table1, table2)
for index, value in pairs(table2) do
if type(value) == "table" then
if type(table1[index]) == "table" then
thxbob.lib.table_merge(table1[index], table2[index])
else
table1[index] = util.table.deepcopy(table2[index])
end
else
table1[index] = value
end
end
end
-- Converts recipe.result to recipe.results!
function thxbob.lib.result_check(object)
BioInd.show("Entered function result_check", object)
if object then
object.results = object.results or {}
if object.result then
local item = thxbob.lib.item.basic_item({name = object.result})
BioInd.show("item", item)
if object.result_count then
item.amount = object.result_count
object.result_count = nil
end
BioInd.show("object.result", object.result)
thxbob.lib.item.add_new(object.results, item)
BioInd.show("object.results after add_new", object.results)
if object.ingredients then -- It's a recipe
if not object.main_product then
if object.icon or object.subgroup or object.order or item.type ~= "item" then -- if we already have one, add the rest
BioInd.writeDebug("data.raw[%s][%s]: %s", {item.type, object.result, data.raw[item.type][object.result] or "nil"})
if (not object.icon) and data.raw[item.type][object.result] and
data.raw[item.type][object.result].icon then
object.icon = data.raw[item.type][object.result].icon
object.icon_size = data.raw[item.type][object.result].icon_size
-- Make sure objects also have an icons definition
elseif not object.icons and data.raw[item.type][object.result] and
data.raw[item.type][object.result].icons and
-- Don't assume that an icon already exists,
-- it could be set later on!
data.raw[item.type][object.result].icon then
object.icons = {
{icon = data.raw[item.type][object.result].icon, icon_size = 64}
}
end
if not object.subgroup and data.raw[item.type][object.result] and
data.raw[item.type][object.result].subgroup then
object.subgroup = data.raw[item.type][object.result].subgroup
end
if not object.order and data.raw[item.type][object.result] and
data.raw[item.type][object.result].order then
object.order = data.raw[item.type][object.result].order
end
else -- otherwise just use main_product as a cheap way to set them all.
object.main_product = object.result
end
end
end
object.result = nil
end
else
BioInd.writeDebug("%s does not exist.", {object})
end
end
function thxbob.lib.belt_speed_ips(ips)
return ips * 1/480
end
local BioInd = require('common')('Bio_Industries_2')
-- Merges table2's contents into table1.
function thxbob.lib.table_merge(table1, table2)
for index, value in pairs(table2) do
if type(value) == "table" then
if type(table1[index]) == "table" then
thxbob.lib.table_merge(table1[index], table2[index])
else
table1[index] = util.table.deepcopy(table2[index])
end
else
table1[index] = value
end
end
end
-- Converts recipe.result to recipe.results!
function thxbob.lib.result_check(object)
BioInd.show("Entered function result_check", object)
if object then
object.results = object.results or {}
if object.result then
local item = thxbob.lib.item.basic_item({name = object.result})
BioInd.show("item", item)
if object.result_count then
item.amount = object.result_count
object.result_count = nil
end
BioInd.show("object.result", object.result)
thxbob.lib.item.add_new(object.results, item)
BioInd.show("object.results after add_new", object.results)
if object.ingredients then -- It's a recipe
if not object.main_product then
if object.icon or object.subgroup or object.order or item.type ~= "item" then -- if we already have one, add the rest
BioInd.writeDebug("data.raw[%s][%s]: %s", {item.type, object.result, data.raw[item.type][object.result] or "nil"})
if (not object.icon) and data.raw[item.type][object.result] and
data.raw[item.type][object.result].icon then
object.icon = data.raw[item.type][object.result].icon
object.icon_size = data.raw[item.type][object.result].icon_size
-- Make sure objects also have an icons definition
elseif not object.icons and data.raw[item.type][object.result] and
data.raw[item.type][object.result].icons and
-- Don't assume that an icon already exists,
-- it could be set later on!
data.raw[item.type][object.result].icon then
object.icons = {
{icon = data.raw[item.type][object.result].icon, icon_size = 64}
}
end
if not object.subgroup and data.raw[item.type][object.result] and
data.raw[item.type][object.result].subgroup then
object.subgroup = data.raw[item.type][object.result].subgroup
end
if not object.order and data.raw[item.type][object.result] and
data.raw[item.type][object.result].order then
object.order = data.raw[item.type][object.result].order
end
else -- otherwise just use main_product as a cheap way to set them all.
object.main_product = object.result
end
end
end
object.result = nil
end
else
BioInd.writeDebug("%s does not exist.", {object})
end
end
function thxbob.lib.belt_speed_ips(ips)
return ips * 1/480
end

View file

@ -1,178 +1,178 @@
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.item then thxbob.lib.item = {} end
function thxbob.lib.item.get_type(name)
local item_types = {
"ammo",
"armor",
"capsule",
"fluid",
"gun",
"item",
"module",
"tool",
"item-with-entity-data"
}
local item_type = nil
for i, type_name in pairs(item_types) do
if data.raw[type_name][name] then item_type = type_name end
end
return item_type
end
function thxbob.lib.item.get_basic_type(name)
local item_type = "item"
if data.raw.fluid[name] then item_type = "fluid" end
return item_type
end
function thxbob.lib.item.basic_item(inputs)
local item = {}
if inputs.name then
item.name = inputs.name
else
item.name = inputs[1]
end
if inputs.amount then
item.amount = inputs.amount
else
if inputs[2] then
item.amount = inputs[2]
end
end
if not item.amount then
item.amount = 1
end
if inputs.type then
item.type = inputs.type
else
item.type = thxbob.lib.item.get_basic_type(item.name)
end
if item.type == "item" then
if item.amount > 0 and item.amount < 1 then
item.amount = 1
else
item.amount = math.floor(item.amount)
end
end
return item
end
function thxbob.lib.item.item(inputs)
local item = {}
if inputs.name then
item.name = inputs.name
else
item.name = inputs[1]
end
if inputs.amount then
item.amount = inputs.amount
else
if inputs[2] then
item.amount = inputs[2]
end
end
if not item.amount then
if inputs.amount_min and inputs.amount_max then
item.amount_min = inputs.amount_min
item.amount_max = inputs.amount_max
else
item.amount = 1
end
end
if inputs.probability then item.probability = inputs.probability end
if inputs.type then
item.type = inputs.type
else
item.type = thxbob.lib.item.get_basic_type(item.name)
end
return item
end
function thxbob.lib.item.combine(item1_in, item2_in)
local item = {}
local item1 = thxbob.lib.item.item(item1_in)
local item2 = thxbob.lib.item.item(item2_in)
item.name = item1.name
item.type = item1.type
if item1.amount and item2.amount then
item.amount = item1.amount + item2.amount
elseif item1.amount_min and item1.amount_max and item2.amount_min and item2.amount_max then
item.amount_min = item1.amount_min + item2.amount_min
item.amount_max = item1.amount_max + item2.amount_max
else
if item1.amount_min and item1.amount_max and item2.amount then
item.amount_min = item1.amount_min + item2.amount
item.amount_max = item1.amount_max + item2.amount
elseif item1.amount and item2.amount_min and item2.amount_max then
item.amount_min = item1.amount + item2.amount_min
item.amount_max = item1.amount + item2.amount_max
end
end
if item1.probability and item2.probability then
item.probability = (item1.probability + item2.probability) / 2
elseif item1.probability then
item.probability = (item1.probability + 1) / 2
elseif item2.probability then
item.probability = (item2.probability + 1) / 2
end
return item
end
function thxbob.lib.item.add(list, item_in) --increments amount if exists
local item = thxbob.lib.item.item(item_in)
local addit = true
for i, object in pairs(list) do
if object[1] == item.name or object.name == item.name then
addit = false
list[i] = thxbob.lib.item.combine(object, item)
end
end
if addit then table.insert(list, item) end
end
function thxbob.lib.item.add_new(list, item_in) --ignores if exists
local item = thxbob.lib.item.item(item_in)
local addit = true
for i, object in pairs(list) do
if item.name == thxbob.lib.item.basic_item(object).name then addit = false end
end
if addit then
table.insert(list, item)
end
end
function thxbob.lib.item.remove(list, item)
for i, object in ipairs(list) do
if object[1] == item or object.name == item then
table.remove(list, i)
end
end
end
function thxbob.lib.item.set(list, item_in)
local item = thxbob.lib.item.item(item_in)
for i, object in pairs(list) do
if object[1] == item.name or object.name == item.name then
list[i] = item
end
end
end
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.item then thxbob.lib.item = {} end
function thxbob.lib.item.get_type(name)
local item_types = {
"ammo",
"armor",
"capsule",
"fluid",
"gun",
"item",
"module",
"tool",
"item-with-entity-data"
}
local item_type = nil
for i, type_name in pairs(item_types) do
if data.raw[type_name][name] then item_type = type_name end
end
return item_type
end
function thxbob.lib.item.get_basic_type(name)
local item_type = "item"
if data.raw.fluid[name] then item_type = "fluid" end
return item_type
end
function thxbob.lib.item.basic_item(inputs)
local item = {}
if inputs.name then
item.name = inputs.name
else
item.name = inputs[1]
end
if inputs.amount then
item.amount = inputs.amount
else
if inputs[2] then
item.amount = inputs[2]
end
end
if not item.amount then
item.amount = 1
end
if inputs.type then
item.type = inputs.type
else
item.type = thxbob.lib.item.get_basic_type(item.name)
end
if item.type == "item" then
if item.amount > 0 and item.amount < 1 then
item.amount = 1
else
item.amount = math.floor(item.amount)
end
end
return item
end
function thxbob.lib.item.item(inputs)
local item = {}
if inputs.name then
item.name = inputs.name
else
item.name = inputs[1]
end
if inputs.amount then
item.amount = inputs.amount
else
if inputs[2] then
item.amount = inputs[2]
end
end
if not item.amount then
if inputs.amount_min and inputs.amount_max then
item.amount_min = inputs.amount_min
item.amount_max = inputs.amount_max
else
item.amount = 1
end
end
if inputs.probability then item.probability = inputs.probability end
if inputs.type then
item.type = inputs.type
else
item.type = thxbob.lib.item.get_basic_type(item.name)
end
return item
end
function thxbob.lib.item.combine(item1_in, item2_in)
local item = {}
local item1 = thxbob.lib.item.item(item1_in)
local item2 = thxbob.lib.item.item(item2_in)
item.name = item1.name
item.type = item1.type
if item1.amount and item2.amount then
item.amount = item1.amount + item2.amount
elseif item1.amount_min and item1.amount_max and item2.amount_min and item2.amount_max then
item.amount_min = item1.amount_min + item2.amount_min
item.amount_max = item1.amount_max + item2.amount_max
else
if item1.amount_min and item1.amount_max and item2.amount then
item.amount_min = item1.amount_min + item2.amount
item.amount_max = item1.amount_max + item2.amount
elseif item1.amount and item2.amount_min and item2.amount_max then
item.amount_min = item1.amount + item2.amount_min
item.amount_max = item1.amount + item2.amount_max
end
end
if item1.probability and item2.probability then
item.probability = (item1.probability + item2.probability) / 2
elseif item1.probability then
item.probability = (item1.probability + 1) / 2
elseif item2.probability then
item.probability = (item2.probability + 1) / 2
end
return item
end
function thxbob.lib.item.add(list, item_in) --increments amount if exists
local item = thxbob.lib.item.item(item_in)
local addit = true
for i, object in pairs(list) do
if object[1] == item.name or object.name == item.name then
addit = false
list[i] = thxbob.lib.item.combine(object, item)
end
end
if addit then table.insert(list, item) end
end
function thxbob.lib.item.add_new(list, item_in) --ignores if exists
local item = thxbob.lib.item.item(item_in)
local addit = true
for i, object in pairs(list) do
if item.name == thxbob.lib.item.basic_item(object).name then addit = false end
end
if addit then
table.insert(list, item)
end
end
function thxbob.lib.item.remove(list, item)
for i, object in ipairs(list) do
if object[1] == item or object.name == item then
table.remove(list, i)
end
end
end
function thxbob.lib.item.set(list, item_in)
local item = thxbob.lib.item.item(item_in)
for i, object in pairs(list) do
if object[1] == item.name or object.name == item.name then
list[i] = item
end
end
end

View file

@ -1,163 +1,163 @@
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.recipe then thxbob.lib.recipe = {} end
function thxbob.lib.recipe.replace_ingredient(recipe, old, new)
local retval = false
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(new) then
local amount = 0
if data.raw.recipe[recipe].ingredients then
for i, ingredient in pairs(data.raw.recipe[recipe].ingredients) do
local item = thxbob.lib.item.basic_item(ingredient)
if item.name == old then
amount = item.amount + amount
end
end
if amount > 0 then
if thxbob.lib.item.get_type(old) == "fluid" and thxbob.lib.item.get_type(new) == "item" then
amount = math.ceil(amount / 10)
end
if thxbob.lib.item.get_type(old) == "item" and thxbob.lib.item.get_type(new) == "fluid" then
amount = amount * 10
end
thxbob.lib.recipe.remove_ingredient(recipe, old)
thxbob.lib.recipe.add_ingredient(recipe, {new, amount})
return true
else
return false
end
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_type(new) then
BioInd.writeDebug("Ingredient %s does not exist.", {new})
end
end
return retval
end
function thxbob.lib.recipe.replace_ingredient_in_all(old, new)
if thxbob.lib.item.get_basic_type(new) then
for i, recipe in pairs(data.raw.recipe) do
thxbob.lib.recipe.replace_ingredient(recipe.name, old, new)
end
else
BioInd.writeDebug("Ingredient %s does not exist.", {new})
end
end
function thxbob.lib.recipe.remove_ingredient(recipe, item)
if data.raw.recipe[recipe] then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.remove(data.raw.recipe[recipe].ingredients, item)
end
else
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
end
function thxbob.lib.recipe.add_new_ingredient(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.add_new(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item))
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_type(item) then
BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.add_ingredient(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.add(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item))
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.set_ingredient(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.set(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item))
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.add_result(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then
thxbob.lib.result_check(data.raw.recipe[recipe])
thxbob.lib.item.add(data.raw.recipe[recipe].results, item)
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Item %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.set_result(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then
thxbob.lib.result_check(data.raw.recipe[recipe])
thxbob.lib.item.set(data.raw.recipe[recipe].results, item)
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Item %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.remove_result(recipe, item)
local f_name = "remove_result"
BioInd.writeDebug("Entered function %s(%s, %s)", {f_name, recipe, item})
if data.raw.recipe[recipe] then
if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then
thxbob.lib.result_check(data.raw.recipe[recipe])
thxbob.lib.item.remove(data.raw.recipe[recipe].results, item)
end
else
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.recipe then thxbob.lib.recipe = {} end
function thxbob.lib.recipe.replace_ingredient(recipe, old, new)
local retval = false
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(new) then
local amount = 0
if data.raw.recipe[recipe].ingredients then
for i, ingredient in pairs(data.raw.recipe[recipe].ingredients) do
local item = thxbob.lib.item.basic_item(ingredient)
if item.name == old then
amount = item.amount + amount
end
end
if amount > 0 then
if thxbob.lib.item.get_type(old) == "fluid" and thxbob.lib.item.get_type(new) == "item" then
amount = math.ceil(amount / 10)
end
if thxbob.lib.item.get_type(old) == "item" and thxbob.lib.item.get_type(new) == "fluid" then
amount = amount * 10
end
thxbob.lib.recipe.remove_ingredient(recipe, old)
thxbob.lib.recipe.add_ingredient(recipe, {new, amount})
return true
else
return false
end
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_type(new) then
BioInd.writeDebug("Ingredient %s does not exist.", {new})
end
end
return retval
end
function thxbob.lib.recipe.replace_ingredient_in_all(old, new)
if thxbob.lib.item.get_basic_type(new) then
for i, recipe in pairs(data.raw.recipe) do
thxbob.lib.recipe.replace_ingredient(recipe.name, old, new)
end
else
BioInd.writeDebug("Ingredient %s does not exist.", {new})
end
end
function thxbob.lib.recipe.remove_ingredient(recipe, item)
if data.raw.recipe[recipe] then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.remove(data.raw.recipe[recipe].ingredients, item)
end
else
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
end
function thxbob.lib.recipe.add_new_ingredient(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.add_new(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item))
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_type(item) then
BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.add_ingredient(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.add(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item))
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.set_ingredient(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].ingredients then
thxbob.lib.item.set(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item))
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.add_result(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then
thxbob.lib.result_check(data.raw.recipe[recipe])
thxbob.lib.item.add(data.raw.recipe[recipe].results, item)
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Item %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.set_result(recipe, item)
if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then
if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then
thxbob.lib.result_check(data.raw.recipe[recipe])
thxbob.lib.item.set(data.raw.recipe[recipe].results, item)
end
else
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then
BioInd.writeDebug("Item %s does not exist.", {thxbob.lib.item.basic_item(item).name})
end
end
end
function thxbob.lib.recipe.remove_result(recipe, item)
local f_name = "remove_result"
BioInd.writeDebug("Entered function %s(%s, %s)", {f_name, recipe, item})
if data.raw.recipe[recipe] then
if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then
thxbob.lib.result_check(data.raw.recipe[recipe])
thxbob.lib.item.remove(data.raw.recipe[recipe].results, item)
end
else
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
end

View file

@ -1,173 +1,173 @@
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.tech then thxbob.lib.tech = {} end
function thxbob.lib.tech.replace_science_pack(technology, old, new)
if data.raw.technology[technology] and data.raw.tool[new] then
local doit = false
local amount = 0
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == old then
doit = true
amount = ingredient[2] + amount
end
if ingredient.name == old then
doit = true
amount = ingredient.amount + amount
end
end
if doit then
thxbob.lib.tech.remove_science_pack(technology, old)
thxbob.lib.tech.add_science_pack(technology, new, amount)
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.tool[new] then
BioInd.writeDebug("Science pack %s does not exist.", {new})
end
end
end
function thxbob.lib.tech.add_new_science_pack(technology, pack, amount)
if data.raw.technology[technology] and data.raw.tool[pack] then
local addit = true
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == pack or ingredient.name == pack then addit = false end
end
if addit then table.insert(data.raw.technology[technology].unit.ingredients, {pack, amount}) end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.tool[pack] then
BioInd.writeDebug("Science pack %s does not exist.", {pack})
end
end
end
function thxbob.lib.tech.add_science_pack(technology, pack, amount)
if data.raw.technology[technology] and data.raw.tool[pack] then
local addit = true
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == pack then
addit = false
ingredient[2] = ingredient[2] + amount
end
if ingredient.name == pack then
addit = false
ingredient.amount = ingredient.amount + amount
end
end
if addit then
table.insert(data.raw.technology[technology].unit.ingredients, {pack, amount})
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology " .. tostring(technology) .. " does not exist.")
end
if not data.raw.tool[pack] then
BioInd.writeDebug("Science pack %s does not exist.", {pack})
end
end
end
function thxbob.lib.tech.remove_science_pack(technology, pack)
if data.raw.technology[technology] then
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == pack or ingredient.name == pack then
table.remove(data.raw.technology[technology].unit.ingredients, i)
end
end
else
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
end
function thxbob.lib.tech.add_recipe_unlock(technology, recipe)
if data.raw.technology[technology] and data.raw.recipe[recipe] then
local addit = true
if not data.raw.technology[technology].effects then
data.raw.technology[technology].effects = {}
end
for i, effect in pairs(data.raw.technology[technology].effects) do
if effect.type == "unlock-recipe" and effect.recipe == recipe then addit = false end
end
if addit then table.insert(data.raw.technology[technology].effects, {type = "unlock-recipe", recipe = recipe}) end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
end
end
function thxbob.lib.tech.remove_recipe_unlock(technology, recipe)
if data.raw.technology[technology] and data.raw.technology[technology].effects then
for i, effect in pairs(data.raw.technology[technology].effects) do
if effect.type == "unlock-recipe" and effect.recipe == recipe then
table.remove(data.raw.technology[technology].effects, i)
end
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
end
end
function thxbob.lib.tech.replace_prerequisite(technology, old, new)
if data.raw.technology[technology] and data.raw.technology[new] then
for i, prerequisite in ipairs(data.raw.technology[technology].prerequisites) do
if prerequisite == old then
thxbob.lib.tech.remove_prerequisite(technology, old)
thxbob.lib.tech.add_prerequisite(technology, new)
end
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.technology[new] then
BioInd.writeDebug("Technology %s does not exist.", {new})
end
end
end
function thxbob.lib.tech.add_prerequisite(technology, prerequisite)
if data.raw.technology[technology] and data.raw.technology[prerequisite] then
local addit = true
if data.raw.technology[technology].prerequisites then
for i, check in ipairs(data.raw.technology[technology].prerequisites) do
if check == prerequisite then addit = false end
end
else
data.raw.technology[technology].prerequisites = {}
end
if addit then table.insert(data.raw.technology[technology].prerequisites, prerequisite) end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.technology[prerequisite] then
BioInd.writeDebug("Technology %s does not exist.", {prerequisite})
end
end
end
function thxbob.lib.tech.remove_prerequisite(technology, prerequisite)
if data.raw.technology[technology] then
for i, check in ipairs(data.raw.technology[technology].prerequisites) do
if check == prerequisite then
table.remove(data.raw.technology[technology].prerequisites, i)
end
end
else
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
end
local BioInd = require('common')('Bio_Industries_2')
if not thxbob.lib.tech then thxbob.lib.tech = {} end
function thxbob.lib.tech.replace_science_pack(technology, old, new)
if data.raw.technology[technology] and data.raw.tool[new] then
local doit = false
local amount = 0
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == old then
doit = true
amount = ingredient[2] + amount
end
if ingredient.name == old then
doit = true
amount = ingredient.amount + amount
end
end
if doit then
thxbob.lib.tech.remove_science_pack(technology, old)
thxbob.lib.tech.add_science_pack(technology, new, amount)
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.tool[new] then
BioInd.writeDebug("Science pack %s does not exist.", {new})
end
end
end
function thxbob.lib.tech.add_new_science_pack(technology, pack, amount)
if data.raw.technology[technology] and data.raw.tool[pack] then
local addit = true
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == pack or ingredient.name == pack then addit = false end
end
if addit then table.insert(data.raw.technology[technology].unit.ingredients, {pack, amount}) end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.tool[pack] then
BioInd.writeDebug("Science pack %s does not exist.", {pack})
end
end
end
function thxbob.lib.tech.add_science_pack(technology, pack, amount)
if data.raw.technology[technology] and data.raw.tool[pack] then
local addit = true
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == pack then
addit = false
ingredient[2] = ingredient[2] + amount
end
if ingredient.name == pack then
addit = false
ingredient.amount = ingredient.amount + amount
end
end
if addit then
table.insert(data.raw.technology[technology].unit.ingredients, {pack, amount})
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology " .. tostring(technology) .. " does not exist.")
end
if not data.raw.tool[pack] then
BioInd.writeDebug("Science pack %s does not exist.", {pack})
end
end
end
function thxbob.lib.tech.remove_science_pack(technology, pack)
if data.raw.technology[technology] then
for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do
if ingredient[1] == pack or ingredient.name == pack then
table.remove(data.raw.technology[technology].unit.ingredients, i)
end
end
else
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
end
function thxbob.lib.tech.add_recipe_unlock(technology, recipe)
if data.raw.technology[technology] and data.raw.recipe[recipe] then
local addit = true
if not data.raw.technology[technology].effects then
data.raw.technology[technology].effects = {}
end
for i, effect in pairs(data.raw.technology[technology].effects) do
if effect.type == "unlock-recipe" and effect.recipe == recipe then addit = false end
end
if addit then table.insert(data.raw.technology[technology].effects, {type = "unlock-recipe", recipe = recipe}) end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.recipe[recipe] then
BioInd.writeDebug("Recipe %s does not exist.", {recipe})
end
end
end
function thxbob.lib.tech.remove_recipe_unlock(technology, recipe)
if data.raw.technology[technology] and data.raw.technology[technology].effects then
for i, effect in pairs(data.raw.technology[technology].effects) do
if effect.type == "unlock-recipe" and effect.recipe == recipe then
table.remove(data.raw.technology[technology].effects, i)
end
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
end
end
function thxbob.lib.tech.replace_prerequisite(technology, old, new)
if data.raw.technology[technology] and data.raw.technology[new] then
for i, prerequisite in ipairs(data.raw.technology[technology].prerequisites) do
if prerequisite == old then
thxbob.lib.tech.remove_prerequisite(technology, old)
thxbob.lib.tech.add_prerequisite(technology, new)
end
end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.technology[new] then
BioInd.writeDebug("Technology %s does not exist.", {new})
end
end
end
function thxbob.lib.tech.add_prerequisite(technology, prerequisite)
if data.raw.technology[technology] and data.raw.technology[prerequisite] then
local addit = true
if data.raw.technology[technology].prerequisites then
for i, check in ipairs(data.raw.technology[technology].prerequisites) do
if check == prerequisite then addit = false end
end
else
data.raw.technology[technology].prerequisites = {}
end
if addit then table.insert(data.raw.technology[technology].prerequisites, prerequisite) end
else
if not data.raw.technology[technology] then
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
if not data.raw.technology[prerequisite] then
BioInd.writeDebug("Technology %s does not exist.", {prerequisite})
end
end
end
function thxbob.lib.tech.remove_prerequisite(technology, prerequisite)
if data.raw.technology[technology] then
for i, check in ipairs(data.raw.technology[technology].prerequisites) do
if check == prerequisite then
table.remove(data.raw.technology[technology].prerequisites, i)
end
end
else
BioInd.writeDebug("Technology %s does not exist.", {technology})
end
end

File diff suppressed because it is too large Load diff

View file

@ -1,142 +1,142 @@
--- Utils for grouping
function group_entities(entity_list)
return group_entities(nil, entity_list)
end
function group_entities(entity_groupid, entity_list)
return group("entities", entity_groupid, entity_list)
end
function getGroup_entities(entity_groupid)
return getGroup("entities", entity_groupid)
end
function getGroup_entities_by_member(entity_id)
return getGroup_byMember("entities", entity_id)
end
function ungroup_entities(entity_groupid)
return ungroup("entities", entity_groupid)
end
-------------------------------------------------------------------
-- Grouping
--
function group(index_id, group_id, members)
_init_group(index_id, group_id)
if index_id == nil then
index_id = "default"
end
if group_id then
for ix, vx in ipairs(members) do
_addto_group(index_id, group_id, vx)
end
return group_id
else
-- no GID, then assign one
return group(index_id, _new_group(index_id), members)
end
end
function getGroup(index_id, group_id)
_init_group(index_id, group_id)
if group_id then
return _get_group(index_id, group_id)
else
return nil
end
end
function getGroup_byMember(index_id, group_id, member_id)
_init_group(index_id, group_id)
if member_id then
return _of_group(index_id, group_id, entity_id)
else
return nil
end
end
function ungroup(index_id, group_id)
_init_group(index_id, group_id)
if group_id then
return _clear_group(index_id, group_id)
else
return false
end
end
-------------------------------------------------------------------
function _init_group(index_id)
if not storage.group then
storage.group = {}
end
if not storage.group.default then
storage.group.default = {}
end
if index_id and not storage.group[index_id] then
-- don't care if they name their group "default"
storage.group[index_id] = {}
end
end
function _new_group(index_id)
local group_id_n = 0
local group_id_r = nil
while group_id_r == nil do
local group_id_x = "gid-" .. (group_id_n + #storage.group[index_id])
if storage.group[index_id][group_id_x] then
-- collision
group_id_n = group_id_n + 1
else
group_id_r = group_id_x
end
end
return group_id_r
end
function _addto_group(index_id, group_id, member_id)
if storage.group[index_id] then
if not storage.group[index_id][group_id] then
storage.group[index_id][group_id] = {}
end
end
table.insert(storage.group[index_id][group_id], member_id)
end
function _get_group(index_id, group_id)
return storage.group[index_id][group_id]
end
function _of_group(index_id, member_id)
--full scan
for kx, vx in pairs(storage.group[index_id]) do
for ky, vy in pairs(vx) do
if member_id == vy then
return vx
end
end
end
return nil
end
function _clear_group(index_id, group_id)
storage.group[index_id][group_id] = nil
end
-------------------------------------------------------------------
-------------------------------------------------------------------
-- Cantor Hash
-------------------------------------------------------------------
function cantor(k1, k2)
return (0.5 * (k1+k2) * (k1+k2+1) + k2)
end
-------------------------------------------------------------------
--- Utils for grouping
function group_entities(entity_list)
return group_entities(nil, entity_list)
end
function group_entities(entity_groupid, entity_list)
return group("entities", entity_groupid, entity_list)
end
function getGroup_entities(entity_groupid)
return getGroup("entities", entity_groupid)
end
function getGroup_entities_by_member(entity_id)
return getGroup_byMember("entities", entity_id)
end
function ungroup_entities(entity_groupid)
return ungroup("entities", entity_groupid)
end
-------------------------------------------------------------------
-- Grouping
--
function group(index_id, group_id, members)
_init_group(index_id, group_id)
if index_id == nil then
index_id = "default"
end
if group_id then
for ix, vx in ipairs(members) do
_addto_group(index_id, group_id, vx)
end
return group_id
else
-- no GID, then assign one
return group(index_id, _new_group(index_id), members)
end
end
function getGroup(index_id, group_id)
_init_group(index_id, group_id)
if group_id then
return _get_group(index_id, group_id)
else
return nil
end
end
function getGroup_byMember(index_id, group_id, member_id)
_init_group(index_id, group_id)
if member_id then
return _of_group(index_id, group_id, entity_id)
else
return nil
end
end
function ungroup(index_id, group_id)
_init_group(index_id, group_id)
if group_id then
return _clear_group(index_id, group_id)
else
return false
end
end
-------------------------------------------------------------------
function _init_group(index_id)
if not storage.group then
storage.group = {}
end
if not storage.group.default then
storage.group.default = {}
end
if index_id and not storage.group[index_id] then
-- don't care if they name their group "default"
storage.group[index_id] = {}
end
end
function _new_group(index_id)
local group_id_n = 0
local group_id_r = nil
while group_id_r == nil do
local group_id_x = "gid-" .. (group_id_n + #storage.group[index_id])
if storage.group[index_id][group_id_x] then
-- collision
group_id_n = group_id_n + 1
else
group_id_r = group_id_x
end
end
return group_id_r
end
function _addto_group(index_id, group_id, member_id)
if storage.group[index_id] then
if not storage.group[index_id][group_id] then
storage.group[index_id][group_id] = {}
end
end
table.insert(storage.group[index_id][group_id], member_id)
end
function _get_group(index_id, group_id)
return storage.group[index_id][group_id]
end
function _of_group(index_id, member_id)
--full scan
for kx, vx in pairs(storage.group[index_id]) do
for ky, vy in pairs(vx) do
if member_id == vy then
return vx
end
end
end
return nil
end
function _clear_group(index_id, group_id)
storage.group[index_id][group_id] = nil
end
-------------------------------------------------------------------
-------------------------------------------------------------------
-- Cantor Hash
-------------------------------------------------------------------
function cantor(k1, k2)
return (0.5 * (k1+k2) * (k1+k2+1) + k2)
end
-------------------------------------------------------------------

Binary file not shown.

View file

@ -0,0 +1,102 @@
[recipe-description]
bi-acid=Man braucht kein Öl, um Schwefelsäure zu gewinnen — es geht auch mit nachwachsenden Ressourcen!
bi-adv-fertiliser-1=__ITEM__bi-adv-fertiliser__ (__ITEM__alien-artifact__)
bi-adv-fertiliser-2=__ITEM__bi-adv-fertiliser__
bi-fertiliser-1=__ITEM__fertiliser__
bi-fertiliser-2=__ITEM__fertiliser__ (mit Natriumhydroxid)
#~ bi-arboretum-r1=Bäume pflanzen
#~ bi-arboretum-r2=Gelände verändern (__ITEM__fertiliser__)
#~ bi-arboretum-r3=Gelände verändern (__ITEM__bi-adv-fertiliser__)y
#~ bi-arboretum-r4=Gelände verändern & Bäume pflanzen (__ITEM__fertiliser__)
#~ bi-arboretum-r5=Gelände verändern & Bäume pflanzen (__ITEM__bi-adv-fertiliser__)
#~ bi-arboretum-r-fertilise+plant=Düngt den Boden und pflanzt Bäume, sobald der Radar einen Sektor vollständig abgetastet hat.
#~ bi-arboretum-r-fertilise=Düngt den Boden, sobald der Radar einen Sektor vollständig abgetastet hat.
bi-arboretum-r1=Pflanzt Bäume, sobald der Radar einen Sektor vollständig abgetastet hat.
bi-arboretum-r2=Düngt den Boden, sobald der Radar einen Sektor vollständig abgetastet hat.
bi-arboretum-r3=Düngt den Boden, sobald der Radar einen Sektor vollständig abgetastet hat.
bi-arboretum-r4=Düngt den Boden und pflanzt Bäume, sobald der Radar einen Sektor vollständig abgetastet hat.
bi-arboretum-r5=Düngt den Boden und pflanzt Bäume, sobald der Radar einen Sektor vollständig abgetastet hat.
bi-ash-1=__ITEM__bi-ash__ aus __ITEM__wood__
bi-ash-2=__ITEM__bi-ash__ aus __ITEM__bi-woodpulp__
bi-basic-gas-processing=Flüssiggas aus __ITEM__coal__ und __ITEM__resin__
#~ bi-basic-pumpjack-disassemble=Demontage: Brennerflüssigkeitspumpe
#~ bi-battery=Bio-Batterie
bi-biomass-1=Nimm __ITEM__fertiliser__, vermische es mit Wasser — und fertig ist die erste Biomasse!
bi-biomass-2=Vermische etwas Biomasse mit Wasser und Flüssigluft, damit sie sich vermehrt!
bi-biomass-3=Durch Zugabe von __ITEM__bi-ash__ lässt sich in kurzer Zeit ein Vielfaches an Biomasse herstellen!
bi-biomass-conversion-1=Stelle __ITEM__bi-cellulose__ und Leichtöl aus Biomasse her!
bi-biomass-conversion-2=Stelle Flüssiggas aus Biomasse her!
bi-biomass-conversion-3=Stelle Schmiermittel aus Biomasse her!
bi-biomass-conversion-4=Stelle Rohöl und Wasser/Schwefelhaltiges Wasser aus Biomasse her!
bi-disassemble-recipes=Ein Teil der Materialien kann wiederverwendet werden.
#~ bi-burner-inserter-disassemble=__ENTITY__burner-inserter__ zerlegen
#~ bi-burner-mining-drill-disassemble=__ENTITY__burner-mining-drill__ zerlegen
bi-cellulose-1=Produktion von __ITEM__bi-cellulose__ (einfach)
bi-cellulose-2=Produktion von __ITEM__bi-cellulose__ (verbessert)
bi-charcoal-1=__ITEM__wood-charcoal__ aus __ITEM__bi-woodpulp__
bi-charcoal-2=__ITEM__wood-charcoal__ aus __ITEM__wood__
bi-coal-1=Produktion von __ITEM__coal__ (einfach)
bi-coal-2=Produktion von __ITEM__coal__ (verbessert)
bi-coke-coal=__ITEM__pellet-coke__ aus __ITEM__coal__
bi-crushed-stone-1=__ITEM__stone-crushed__ aus __ITEM__stone__
bi-crushed-stone-2=__ITEM__stone-crushed__ aus __ITEM__concrete__
bi-crushed-stone-3=__ITEM__stone-crushed__ aus __ITEM__hazard-concrete__
bi-crushed-stone-4=__ITEM__stone-crushed__ aus __ITEM__refined-concrete__
bi-crushed-stone-5=__ITEM__stone-crushed__ aus __ITEM__refined-hazard-concrete__
#~ bi-liquid-air=Flüssigluft
bi-logs-1=Bekommt er ordentlich Wasser, wächst aus einem Setzling ein Baum, der gleich zu __ITEM__wood__ und __ITEM__bi-woodpulp__ verarbeitet wird.
bi-logs-2=__ITEM__bi-ash__ beschleunigt das Wachstum.
bi-logs-3=__ITEM__fertiliser__ ist wohl gesund für Pflanzen jedenfalls wachsen die Bäume damit noch schneller heran.
bi-logs-4=Hier wird __ITEM__bi-adv-fertiliser__ eingesetzt. Muss ich noch mehr sagen?
bi-seed-1=Man braucht nicht viel mehr als __ITEM__wood__ und Wasser, um an __ITEM__bi-seed__ zu kommen.
bi-seed-2=Durch Zugabe von __ITEM__bi-ash__ erzielt man in kürzerer Zeit höhere Erträge.
bi-seed-3=Mit __ITEM__fertiliser__ erhält man noch viel mehr __ITEM__bi-seed__.
bi-seed-4=__ITEM__bi-adv-fertiliser__ für die Superproduktion von __ITEM__bi-seed__!
bi-seedling-1=Mit etwas Wasser wächst aus __ITEM__bi-seed__ ein __ENTITY__seedling__ heran.
bi-seedling-2=__ITEM__bi-ash__ verbessert das Wachstum.
bi-seedling-3=Wer seine Produktion steigern will, kommt nicht an __ITEM__fertiliser__ vorbei!
bi-seedling-4=__ITEM__bi-adv-fertiliser__ macht Supererträge bei der Produktion von __ENTITY__seedling__ möglich!
bi-seed-bomb-advanced=Pflanze Bäume in einem großen Radius mittels einer Samenbombe (__ITEM__bi-adv-fertiliser__)!
bi-seed-bomb-basic=Pflanze Bäume in einem großen Radius mittels einer Samenbombe!
bi-seed-bomb-standard=Pflanze Bäume in einem großen Radius mittels einer Samenbombe (__ITEM__fertiliser__)!
#~ bi-long-handed-inserter-disassemble=__ENTITY__long-handed-inserter__ zerlegen
#~ bi-mineralized-sulfuric-waste=Mineralized water & sulfuric waste from crushed stone, charcoal and pure water
bi-pellet-coke=__ITEM__pellet-coke__ aus __ITEM__solid-fuel__
bi-pellet-coke-2=__ITEM__pellet-coke__ aus Kohlenstoff
bi-plastic-1=Bio-__ITEM__plastic-bar__ aus __ITEM__wood__
bi-plastic-2=Bio-__ITEM__plastic-bar__ aus __ITEM__bi-cellulose__
bi-purified-air-1=__ITEM__bi-purified-air__ (__ITEM__fertiliser__)
bi-purified-air-2=__ITEM__bi-purified-air__ (__ITEM__bi-adv-fertiliser__)
bi-resin-pulp=__ITEM__resin__ aus __ITEM__bi-woodpulp__
bi-resin-wood=__ITEM__resin__ aus __ITEM__wood__
bi-solid-fuel=__ITEM__solid-fuel__ aus __ITEM__wood-bricks__
#~ bi-steel-furnace-disassemble=__ENTITY__steel-furnace__ zerlegen
#~ bi-stone-brick=Bio-__ITEM__stone-brick__
#~ bi-stone-furnace-disassemble=__ENTITY__stone-furnace__ zerlegen
bi-sulfur-angels=Bio-__ITEM__sulfur__
bi-sulfur=Bio-__ITEM__sulfur__
bi-wood-from-pulp=__ITEM__wood__ aus __ITEM__bi-woodpulp__
bi-rail-wood-to-concrete=__ENTITY__bi-rail-wood__ aufwerten
bi-slag-slurry=Slag slurry from ash, crushed stone and saline water
bi-sand=__ITEM__sand__ from __ITEM__stone-crushed__

View file

@ -0,0 +1,569 @@
[mod-setting-name]
BI_Bio_Cannon=Enable: Prototype Artillery
BI_Bio_Fuel=Enable: Bio fuel production
BI_Game_Tweaks_Bot=Game tweaks: Bots
BI_Game_Tweaks_Disassemble=Game tweaks: Disassemble recipes
BI_Game_Tweaks_Emissions_Multiplier=Game tweaks: Fuel emission multipliers
BI_Game_Tweaks_Player=Game tweaks: Player
BI_Game_Tweaks_Recipe=Game tweaks: Recipe
BI_Game_Tweaks_Stack_Size=Game tweaks: Stack size
BI_Game_Tweaks_Tree=Game tweaks: Tree yield
BI_Game_Tweaks_Small_Tree_Collisionbox=Game tweaks: Smaller collision boxes for trees
BI_Game_Tweaks_Production_Science=Game tweaks: Alternative recipe for __ITEM__production-science-pack__
#~ BI_Hide_musk_floor_in_mapview=Hide electric grid overlay for Musk floor in map view
BI_Show_musk_floor_in_mapview=Enable: Electric grid overlay for __ENTITY__bi-solar-mat__ in map view
BI_Solar_Additions=Enable: Bio solar additions
BI_Enable_gvv_support=Compatibility: Add support for GVV
[mod-setting-description]
BI_Bio_Cannon=The Prototype artillery is very powerful, but will only fire at spawners
BI_Bio_Fuel=Enables the production of oil products using bio fuels
BI_Game_Tweaks_Bot=Bots can't be mined or catch fire
BI_Game_Tweaks_Disassemble=Allow some disassemble recipes. You get about 50% of the resources back
BI_Game_Tweaks_Emissions_Multiplier=Bob started this. The general idea is that unprocessed fuels cause more pollution than more refined fules. Thus coal would produce 200% pollution, while solid fuel would produce only 85%. Please see "Fuel Values.xlsx" in mod folder for more info!
#~ BI_Game_Tweaks_Player=Build, drop & reach distance: 6 => 20; Reach for item pickup 1 => 4; Resource reach distance: 2.7 => 4; Loot pickup distance: 2 => 5
BI_Game_Tweaks_Player=Build, drop & reach distance: 6 => 20\nReach distance for item pickup 1 => 4\nResource reach distance: 2.7 => 4\nLoot pickup distance: 2 => 5
#~ BI_Game_Tweaks_Recipe=Recipes Affected: CONCRETE Remove: Iron Ore Add: Iron Stick, STONE-WALL Add: Iron Stick, RAIL Remove: stone Add: crushed-stone and Concrete, STEEL-AXE Remove: Iron-Stick Add: Iron-Axe
BI_Game_Tweaks_Recipe=Affected recipes:\nConcrete (Iron ore => Iron stick)\nStone wall(Iron stick added)\nRail (stone => crushed-stone + concrete)
BI_Game_Tweaks_Stack_Size=Affects stack sizes of wood, stone, crushed-stone, concrete & slag
BI_Game_Tweaks_Tree=Game tweaks - trees randomly provide 1 to 6 wood when chopped down. Vanilla=4
BI_Game_Tweaks_Small_Tree_Collisionbox=EXPERIMENTAL: This setting is enabled per default. If it isn't, trees will have the bigger vanilla collision box, making forests more likely to block players, vehicles, and biters. Not sure if this will have any side effects!
BI_Game_Tweaks_Production_Science=If this is enabled, an alternative recipe for Production science packs will be available.\n(Default: on)
#~ BI_Hide_musk_floor_in_mapview=In map view, the electric grid overlay will be hidden for Musk floor if this setting is enabled. This shouldn't be changed in a running game as applying the setting to every Musk floor tile may take some time!
BI_Show_musk_floor_in_mapview=Show the electric grid overlay for __ENTITY__bi-solar-mat__ in map view. This shouldn't be changed in a running game as applying the setting to every __ENTITY__bi-solar-mat__ tile may take some time!\n(Default: on)
BI_Solar_Additions=Enables solar items like the solar farm, solar power plant, bio accumulator and huge substation
BI_Enable_gvv_support=The "Lua API global Variable Viewer" (gvv) allows you to inspect the global table of other mods. If you want to help debugging "Bio Industries", enable this and type "\gvv" at the chat console to open the GUI of gvv.\n(Default: off)
[technology-name]
bi-tech-advanced-biotechnology=Advanced biotechnology
bi-tech-bio-cannon=Prototype artillery
bi-tech-bio-farming=Bio farm
bi-tech-coal-processing-1=Coal processing 1
bi-tech-coal-processing-2=Coal processing 2
bi-tech-coal-processing-3=Coal processing 3
bi-tech-fertiliser=Fertilizer
bi-tech-organic-plastic=Organic plastic
[technology-description]
bi-tech-advanced-biotechnology=Unlock higher tiered recipes
bi-tech-bio-cannon=Prototype artillery turret technology. - Not yet capable of manual targeting
bi-tech-bio-farming=Learn how to grow trees -- the first step towards unlocking other wood products
bi-tech-coal-processing-1=Burn wood to get charcoal and ash
bi-tech-coal-processing-2=Process charcoal to coal and solid fuel to pellet-coke
bi-tech-coal-processing-3=Process charcoal more efficiently and produce pellet-coke from coal
bi-tech-fertiliser=Using fertilisers you can get much more output from recipes
bi-tech-organic-plastic=Produce plastics using organic materials
[entity-name]
bi-arboretum-area=Terraformer
bi-arboretum-radar=Terraformer radar
bi-arboretum=Terraformer
bi-bio-accumulator=Huge accumulator
bi-bio-boiler=Bio boiler
bi-bio-cannon-area=Prototype artillery
bi-bio-cannon=Prototype artillery
bi-bio-farm-electric-pole=Bio farm cabling
bi-bio-farm-light=Bio farm heat lamps
bi-bio-farm-solar-panel=Bio farm solar
bi-bio-farm=Bio farm
bi-bio-garden-light=Bio garden light
bi-bio-garden=Bio garden
bi-bio-greenhouse=Bio nursery
bi-bio-reactor=Bioreactor
bi-bio-solar-farm=Bio solar farm
bi-burner-pump=Burner fluid pump
bi-cokery=Cokery
#~ These strings are obsolete!
#~ bi-curved-rail-power=Powered rail
#~ bi-curved-rail-wood-bridge=Wooden curved rail used for bridges
#~ bi-curved-rail-wood=Wooden curved rail
bi-dart-magazine-basic=Basic dart ammo
bi-dart-magazine-enhanced=Enhanced dart ammo
bi-dart-magazine-poison=Poison dart ammo
bi-dart-magazine-standard=Standard dart ammo
bi-dart-turret=Dart turret
#~ These strings seem to be obsolete!
#~ bi-ground-steam=Natural steam
#~ bi-ground-sulfuric-acid=Natural sulfuric acid
#~ bi-ground-water=Water
bi-large-substation=Huge substation
bi-musk-mat-pole=Hidden power pole for Musk mat
bi-musk-mat-solar-panel=Musk floor
bi-power-to-rail-pole=Rail to power connector
# Obsolete
#~ bi-solar-boiler-panel=Solar power plant & boiler
bi-solar-boiler=Solar power plant & boiler
bi-solar-mat=Musk floor
bi-stone-crusher=Stone crusher
#~ bi-straight-rail-power=Powered rail
bi-rail-power=Powered rail
#~ bi-straight-rail-wood-bridge=Wooden straight rail used for bridges
bi-rail-wood-bridge=Wooden rail used for bridges
#~ bi-straight-rail-wood=Wooden straight rail
bi-rail-wood=Wooden rail
bi-wood-pipe-to-ground=Wood pipe to ground
bi-wood-pipe=Wood pipe
bi-wooden-chest-giga=Huge wooden chest
bi-wooden-chest-huge=Large wooden chest
bi-wooden-chest-large=Medium wooden chest
bi-wooden-fence=Wooden fence
bi-wooden-pole-big=Big wooden pole
bi-wooden-pole-huge=Huge wooden pole
seedling-2=Sapling
seedling-3=Sapling
seedling=Sapling
wooden-chest=Small wooden chest
rail-remnants-wood=Remnants of wooden rails
rail-remnants-wood-bridge=Remnants of a wooden bridge
[entity-description]
bi-arboretum-area=Terraformer to change the terrain or plant trees around the building
bi-arboretum-radar=Terraformer radar
bi-arboretum=Terraformer to change the terrain or plant trees around the building
bi-bio-accumulator=Can store very large amounts of energy, because size matters...
bi-bio-boiler=These boilers are as efficient as normal ones, but produce 75% less pollution!
#~ bi-bio-cannon-area=Can ONLY fire at spawners and worms! - Range 90 - Not yet capable of manual targeting
bi-bio-cannon=Can ONLY fire at spawners and worms! (Range: 90)\nThis prototype isn't capable of manual targeting.
#~ bi-bio-farm-electric-pole=Bio farm cabling (Hidden)
#~ bi-bio-farm-light=Bio farm heat lamps, so trees can grow at night (Hidden)
#~ bi-bio-farm-solar-panel=Bio farm solar (Hidden)
#~ bi-bio-farm=Bio farm, turn saplings into raw wood. Consumes more electricity at night
bi-bio-farm=Bio farms are where saplings grow into trees that are processed to raw wood and wood pulp. An integrated solar panel provides some of the energy during the day.
bi-bio-garden-light=The garden also acts as a lamp at night. (Hidden)
bi-bio-garden=The bio garden scrubs air, removing pollution. (One bio garden can absorb 45 pollution units per second -- as much as 1500 trees!)
bi-bio-greenhouse=Use a nursery to grow saplings
bi-bio-reactor=Bio-reactors are used to produce and process biomass.
bi-bio-solar-farm=Bio solar farm save space by condensing your solar panels into a compact unit. They create a lot of power!\Using Bio solar farms instead of the original solar panels will also improve performance because less entities require less updates per second (UPS).
bi-burner-pump=Burner fluid pump
bi-cokery=Wood and wood pulp are processed to charcoal and other fuels in the cokery.
#~ These strings are obsolete!
#~ bi-curved-rail-power=Rail that also conducts electricity. Connect to power grid using "power to rail" connector
#~ bi-curved-rail-wood-bridge=Wooden curved rail used for bridges.\nNote: You can't walk on this!
#~ bi-curved-rail-wood=Wooden curved rail
bi-dart-magazine-basic=Basic wooden projectiles
bi-dart-magazine-enhanced=Enhanced wooden projectiles
bi-dart-magazine-poison=Poisoned wooden projectiles
bi-dart-magazine-standard=Standard wooden projectiles
#~ These strings seem to be obsolete!
#~ bi-ground-steam=Natural steam
#~ bi-ground-sulfuric-acid=Natural sulfuric acid
#~ bi-ground-water=Water
bi-large-substation=Huge substation
bi-musk-mat-pole=Hidden power pole for Musk mat
bi-musk-mat-solar-panel=Power from Musk floor
bi-power-to-rail-pole=Connect your power rail to the power grid!\nATTENTION: When you place a connector in reach of two powered rails that are running parallel or crossing each other, you will connect these networks!
#~ Remove?
bi-solar-boiler-panel=A boiler that uses solar energy or electricity (also produces electricity).
#~ Changed
#~ bi-solar-boiler=A boiler that uses solar energy or electricity (also produces electricity).
bi-solar-boiler=This boiler uses solar energy or electricity to produce electricity.
#~ bi-solar-mat=A solar panel/floor that can be used as a pavement, generates 10kW electricity and fast movement. (Thanks Elon Musk!)
bi-solar-mat=This special pavement contains solar panels. Each tile will generate 10kW of electricity and grant you fast movement speed. (Thanks, Elon Musk!)
#~ bi-stone-crusher=Machine to break stone into crushed stone
bi-stone-crusher=These machines crush stone and concrete. If necessary, you can also use them to make sand from crushed stone.
#~ bi-straight-rail-wood-bridge=Wooden straight rail used for bridges.\nNote: You can't walk on this!
bi-rail-wood-bridge=Wooden straight rail used for bridges.\nNote: You can't walk on this!
#~ bi-straight-rail-wood=Wooden straight rail
bi-rail-wood=Wooden straight rail
#~ bi-straight-rail-power=Rail that also conducts electricity. Connect to power grid using "power to rail" connector
bi-rail-power=Rail that also conducts electricity. Connect to power grid using "power to rail" connector
bi-wood-pipe-to-ground=Wood pipe to ground
bi-wood-pipe=Wooden pipe
bi-wooden-chest-giga=A HUGE wooden chest
bi-wooden-chest-huge=A very large wooden chest
bi-wooden-chest-large=A medium wooden chest
#~ bi-wooden-fence=A defensive wall made from wood
bi-wooden-fence=Though not very strong, wooden fences help you right from the start to keep enemies out of your factory.
bi-wooden-pole-big=Big wooden power pole. Will auto heal if you play with NE enemies
bi-wooden-pole-huge=A huge wooden pole for spanning vast distances (64 tiles) with copper cable or circuit network wires
seedling-2=A young tree, perfect for planting. You can also plant this in the ground and it will grow into a tree. Remember to first fertilize the ground to improve the chances of it growing
seedling-3=A young tree, perfect for planting. You can also plant this in the ground and it will grow into a tree. Remember to first fertilize the ground to improve the chances of it growing
seedling=A young tree, perfect for planting. You can also plant this in the ground and it will grow into a tree. Remember to first fertilize the ground to improve the chances of it growing
rail-remnants-wood=Remnants of wooden rails
rail-remnants-wood-bridge=Remnants of a wooden bridge
[item-name]
bi-adv-fertiliser=Advanced fertiliser
bi-arboretum-area=Terraformer
bi-arboretum-r1=Plant trees
bi-arboretum-r2=Change terrain (basic)
bi-arboretum-r3=Change terrain (advanced)
bi-arboretum-r4=Change terrain & plant trees (basic)
bi-arboretum-r5=Change terrain & plant trees (advanced)
bi-arboretum=Terraformer
bi-ash=Ash
bi-bio-accumulator=Huge accumulator
bi-bio-boiler=Bio boiler
bi-bio-cannon-area=Prototype artillery
bi-bio-cannon-basic-ammo=Prototype artillery - rocket ammo
bi-bio-cannon-biological-ammo=Prototype artillery - biological ammo
bi-bio-cannon-poison-ammo=Prototype artillery - poison ammo
bi-bio-cannon-proto-ammo=Prototype artillery - basic ammo
bi-bio-cannon=Prototype artillery
bi-bio-farm=Bio farm
bi-bio-reactor=Bioreactor
bi-bio-solar-farm=Bio solar farm
bi-burner-pump=Burner fluid pump
bi-cellulose=Cellulose
bi-cokery=Cokery
bi-dart-magazine-basic=Basic dart ammo
bi-dart-magazine-enhanced=Enhanced dart ammo
bi-dart-magazine-poison=Poison dart ammo
bi-dart-magazine-standard=Standard dart ammo
bi-dart-rifle=Dart rifle
bi-dart-turret=Dart turret
bi-ground-water=Water
bi-large-substation=Huge substation
#~ Obsolete
#~ bi-medicine=Medicine
#~ Do we need localizations for hidden entities?
#~ bi-musk-mat-pole=Hidden power pole for Musk mat
#~ bi-musk-mat-solar-panel=Musk floor
#~ Obsolete?
#~ bi-nutrients=Nutrients
bi-power-to-rail-pole=Rail to power connector
bi-purified-air=Purified air
bi-rail-power=Power rail
bi-rail-wood-bridge=Wooden rail bridge
bi-rail-wood=Wooden rail
bi-seed-bomb-advanced=Advanced seed bomb
bi-seed-bomb-basic=Basic seed bomb
bi-seed-bomb-standard=Standard seed bomb
bi-seed=Seed
bi-solar-boiler=Solar power plant & boiler
bi-solar-boiler-panel=Solar power plant & boiler
bi-solar-mat=Musk floor
bi-stone-crusher=Stone crusher
bi-wood-pipe-to-ground=Wooden pipe to ground
bi-wood-pipe=Wooden pipe
bi-wooden-chest-giga=Huge wooden chest
bi-wooden-chest-huge=Large wooden chest
bi-wooden-chest-large=Medium wooden chest
bi-wooden-fence=Wooden fence
bi-wooden-pole-big=Big wooden power pole. Will auto heal if you play with NE enemies
bi-wooden-pole-huge=Huge wooden pole
bi-woodpulp=Wood pulp
fertiliser=Fertilizer
pellet-coke=Pellet coke
resin=Resin
seedling=Sapling
stone-crushed=Crushed stone
#~ Obsolete? This is only used in a compatibility recipe for bi-slag-slurry if angelsrefining is active!
water-saline=Saline water
wood-bricks=Wood bricks
wood-charcoal=Charcoal
[item-description]
bi-adv-fertiliser=Improved fertilizer for growing stuff even faster or changing terrain quality
bi-arboretum-area=Terraformer to change the terrain or plant trees around the building
bi-arboretum-r1=Plant trees around the building
bi-arboretum-r2=Change terrain around the building (basic)
bi-arboretum-r3=Change terrain around the building (advanced)\nNote: Use advanced instead of basic fertiliser to make the ground more fertile.
bi-arboretum-r4=Change terrain & plant trees around the building (basic)
bi-arboretum-r5=Change terrain around the building (advanced)\nNote: Use advanced instead of basic fertiliser to make the ground more fertile, so that trees will grow faster.
bi-arboretum=Terraformer to change the terrain or plant trees around the building
bi-ash=Even ash can be used!
bi-bio-accumulator=Can store very large amounts of energy, because size matters...
#~ bi-bio-boiler=High efficiency boiler
bi-bio-boiler=These boilers are as efficient as normal ones, but produce 75% less pollution!
bi-bio-cannon-area=This early prototype of artillery can ONLY fire at spawners (maximum range: 90) and is not yet capable of manual targeting.
bi-bio-cannon-basic-ammo=Rocket powered, low physical damage
bi-bio-cannon-biological-ammo=Rocket powered, high biological damage
bi-bio-cannon-poison-ammo=Rocket powered, medium poison damage
bi-bio-cannon-proto-ammo=Low damage, most of the TNT is used for propulsion
bi-bio-cannon=This early prototype of artillery can ONLY fire at spawners (maximum range: 90) and is not yet capable of manual targeting.
bi-bio-farm=A greenhouse with powerful artificial lighting for growing saplings into trees (Wood)
bi-bio-solar-farm=Save space, by condensing your solar panels into a compact unit. Create a lot of power!
#~ Obsolete?
bi-burner-pump=Burner fluid pump
bi-dart-magazine-basic=Basic wooden projectiles
bi-dart-magazine-enhanced=Enhanced wooden projectiles
bi-dart-magazine-poison=Poisoned wooden projectiles
bi-dart-magazine-standard=Standard wooden projectiles
#~ bi-ground-water=Water
bi-large-substation=Huge substation
bi-musk-mat-pole=Hidden power pole for Musk mat
bi-musk-mat-solar-panel=Power from Musk floor
bi-power-to-rail-pole=Connect your power rail to the power grid
bi-purified-air=Clean air, pollution removed!
bi-rail-power=Rail that also conducts electricity (connect rails to the power grid with the "rail to power connector")
bi-rail-wood-bridge=Wooden rail bridge that can cross water.\nNote: You can't walk on this!
bi-rail-wood=Cheap rails made with wood
bi-seed-bomb-advanced=Plant trees in a large area, with advanced fertiliser via a seed bomb!
bi-seed-bomb-basic=Plant trees in a large area via a seed bomb!
bi-seed-bomb-standard=Plant trees in a large area, with fertiliser via a seed bomb!
bi-seed=Seed to grow a sapling from
bi-solar-boiler=A boiler that uses solar energy or electricity (also produces electricity).
bi-solar-boiler-panel=A boiler that uses solar energy or electricity (also produces electricity).
bi-solar-mat=A solar panel/floor that can be used as a pavement, generates 10kW electricity and fast movement. (Thanks Elon Musk!)
bi-stone-crusher=Machine to break stone into crushed stone
bi-wood-pipe-to-ground=A wood pipe to ground
bi-wood-pipe=A pipe made from wood
bi-wooden-chest-giga=A HUGE wooden chest
bi-wooden-chest-huge=A very large wooden chest
bi-wooden-chest-large=A medium wooden chest
bi-wooden-fence=A defensive wall made from wood
bi-wooden-pole-big=Big wooden power pole
bi-wooden-pole-huge=A huge wooden pole for spanning vast distances (64 tiles) with copper cable or circuit network wires
bi-woodpulp=Burn it to ash or charcoal, or convert it to wood bricks!
fertiliser=Fertilizer for growing stuff faster or changing terrain quality
pellet-coke=Pellet coke is a great train fuel
resin=Resin
seedling=A young tree, perfect for planting. You can also plant this in the ground and it will grow into a tree. Remember to first fertilize the ground to improve the chances of it growing!
stone-crushed=Crushed stone
#~ Obsolete? This is only used in a compatibility recipe for bi-slag-slurry if angelsrefining is active!
water-saline=Saline water
wood-bricks=Great processed fuel source with low emissions
[fluid-name]
bi-biomass=Algae biomass
#~ bi-ground-water=Water
liquid-air=Liquid air
nitrogen=Nitrogen
#~ Obsolete? This is only used in a compatibility recipe for bi-slag-slurry if angelsrefining is active!
water-saline=Saline water
[recipe-name]
bi-acid=Bio-acid
bi-adv-fertiliser-1=Advanced fertiliser
bi-adv-fertiliser-2=Advanced fertiliser
bi-arboretum-r1=Plant trees
bi-arboretum-r2=Change terrain (basic)
bi-arboretum-r3=Change terrain (advanced)
bi-arboretum-r4=Change terrain & plant trees (basic)
bi-arboretum-r5=Change terrain & plant trees (advanced)
bi-arboretum=Terraformer
bi-ash-1=Ash from wood
bi-ash-2=Ash from wood pulp
# Added bi-basic-petroleum-gas-processing (0.17.49/0.18.17)
# Renamed bi-basic-petroleum-gas-processing to bi-basic-gas-processing (0.17.51/0.18.20)
bi-basic-gas-processing=Basic gas processing
bi-battery=Bio battery
bi-bio-accumulator=Huge accumulator
bi-bio-boiler=Bio boiler
bi-bio-cannon-area=Prototype artillery
bi-bio-cannon-basic-ammo=Prototype artillery (rocket ammo)
bi-bio-cannon-biological-ammo=Prototype artillery (biological ammo)
bi-bio-cannon-poison-ammo=Prototype artillery (poison ammo)
bi-bio-cannon-proto-ammo=Prototype artillery (basic ammo)
bi-bio-cannon=Prototype artillery
bi-bio-farm=Bio farm
bi-bio-garden=Bio garden
bi-bio-greenhouse=Bio nursery
bi-bio-reactor=Bioreactor
bi-bio-solar-farm=Bio solar farm
bi-biomass-1=Algae biomass production with fertiliser
bi-biomass-2=Algae biomass production with algae biomass (basic)
bi-biomass-3=Algae biomass production with algae biomass (advanced)
bi-biomass-conversion-1=Bio fuel conversion 1: Cellulose, light oil
bi-biomass-conversion-2=Bio fuel conversion 2: Petroleum gas
bi-biomass-conversion-3=Bio fuel conversion 3: Lubricant
bi-biomass-conversion-4=Bio fuel conversion 4: Crude oil, water/sulfuric waste water
bi-burner-inserter-disassemble=Disassemble burner inserter
bi-burner-mining-drill-disassemble=Disassemble burner miner
bi-cellulose-1=Basic cellulose production
bi-cellulose-2=Advanced cellulose production
bi-charcoal-1=Charcoal from wood pulp
bi-charcoal-2=Charcoal from wood
bi-coal-1=Basic coal production
bi-coal-2=Advanced coal production
bi-coke-coal=Pellet coke
bi-cokery=Cokery
bi-crushed-stone-1=Crushed stone from stone
bi-crushed-stone-2=Crushed stone from concrete
bi-crushed-stone-3=Crushed stone from hazard concrete
bi-crushed-stone-4=Crushed stone from refined concrete
bi-crushed-stone-5=Crushed stone from refined hazard concrete
bi-dart-magazine-basic=Basic dart ammo
bi-dart-magazine-enhanced=Enhanced dart ammo
bi-dart-magazine-poison=Poison dart ammo
bi-dart-magazine-standard=Standard dart ammo
bi-dart-rifle=Dart rifle
bi-dart-turret=Dart turret
bi-fertiliser-1=Fertilizer
bi-fertiliser-2=Fertilizer
bi-large-substation=Huge substation
bi-liquid-air=Liquid air
bi-logs-1=Basic wood production
bi-logs-2=Improved wood production with ash
bi-logs-3=Advanced wood production with fertiliser
bi-logs-4=Super wood production with advanced fertiliser
bi-long-handed-inserter-disassemble=Disassemble long handed inserter
bi-mineralized-sulfuric-waste=Mineralized water & sulfuric waste
bi-nitrogen=Nitrogen
bi-pellet-coke=Pellet coke from solid fuel
bi-pellete-coal-2=Pellet-coal from carbon
bi-plastic-1=Bio plastic from wood
bi-plastic-2=Bio plastic from cellulose
bi-power-to-rail-pole=Rail to power connector
bi-press-wood=Press wood
bi-production-science-pack=Production science pack
bi-purified-air-1=Clean air (basic)
bi-purified-air-2=Clean air (advanced)
bi-rail-power=Power rail
bi-rail-wood-bridge=Wooden rail bridge
bi-rail-wood-to-concrete=Upgrade wooden rail
bi-rail-wood=Wooden rail
bi-resin-pulp=Resin from wood pulp
bi-resin-wood=Resin from wood
bi-sand=Sand from crushed stone
bi-seed-1=Basic tree seed production
bi-seed-2=Improved tree seed production with ash
bi-seed-3=Advanced tree seed production with fertiliser
bi-seed-4=Super tree seed production with advanced fertiliser
bi-seed-bomb-advanced=Advanced seed bomb
bi-seed-bomb-basic=Basic seed bomb
bi-seed-bomb-standard=Standard seed bomb
#~ bi-seedling=Sapling
bi-seedling-1=Basic sapling production
bi-seedling-2=Improved sapling production with ash
bi-seedling-3=Advanced sapling production with fertiliser
bi-seedling-4=Super sapling production with advanced fertiliser
bi-slag-slurry=Slag slurry
#~ bi-solar-boiler=Solar power plant & boiler (boiler)
bi-solar-boiler-panel=Solar power plant & boiler
bi-solar-boiler=Solar power plant & boiler
bi-solar-mat=Musk floor
bi-solid-fuel=Solid fuel from wood bricks
bi-steel-furnace-disassemble=Disassemble steel furnace
bi-stone-brick=Bio stone brick
bi-stone-crusher=Stone crusher
bi-stone-furnace-disassemble=Disassemble stone furnace
bi-sulfur-angels=Bio-sulfur
bi-sulfur=Bio-sulfur
bi-wood-from-pulp=Wood from wood pulp
bi-wood-fuel-brick=Wood bricks
bi-wood-pipe-to-ground=Wooden pipe to ground
bi-wood-pipe=Wood pipe
bi-wooden-chest-giga=Huge wooden chest
bi-wooden-chest-huge=Large wooden chest
bi-wooden-chest-large=Medium wooden chest
bi-wooden-fence=Wooden fence
bi-wooden-pole-big=Big wooden pole
bi-wooden-pole-huge=Huge wooden pole
bi-woodpulp=Wood pulp from wood
wooden-chest=Small wooden chest
[recipe-description]
bi-acid=Use algae biomass and cellulose to produce sulfuric acid!
bi-adv-fertiliser-1=Better than normal fertiliser
bi-adv-fertiliser-2=Better than normal fertiliser
bi-arboretum-r1=Note: The recipe will never complete, trees are planted on sector scan.
bi-arboretum-r2=Note: The recipe will never complete, trees are planted on sector scan.
bi-arboretum-r3=Note: The recipe will never complete, trees are planted on sector scan.
bi-arboretum-r4=Note: The recipe will never complete, trees are planted on sector scan.
bi-arboretum-r5=Note: The recipe will never complete, trees are planted on sector scan.
bi-arboretum=Plant trees or change the terrain around the building
bi-ash-1=Burn wood, get ash!
bi-ash-2=Burn lots of wood pulp, get lots of ash!
# Added bi-basic-petroleum-gas-processing (0.17.49/0.18.17)
# Renamed bi-basic-petroleum-gas-processing to bi-basic-gas-processing (0.17.51/0.18.20)
bi-basic-gas-processing=Inefficient gas extraction
bi-basic-pumpjack-disassemble=Dissasemble burner fluid pump at a small loss of materials
bi-bio-cannon-area=This early prototype of artillery can ONLY fire at spawners (maximum range: 90) and is not yet capable of manual targeting.
bi-bio-cannon-basic-ammo=Rocket powered, low physical damage
bi-bio-cannon-biological-ammo=Rocket powered, high biological damage
bi-bio-cannon-poison-ammo=Rocket powered, medium poison damage
bi-bio-cannon-proto-ammo=Low damage, most of the TNT is used for propulsion
bi-bio-cannon=This early prototype of artillery can ONLY fire at spawners (maximum range: 90) and is not yet capable of manual targeting.
bi-bio-farm=Bio farm to produce wood and wood pulp
bi-bio-greenhouse=Bio nursery to produce seeds and saplings
bi-biomass-1=Start up your algae biomass production by using fertiliser!
bi-biomass-2=Feed back some of the produced algae biomass to produce more of it!\nNote: This will yield less (and take longer) than using the start-up recipe, but you will save on fertiliser.
bi-biomass-3=Feed back some of the produced algae biomass and add ash to produce lots of it!\nNote: This will yield considerably more than the other recipes in a fraction of the time.
bi-biomass-conversion-1=Use algae biomass to produce light oil and cellulose!
bi-biomass-conversion-2=Use algae biomass to produce petroleum gas!
bi-biomass-conversion-3=Use algae biomass to produce lubricant!
bi-biomass-conversion-4=Use algae biomass to produce crude oil and water!
bi-burner-inserter-disassemble=Disassemble burner inserter at a small loss of materials
bi-burner-mining-drill-disassemble=Disassemble burner miner at a small loss of materials
bi-charcoal-1=Burn wood pulp to make charcoal
bi-charcoal-2=Burn wood to make charcoal
bi-coal-1=Process charcoal to make coal
bi-coal-2=Advanced processing of charcoal will let you make more coal!
bi-coke-coal=Turn coal into pellet-coke
bi-crushed-stone-1=Get crushed stone from crushing stone in the stone crusher :-)
bi-crushed-stone-2=Having mastered advanced material processing, you now can also get crushed stone from concrete!
bi-crushed-stone-3=Having mastered advanced material processing, you now can also get crushed stone from hazard concrete!
bi-crushed-stone-4=You will get twice as much crushed stone from processing refined instead of normal concrete, but it takes twice as long!
bi-crushed-stone-5=You will get twice as much crushed stone from processing refined instead of normal hazard concrete, but it takes twice as long!
bi-dart-magazine-basic=Basic wooden projectiles
bi-dart-magazine-enhanced=Enhanced wooden projectiles
bi-dart-magazine-poison=Poisoned wooden projectiles
bi-dart-magazine-standard=Standard wooden projectiles
bi-fertiliser-1=Lets stuff grow faster
bi-fertiliser-2=Lets stuff grow faster (sodium-hydroxide)
bi-logs-1=Grow wood the old-fashioned way by watering saplings!
bi-logs-2=Improve your wood production by using ash as a cheap fertiliser!
bi-logs-3=Grow even more wood by using fertiliser instead of ash!
bi-logs-4=Using advanced fertiliser will yield you insane amounts of wood and wood pulp!
bi-long-handed-inserter-disassemble=Disassemble long handed inserter at a small loss of materials
bi-mineralized-sulfuric-waste=Mineralized water & sulfuric waste from crushed stone, charcoal and pure water
bi-pellet-coke=Turn solid fuel into pellet-coke
bi-power-to-rail-pole=Connect your power rail to the power grid
bi-production-science-pack=Use more, but cheaper wooden rails to make production science packs!
bi-rail-power=Rail that also conducts electricity (connect to power grid using "power to rail" connector)
bi-rail-wood-bridge=Rail that can bridge water\nNote: You can't walk on this!
bi-rail-wood-to-concrete=Upgrade wooden rails to default rails
bi-rail-wood=Cheap rails made with wood
bi-resin-pulp=Process wood pulp to get resin
bi-resin-wood=Process wood to get resin
bi-sand=Sand from crushed stone
#~ bi-seedling=A young tree, perfect for planting. (You can also plant this in the ground and it will grow into a tree. Remember to first fertilize the ground to improve the chances of it growing!)
bi-seed-1=Use wood and water to produce tree seeds!
bi-seed-2=Improve your tree seed production by using ash as a cheap fertiliser!
bi-seed-3=Improve your tree seed production even more by using fertiliser instead of ash!
bi-seed-4=Increase your tree seed production dramatically with advanced fertiliser!
bi-seed-bomb-advanced=Plant trees in a large area, with advanced fertiliser via a seed bomb!
bi-seed-bomb-basic=Plant trees in a large area via a seed bomb!
bi-seed-bomb-standard=Plant trees in a large area, with fertiliser via a seed bomb!
bi-seedling-1=Use tree seeds and water to grow saplings!
bi-seedling-2=Grow more saplings by using ash as a cheap fertiliser!
bi-seedling-3=Grow even more saplings by using fertiliser instead of ash!
bi-seedling-4=Use advanced fertiliser to grow still more saplings in less time!
bi-slag-slurry=Slag slurry from ash, crushed stone and saline water
bi-solar-boiler=A boiler that uses solar energy or electricity (also produces electricity).
bi-solar-boiler-panel=A boiler that uses solar energy or electricity (also produces electricity).
bi-solid-fuel=Turning wood bricks into solid fuel is a great way to get rid of excess wood pulp!
bi-steel-furnace-disassemble=Disassemble steel furnace at a small loss of materials
bi-stone-brick=Stone brick from crushed stone and ash
bi-stone-crusher=Machine to break stone into crushed stone
bi-stone-furnace-disassemble=Disassemble stone furnace at a small loss of materials
bi-sulfur=Bio-sulfur
bi-wood-from-pulp=Regain wood by compressing wood pulp and resin
bi-wood-fuel-brick=Compress wood pulp for easier handling!
bi-wooden-pole-huge=A huge wooden pole for spanning vast distances (64 tiles) with copper cable or circuit network wires
bi-woodpulp=Process wood to wood pulp
[tile-name]
bi-solar-mat=Solar mat
bi-wood-floor=Wood floor
[item-group-name]
bio-industries=Bio-Industries
[ammo-category-name]
Bio_Cannon_Ammo=Bio cannon ammo
Bio_Turret_Ammo=Bio turret ammo
[damage-type-name]
Biological=Biological
bob-pierce=Pierce
[bi-misc]
growing-tree=Growing tree
growing-tree-desc=Given some time, a big tree will grow from this sapling.
young-tree=Young tree
young-tree-desc=This tree is still young and won't yield much wood yet. Better wait until it's fully grown before you chop it down!
[modifier-description]
Bio_Cannon_Ammo-damage-bonus=Prototype artillery damage: +__1__
Bio_Cannon_Ammo-shooting-speed-bonus=Prototype artillery shooting speed: +__1__
Bio_Turret_Ammo-damage-bonus=Dart turret ammo damage bonus: +__1__
Bio_Turret_Ammo-shooting-speed-bonus=Dart turret ammo shooting speed bonus: +__1__
bi-dart-turret-attack-bonus=Dart turret damage bonus: +__1__
bi-dart-turret-damage-bonus=Dart turret damage bonus: +__1__

View file

@ -0,0 +1,107 @@
[ammo-category-name]
Bio_Cannon_Ammo=Bio cannon ammo
Bio_Turret_Ammo=Bio turret ammo
[bi-misc]
growing-tree=Растущее дерево
growing-tree-desc=Если подождать, из этого саженца вырастет большое дерево
young-tree=Молодое дерево
young-tree-desc=Это дерево ещё молодое, из него выйдет не так много древесины. Лучше подождать, пока оно полностью вырастет, прежде, чем рубить его!
[entity-description]
# Changed for 0.17.60/0.18.29!
#~ bi-bio-boiler=These boilers are as efficient as normal ones, but produce 75% less pollution!
bi-solar-boiler=Бойлер с нагревом от солнечного тепла или электричества (также производит электричество).
[item-description]
bi-adv-fertiliser=Улучшенное Удобрение для ещё более быстрого выращивания, либо изменения качества поверхности
bi-arboretum=Терраформер, позволяющий изменять поверхность и сажать вокруг себя деревья
bi-arboretum-area=Терраформер, позволяющий изменять поверхность и сажать вокруг себя деревья
bi-ash=Даже пепел пойдёт в дело!
bi-stone-crusher=Завод для перемалывания камня в Измельчённый камень
[item-name]
bi-bio-reactor=Биореактор
bi-solar-boiler=Солнечная электростанция и бойлер
[mod-setting-description]
BI_Game_Tweaks_Small_Tree_Collisionbox=ЭКСПЕРИМЕНТАЛЬНО: настройка включена по умолчани. Если отключить, вокруг деревья получат большую область столкновений из немодифицированной игры. Такие деревья будут создавать больше препятствий для игроков, транспорта и кусак. Могут возникнуть побочные эффекты!
# This setting has been inverted for 1.0! While activating this setting would HIDE the overlay before, it will SHOW the overlay now. I'll leave the old translation in for reference (commented out). This line can be removed once the new string has been translated!
#~ BI_Hide_musk_floor_in_mapview=В режиме карты пол Илона Маска не будет отображаться в слое Электрических сетей, если эта настройка включена. Не рекомендуется изменять при загруженной игре, поскольку применение настройки к каждой клетке пола Илона Маска может занять длительное время!
BI_Show_musk_floor_in_mapview=Show the electric grid overlay for __ENTITY__bi-solar-mat__ in map view. This shouldn't be changed in a running game as applying the setting to every __ENTITY__bi-solar-mat__ tile may take some time!
[mod-setting-name]
BI_Game_Tweaks_Small_Tree_Collisionbox=Твики игры: Маленькая область столкновений у деревьев
# This setting has been inverted for 1.0! While activating this setting would HIDE the overlay before, it will SHOW the overlay now. I'll leave the old translation in for reference (commented out). This line can be removed once the new string has been translated!
#~ BI_Hide_musk_floor_in_mapview=Скрыть пол Илона Маска в слое Электросетей
BI_Show_musk_floor_in_mapview=Enable: Electric grid overlay for __ENTITY__bi-solar-mat__ in map view
[recipe-description]
bi-acid=Используйте Биомассу из водорослей и Целлюлозу, чтобы производить Серную кислоту!
bi-adv-fertiliser-1=Лучше, чем обычное Удобрение
bi-adv-fertiliser-2=Лучше, чем обычное Удобрение
bi-ash-1=Сжигайте Древесину, получайте Пепел!
bi-ash-2=Сжигайте много Древесных опилков, получайте много Пепла!
# Added bi-basic-petroleum-gas-processing (0.17.49/0.18.17)
# Renamed bi-basic-petroleum-gas-processing to bi-basic-gas-processing (0.17.51/0.18.20)
bi-basic-gas-processing=Inefficient gas extraction
bi-bio-cannon=Этот ранний прототип артиллерии умеет стрелять ТОЛЬКО по гнёздам (максимальный радиус: 90) и пока не может быть наведён вручную.
bi-bio-cannon-area=Этот ранний прототип артиллерии умеет стрелять ТОЛЬКО по гнёздам (максимальный радиус: 90) и пока не может быть наведён вручную.
bi-bio-cannon-basic-ammo=Ракетный, небольшой физический урон
bi-bio-cannon-biological-ammo=Ракетный, высокий высокий биологический урон
bi-bio-cannon-poison-ammo=Ракетный, средний урон ядом
bi-bio-cannon-proto-ammo=Низкий урон, большая часть взрывчатки используется для придания движения
bi-bio-farm=Биоферма для производства Древесины и Древесных опилок
bi-biomass-1=Начните производство Биомассы из водорослей, применив Удобрение!
bi-biomass-2=Верните в производственный цикл часть произведённой Биомассы из водорослей, чтобы получить ещё больше её!\nПримечание: выход продукта будет меньше и дольше, чем даже в базовом рецепте, но вы сэкономите на удобрениях.
bi-biomass-3=Верните в производственный цикл часть произведённой Биомассы из водорослей и добавьте Пепел, чтобы получить ещё больше её!\nПримечание: выход продукта будет существенно больше и быстрее, чем по другим рецептам.
bi-charcoal-1=Сжигайте Древесные опилки чтобы получать Древесный уголь
bi-charcoal-2=Сжигайте Древесину чтобы получать Древесный уголь
bi-coal-1=Переработайте Древесный уголь на Уголь
bi-coal-2=Продвинутая обработка Древесного угля позволяет получать больше Угля!
bi-coke-coal=Переработайте Уголь в Коксовый уголь
bi-crushed-stone-1=Получайте Измельченный камень путём измельчения камня в Измельчителе камня :-)
bi-crushed-stone-2=Постигнув продвинутую переработку материалов, вы можете получать Измельчённый камень из Бетона!
bi-crushed-stone-3=Постигнув продвинутую переработку материалов, вы можете получать Измельчённый камень из Бетона "Опасность"!
bi-crushed-stone-4=Вы получите в два раза больше Измельчённого камня из Железобетона, чем из Бетона, но и займёт это в два раза дольше!
bi-crushed-stone-5=Вы получите в два раза больше Измельчённого камня из Железобетона "Опасность", чем из Бетона "Опасность", но и займёт это в два раза дольше!
bi-dart-magazine-basic=Базовый дротиковый снаряд
bi-dart-magazine-enhanced=Магазин с продвинутыми дротиками
bi-dart-magazine-poison=Магазин с ядовитыми дротиками
bi-dart-magazine-standard=Магазин с дротиками
bi-logs-1=Выращивайте лес по-старинке, поливая Саженцы!
bi-logs-2=Улучшите производство древесины, используя Пепел как дешёвое удобрение!
bi-logs-3=Выращивайте ещё больше леса, используя полноценное Удобрение вместо Пепла!
bi-logs-4=Применение Продвинутого удобрения даст вам бешеное количество Древесины и Древесных опилок!
bi-pellet-coke=Переработайте Твёрдое топливо в Коксовый уголь
bi-production-science-pack=Используйте большое количество Деревянных рельсов для производства Производственных исследовательских пакетов!
bi-rail-power=Рельс, который может проводить электричество. Подключите к электрической сети используя коннектор "Электро-рельсы"
bi-rail-wood=Дешёвые рельсы, сделанные с применением дерева
bi-rail-wood-to-concrete=Улучшить Деревянные рельсы до обычных Рельсов
bi-resin-pulp=Переработайте Древесные опилки на Смолу
bi-resin-wood=Переработайте Древесину на Смолу
bi-solar-boiler=Бойлер с нагревом от солнечного тепла или электричества (также производит электричество).
bi-solar-boiler-panel=Бойлер с нагревом от солнечного тепла или электричества (также производит электричество).
bi-solid-fuel=Переработка Деревянных топливных брикетов в Твёрдое топливо - отличный способ избавиться от избытка Древесных опилков!
bi-stone-crusher=Устройство для дробления Камня в Измельчённый камень
bi-sulfur=Био-сера
bi-wood-from-pulp=Получите обратно Древесину, прессуя Древесные опилки со Смолой
bi-wood-fuel-brick=Прессуйте Древесные опилки для удобства в обращении!
bi-wooden-pole-huge=Огромный деревянный столб, позволяющий прокидывать Медный кабель или Сигнальный провод на протяжённые расстояния (64 клетки)
bi-woodpulp=Переработать Древесину в Древесные опилки
[recipe-name]
bi-bio-cannon=Прототип артиллерии
bi-bio-cannon-area=Прототип артиллерии
bi-bio-cannon-basic-ammo=Прототип артиллерии (ракетный боеприпас)
bi-bio-cannon-biological-ammo=Прототип артиллерии (биологический боеприпас)
bi-bio-cannon-poison-ammo=Прототип артиллерии (ядовитый боеприпас)
bi-bio-cannon-proto-ammo=Прототип артиллерии (базовый боеприпас)
bi-crushed-stone-4=Измельчённый камень из Железобетона
bi-crushed-stone-5=Измельчённый камень из Железобетона "Опасность"
bi-production-science-pack=Производственный научный пакет
bi-wood-from-pulp=Дерево из Древесных опилок
# Added bi-basic-petroleum-gas-processing (0.17.49/0.18.17)
# Renamed bi-basic-petroleum-gas-processing to bi-basic-gas-processing (0.17.51/0.18.20)
bi-basic-gas-processing=Basic gas processing

View file

@ -0,0 +1,508 @@
[mod-setting-name]
BI_Solar_Additions=Включить: Био дополнения
BI_Bio_Fuel=Включить: Производство биотоплива
BI_Bio_Cannon=Включить: Прототип артиллерии
BI_Game_Tweaks_Stack_Size=Твики игры: Размер стака
BI_Game_Tweaks_Recipe=Твики игры: Рецепт
BI_Game_Tweaks_Tree=Твики игры: Добыча с деревьев
BI_Game_Tweaks_Small_Tree_Collisionbox=Enable game tweaks: Smaller collision boxes for trees
BI_Game_Tweaks_Player=Твики игры: Игрок
BI_Game_Tweaks_Disassemble=Твики игры: Разборка элементов
BI_Game_Tweaks_Bot=Твики игры: Дроны
BI_Game_Tweaks_Emissions_Multiplier=Твики игры: Множители выбросов топлива
BI_Game_Tweaks_Production_Science=Game tweaks: Alternative recipe for __ITEM__production-science-pack__
BI_Show_musk_floor_in_mapview=Enable: Electric grid overlay for __ENTITY__bi-solar-mat__ in map view\n(Default: on)
BI_Enable_gvv_support=Compatibility: Add support for GVV
[mod-setting-description]
BI_Solar_Additions=Включает такие предметы как Солнечная ферма, Солнечная электростанция, Биоаккумулятор и Гигантскую подстанцию.
BI_Bio_Fuel=Включает производство нефтяной продукции используя биотопливо
BI_Bio_Cannon=Прототип артиллерии очень мощный, но стреляет только по гнездам
BI_Game_Tweaks_Stack_Size=Влияет на размеры стаков Древесины, Камня, Щебня, Бетона и Шлака
BI_Game_Tweaks_Recipe=Изменения в рецептах:\nБетон (Железная руда => Железный прут)\nКаменная стена (+ Железный прут)\nЖелезная дорога (Камень => Измельченный камень)
BI_Game_Tweaks_Tree=Твики игры - при рубке деревья случайно дают от 1 до 6 древесины. В ваниле=4
BI_Game_Tweaks_Small_Tree_Collisionbox=EXPERIMENTAL: This setting is enabled per default. If it isn't, trees will have the bigger vanilla collision box, making forests more likely to block players, vehicles, and biters. Not sure if this will have any side effects!
BI_Game_Tweaks_Player=Дистанция взаимодействия 6 => 20, подбор количества предметов 1 => 4, дистанция добычи ресурсов 2.7 => 4, дистанция подбора предметов 2 => 5, скорость бега 0.15 => 0.25
BI_Game_Tweaks_Disassemble=Добавить некоторые рецепты для разборки. Вы получите около 50% ресурсов обратно
BI_Game_Tweaks_Bot=Дроны не могут быть подобраны или получать повреждения от горения
BI_Game_Tweaks_Emissions_Multiplier=Боб начинал это. Основная идея заключается в том, что необработанное топливо производит больше загрязнения, чем более продвинутые виды топлива. Таким образом уголь производил 200% загрязнения, в то время как твердое топливо - всего 85%. Пожалуйста, смотрите файл "Fuel Values.xlsx" в папке с модом для большей информации.
BI_Game_Tweaks_Production_Science=If this is enabled, an alternative recipe for Production science packs will be available.\n(Default: on)
BI_Show_musk_floor_in_mapview=Show the electric grid overlay for __ENTITY__bi-solar-mat__ in map view. This shouldn't be changed in a running game as applying the setting to every __ENTITY__bi-solar-mat__ tile may take some time!
BI_Enable_gvv_support=The "Lua API global Variable Viewer" (gvv) allows you to inspect the global table of other mods. If you want to help debugging "Water Turret", enable this and type "\gvv" at the chat console to open the GUI of gvv.\n(Default: off)
[technology-name]
bi-tech-coal-processing-1=Переработка угля 1
bi-tech-coal-processing-2=Переработка угля 2
bi-tech-coal-processing-3=Переработка угля 3
bi-tech-advanced-biotechnology=Продвинутая биотехнология
bi-tech-bio-cannon=Прототип артиллерии
bi-tech-bio-farming=Биоферма
bi-tech-fertiliser=Удобрение
bi-tech-organic-plastic=Органический пластик
[technology-description]
bi-tech-coal-processing-1=Переработка дерева в уголь
bi-tech-coal-processing-2=Переработка дерева в уголь
bi-tech-coal-processing-3=Переработка дерева в уголь
bi-tech-advanced-biotechnology=Открытие более высокоуровневых рецептов
bi-tech-bio-cannon=Прототип технологии артиллерийской башни. - Пока что без возможности ручного наведения
bi-tech-bio-farming=Изучите как выращивать деревья первый шаг к открытию других производств дерева
bi-tech-fertiliser=Используя удобрения, вы сможете получить значительно больше из рецептов
bi-tech-organic-plastic=Производство пластика используя органические материалы
[entity-name]
bi-arboretum-area=Терраформер
bi-arboretum-radar=Радар терраформер
bi-arboretum=Терраформер
bi-bio-accumulator=Аккумулятор огромной емкости
bi-bio-boiler=Биобойлер
bi-bio-cannon-area=Прототип артиллерии
bi-bio-cannon=Прототип артиллерии
bi-bio-farm-electric-pole=Кабели биофермы
bi-bio-farm-light=Горячие лампы биофермы
bi-bio-farm-solar-panel=Солнечная энергия биофермы
bi-bio-farm=Биоферма
bi-bio-garden-light=Свет биосада
bi-bio-garden=Биосад
bi-bio-greenhouse=Теплица
bi-bio-reactor=Биореактор
bi-bio-solar-farm=Био Солнечная ферма
bi-burner-pump=Топливная качалка
bi-cokery=Коксовая печь
#~ bi-curved-rail-power=Электрические рельсы
#~ bi-curved-rail-wood-bridge=Деревянные изогнутые рельсы для мостов
#~ bi-curved-rail-wood=Деревянные изогнутые рельсы
bi-dart-magazine-basic=Базовый дротиковый снаряд
bi-dart-magazine-enhanced=Магазин с продвинутыми дротиками
bi-dart-magazine-poison=Магазин с ядовитыми дротиками
bi-dart-magazine-standard=Магазин с дротиками
bi-dart-turret=Дротиковая турель
#~ These strings seem to be obsolete!
#~ bi-ground-steam=Природный пар
#~ bi-ground-sulfuric-acid=Природная серная кислота
#~ bi-ground-water=Вода
bi-large-substation=Гигантская подстанция
bi-musk-mat-pole=Скрытый силовой столб для пола Илона Маска
bi-musk-mat-solar-panel=Пол Илона Маска
bi-power-to-rail-pole=Коннектор "Электро-рельсы"
bi-solar-boiler-panel=Солнечная электростанция и бойлер - Панель
bi-solar-boiler=Солнечная электростанция и бойлер - Бойлер
bi-solar-mat=Пол Илона Маска
bi-stone-crusher=Измельчитель камня
#~ bi-straight-rail-power=Электрические рельсы
#~ bi-straight-rail-wood-bridge=Деревянные прямые рельсы для мостов
#~ bi-straight-rail-wood=Деревянные прямые рельсы
#~ bi-rail-power=Электрические рельсы
bi-rail-power=Электрические рельсы
#~ bi-straight-rail-wood-bridge=Деревянные прямые рельсы для мостов
bi-rail-wood-bridge=Деревянные прямые рельсы для мостов
#~ bi-straight-rail-wood=Деревянные прямые рельсы
bi-rail-wood=Деревянные прямые рельсы
bi-wood-pipe-to-ground=Подземная деревянная труба
bi-wood-pipe=Деревянная труба
bi-wooden-chest-giga=Огромный деревянный ящик
bi-wooden-chest-huge=Большой деревянный ящик
bi-wooden-chest-large=Средний деревянный ящик
bi-wooden-fence=Деревянный забор
bi-wooden-pole-big=Большой деревянный столб
bi-wooden-pole-huge=Гигантский электрический столб
seedling-2=Саженец
seedling-3=Саженец
seedling=Саженец
wooden-chest=Деревянный ящик
rail-remnants-wood=Remnants of wooden rails
rail-remnants-wood-bridge=Remnants of a wooden bridge
[entity-description]
bi-arboretum-area=Терраформер изменяет местность или растущие деревья в радиусе вокруг строения
bi-arboretum-radar=Радар терраформера
bi-arboretum=Терраформер изменяет местность или растущие деревья в радиусе вокруг строения
bi-bio-accumulator=Может хранить огромное количество энергии, потому что размер имеет значение...
bi-bio-boiler=Высокоэффективный бойлер
bi-bio-cannon-area=Может стрелять ТОЛЬКО по гнездам! - Дистанция 90 - Пока что без возможности ручного наведения
bi-bio-cannon=Может стрелять ТОЛЬКО по гнездам! - Дистанция 90 - Пока что без возможности ручного наведения
bi-bio-farm-electric-pole=Кабели биофермы (Скрыто)
bi-bio-farm-light=Гарячие лампы биофермы, так что деревья могут расти ночью (Скрыто)
bi-bio-farm-solar-panel=Солнеяная энергия биофермы (Скрыто)
#~ New string in 0.17.60/0.18.29!
#~ bi-bio-farm=Bio farms are where saplings grow into trees that are processed to raw wood and wood pulp. An integrated solar panel provides some of the energy during the day.
bi-bio-farm=Биоферма, превращает саженцы в древесину. Потребляет больше электричества ночью
bi-bio-garden-light=Сад также ведет себя как лампа ночью. (Скрыто)
#~ New string in 0.17.60/0.18.29!
#~ bi-bio-garden=The bio garden scrubs air, removing pollution. (One bio garden can absorb 45 pollution units per second as much as 1500 trees!)
bi-bio-garden=Биосад собирает воздух и убирает загрязнение. (-35 PU)
bi-bio-greenhouse=Используйте теплицу для роста саженцев
#~ New string in 0.17.60/0.18.29!
#~ bi-bio-reactor=Bio-reactors are used to produce and process biomass.bi-bio-reactor=Использует продвинутые биореакции
#~ New string in 0.17.60/0.18.29!
#~ bi-bio-solar-farm=Bio solar farm save space by condensing your solar panels into a compact unit. They create a lot of power!\Using Bio solar farms instead of the original solar panels will also improve performance because less entities require less updates per second (UPS).
bi-bio-solar-farm=Сохраняет пространство, соединяя ваши солнечный панели в компактный блок. Создает много энергии!
bi-burner-pump=Топливный насос для выкачки воды из-под земли
#~ New string in 0.17.60/0.18.29!
#~ bi-cokery=Wood and wood pulp are processed to charcoal and other fuels in the cokery.
bi-cokery=Переработка дерева в уголь или другие виды топлива
#~ These strings are obsolete!
#~ bi-curved-rail-power=Рельса которая может проводить электричество. Подключите к электрической сети используя коннектор "Электро-рельсы"
#~ bi-curved-rail-wood-bridge=Деревянные изогнутые рельсы для мостов. Заметьте, что вы не можете по ним ходить.
#~ bi-curved-rail-wood=Деревянные изогнутые рельсы
#~ These are items, not entities!
#~ bi-dart-magazine-basic=Базовые дротиковые снаряды
#~ bi-dart-magazine-enhanced=Продвинутые дротиковые снаряды
#~ bi-dart-magazine-poison=Ядовитые дротиковые снаряды
#~ bi-dart-magazine-standard=Стандартные дротиковые снаряды
#~ These strings seem to be obsolete!
#~ bi-ground-steam=Природные залежи пара
#~ bi-ground-sulfuric-acid=Природные залежи серной кислоты
#~ bi-ground-water=Глубинная вода
bi-large-substation=Гигантская подстанция
bi-musk-mat-pole=Скрытый силовой столб для пола Илона Маска
bi-musk-mat-solar-panel=Энергия от пола Илона Маска
#~ New string in 0.17.60/0.18.29!
#~ bi-power-to-rail-pole=Connect your power rail to the power grid!\nATTENTION: When you place a connector in reach of two powered rails that are running parallel or crossing each other, you will connect these networks!
bi-power-to-rail-pole=Коннектор ваших электрических рельс к электрической сети
bi-solar-boiler-2=Бойлер, который использует солнечную энергию или электричество. Также производит электричество
bi-solar-boiler-panel=Бойлер, который использует солнечную энергию или электричество. Также производит электричество
bi-solar-mat=Солнечная панель/пол которая может быть использована как дорожное покрытие, генерирует 10kW электричества и позволяет быстро перемещаться (Спасибо Илону Маску!)
#~ New string in 0.17.60/0.18.29!
#~ bi-stone-crusher=These machines crush stone and concrete. If necessary, you can also use them to make sand from crushed stone.
bi-stone-crusher=Машина которая измельчает камни
#~ bi-straight-rail-power=Рельса которая может проводить электричество. Подключите к электрической сети используя коннектор "Электро-рельсы"
bi-rail-power=Рельса которая может проводить электричество. Подключите к электрической сети используя коннектор "Электро-рельсы"
#~ bi-straight-rail-wood-bridge=Деревянные прямые рельсы для мостов. Заметьте, что вы не можете по ним ходить.
bi-rail-wood-bridge=Деревянные прямые рельсы для мостов. Заметьте, что вы не можете по ним ходить.
#~ bi-straight-rail-wood=Деревянные прямые рельсы
bi-rail-wood=Деревянные прямые рельсы
bi-wood-pipe-to-ground=Подземная деревянная труба
bi-wood-pipe=Деревянная труба
bi-wooden-chest-giga=Самый большой деревянный ящик
bi-wooden-chest-huge=Больше среднего деревянный ящик
bi-wooden-chest-large=Обычный средний деревянный ящик
#~ New string in 0.17.60/0.18.29!
#~ bi-wooden-fence=Though not very strong, wooden fences help you right from the start to keep enemies out of your factory.
bi-wooden-fence=Защитная стена сделанная из дерева
bi-wooden-pole-big=Большой деревянный столб ЛЭП. Будет автоматически восстанавливать здоровье, если вы играете с NE Enemies
bi-wooden-pole-huge=Электрический столб, который может охватить огромное расстояние - 64
seedling-2=Молодое растение, идеально для посадки. Вы также можете посадить его в землю и оно вырастет в дерево. Помните, что сначала нужно удобрить землю, чтобы увеличить шанс роста.
seedling-3=Молодое растение, идеально для посадки. Вы также можете посадить его в землю и оно вырастет в дерево. Помните, что сначала нужно удобрить землю, чтобы увеличить шанс роста.
seedling=Молодое растение, идеально для посадки. Вы также можете посадить его в землю и оно вырастет в дерево. Помните, что сначала нужно удобрить землю, чтобы увеличить шанс роста.
rail-remnants-wood=Remnants of wooden rails
rail-remnants-wood-bridge=Remnants of a wooden bridge
[item-name]
bi-adv-fertiliser=Продвинутое удобрение
bi-arboretum-area=Терраформер
bi-arboretum-r1=Посаженные деревья
bi-arboretum-r2=Изменение территории - Базовое
bi-arboretum-r3=Изменение территории - Продвинутое
bi-arboretum-r4=Изменение территории и посаженых деревьев - Базовое
bi-arboretum-r5=Изменение территории и посаженых деревьев - Продвинутое
bi-arboretum=Терраформер
bi-ash=Зола
bi-bio-accumulator=Аккумулятор огромной емкости
bi-bio-boiler=Биобойлер
bi-bio-cannon-area=Прототип артиллерии
bi-bio-cannon-basic-ammo=Прототип артиллерии - ракетный боеприпас
bi-bio-cannon-biological-ammo=Прототип артиллерии - биологический боеприпас
bi-bio-cannon-poison-ammo=Прототип артиллерии - ядовитый боеприпас
bi-bio-cannon-proto-ammo=Прототип артиллерии - базовый боеприпас
bi-bio-cannon=Прототип артиллерии
bi-bio-farm=Биоферма
bi-bio-solar-farm=Био Солнечная ферма
bi-biolab=Биолаборатория
bi-burner-pump=Топливная качалка
bi-cellulose=Целлюлоза
bi-cokery=Коксовая печь
bi-dart-magazine-basic=Базовый дротиковый снаряд
bi-dart-magazine-enhanced=Продвинутый дротиковый снаряд
bi-dart-magazine-poison=Ядовитые дротиковые снаряды
bi-dart-magazine-standard=Стандартные дротиковые боеприпасы
bi-dart-rifle=Дротиковая винтовка
bi-dart-turret=Дротиковая турель
bi-ground-water=Вода
bi-large-substation=Гигантская подстанция
#~ Obsolete?
#~ bi-medicine=Медицина
#~ Do we need localizations for hidden entities?
#~ bi-musk-mat-pole=Скрытый силовой столб для пола Илона Маска
#~ bi-musk-mat-solar-panel=Пол Илона Маска
#~ Obsolete
#~ bi-nutrients=Питательный раствор
bi-power-to-rail-pole=Коннектор "Электро-рельсы"
bi-purified-air=Очиститель воздуха
bi-rail-power=Электрические рельсы
bi-rail-wood-bridge=Деревянные рельсы для мостов
bi-rail-wood=Деревянные рельсы
bi-seed-bomb-advanced=Продвинутая семенная бомба
bi-seed-bomb-basic=Базовая семенная бомба
bi-seed-bomb-standard=Стандартная семенная бомба
bi-seed=Семена
bi-solar-boiler-2=Солнечная электростанция и бойлер - бойлер
bi-solar-boiler-panel=Солнечная электростанция и бойлер - панель
bi-solar-mat=Пол Илона Маска
bi-stone-crusher=Измельченный камень
bi-wood-pipe-to-ground=Подземная деревянная труба
bi-wood-pipe=Деревянная труба
bi-wooden-chest-giga=Огромный деревянный ящик
bi-wooden-chest-huge=Большой деревянный ящик
bi-wooden-chest-large=Средний деревянный ящик
bi-wooden-fence=Деревянный забор
bi-wooden-pole-big=Большой деревянный столб ЛЭП. Будет автоматически восстанавливать здоровье, если вы играете с NE Enemies
bi-wooden-pole-huge=Гигантский электрический столб
bi-woodpulp=Древесные опилки
fertiliser=Удобрение
pellet-coke=Коксовый уголь
resin=Смола
seedling=Сажанец
stone-crushed=Измельчитель камня
#~ Obsolete? This is only used in a compatibility recipe for bi-slag-slurry if angelsrefining is active!
water-saline=Солёная вода
wood-bricks=Деревянные топливные брикеты
wood-charcoal=Древесный уголь
[item-description]
bi-Arboretum-Area=Терраформер изменяет местность или растущие деревья в радиусе вокруг строения
bi-Arboretum=Терраформер изменяет местность или растущие деревья в радиусе вокруг строения
bi-arboretum-r1=Сажает деревья или изменяет местность в радиусе вокруг строения
bi-arboretum-r2=Изменяет местность в радиусе вокруг строения - Базовое
bi-arboretum-r3=Изменяет местность в радиусе вокруг строения - Продвинутое
bi-arboretum-r4=Изменяет местность и сажает деревья в радиусе вокруг строения - Базовое
bi-arboretum-r5=Изменяет местность и сажает деревья в радиусе вокруг строения - Продвинутое
bi-bio-accumulator=Может хранить огромное количество энергии, потому что размер имеет значение...
bi-bio-boiler=Высокоэффективный бойлер
bi-bio-cannon-area=Может стрелять ТОЛЬКО по гнездам! - Дистанция 90 - Пока что без возможности ручного наведения
bi-bio-cannon-basic-ammo=Ракетная мощь, низкий физический урон
bi-bio-cannon-biological-ammo=Ракетная мощь, высокий биологический урон
bi-bio-cannon-poison-ammo=Ракетная мощь, средний урон ядом
bi-bio-cannon-proto-ammo=Низкий урон, большая часть взрывчатки используется для придания движения
bi-bio-cannon=Может стрелять ТОЛЬКО по гнездам! - Дистанция 90 - Пока что без возможности ручного наведения
bi-bio-farm=Теплица с мощным искусственным освещением для выращивания деревьев из саженцев (сырье-древесина)
bi-bio-solar-farm=Сохраняет пространство, соединяя ваши солнечный панели в компактный блок. Создает много энергии!
#~ Obsolete?
bi-burner-pump=Топливный насос для выкачки воды из-под земли
bi-dart-magazine-basic=Базовый дротиковый снаряд
bi-dart-magazine-enhanced=Продвинутый дротиковый снаряд
bi-dart-magazine-poison=Малый урон ядом
bi-dart-magazine-standard=Стандартные дротиковые снаряды
bi-ground-water=Вода
bi-large-substation=Гигантская подстанция
bi-musk-mat-pole=Скрытый силовой столб для пола Илона Маска
bi-musk-mat-solar-panel=Энергия от пола Илона Маска
bi-power-to-rail-pole=Коннектор ваших электрических рельс к электрической сети
bi-purified-air=Чистый воздух, загрязнение удаляется!
bi-rail-power=Рельса которая может проводить электричество. Подключите к электрической сети используя коннектор "Электро-рельсы"
bi-rail-wood-bridge=Деревянные рельсы для создания мостов. Заметьте, что вы не можете по ней ходить.
bi-rail-wood=Деревянные рельсы
bi-seed-bomb-advanced=Засаживает деревьями большую территорию, с продвинутым удобрением с помощью семенной бомбы!
bi-seed-bomb-basic=Засаживает деревьями большую территорию с помощью семенной бомбы!
bi-seed-bomb-standard=Засаживает деревьями большую территорию, с удобрением с помощью семенной бомбы!
bi-seed=Семена, чтобы выращивать из них саженцы
bi-solar-boiler-panel=Бойлер, который использует солнечную энергию или электричество. Также производит электричество
bi-solar-boiler=Бойлер, который использует солнечную энергию или электричество. Также производит электричество
bi-solar-mat=Солнечная панель/пол которая может быть использована как дорожное покрытие, генерирует 10kW электричества и позволяет быстро перемещаться (Спасибо Илону Маску!)
bi-wood-pipe-to-ground=Деревянная подземная труба
bi-wood-pipe=Труба сделанная из дерева
bi-wooden-chest-giga=Самый большой деревянный ящик
bi-wooden-chest-huge=Деревянный ящик больше среднего
bi-wooden-chest-large=Обычный средний деревянный ящик
bi-wooden-fence=Защитная стена сделанная из дерева
bi-wooden-pole-big=Большой деревянный столб ЛЭП
bi-wooden-pole-huge=Электрический столб, который может охватить огромное расстояние - 64
bi-woodpulp=Можно сжигать или переработать в золу или уголь
fertiliser=Удобрения нужны для быстрого выращивания растений и изменения качества почвы на более плодородную
pellet-coke=Коксовый уголь это отличное топливо для поездов.
resin=Смола
seedling=Молодое растение, идеально для посадки. Вы также можете посадить его в землю и оно вырастет в дерево. Помните, что сначала её нужно удобрить, чтобы увеличить шанс роста.
stone-crushed=Камень измельченный в щебень
#~ Obsolete? This is only used in a compatibility recipe for bi-slag-slurry if angelsrefining is active!
water-saline=Солёная вода
wood-bricks=Хорошо обработанный источник топлива с низкими выбросами
[fluid-name]
bi-biomass=Биомасса из водорослей
bi-ground-water=Вода
liquid-air=Сжиженный воздух
nitrogen=Азот
#~ Obsolete? This is only used in a compatibility recipe for bi-slag-slurry if angelsrefining is active!
water-saline=Солёная вода
[recipe-name]
bi-bio-accumulator=Аккумулятор огромной емкости
bi-acid=Био-кислота
bi-adv-fertiliser-1=Продвинутое удобрение
bi-adv-fertiliser-2=Продвинутое удобрение
bi-arboretum=Терраформер
bi-arboretum-r1=Посаженные деревья
bi-arboretum-r2=Изменение территории - Базовое
bi-arboretum-r3=Изменение территории - Продвинутое
bi-arboretum-r4=Изменение территории и посаженых деревьев - Базовое
bi-arboretum-r5=Изменение территории и посаженых деревьев - Продвинутое
bi-ash-1=Зола
bi-ash-2=Зола
bi-battery=Биоаккумулятор
bi-dart-magazine-basic=Базовый дротиковый снаряд
bi-dart-magazine-enhanced=Магазин с продвинутыми дротиками
bi-dart-magazine-poison=Магазин с ядовитыми дротиками
bi-dart-magazine-standard=Магазин с дротиками
bi-dart-turret=Дротиковая турель
bi-dart-rifle=Дротиковая винтовка
bi-wooden-pole-big=Большой деревянный столб
bi-bio-farm=Биоферма
bi-bio-garden=Биосад
bi-bio-solar-farm=Био Солнечная ферма
bi-biomass-1=Водоросли-Биомасса-1
bi-biomass-2=Водоросли-Биомасса-2
bi-biomass-3=Водоросли-Биомасса-3
bi-biomass-conversion-1=Превращение биотоплива 1
bi-biomass-conversion-2=Превращение биотоплива 2
bi-biomass-conversion-3=Превращение биотоплива 3
bi-biomass-conversion-4=Превращение биотоплива 4
bi-bio-reactor=Биореактор
bi-bio-boiler=Биобойлер
bi-burner-inserter-disassemble=Разборка твердотопливного манипулятора
bi-burner-mining-drill-disassemble=Разборка твердотопливного бура
bi-cellulose-1=Целлюлоза
bi-cellulose-2=Целлюлоза
bi-charcoal-1=Древесный уголь
bi-charcoal-2=Древесный уголь
bi-coal-1=Базовое производство угля
bi-coal-2=Продвинутое производство угля
bi-coke-coal=Коксовый уголь
bi-cokery=Коксовая печь
bi-crushed-stone-1=Измельченный камень
bi-crushed-stone-2=Измельченный камень
bi-crushed-stone-3=Измельченный камень
bi-fertiliser-1=Удобрение
bi-fertiliser-2=Удобрение
bi-wooden-chest-giga=Огромный деревянный ящик
bi-bio-greenhouse=Теплица
bi-large-substation=Гигантская подстанция
bi-wooden-chest-huge=Большой деревянный ящик
bi-wooden-pole-huge=Гигантский электрический столб
bi-wooden-chest-large=Средний деревянный ящик
bi-liquid-air=Сжиженный воздух
bi-logs-1=Базовое производство дерева
bi-logs-2=Производство дерева Mk2
bi-logs-3=Продвинутое производство дерева
bi-logs-4=Супер производство дерева
bi-long-handed-inserter-disassemble=Разборка длинного манипулятора
bi-mineralized-sulfuric-waste=Получение воды и серных отходов
bi-nitrogen=Азот
bi-pellet-coke=Коксовые паллеты из твердого топлива
bi-pellet-coke-2=Угольные паллеты из Углерода
bi-wood-pipe-to-ground=Подземная деревянная труба
bi-plastic-1=Биопластик 1
bi-plastic-2=Биопластик 2
bi-power-to-rail-pole=Рельса с разъемом питания
bi-press-wood=Прессование древесины
bi-production-science-pack=Production science pack
bi-purified-air-1=Очистка воздуха
bi-purified-air-2=Очистка воздуха Mk2
bi-rail-power=Электрические рельсы
bi-rail-wood=Деревянные рельсы
bi-rail-wood-bridge=Деревянные рельсы для мостов
bi-rail-wood-to-concrete=Улучшенные деревянные рельсы
bi-resin-pulp=Смола
bi-resin-wood=Смола
#~ bi-seedling=Саженец
bi-seed-1=Базовое семя
bi-seed-2=Производство семян дерева из золы
bi-seed-3=Производство семян дерева из удобрения
bi-seed-4=Производство семян дерева из продвинутого удобрения
bi-seed-bomb-advanced=Продвинутая семенная бомба
bi-seed-bomb-basic=Базовая семенная бомба
bi-seed-bomb-standard=Стандартная семенная бомба
bi-seedling-1=Базовое производство саженцев
bi-seedling-2=Производство саженцев Mk2
bi-seedling-3=Продвинутое производство саженцев
bi-seedling-4=Супер производство саженцев
bi-slag-slurry=Сжиженный шлак
bi-solar-boiler=Солнечная электростанция и бойлер
bi-solar-boiler-panel=Солнечная электростанция и бойлер
bi-solar-mat=Пол Илона Маска
bi-solid-fuel=Твердое топливо из деревянных топливных брикетов
bi-steel-furnace-disassemble=Разборка стальной печи
bi-stone-brick=Био-Каменный блок
bi-stone-furnace-disassemble=Разборка каменной печи
bi-stone-crusher=Измельченный камень
bi-sulfur=Био-сера
bi-sulfur-angels=Био-сера
bi-wood-from-pulp=Wood from pulp
bi-wood-fuel-brick=Деревянные брикеты
bi-wood-pipe=Деревянная труба
bi-wooden-fence=Деревянный забор
bi-woodpulp=Древесные опилки
wooden-chest=Деревянный ящик
[recipe-description]
bi-arboretum=Сажает деревья или изменяет местность в радиусе вокруг строения
bi-arboretum-r1=Использование Терраформера - Сажает деревья в радиусе вокруг себя (Посадка никогда не прекращается, деревья перевысаживаются посекторно)
bi-arboretum-r2=Использование Терраформера - Изменяет местность в радиусе вокруг себя - Базовое
bi-arboretum-r3=Использование Терраформера - Изменяет местность в радиусе вокруг себя - Продвинутое
bi-arboretum-r4=Использование Терраформера - Изменяет местность и сажает деревья в радиусе вокруг себя - Базовое
bi-arboretum-r5=Использование Терраформера - Изменяет местность и сажает деревья в радиусе вокруг себя - Продвинутое
bi-basic-pumpjack-disassemble=Разобрать топливную качалку и получить немного материалов
bi-biomass-conversion-1=Водоросли-Биомасса в легкую нефть
bi-biomass-conversion-2=Водоросли-Биомасса в нефть
bi-biomass-conversion-3=Водоросли-Биомасса в смазку
bi-biomass-conversion-4=Превращение биотоплива 4
bi-burner-inserter-disassemble=С небольшой потерей материалов
bi-burner-mining-drill-disassemble=С небольшой потерей материалов
bi-fertiliser-1=Позволяет растениям расти быстрее
bi-fertiliser-2=Позволяет растениям расти быстрее (гидроксид натрия)
bi-bio-greenhouse=Теплица производит семена и саженцы
bi-long-handed-inserter-disassemble=С небольшой потерей материалов
bi-mineralized-sulfuric-waste=Получение воды и серных отходов из измельченного камня, древесного угля и чистой воды
bi-power-to-rail-pole=Коннектор ваших электрических рельс к электрической сети
bi-rail-wood-bridge=Рельсы, которые могут пересекать воду
bi-seed-1=Семя, которое вырастает в саженец
bi-seed-2=Семя, которое вырастает в саженец
bi-seed-3=Семя, которое вырастает в саженец
bi-seed-4=Семя, которое вырастает в саженец
bi-seed-bomb-advanced=Засаживает деревьями большую территорию, с продвинутым удобрением с помощью семенной бомбы!
bi-seed-bomb-basic=Засаживает деревьями большую территорию с помощью семенной бомбы!
bi-seed-bomb-standard=Засаживает деревьями большую территорию, с удобрением с помощью семенной бомбы!
#~ bi-seedling=Молодое дерево, идеально для посадки. (Вы также можете посадить его в землю и оно вырастет в дерево. Помните, что сначала нужно удобрить землю, чтобы увеличить шанс роста.)
bi-seedling-1=Производит 40 саженцев
bi-seedling-2=Производит 50 саженцев
bi-seedling-3=Производит 75 саженцев
bi-seedling-4=Производит 150 саженцев
bi-slag-slurry=Сжиженный шлак из золы, измельченного камня и соленой воды
bi-steel-furnace-disassemble=С небольшой потерей материалов
bi-stone-brick=Каменный блок из измельченного камня и золы
bi-stone-furnace-disassemble=С небольшой потерей материалов
[tile-name]
bi-solar-mat=Солнечный пол
bi-wood-floor=Деревянный пол
[item-group-name]
Bio_Turret_Ammo=Био-Боеприпасы
bio-industries=Био-Индустрия
[damage-type-name]
Biological=Биологический
bob-pierce=Бронебойный
[bi-misc]
growing-tree=Growing tree
growing-tree-desc=Given some time, a big tree will grow from this sapling.
young-tree=Young tree
young-tree-desc=This tree is still young and won't yield much wood yet. Better wait until it's fully grown before you chop it down!
[modifier-description]
Bio_Cannon_Ammo-damage-bonus=Бонус урона боеприпаса прототипа артиллерии: +__1__
Bio_Cannon_Ammo-shooting-speed-bonus=Бонус скорости стрельбы прототипа артиллерии: +__1__
Bio_Turret_Ammo-damage-bonus=Бонус урона боеприпаса дротиковой турели: +__1__
Bio_Turret_Ammo-shooting-speed-bonus=Бонус скорости стрельбы боеприпаса дротиковой турели: +__1__
bi-dart-turret-attack-bonus=Бонус урона дротиковой турели: +__1__
[autoplace-control-names]
bi-ground-water=__ENTITY__bi-ground-water__

View file

@ -1,10 +1,10 @@
data:extend({
--- Bio Damage for new Ammo
{
type = "damage-type",
name = "Biological"
},
})
data:extend({
--- Bio Damage for new Ammo
{
type = "damage-type",
name = "Biological"
},
})

View file

@ -1,212 +1,212 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = BioInd.modRoot .. "/graphics/entities/bio_cannon/"
local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/"
require "util"
if BI.Settings.Bio_Cannon then
function preparing_animation()
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 12,
line_length = 6,
run_mode = "forward",
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_anim.png",
scale = 0.5
}
}
}
end
function prepared_animation() -- OPEN
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_open.png",
scale = 0.5
}, {
priority = "high",
width = 320,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {5, -0.95},
filename = ENTITYPATH .. "hr_bio_cannon_shadow.png",
draw_as_shadow = true,
scale = 0.5
}
}
}
end
function folding_animation()
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 12,
line_length = 6,
run_mode = "backward",
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_anim.png",
scale = 0.5
}
}
}
end
function folded_animation() -- CLOSED
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_anim.png",
scale = 0.5
}, {
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0.2, -0.95},
filename = ENTITYPATH .. "hr_bio_cannon_shadow.png",
draw_as_shadow = true,
scale = 0.5
}
}
}
end
data:extend({
-- Bio Cannon Artillery
{
type = "ammo-turret",
name = "bi-bio-cannon",
icon = ICONPATH .. "biocannon_icon.png",
icon_size = 64,
icons = {{icon = ICONPATH .. "biocannon_icon.png", icon_size = 64}},
flags = {"placeable-neutral", "placeable-player", "player-creation"},
-- makes cannon blueprintable
placeable_by = {item = "bi-bio-cannon", count = 1},
open_sound = {
filename = "__base__/sound/machine-open.ogg",
volume = 0.85
},
close_sound = {
filename = "__base__/sound/machine-close.ogg",
volume = 0.75
},
minable = {mining_time = 10, result = "bi-bio-cannon"},
max_health = 900,
corpse = "bi-bio-cannon-remnants",
dying_explosion = "massive-explosion",
automated_ammo_count = 10,
resistances = {
{type = "fire", percent = 90},
{type = "explosion", percent = 30},
{type = "impact", percent = 30}
},
collision_box = {{-4.20, -4.20}, {4.20, 4.20}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
order = "i[items][Bio_Cannon]",
inventory_size = 1,
prepare_range = 120,
preparing_speed = 0.012,
attack_parameters = {
type = "projectile",
ammo_category = "Bio_Cannon_Ammo",
cooldown = 600,
warmup = 600,
-- ~ range = 0,
range = 120,
min_range = 20,
projectile_creation_distance = 1.8,
action = {}
},
folding_speed = 0.012,
preparing_animation = preparing_animation(),
prepared_animation = prepared_animation(),
-- attacking_animation = attacking_animation(),
folding_animation = folding_animation(),
folded_animation = folded_animation(),
call_for_help_radius = 90,
attack_target_mask = {"Bio_Cannon_Ammo"},
graphics_set = {}
},
---- Corpse / Remnants
{
type = "corpse",
name = "bi-bio-cannon-remnants",
icon_size = 64,
icons = {{icon = ICONPATH .. "biocannon_icon.png", icon_size = 64}},
flags = {"placeable-neutral", "not-on-map"},
subgroup = "defensive-structure-remnants",
order = "a-c-a",
selection_box = {{-4.5, -4.5}, {4.5, 4.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 = make_rotated_animation_variations_from_sheet(1, {
layers = {
{
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0, -0.8},
filename = REMNANTSPATH .. "hr_bio_cannon_remnant.png",
scale = 0.5
}
}
})
}
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = BioInd.modRoot .. "/graphics/entities/bio_cannon/"
local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/"
require "util"
if BI.Settings.Bio_Cannon then
function preparing_animation()
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 12,
line_length = 6,
run_mode = "forward",
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_anim.png",
scale = 0.5
}
}
}
end
function prepared_animation() -- OPEN
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_open.png",
scale = 0.5
}, {
priority = "high",
width = 320,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {5, -0.95},
filename = ENTITYPATH .. "hr_bio_cannon_shadow.png",
draw_as_shadow = true,
scale = 0.5
}
}
}
end
function folding_animation()
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 12,
line_length = 6,
run_mode = "backward",
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_anim.png",
scale = 0.5
}
}
}
end
function folded_animation() -- CLOSED
return {
layers = {
{
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0, -0.8},
filename = ENTITYPATH .. "hr_bio_cannon_anim.png",
scale = 0.5
}, {
priority = "high",
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0.2, -0.95},
filename = ENTITYPATH .. "hr_bio_cannon_shadow.png",
draw_as_shadow = true,
scale = 0.5
}
}
}
end
data:extend({
-- Bio Cannon Artillery
{
type = "ammo-turret",
name = "bi-bio-cannon",
icon = ICONPATH .. "biocannon_icon.png",
icon_size = 64,
icons = {{icon = ICONPATH .. "biocannon_icon.png", icon_size = 64}},
flags = {"placeable-neutral", "placeable-player", "player-creation"},
-- makes cannon blueprintable
placeable_by = {item = "bi-bio-cannon", count = 1},
open_sound = {
filename = "__base__/sound/machine-open.ogg",
volume = 0.85
},
close_sound = {
filename = "__base__/sound/machine-close.ogg",
volume = 0.75
},
minable = {mining_time = 10, result = "bi-bio-cannon"},
max_health = 900,
corpse = "bi-bio-cannon-remnants",
dying_explosion = "massive-explosion",
automated_ammo_count = 10,
resistances = {
{type = "fire", percent = 90},
{type = "explosion", percent = 30},
{type = "impact", percent = 30}
},
collision_box = {{-4.20, -4.20}, {4.20, 4.20}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
order = "i[items][Bio_Cannon]",
inventory_size = 1,
prepare_range = 120,
preparing_speed = 0.012,
attack_parameters = {
type = "projectile",
ammo_category = "Bio_Cannon_Ammo",
cooldown = 600,
warmup = 600,
-- ~ range = 0,
range = 120,
min_range = 20,
projectile_creation_distance = 1.8,
action = {}
},
folding_speed = 0.012,
preparing_animation = preparing_animation(),
prepared_animation = prepared_animation(),
-- attacking_animation = attacking_animation(),
folding_animation = folding_animation(),
folded_animation = folded_animation(),
call_for_help_radius = 90,
attack_target_mask = {"Bio_Cannon_Ammo"},
graphics_set = {}
},
---- Corpse / Remnants
{
type = "corpse",
name = "bi-bio-cannon-remnants",
icon_size = 64,
icons = {{icon = ICONPATH .. "biocannon_icon.png", icon_size = 64}},
flags = {"placeable-neutral", "not-on-map"},
subgroup = "defensive-structure-remnants",
order = "a-c-a",
selection_box = {{-4.5, -4.5}, {4.5, 4.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 = make_rotated_animation_variations_from_sheet(1, {
layers = {
{
width = 692,
height = 672,
direction_count = 1,
frame_count = 1,
line_length = 1,
axially_symmetrical = false,
shift = {0, -0.8},
filename = REMNANTSPATH .. "hr_bio_cannon_remnant.png",
scale = 0.5
}
}
})
}
})
end

View file

@ -1,16 +1,16 @@
if BI.Settings.Bio_Cannon then
data:extend({
{
type = "ammo-category",
name = "Bio_Cannon_Ammo",
order = "1"
},
{
type = "trigger-target-type",
name = "Bio_Cannon_Ammo"
}
})
end
if BI.Settings.Bio_Cannon then
data:extend({
{
type = "ammo-category",
name = "Bio_Cannon_Ammo",
order = "1"
},
{
type = "trigger-target-type",
name = "Bio_Cannon_Ammo"
}
})
end

View file

@ -1,28 +1,28 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if BI.Settings.Bio_Cannon then
data:extend({
-- Hive Buster Turret
{
type = "item",
name = "bi-bio-cannon",
localised_name = {"entity-name.bi-bio-cannon"},
localised_description = {"entity-description.bi-bio-cannon"},
icon = ICONPATH .. "biocannon_icon.png",
icon_size = 64,
icon_mipmaps = 1,
icons = {
{
icon = ICONPATH .. "biocannon_icon.png",
icon_size = 64,
}
},
subgroup = "defensive-structure",
order = "x[turret]-x[gun-turret]",
place_result = "bi-bio-cannon",
stack_size = 1,
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if BI.Settings.Bio_Cannon then
data:extend({
-- Hive Buster Turret
{
type = "item",
name = "bi-bio-cannon",
localised_name = {"entity-name.bi-bio-cannon"},
localised_description = {"entity-description.bi-bio-cannon"},
icon = ICONPATH .. "biocannon_icon.png",
icon_size = 64,
icon_mipmaps = 1,
icons = {
{
icon = ICONPATH .. "biocannon_icon.png",
icon_size = 64,
}
},
subgroup = "defensive-structure",
order = "x[turret]-x[gun-turret]",
place_result = "bi-bio-cannon",
stack_size = 1,
},
})
end

View file

@ -1,350 +1,350 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/entities/bio_cannon/projectiles/"
require "util"
if BI.Settings.Bio_Cannon then
if mods["Natural_Evolution_Enemies"] then
NE_Damage = 2
else
NE_Damage = 1
end
data:extend({
--Projectile
-- Bio Cannon Ammo
-- Prototype
{
type = "projectile",
name = "bi-bio-cannon-proto-ammo",
flags = {"not-on-map"},
acceleration = 0.0004,
action = {
{
type = "area",
radius = 2,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 80 * NE_Damage, type = "physical"}
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
},
}
}
},
},
light = {intensity = 0.7, size = 3},
animation = {
filename = ICONPATH .. "bio_cannon_proto_ammo.png",
priority = "extra-high",
width = 18,
height = 47,
scale = 0.85,
frame_count = 1
},
shadow = {
filename = ICONPATH .. "bio_cannon_ammo-shadow.png",
priority = "extra-high",
width = 18,
height = 47,
scale = 0.85,
frame_count = 1
},
smoke = {
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, 1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
-- Basic
{
type = "projectile",
name = "bi-bio-cannon-basic-ammo",
flags = {"not-on-map"},
acceleration = 0.0005,
action = {
{
type = "area",
radius = 8,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 120 * NE_Damage, type = "physical"}
},
{
type = "damage",
damage = {amount = 180 * NE_Damage, type = "explosion"}
},
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "nested-result",
action = {
type = "area",
target_entities = false,
repeat_count = 10,
radius = 2,
action_delivery = {
type = "projectile",
projectile = "NE-Napalm-Small",
starting_speed = 0.5
}
}
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
},
{
type = "create-entity",
entity_name = "bio-cannon-explosion",
},
}
}
},
},
light = {intensity = 0.7, size = 6},
animation = {
filename = ICONPATH .. "bio_cannon_basic_ammo.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
shadow = {
filename = ICONPATH .. "bio_cannon_ammo-shadow.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
--[[
sound = {
{
filename = "__Natural_Evolution_Buildings__/sound/launch.ogg",
volume = 4.0
},
},
]]
smoke = {
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, 1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
--- Poison
{
type = "projectile",
name = "bi-bio-cannon-poison-ammo",
flags = {"not-on-map"},
acceleration = 0.0006,
action = {
{
type = "area",
radius = 12,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 120 * NE_Damage, type = "physical"}
},
{
type = "damage",
damage = {amount = 180 * NE_Damage, type = "explosion"}
},
{
type = "damage",
damage = {amount = 250 * NE_Damage, type = "poison"}
},
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "nested-result",
action = {
type = "area",
target_entities = false,
repeat_count = 20,
radius = 3,
action_delivery = {
type = "projectile",
projectile = "NE-Napalm-Small",
starting_speed = 0.5
}
}
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
},
{
type = "create-entity",
entity_name = "bio-cannon-explosion",
},
}
}
},
},
light = {intensity = 0.8, size = 7},
animation = {
filename = ICONPATH .. "bio_cannon_poison_ammo.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
shadow = {
filename = ICONPATH .. "bio_cannon_ammo-shadow.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
--[[
sound = {
{
filename = "__Natural_Evolution_Buildings__/sound/launch.ogg",
volume = 4.0
},
},
]]
smoke = {
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, 1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
--- Bio Cannon Explosion
{
type = "smoke-with-trigger",
name = "bio-cannon-explosion",
flags = {"not-on-map"},
show_when_smoke_off = true,
animation = {
filename = ICONPATH .. "explosion.png",
priority = "low",
width = 256,
height = 128,
frame_count = 12,
animation_speed = 0.2,
line_length = 3,
scale = 2,
},
sound = {
{
filename = "__Bio_Industries_2__/sound/boom.ogg",
volume = 4.0
},
},
slow_down_factor = 0,
affected_by_wind = false,
cyclic = false,
duration = 60 * 5,
spread_duration = 10,
},
--- Napalm Small
{
type = "projectile",
name = "NE-Napalm-Small",
flags = {"not-on-map"},
acceleration = 0,
action = {
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "create-entity",
entity_name = "fire-flame"
},
}
}
},
},
animation = {
filename = "__core__/graphics/empty.png",
frame_count = 1,
width = 1,
height = 1,
priority = "high"
},
shadow = {
filename = "__core__/graphics/empty.png",
frame_count = 1,
width = 1,
height = 1,
priority = "high"
}
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/entities/bio_cannon/projectiles/"
require "util"
if BI.Settings.Bio_Cannon then
if mods["Natural_Evolution_Enemies"] then
NE_Damage = 2
else
NE_Damage = 1
end
data:extend({
--Projectile
-- Bio Cannon Ammo
-- Prototype
{
type = "projectile",
name = "bi-bio-cannon-proto-ammo",
flags = {"not-on-map"},
acceleration = 0.0004,
action = {
{
type = "area",
radius = 2,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 80 * NE_Damage, type = "physical"}
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
},
}
}
},
},
light = {intensity = 0.7, size = 3},
animation = {
filename = ICONPATH .. "bio_cannon_proto_ammo.png",
priority = "extra-high",
width = 18,
height = 47,
scale = 0.85,
frame_count = 1
},
shadow = {
filename = ICONPATH .. "bio_cannon_ammo-shadow.png",
priority = "extra-high",
width = 18,
height = 47,
scale = 0.85,
frame_count = 1
},
smoke = {
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, 1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
-- Basic
{
type = "projectile",
name = "bi-bio-cannon-basic-ammo",
flags = {"not-on-map"},
acceleration = 0.0005,
action = {
{
type = "area",
radius = 8,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 120 * NE_Damage, type = "physical"}
},
{
type = "damage",
damage = {amount = 180 * NE_Damage, type = "explosion"}
},
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "nested-result",
action = {
type = "area",
target_entities = false,
repeat_count = 10,
radius = 2,
action_delivery = {
type = "projectile",
projectile = "NE-Napalm-Small",
starting_speed = 0.5
}
}
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
},
{
type = "create-entity",
entity_name = "bio-cannon-explosion",
},
}
}
},
},
light = {intensity = 0.7, size = 6},
animation = {
filename = ICONPATH .. "bio_cannon_basic_ammo.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
shadow = {
filename = ICONPATH .. "bio_cannon_ammo-shadow.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
--[[
sound = {
{
filename = "__Natural_Evolution_Buildings__/sound/launch.ogg",
volume = 4.0
},
},
]]
smoke = {
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, 1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
--- Poison
{
type = "projectile",
name = "bi-bio-cannon-poison-ammo",
flags = {"not-on-map"},
acceleration = 0.0006,
action = {
{
type = "area",
radius = 12,
action_delivery = {
type = "instant",
target_effects = {
{
type = "damage",
damage = {amount = 120 * NE_Damage, type = "physical"}
},
{
type = "damage",
damage = {amount = 180 * NE_Damage, type = "explosion"}
},
{
type = "damage",
damage = {amount = 250 * NE_Damage, type = "poison"}
},
}
}
},
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "nested-result",
action = {
type = "area",
target_entities = false,
repeat_count = 20,
radius = 3,
action_delivery = {
type = "projectile",
projectile = "NE-Napalm-Small",
starting_speed = 0.5
}
}
},
{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
},
{
type = "create-entity",
entity_name = "bio-cannon-explosion",
},
}
}
},
},
light = {intensity = 0.8, size = 7},
animation = {
filename = ICONPATH .. "bio_cannon_poison_ammo.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
shadow = {
filename = ICONPATH .. "bio_cannon_ammo-shadow.png",
priority = "extra-high",
width = 18,
height = 47,
frame_count = 1
},
--[[
sound = {
{
filename = "__Natural_Evolution_Buildings__/sound/launch.ogg",
volume = 4.0
},
},
]]
smoke = {
{
name = "smoke-fast",
deviation = {0.15, 0.15},
frequency = 1,
position = {0, 1},
slow_down_factor = 1,
starting_frame = 3,
starting_frame_deviation = 5,
starting_frame_speed = 0,
starting_frame_speed_deviation = 5
}
}
},
--- Bio Cannon Explosion
{
type = "smoke-with-trigger",
name = "bio-cannon-explosion",
flags = {"not-on-map"},
show_when_smoke_off = true,
animation = {
filename = ICONPATH .. "explosion.png",
priority = "low",
width = 256,
height = 128,
frame_count = 12,
animation_speed = 0.2,
line_length = 3,
scale = 2,
},
sound = {
{
filename = "__Bio_Industries_2__/sound/boom.ogg",
volume = 4.0
},
},
slow_down_factor = 0,
affected_by_wind = false,
cyclic = false,
duration = 60 * 5,
spread_duration = 10,
},
--- Napalm Small
{
type = "projectile",
name = "NE-Napalm-Small",
flags = {"not-on-map"},
acceleration = 0,
action = {
{
type = "direct",
action_delivery = {
type = "instant",
target_effects = {
{
type = "create-entity",
entity_name = "fire-flame"
},
}
}
},
},
animation = {
filename = "__core__/graphics/empty.png",
frame_count = 1,
width = 1,
height = 1,
priority = "high"
},
shadow = {
filename = "__core__/graphics/empty.png",
frame_count = 1,
width = 1,
height = 1,
priority = "high"
}
},
})
end

View file

@ -1,118 +1,118 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/weapon/"
if BI.Settings.Bio_Cannon then
data:extend({
-- Prototype Artillery Proto Ammo
{
type = "ammo",
name = "bi-bio-cannon-proto-ammo",
icon = ICONPATH .. "bio_cannon_proto_ammo_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_cannon_proto_ammo_icon.png",
icon_size = 64,
}
},
ammo_category = "artillery-shell",
ammo_type = {
category = "Bio_Cannon_Ammo",
target_type = "direction",
action = {
{
type = "direct",
action_delivery = {
type = "projectile",
projectile = "bi-bio-cannon-proto-ammo",
starting_speed = 1,
direction_deviation = 0.8,
range_deviation = 0.8,
max_range = 90
}
}
}
},
subgroup = "ammo",
order = "z[Bio_Cannon_Ammo]-a[Proto]",
stack_size = 50,
},
-- Prototype Artillery Basic Ammo
{
type = "ammo",
name = "bi-bio-cannon-basic-ammo",
icon = ICONPATH .. "bio_cannon_basic_ammo_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_cannon_basic_ammo_icon.png",
icon_size = 64,
}
},
ammo_category = "artillery-shell",
ammo_type = {
category = "Bio_Cannon_Ammo",
target_type = "direction",
action = {
{
type = "direct",
action_delivery = {
type = "projectile",
projectile = "bi-bio-cannon-basic-ammo",
starting_speed = 1,
direction_deviation = 0.8,
range_deviation = 0.8,
max_range = 90
}
}
}
},
subgroup = "ammo",
order = "z[Bio_Cannon_Ammo]-b[Basic]",
stack_size = 50,
},
-- Prototype Artillery Poison Ammo
{
type = "ammo",
name = "bi-bio-cannon-poison-ammo",
icon = ICONPATH .. "bio_cannon_poison_ammo_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_cannon_poison_ammo_icon.png",
icon_size = 64,
}
},
ammo_category = "artillery-shell",
ammo_type = {
category = "Bio_Cannon_Ammo",
target_type = "direction",
action = {
{
type = "direct",
action_delivery = {
type = "projectile",
projectile = "bi-bio-cannon-poison-ammo",
starting_speed = 1,
direction_deviation = 0.8,
range_deviation = 0.8,
max_range = 90
}
}
}
},
subgroup = "ammo",
order = "z[Bio_Cannon_Ammo]-c[Poison]",
stack_size = 50,
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/weapon/"
if BI.Settings.Bio_Cannon then
data:extend({
-- Prototype Artillery Proto Ammo
{
type = "ammo",
name = "bi-bio-cannon-proto-ammo",
icon = ICONPATH .. "bio_cannon_proto_ammo_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_cannon_proto_ammo_icon.png",
icon_size = 64,
}
},
ammo_category = "artillery-shell",
ammo_type = {
category = "Bio_Cannon_Ammo",
target_type = "direction",
action = {
{
type = "direct",
action_delivery = {
type = "projectile",
projectile = "bi-bio-cannon-proto-ammo",
starting_speed = 1,
direction_deviation = 0.8,
range_deviation = 0.8,
max_range = 90
}
}
}
},
subgroup = "ammo",
order = "z[Bio_Cannon_Ammo]-a[Proto]",
stack_size = 50,
},
-- Prototype Artillery Basic Ammo
{
type = "ammo",
name = "bi-bio-cannon-basic-ammo",
icon = ICONPATH .. "bio_cannon_basic_ammo_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_cannon_basic_ammo_icon.png",
icon_size = 64,
}
},
ammo_category = "artillery-shell",
ammo_type = {
category = "Bio_Cannon_Ammo",
target_type = "direction",
action = {
{
type = "direct",
action_delivery = {
type = "projectile",
projectile = "bi-bio-cannon-basic-ammo",
starting_speed = 1,
direction_deviation = 0.8,
range_deviation = 0.8,
max_range = 90
}
}
}
},
subgroup = "ammo",
order = "z[Bio_Cannon_Ammo]-b[Basic]",
stack_size = 50,
},
-- Prototype Artillery Poison Ammo
{
type = "ammo",
name = "bi-bio-cannon-poison-ammo",
icon = ICONPATH .. "bio_cannon_poison_ammo_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_cannon_poison_ammo_icon.png",
icon_size = 64,
}
},
ammo_category = "artillery-shell",
ammo_type = {
category = "Bio_Cannon_Ammo",
target_type = "direction",
action = {
{
type = "direct",
action_delivery = {
type = "projectile",
projectile = "bi-bio-cannon-poison-ammo",
starting_speed = 1,
direction_deviation = 0.8,
range_deviation = 0.8,
max_range = 90
}
}
}
},
subgroup = "ammo",
order = "z[Bio_Cannon_Ammo]-c[Poison]",
stack_size = 50,
},
})
end

View file

@ -1,57 +1,57 @@
if BI.Settings.Bio_Cannon then
data:extend({
-- Prototype Artillery Proto Ammo
{
type= "recipe",
name= "bi-bio-cannon-proto-ammo",
localised_name = {"item-name.bi-bio-cannon-proto-ammo"},
localised_description = {"item-description.bi-bio-cannon-proto-ammo"},
enabled = false,
energy_required = 2,
ingredients = {{type="item", name="iron-plate", amount=10}, {type="item", name="explosives", amount=10}},
results = {{type="item", name="bi-bio-cannon-proto-ammo", amount=1}},
subgroup = "bi-ammo",
order = "z[Bio_Cannon_Ammo]-a[Proto]",
allow_as_intermediate = true, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
},
-- Prototype Artillery Basic Ammo
{
type= "recipe",
name= "bi-bio-cannon-basic-ammo",
localised_name = {"item-name.bi-bio-cannon-basic-ammo"},
localised_description = {"item-description.bi-bio-cannon-basic-ammo"},
enabled = false,
energy_required = 4,
ingredients = {{type="item", name="bi-bio-cannon-proto-ammo", amount=1}, {type="item", name="rocket", amount=10}},
results = {{type="item", name="bi-bio-cannon-basic-ammo", amount=1}},
subgroup = "bi-ammo",
order = "z[Bio_Cannon_Ammo]-b[Basic]",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
},
-- Prototype Artillery Poison Ammo
{
type= "recipe",
name= "bi-bio-cannon-poison-ammo",
localised_name = {"item-name.bi-bio-cannon-poison-ammo"},
localised_description = {"item-description.bi-bio-cannon-poison-ammo"},
enabled = false,
energy_required = 8,
ingredients = {{type="item", name="bi-bio-cannon-basic-ammo", amount=1}, {type="item", name="poison-capsule", amount=5}, {type="item", name="explosive-rocket", amount=5}},
results = {{type="item", name="bi-bio-cannon-poison-ammo", amount=1}},
subgroup = "bi-ammo",
order = "z[Bio_Cannon_Ammo]-c[Poison]",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
},
})
end
if BI.Settings.Bio_Cannon then
data:extend({
-- Prototype Artillery Proto Ammo
{
type= "recipe",
name= "bi-bio-cannon-proto-ammo",
localised_name = {"item-name.bi-bio-cannon-proto-ammo"},
localised_description = {"item-description.bi-bio-cannon-proto-ammo"},
enabled = false,
energy_required = 2,
ingredients = {{type="item", name="iron-plate", amount=10}, {type="item", name="explosives", amount=10}},
results = {{type="item", name="bi-bio-cannon-proto-ammo", amount=1}},
subgroup = "bi-ammo",
order = "z[Bio_Cannon_Ammo]-a[Proto]",
allow_as_intermediate = true, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
},
-- Prototype Artillery Basic Ammo
{
type= "recipe",
name= "bi-bio-cannon-basic-ammo",
localised_name = {"item-name.bi-bio-cannon-basic-ammo"},
localised_description = {"item-description.bi-bio-cannon-basic-ammo"},
enabled = false,
energy_required = 4,
ingredients = {{type="item", name="bi-bio-cannon-proto-ammo", amount=1}, {type="item", name="rocket", amount=10}},
results = {{type="item", name="bi-bio-cannon-basic-ammo", amount=1}},
subgroup = "bi-ammo",
order = "z[Bio_Cannon_Ammo]-b[Basic]",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
},
-- Prototype Artillery Poison Ammo
{
type= "recipe",
name= "bi-bio-cannon-poison-ammo",
localised_name = {"item-name.bi-bio-cannon-poison-ammo"},
localised_description = {"item-description.bi-bio-cannon-poison-ammo"},
enabled = false,
energy_required = 8,
ingredients = {{type="item", name="bi-bio-cannon-basic-ammo", amount=1}, {type="item", name="poison-capsule", amount=5}, {type="item", name="explosive-rocket", amount=5}},
results = {{type="item", name="bi-bio-cannon-poison-ammo", amount=1}},
subgroup = "bi-ammo",
order = "z[Bio_Cannon_Ammo]-c[Poison]",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
},
})
end

View file

@ -1,30 +1,30 @@
if BI.Settings.Bio_Cannon then
data:extend({
-- Hive Buster Turret
{
type = "recipe",
name = "bi-bio-cannon",
localised_name = {"entity-name.bi-bio-cannon"},
localised_description = {"entity-description.bi-bio.cannon"},
enabled = false,
energy_required = 50,
ingredients = {
{type="item", name="concrete", amount=100},
{type="item", name="radar", amount=1},
{type="item", name="steel-plate", amount=80},
{type="item", name="electric-engine-unit", amount=5},
},
results = {{type="item", name="bi-bio-cannon", amount=1}},
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = true, -- Added for 0.18.34/1.1.4
allow_decomposition = false, -- Added for 0.18.34/1.1.4
subgroup = "defensive-structure",
order = "b[turret]-e[bi-prototype-artillery-turret]"
},
})
end
if BI.Settings.Bio_Cannon then
data:extend({
-- Hive Buster Turret
{
type = "recipe",
name = "bi-bio-cannon",
localised_name = {"entity-name.bi-bio-cannon"},
localised_description = {"entity-description.bi-bio.cannon"},
enabled = false,
energy_required = 50,
ingredients = {
{type="item", name="concrete", amount=100},
{type="item", name="radar", amount=1},
{type="item", name="steel-plate", amount=80},
{type="item", name="electric-engine-unit", amount=5},
},
results = {{type="item", name="bi-bio-cannon", amount=1}},
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = true, -- Added for 0.18.34/1.1.4
allow_decomposition = false, -- Added for 0.18.34/1.1.4
subgroup = "defensive-structure",
order = "b[turret]-e[bi-prototype-artillery-turret]"
},
})
end

View file

@ -1,37 +1,37 @@
-- Don't duplicate what NE does
if BI.Settings.Bio_Cannon and not mods["Natural_Evolution_Buildings"] then
table.insert(data.raw.technology["physical-projectile-damage-5"].effects, {
type = "ammo-damage",
ammo_category = "Bio_Cannon_Ammo",
modifier = 0.9
})
table.insert(data.raw.technology["physical-projectile-damage-6"].effects, {
type = "ammo-damage",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1.3
})
table.insert(data.raw.technology["physical-projectile-damage-7"].effects, {
type = "ammo-damage",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1
})
table.insert(data.raw.technology["artillery-shell-speed-1"].effects, {
type = "gun-speed",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1
})
table.insert(data.raw.technology["weapon-shooting-speed-5"].effects, {
type = "gun-speed",
ammo_category = "Bio_Cannon_Ammo",
modifier = 0.8
})
table.insert(data.raw.technology["weapon-shooting-speed-6"].effects, {
type = "gun-speed",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1.5
})
end
-- Don't duplicate what NE does
if BI.Settings.Bio_Cannon and not mods["Natural_Evolution_Buildings"] then
table.insert(data.raw.technology["physical-projectile-damage-5"].effects, {
type = "ammo-damage",
ammo_category = "Bio_Cannon_Ammo",
modifier = 0.9
})
table.insert(data.raw.technology["physical-projectile-damage-6"].effects, {
type = "ammo-damage",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1.3
})
table.insert(data.raw.technology["physical-projectile-damage-7"].effects, {
type = "ammo-damage",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1
})
table.insert(data.raw.technology["artillery-shell-speed-1"].effects, {
type = "gun-speed",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1
})
table.insert(data.raw.technology["weapon-shooting-speed-5"].effects, {
type = "gun-speed",
ammo_category = "Bio_Cannon_Ammo",
modifier = 0.8
})
table.insert(data.raw.technology["weapon-shooting-speed-6"].effects, {
type = "gun-speed",
ammo_category = "Bio_Cannon_Ammo",
modifier = 1.5
})
end

View file

@ -1,52 +1,52 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
if BI.Settings.Bio_Cannon then
data:extend({
{
type = "technology",
name = "bi-tech-bio-cannon",
icon_size = 256,
icon = ICONPATH .. "bi-tech-bio_cannon.png",
icons = {
{
icon = ICONPATH .. "bi-tech-bio_cannon.png",
icon_size = 256,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-bio-cannon"
},
{
type = "unlock-recipe",
recipe = "bi-bio-cannon-proto-ammo"
},
{
type = "unlock-recipe",
recipe = "bi-bio-cannon-basic-ammo"
},
{
type = "unlock-recipe",
recipe = "bi-bio-cannon-poison-ammo"
},
},
prerequisites = {"military-2"},
unit = {
count = 300,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"military-science-pack", 1},
},
time = 30,
}
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
if BI.Settings.Bio_Cannon then
data:extend({
{
type = "technology",
name = "bi-tech-bio-cannon",
icon_size = 256,
icon = ICONPATH .. "bi-tech-bio_cannon.png",
icons = {
{
icon = ICONPATH .. "bi-tech-bio_cannon.png",
icon_size = 256,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-bio-cannon"
},
{
type = "unlock-recipe",
recipe = "bi-bio-cannon-proto-ammo"
},
{
type = "unlock-recipe",
recipe = "bi-bio-cannon-basic-ammo"
},
{
type = "unlock-recipe",
recipe = "bi-bio-cannon-poison-ammo"
},
},
prerequisites = {"military-2"},
unit = {
count = 300,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"military-science-pack", 1},
},
time = 30,
}
},
})
end

View file

@ -1,78 +1,78 @@
-- We may want to remove our coal processing techs and move the unlocks to a
-- similar tech from other mods. So let's store the unlocks for each tech for
-- easier shuffling!
return {
-- "bi-tech-coal-processing-1"
{
{
type = "unlock-recipe",
recipe = "bi-charcoal-1"
},
{
type = "unlock-recipe",
recipe = "bi-charcoal-2"
},
{
type = "unlock-recipe",
recipe = "bi-ash-2"
},
{
type = "unlock-recipe",
recipe = "bi-ash-1"
},
{
type = "unlock-recipe",
recipe = "bi-wood-fuel-brick"
},
{
type = "unlock-recipe",
recipe = "bi-seed-2"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-2"
},
{
type = "unlock-recipe",
recipe = "bi-logs-2"
},
{
type = "unlock-recipe",
recipe = "bi-cokery"
},
},
-- "bi-tech-coal-processing-2"
{
{
type = "unlock-recipe",
recipe = "bi-coal-1"
},
{
type = "unlock-recipe",
recipe = "bi-pellet-coke"
},
-- Moved here from "bi-tech-coal-processing-1" (0.18.29):
{
type = "unlock-recipe",
recipe = "bi-solid-fuel"
},
{
type = "unlock-recipe",
recipe = "bi-stone-brick"
},
},
-- "bi-tech-coal-processing-3"
{
{
type = "unlock-recipe",
recipe = "bi-coal-2"
},
{
type = "unlock-recipe",
recipe = "bi-coke-coal"
},
},
}
-- We may want to remove our coal processing techs and move the unlocks to a
-- similar tech from other mods. So let's store the unlocks for each tech for
-- easier shuffling!
return {
-- "bi-tech-coal-processing-1"
{
{
type = "unlock-recipe",
recipe = "bi-charcoal-1"
},
{
type = "unlock-recipe",
recipe = "bi-charcoal-2"
},
{
type = "unlock-recipe",
recipe = "bi-ash-2"
},
{
type = "unlock-recipe",
recipe = "bi-ash-1"
},
{
type = "unlock-recipe",
recipe = "bi-wood-fuel-brick"
},
{
type = "unlock-recipe",
recipe = "bi-seed-2"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-2"
},
{
type = "unlock-recipe",
recipe = "bi-logs-2"
},
{
type = "unlock-recipe",
recipe = "bi-cokery"
},
},
-- "bi-tech-coal-processing-2"
{
{
type = "unlock-recipe",
recipe = "bi-coal-1"
},
{
type = "unlock-recipe",
recipe = "bi-pellet-coke"
},
-- Moved here from "bi-tech-coal-processing-1" (0.18.29):
{
type = "unlock-recipe",
recipe = "bi-solid-fuel"
},
{
type = "unlock-recipe",
recipe = "bi-stone-brick"
},
},
-- "bi-tech-coal-processing-3"
{
{
type = "unlock-recipe",
recipe = "bi-coal-2"
},
{
type = "unlock-recipe",
recipe = "bi-coke-coal"
},
},
}

View file

@ -1,440 +1,440 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ICONPATHMIPS = BioInd.modRoot .. "/graphics/icons/mips/"
data:extend({
{
type = "recipe",
name = "bi-pellet-coke-2",
icon = ICONPATH .. "pellet_coke_b.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "pellet_coke_b.png",
icon_size = 64,
}
},
category = "biofarm-mod-smelting",
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-g[bi-coke-coal]-2",
energy_required = 4,
ingredients = {},
results = {{type="item", name="pellet-coke", amount=1}},
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
enabled = false,
},
-- fertilizer from sodium-hydroxide--
{
type = "recipe",
name = "bi-fertilizer-2",
icon = ICONPATH .. "fertilizer_sodium_hydroxide.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "fertilizer_sodium_hydroxide.png",
icon_size = 64,
}
},
category = "chemistry",
energy_required = 5,
ingredients = {
{type = "fluid", name = "nitrogen", amount = 10},
{type = "item", name = "bi-ash", amount = 10}
},
results = {
{type = "item", name = "fertilizer", amount = 5}
},
enabled = false,
allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4
always_show_made_in = true, -- Changed for 0.18.34/1.1.4
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
subgroup = "bio-bio-farm-intermediate-product",
order = "b[bi-fertilizer]",
},
})
---- Resin
if not data.raw.item["resin"] then
data:extend({
--- Resin Item
{
type = "item",
name = "resin",
icon = ICONPATH .. "bi_resin.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_resin.png",
icon_size = 64,
}
},
icon_mipmaps = 4,
pictures = {
{ size = 64, filename = ICONPATHMIPS.."Resin_1.png", scale = 0.2 },
{ size = 64, filename = ICONPATHMIPS.."Resin_2.png", scale = 0.2 },
{ size = 64, filename = ICONPATHMIPS.."Resin_3.png", scale = 0.2 },
{ size = 64, filename = ICONPATHMIPS.."Resin_4.png", scale = 0.2 }
},
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-bb[bi-resin]",
stack_size = 200
},
--- Resin recipe - Wood
{
type = "recipe",
name = "bi-resin-wood",
localised_name = {"recipe-name.bi-resin-wood"},
localised_description = {"recipe-description.bi-resin-wood"},
icon = ICONPATH .. "bi_resin_wood.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_resin_wood.png",
icon_size = 64,
}
},
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-bb[bi-2-resin-2-wood]",
enabled = false,
allow_as_intermediate = true, -- 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
energy_required = 1,
ingredients = {
{type = "item", name = "wood", amount = 1}
},
results = {{type="item", name="resin", amount=1}},
main_procuct = "",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
})
-- Order in table reflects order in display (Tech tree), so we remove the last
-- recipes, add the new one, and re-add the removed recipes where they belong.
for _, recipe in ipairs({"bi-woodpulp", "bi-resin-pulp", "bi-wood-from-pulp"}) do
thxbob.lib.tech.remove_recipe_unlock("bi-tech-bio-farming", recipe)
end
for _, recipe in ipairs({"bi-woodpulp", "bi-resin-wood", "bi-resin-pulp", "bi-wood-from-pulp"}) do
thxbob.lib.tech.add_recipe_unlock("bi-tech-bio-farming", recipe)
end
elseif data.raw.recipe["bob-resin-wood"] then
data.raw.recipe["bob-resin-wood"].icon = ICONPATH .. "bi_resin_wood.png"
data.raw.recipe["bob-resin-wood"].icon_size = 64
end
-- Pellet-Coke from Carbon - Bobs & Angels
if data.raw.item["solid-carbon"] and mods["angelspetrochem"] then
thxbob.lib.recipe.add_new_ingredient("bi-pellet-coke-2", {type = "item", name = "solid-carbon", amount = 10})
data.raw.recipe["bi-coke-coal"].icon = ICONPATH .. "pellet_coke_1.png"
data.raw.recipe["bi-coke-coal"].icon_size = 64
data.raw.recipe["bi-pellet-coke-2"].icon = ICONPATH .. "pellet_coke_a.png"
data.raw.recipe["bi-pellet-coke-2"].icon_size = 64
data.raw.recipe["bi-pellet-coke"].icon = ICONPATH .. "pellet_coke_c.png"
data.raw.recipe["bi-pellet-coke"].icon_size = 64
thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-pellet-coke-2")
elseif data.raw.item["carbon"] and mods["bobplates"] then
thxbob.lib.recipe.add_new_ingredient ("bi-pellet-coke-2", {type = "item", name = "carbon", amount = 10})
data.raw.recipe["bi-coke-coal"].icon = ICONPATH .. "pellet_coke_1.png"
data.raw.recipe["bi-coke-coal"].icon_size = 64
data.raw.recipe["bi-pellet-coke-2"].icon = ICONPATH .. "pellet_coke_b.png"
data.raw.recipe["bi-pellet-coke-2"].icon_size = 64
data.raw.recipe["bi-pellet-coke"].icon = ICONPATH .. "pellet_coke_c.png"
data.raw.recipe["bi-pellet-coke"].icon_size = 64
thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-pellet-coke-2")
end
-- Update Wood Bricks icon to Angels
if data.raw.item["wood-bricks"] and mods["angelsbioprocessing"] then
data.raw.recipe["bi-wood-fuel-brick"].icon = "__angelsbioprocessing__/graphics/icons/wood-bricks.png"
data.raw.recipe["bi-wood-fuel-brick"].icon_size = 32
data.raw.recipe["bi-wood-fuel-brick"].icons = {
{
icon = "__angelsbioprocessing__/graphics/icons/wood-bricks.png",
icon_size = 32,
}
}
data.raw.item["wood-bricks"].icon = "__angelsbioprocessing__/graphics/icons/wood-bricks.png"
data.raw.item["wood-bricks"].icon_size = 32
end
--- Add fertilizer recipes if bob's or Angels
if data.raw.item["solid-sodium-hydroxide"] and mods["angelspetrochem"] then
thxbob.lib.recipe.add_new_ingredient("bi-fertilizer-2", {type = "item", name = "solid-sodium-hydroxide", amount = 10})
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "gas-nitrogen")
data.raw.recipe["bi-fertilizer-2"].icon = ICONPATH .. "fertilizer_solid_sodium_hydroxide.png"
data.raw.recipe["bi-fertilizer-2"].icon_size = 64
thxbob.lib.tech.add_recipe_unlock("bi-tech-fertilizer", "bi-fertilizer-2")
elseif data.raw.item["sodium-hydroxide"] and mods["bobplates"] then
thxbob.lib.recipe.add_new_ingredient("bi-fertilizer-2", {
type = "item",
name = "sodium-hydroxide",
amount = 10
})
thxbob.lib.tech.add_recipe_unlock("bi-tech-fertilizer", "bi-fertilizer-2")
end
-- If Angels, replace liquid air + nitrogen and with Angel's ingredients in recipes
if data.raw.fluid["gas-nitrogen"] and data.raw.fluid["gas-compressed-air"] and mods["angelspetrochem"] then
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", "nitrogen", "gas-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "gas-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "gas-compressed-air")
thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "gas-compressed-air")
end
-- If Angels, replace icons for biomass-conversion-2 and bi_basic_gas_processing
if mods["angelspetrochem"] then
local conversion = data.raw.recipe["bi-biomass-conversion-2"]
conversion.icon = ICONPATH .. "bio_conversion_2_angels.png"
conversion.icons[1].icon = ICONPATH .. "bio_conversion_2_angels.png"
conversion.localised_name = {"recipe-name.bi-biomass-conversion-2-methane"}
conversion.localised_description = {"recipe-description.bi-biomass-conversion-2-methane"}
local gas_processing = data.raw.recipe["bi-basic-gas-processing"]
gas_processing.icon = ICONPATH .. "bi_basic_gas_processing_angels.png"
gas_processing.icons[1].icon = ICONPATH .. "bi_basic_gas_processing_angels.png"
end
-- If Angels, replace water with water-yellow-waste
if data.raw.fluid["water-yellow-waste"] and mods["angelspetrochem"] then
-- Replace water with water-yellow-waste in Algae Biomass conversion 4
thxbob.lib.recipe.remove_result("bi-biomass-conversion-4", "water")
thxbob.lib.recipe.add_result("bi-biomass-conversion-4", {
type = "fluid",
name = "water-yellow-waste",
amount = 40
})
-- Change recipe localizations
data.raw.recipe["bi-biomass-conversion-4"].localised_name =
{"recipe-name.bi-biomass-conversion-4-yellow-waste"}
data.raw.recipe["bi-biomass-conversion-4"].localised_description =
{"recipe-description.bi-biomass-conversion-4-yellow-waste"}
end
-- Krastorio
if mods["Krastorio"] then
-- Replace liquid air with oxygen in Algae Biomass conversion 2 and 3
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", "nitrogen", "k-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "k-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "k-oxygen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "k-oxygen")
end
-- Krastorio2
if mods["Krastorio2"] then
-- Replace liquid air with oxygen in Algae Biomass conversion 2 and 3
thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "oxygen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "oxygen")
end
--- Make Bio Farm use glass if Bob's
if data.raw.item.glass then
thxbob.lib.recipe.replace_ingredient("bi-bio-farm", "copper-cable", "glass")
end
--- Adding in some recipe's to use up Wood Pulp (Ash and Charcoal) and Crushed Stone
if mods["angelsrefining"] then
data:extend({
-- Charcoal and Crushed Stone Sink
{
type = "recipe",
name = "bi-mineralized-sulfuric-waste",
icon = ICONPATH .. "bi_mineralized_sulfuric.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_mineralized_sulfuric.png",
icon_size = 64,
}
},
category = "liquifying",
subgroup = "water-treatment",
energy_required = 2,
ingredients = {
{type = "fluid", name = "water-purified", amount = 100},
{type = "item", name = "stone-crushed", amount = 90},
{type = "item", name = "wood-charcoal", amount = 30},
},
results= {
{type = "fluid", name = "water-yellow-waste", amount = 40},
{type = "fluid", name = "water-mineralized", amount = 60},
},
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
order = "a[water-water-mineralized]-2",
},
-- Ash and Crushed Stone Sink
{
type = "recipe",
name = "bi-slag-slurry",
icon = ICONPATH .. "bi_slurry.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_slurry.png",
icon_size = 64,
}
},
category = "liquifying",
subgroup = "liquifying",
energy_required = 4,
ingredients = {
{type = "fluid", name = "water-saline", amount = 50},
{type = "item", name = "stone-crushed", amount = 90},
{type = "item", name = "bi-ash", amount = 40},
},
results = {
{type = "fluid", name = "slag-slurry", amount = 100},
},
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
order = "i [slag-processing-dissolution]-2",
},
})
thxbob.lib.tech.add_recipe_unlock("water-treatment", "bi-mineralized-sulfuric-waste")
thxbob.lib.tech.add_recipe_unlock("slag-processing-1", "bi-slag-slurry")
end
--- Alternative Wooden-Board Recipe for Bob's Electronics
if data.raw.item["wooden-board"] and mods["bobelectronics"] then
data:extend({
-- Wood - Press Wood
{
type = "recipe",
name = "bi-press-wood",
localised_name = {"recipe-name.bi-press-wood"},
icon = ICONPATH .. "bi_wooden_board.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_wooden_board.png",
icon_size = 64,
}
},
subgroup = "bob-boards",
order = "c-a1[wooden-board]",
category = "electronics",
energy_required = 1,
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
ingredients = {
{type = "item", name = "bi-woodpulp", amount = 3},
{type = "item", name = "resin", amount = 1},
},
results = {
{type = "item", name = "wooden-board", amount = 6}
},
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
})
thxbob.lib.tech.add_recipe_unlock("electronics", "bi-press-wood")
if mods["ShinyBobGFX"] or mods["ShinyBobGFX_Continued"] then
data.raw["recipe"]["bi-press-wood"].icon = ICONPATH .. "bi_wooden_board_shiny.png"
data.raw["recipe"]["bi-press-wood"].icon_size = 64
end
end
-- Replace Angels Charcoal Icon
if data.raw.recipe["wood-charcoal"] then
data.raw.recipe["wood-charcoal"].icon = ICONPATH .. "charcoal_pellets.png"
data.raw.recipe["wood-charcoal"].icon_size = 64
data.raw.recipe["wood-charcoal"].category = "biofarm-mod-smelting"
data.raw.item["wood-charcoal"].icon = ICONPATH .. "charcoal.png"
data.raw.item["wood-charcoal"].icon_size = 64
data.raw.item["wood-charcoal"].fuel_emissions_multiplier = 1.05
end
-- Add recipe for sand from crushed stone if any other mod provides sand
if data.raw.item["sand"] or
data.raw.item["biotech-sand"] or
data.raw.item["solid-sand"] then
BioInd.writeDebug("Generating recipe for sand from crushed stone!")
-- General recipe for sand (will be adjusted later if necessary)
data:extend({
{
type = "recipe",
name = "bi-sand",
icons = {
{
icon = ICONPATH .. "sand-aai.png",
icon_size = 64,
mip_maps = 1,
}
},
category = "biofarm-mod-crushing",
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-z[bi-9-sand]",
energy_required = 1,
ingredients = {{type="item", name="stone-crushed", amount=2}},
results = {{type="item", name="sand", amount=5}},
main_product = "",
enabled = false,
allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4
always_show_made_in = true, -- Changed for 0.18.34/1.1.4
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
})
local recipe = data.raw.recipe["bi-sand"]
-- Adjust result for BioTech
if mods["BioTech"] then
BioInd.writeDebug("Adjusting result for \"BioTech\"")
recipe.result = "biotech-sand"
-- Adjust result for Angel's
elseif mods["angelsrefining"] then
-- Adjust result
BioInd.writeDebug("Adjusting result for \"angelsrefining\"")
recipe.result = "solid-sand"
-- Adjust icon for Krastorio
elseif mods["Krastorio2"] or mods["Krastorio"] then
BioInd.writeDebug("Using Krastorio icon …")
recipe.icons[1].icon = ICONPATH .. "sand-Krastorio.png"
end
-- Add recipe to technology
BioInd.writeDebug("Add unlock for recipe bi-sand")
thxbob.lib.tech.add_recipe_unlock("steel-processing", "bi-sand")
-- Use alternative descriptions for stone crusher!
BioInd.writeDebug("Using alternative descriptions for \"bi-stone-crusher\"!")
for _, t in ipairs({"furnace", "item", "recipe"}) do
data.raw[t]["bi-stone-crusher"].localised_description =
{"entity-description.bi-stone-crusher-sand"}
end
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ICONPATHMIPS = BioInd.modRoot .. "/graphics/icons/mips/"
data:extend({
{
type = "recipe",
name = "bi-pellet-coke-2",
icon = ICONPATH .. "pellet_coke_b.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "pellet_coke_b.png",
icon_size = 64,
}
},
category = "biofarm-mod-smelting",
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-g[bi-coke-coal]-2",
energy_required = 4,
ingredients = {},
results = {{type="item", name="pellet-coke", amount=1}},
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
enabled = false,
},
-- fertilizer from sodium-hydroxide--
{
type = "recipe",
name = "bi-fertilizer-2",
icon = ICONPATH .. "fertilizer_sodium_hydroxide.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "fertilizer_sodium_hydroxide.png",
icon_size = 64,
}
},
category = "chemistry",
energy_required = 5,
ingredients = {
{type = "fluid", name = "nitrogen", amount = 10},
{type = "item", name = "bi-ash", amount = 10}
},
results = {
{type = "item", name = "fertilizer", amount = 5}
},
enabled = false,
allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4
always_show_made_in = true, -- Changed for 0.18.34/1.1.4
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
subgroup = "bio-bio-farm-intermediate-product",
order = "b[bi-fertilizer]",
},
})
---- Resin
if not data.raw.item["resin"] then
data:extend({
--- Resin Item
{
type = "item",
name = "resin",
icon = ICONPATH .. "bi_resin.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_resin.png",
icon_size = 64,
}
},
icon_mipmaps = 4,
pictures = {
{ size = 64, filename = ICONPATHMIPS.."Resin_1.png", scale = 0.2 },
{ size = 64, filename = ICONPATHMIPS.."Resin_2.png", scale = 0.2 },
{ size = 64, filename = ICONPATHMIPS.."Resin_3.png", scale = 0.2 },
{ size = 64, filename = ICONPATHMIPS.."Resin_4.png", scale = 0.2 }
},
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-bb[bi-resin]",
stack_size = 200
},
--- Resin recipe - Wood
{
type = "recipe",
name = "bi-resin-wood",
localised_name = {"recipe-name.bi-resin-wood"},
localised_description = {"recipe-description.bi-resin-wood"},
icon = ICONPATH .. "bi_resin_wood.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_resin_wood.png",
icon_size = 64,
}
},
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-bb[bi-2-resin-2-wood]",
enabled = false,
allow_as_intermediate = true, -- 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
energy_required = 1,
ingredients = {
{type = "item", name = "wood", amount = 1}
},
results = {{type="item", name="resin", amount=1}},
main_procuct = "",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
})
-- Order in table reflects order in display (Tech tree), so we remove the last
-- recipes, add the new one, and re-add the removed recipes where they belong.
for _, recipe in ipairs({"bi-woodpulp", "bi-resin-pulp", "bi-wood-from-pulp"}) do
thxbob.lib.tech.remove_recipe_unlock("bi-tech-bio-farming", recipe)
end
for _, recipe in ipairs({"bi-woodpulp", "bi-resin-wood", "bi-resin-pulp", "bi-wood-from-pulp"}) do
thxbob.lib.tech.add_recipe_unlock("bi-tech-bio-farming", recipe)
end
elseif data.raw.recipe["bob-resin-wood"] then
data.raw.recipe["bob-resin-wood"].icon = ICONPATH .. "bi_resin_wood.png"
data.raw.recipe["bob-resin-wood"].icon_size = 64
end
-- Pellet-Coke from Carbon - Bobs & Angels
if data.raw.item["solid-carbon"] and mods["angelspetrochem"] then
thxbob.lib.recipe.add_new_ingredient("bi-pellet-coke-2", {type = "item", name = "solid-carbon", amount = 10})
data.raw.recipe["bi-coke-coal"].icon = ICONPATH .. "pellet_coke_1.png"
data.raw.recipe["bi-coke-coal"].icon_size = 64
data.raw.recipe["bi-pellet-coke-2"].icon = ICONPATH .. "pellet_coke_a.png"
data.raw.recipe["bi-pellet-coke-2"].icon_size = 64
data.raw.recipe["bi-pellet-coke"].icon = ICONPATH .. "pellet_coke_c.png"
data.raw.recipe["bi-pellet-coke"].icon_size = 64
thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-pellet-coke-2")
elseif data.raw.item["carbon"] and mods["bobplates"] then
thxbob.lib.recipe.add_new_ingredient ("bi-pellet-coke-2", {type = "item", name = "carbon", amount = 10})
data.raw.recipe["bi-coke-coal"].icon = ICONPATH .. "pellet_coke_1.png"
data.raw.recipe["bi-coke-coal"].icon_size = 64
data.raw.recipe["bi-pellet-coke-2"].icon = ICONPATH .. "pellet_coke_b.png"
data.raw.recipe["bi-pellet-coke-2"].icon_size = 64
data.raw.recipe["bi-pellet-coke"].icon = ICONPATH .. "pellet_coke_c.png"
data.raw.recipe["bi-pellet-coke"].icon_size = 64
thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-pellet-coke-2")
end
-- Update Wood Bricks icon to Angels
if data.raw.item["wood-bricks"] and mods["angelsbioprocessing"] then
data.raw.recipe["bi-wood-fuel-brick"].icon = "__angelsbioprocessing__/graphics/icons/wood-bricks.png"
data.raw.recipe["bi-wood-fuel-brick"].icon_size = 32
data.raw.recipe["bi-wood-fuel-brick"].icons = {
{
icon = "__angelsbioprocessing__/graphics/icons/wood-bricks.png",
icon_size = 32,
}
}
data.raw.item["wood-bricks"].icon = "__angelsbioprocessing__/graphics/icons/wood-bricks.png"
data.raw.item["wood-bricks"].icon_size = 32
end
--- Add fertilizer recipes if bob's or Angels
if data.raw.item["solid-sodium-hydroxide"] and mods["angelspetrochem"] then
thxbob.lib.recipe.add_new_ingredient("bi-fertilizer-2", {type = "item", name = "solid-sodium-hydroxide", amount = 10})
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "gas-nitrogen")
data.raw.recipe["bi-fertilizer-2"].icon = ICONPATH .. "fertilizer_solid_sodium_hydroxide.png"
data.raw.recipe["bi-fertilizer-2"].icon_size = 64
thxbob.lib.tech.add_recipe_unlock("bi-tech-fertilizer", "bi-fertilizer-2")
elseif data.raw.item["sodium-hydroxide"] and mods["bobplates"] then
thxbob.lib.recipe.add_new_ingredient("bi-fertilizer-2", {
type = "item",
name = "sodium-hydroxide",
amount = 10
})
thxbob.lib.tech.add_recipe_unlock("bi-tech-fertilizer", "bi-fertilizer-2")
end
-- If Angels, replace liquid air + nitrogen and with Angel's ingredients in recipes
if data.raw.fluid["gas-nitrogen"] and data.raw.fluid["gas-compressed-air"] and mods["angelspetrochem"] then
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", "nitrogen", "gas-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "gas-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "gas-compressed-air")
thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "gas-compressed-air")
end
-- If Angels, replace icons for biomass-conversion-2 and bi_basic_gas_processing
if mods["angelspetrochem"] then
local conversion = data.raw.recipe["bi-biomass-conversion-2"]
conversion.icon = ICONPATH .. "bio_conversion_2_angels.png"
conversion.icons[1].icon = ICONPATH .. "bio_conversion_2_angels.png"
conversion.localised_name = {"recipe-name.bi-biomass-conversion-2-methane"}
conversion.localised_description = {"recipe-description.bi-biomass-conversion-2-methane"}
local gas_processing = data.raw.recipe["bi-basic-gas-processing"]
gas_processing.icon = ICONPATH .. "bi_basic_gas_processing_angels.png"
gas_processing.icons[1].icon = ICONPATH .. "bi_basic_gas_processing_angels.png"
end
-- If Angels, replace water with water-yellow-waste
if data.raw.fluid["water-yellow-waste"] and mods["angelspetrochem"] then
-- Replace water with water-yellow-waste in Algae Biomass conversion 4
thxbob.lib.recipe.remove_result("bi-biomass-conversion-4", "water")
thxbob.lib.recipe.add_result("bi-biomass-conversion-4", {
type = "fluid",
name = "water-yellow-waste",
amount = 40
})
-- Change recipe localizations
data.raw.recipe["bi-biomass-conversion-4"].localised_name =
{"recipe-name.bi-biomass-conversion-4-yellow-waste"}
data.raw.recipe["bi-biomass-conversion-4"].localised_description =
{"recipe-description.bi-biomass-conversion-4-yellow-waste"}
end
-- Krastorio
if mods["Krastorio"] then
-- Replace liquid air with oxygen in Algae Biomass conversion 2 and 3
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", "nitrogen", "k-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "k-nitrogen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "k-oxygen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "k-oxygen")
end
-- Krastorio2
if mods["Krastorio2"] then
-- Replace liquid air with oxygen in Algae Biomass conversion 2 and 3
thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "oxygen")
thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "oxygen")
end
--- Make Bio Farm use glass if Bob's
if data.raw.item.glass then
thxbob.lib.recipe.replace_ingredient("bi-bio-farm", "copper-cable", "glass")
end
--- Adding in some recipe's to use up Wood Pulp (Ash and Charcoal) and Crushed Stone
if mods["angelsrefining"] then
data:extend({
-- Charcoal and Crushed Stone Sink
{
type = "recipe",
name = "bi-mineralized-sulfuric-waste",
icon = ICONPATH .. "bi_mineralized_sulfuric.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_mineralized_sulfuric.png",
icon_size = 64,
}
},
category = "liquifying",
subgroup = "water-treatment",
energy_required = 2,
ingredients = {
{type = "fluid", name = "water-purified", amount = 100},
{type = "item", name = "stone-crushed", amount = 90},
{type = "item", name = "wood-charcoal", amount = 30},
},
results= {
{type = "fluid", name = "water-yellow-waste", amount = 40},
{type = "fluid", name = "water-mineralized", amount = 60},
},
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
order = "a[water-water-mineralized]-2",
},
-- Ash and Crushed Stone Sink
{
type = "recipe",
name = "bi-slag-slurry",
icon = ICONPATH .. "bi_slurry.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_slurry.png",
icon_size = 64,
}
},
category = "liquifying",
subgroup = "liquifying",
energy_required = 4,
ingredients = {
{type = "fluid", name = "water-saline", amount = 50},
{type = "item", name = "stone-crushed", amount = 90},
{type = "item", name = "bi-ash", amount = 40},
},
results = {
{type = "fluid", name = "slag-slurry", amount = 100},
},
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
order = "i [slag-processing-dissolution]-2",
},
})
thxbob.lib.tech.add_recipe_unlock("water-treatment", "bi-mineralized-sulfuric-waste")
thxbob.lib.tech.add_recipe_unlock("slag-processing-1", "bi-slag-slurry")
end
--- Alternative Wooden-Board Recipe for Bob's Electronics
if data.raw.item["wooden-board"] and mods["bobelectronics"] then
data:extend({
-- Wood - Press Wood
{
type = "recipe",
name = "bi-press-wood",
localised_name = {"recipe-name.bi-press-wood"},
icon = ICONPATH .. "bi_wooden_board.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_wooden_board.png",
icon_size = 64,
}
},
subgroup = "bob-boards",
order = "c-a1[wooden-board]",
category = "electronics",
energy_required = 1,
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
ingredients = {
{type = "item", name = "bi-woodpulp", amount = 3},
{type = "item", name = "resin", amount = 1},
},
results = {
{type = "item", name = "wooden-board", amount = 6}
},
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
})
thxbob.lib.tech.add_recipe_unlock("electronics", "bi-press-wood")
if mods["ShinyBobGFX"] or mods["ShinyBobGFX_Continued"] then
data.raw["recipe"]["bi-press-wood"].icon = ICONPATH .. "bi_wooden_board_shiny.png"
data.raw["recipe"]["bi-press-wood"].icon_size = 64
end
end
-- Replace Angels Charcoal Icon
if data.raw.recipe["wood-charcoal"] then
data.raw.recipe["wood-charcoal"].icon = ICONPATH .. "charcoal_pellets.png"
data.raw.recipe["wood-charcoal"].icon_size = 64
data.raw.recipe["wood-charcoal"].category = "biofarm-mod-smelting"
data.raw.item["wood-charcoal"].icon = ICONPATH .. "charcoal.png"
data.raw.item["wood-charcoal"].icon_size = 64
data.raw.item["wood-charcoal"].fuel_emissions_multiplier = 1.05
end
-- Add recipe for sand from crushed stone if any other mod provides sand
if data.raw.item["sand"] or
data.raw.item["biotech-sand"] or
data.raw.item["solid-sand"] then
BioInd.writeDebug("Generating recipe for sand from crushed stone!")
-- General recipe for sand (will be adjusted later if necessary)
data:extend({
{
type = "recipe",
name = "bi-sand",
icons = {
{
icon = ICONPATH .. "sand-aai.png",
icon_size = 64,
mip_maps = 1,
}
},
category = "biofarm-mod-crushing",
subgroup = "bio-bio-farm-raw",
order = "a[bi]-a-z[bi-9-sand]",
energy_required = 1,
ingredients = {{type="item", name="stone-crushed", amount=2}},
results = {{type="item", name="sand", amount=5}},
main_product = "",
enabled = false,
allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4
always_show_made_in = true, -- Changed for 0.18.34/1.1.4
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
})
local recipe = data.raw.recipe["bi-sand"]
-- Adjust result for BioTech
if mods["BioTech"] then
BioInd.writeDebug("Adjusting result for \"BioTech\"")
recipe.result = "biotech-sand"
-- Adjust result for Angel's
elseif mods["angelsrefining"] then
-- Adjust result
BioInd.writeDebug("Adjusting result for \"angelsrefining\"")
recipe.result = "solid-sand"
-- Adjust icon for Krastorio
elseif mods["Krastorio2"] or mods["Krastorio"] then
BioInd.writeDebug("Using Krastorio icon …")
recipe.icons[1].icon = ICONPATH .. "sand-Krastorio.png"
end
-- Add recipe to technology
BioInd.writeDebug("Add unlock for recipe bi-sand")
thxbob.lib.tech.add_recipe_unlock("steel-processing", "bi-sand")
-- Use alternative descriptions for stone crusher!
BioInd.writeDebug("Using alternative descriptions for \"bi-stone-crusher\"!")
for _, t in ipairs({"furnace", "item", "recipe"}) do
data.raw[t]["bi-stone-crusher"].localised_description =
{"entity-description.bi-stone-crusher-sand"}
end
end

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,27 +1,27 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
----- Bio-Mass
{
type = "fluid",
name = "bi-biomass",
icon = ICONPATH .. "biomass.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "biomass.png",
icon_size = 64,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
base_color = {r = 0, g = 0, b = 0},
flow_color = {r = 0.1, g = 1.0, b = 0.0},
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
order = "a[fluid]-b[biomass]"
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
----- Bio-Mass
{
type = "fluid",
name = "bi-biomass",
icon = ICONPATH .. "biomass.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "biomass.png",
icon_size = 64,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
base_color = {r = 0, g = 0, b = 0},
flow_color = {r = 0.1, g = 1.0, b = 0.0},
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
order = "a[fluid]-b[biomass]"
},
})

View file

@ -1,341 +1,341 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
function assembler2pipepicturesCokery()
return
{
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png",
priority = "extra-high",
width = 42,
height = 76,
shift = util.by_pixel(-24.5, 1),
scale = 0.5,
},
south = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png",
priority = "extra-high",
width = 39,
height = 73,
shift = util.by_pixel(25.75, 1.25),
scale = 0.5,
}
}
end
function assembler2pipepicturesCokery()
return
{
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = {0.09375, 0.4375}
},
east = {
filename = "__base__/graphics/entity/assembling-machine-2/pipe-east.png",
priority = "extra-high",
width = 41,
height = 40,
shift = {-0.71875, 0}
},
south = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = {0.0625, -1}
},
west = {
filename = "__base__/graphics/entity/assembling-machine-2/pipe-west.png",
priority = "extra-high",
width = 41,
height = 40,
shift = {0.78125, 0.03125}
}
}
end
function pipecoverspicturesCokery()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
east = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
south = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
west = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
}
}
end
function assembler2pipepicturesBioreactor()
return
{
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 71,
height = 38,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png",
priority = "extra-high",
width = 42,
height = 76,
shift = util.by_pixel(-24.5, 1),
scale = 0.5,
},
south = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-S.png",
priority = "extra-high",
width = 88,
height = 61,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png",
priority = "extra-high",
width = 39,
height = 73,
shift = util.by_pixel(25.75, 1.25),
scale = 0.5,
}
}
end
function pipecoverspicturesBioreactor()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
east = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
south = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
west = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
}
}
end
function BioFarm_Pipe_Connectors_Left()
return
{
north = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-N_l.png",
priority = "extra-high",
width = 51,
height = 35,
shift = {0.25, 1},
},
east = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-E_l.png",
priority = "extra-high",
width = 18,
height = 48,
shift = {-1, -0.25},
},
south = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-S_l.png",
priority = "extra-high",
width = 49,
height = 25,
shift = {0.5, -1},
},
west = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-W_l.png",
priority = "extra-high",
width = 16,
height = 51,
shift = {0.5, 0.5},
}
}
end
function bio_farm_pipe_pictures()
return
{
north = {
filename = "__base__/graphics/entity/assembling-machine-3/hr-assembling-machine-3-pipe-N.png",
priority = "extra-high",
width = 71,
height = 38,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
},
south = {
filename = "__base__/graphics/entity/assembling-machine-3/hr-assembling-machine-3-pipe-S.png",
priority = "extra-high",
width = 88,
height = 61,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
}
}
end
bio_farm_pipe_covers_pictures = function()
return {
north = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
draw_as_shadow = true
},
},
},
east = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
shift = {-0.22, 0},
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
shift = {-0.22, 0},
draw_as_shadow = true
},
},
},
south = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
draw_as_shadow = true
},
},
},
west = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
shift = {0.2, 0},
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
shift = {0.2, 0},
draw_as_shadow = true
},
},
}
}
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
function assembler2pipepicturesCokery()
return
{
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png",
priority = "extra-high",
width = 42,
height = 76,
shift = util.by_pixel(-24.5, 1),
scale = 0.5,
},
south = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png",
priority = "extra-high",
width = 39,
height = 73,
shift = util.by_pixel(25.75, 1.25),
scale = 0.5,
}
}
end
function assembler2pipepicturesCokery()
return
{
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = {0.09375, 0.4375}
},
east = {
filename = "__base__/graphics/entity/assembling-machine-2/pipe-east.png",
priority = "extra-high",
width = 41,
height = 40,
shift = {-0.71875, 0}
},
south = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = {0.0625, -1}
},
west = {
filename = "__base__/graphics/entity/assembling-machine-2/pipe-west.png",
priority = "extra-high",
width = 41,
height = 40,
shift = {0.78125, 0.03125}
}
}
end
function pipecoverspicturesCokery()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
east = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
south = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
west = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
}
}
end
function assembler2pipepicturesBioreactor()
return
{
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 71,
height = 38,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png",
priority = "extra-high",
width = 42,
height = 76,
shift = util.by_pixel(-24.5, 1),
scale = 0.5,
},
south = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-S.png",
priority = "extra-high",
width = 88,
height = 61,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png",
priority = "extra-high",
width = 39,
height = 73,
shift = util.by_pixel(25.75, 1.25),
scale = 0.5,
}
}
end
function pipecoverspicturesBioreactor()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
east = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
south = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
west = {
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
}
}
end
function BioFarm_Pipe_Connectors_Left()
return
{
north = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-N_l.png",
priority = "extra-high",
width = 51,
height = 35,
shift = {0.25, 1},
},
east = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-E_l.png",
priority = "extra-high",
width = 18,
height = 48,
shift = {-1, -0.25},
},
south = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-S_l.png",
priority = "extra-high",
width = 49,
height = 25,
shift = {0.5, -1},
},
west = {
filename = "__Bio_Industries_2__/graphics/entities/biofarm/pipe_connections/Bio_Farm-pipe-W_l.png",
priority = "extra-high",
width = 16,
height = 51,
shift = {0.5, 0.5},
}
}
end
function bio_farm_pipe_pictures()
return
{
north = {
filename = "__base__/graphics/entity/assembling-machine-3/hr-assembling-machine-3-pipe-N.png",
priority = "extra-high",
width = 71,
height = 38,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
},
south = {
filename = "__base__/graphics/entity/assembling-machine-3/hr-assembling-machine-3-pipe-S.png",
priority = "extra-high",
width = 88,
height = 61,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
}
}
end
bio_farm_pipe_covers_pictures = function()
return {
north = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
draw_as_shadow = true
},
},
},
east = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
shift = {-0.22, 0},
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
shift = {-0.22, 0},
draw_as_shadow = true
},
},
},
south = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
draw_as_shadow = true
},
},
},
west = {
layers = {
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
shift = {0.2, 0},
scale = 0.5
},
{
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west-shadow.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
shift = {0.2, 0},
draw_as_shadow = true
},
},
}
}
end

View file

@ -1,33 +1,33 @@
data:extend(
{
{
type = "recipe-category",
name = "biofarm-mod-smelting"
},
{
type = "recipe-category",
name = "biofarm-mod-crushing"
},
{
type = "recipe-category",
name = "biofarm-mod-bioreactor"
},
{
type = "recipe-category",
name = "biofarm-mod-farm"
},
{
type = "recipe-category",
name = "biofarm-mod-greenhouse"
},
{
type = "recipe-category",
name = "bi-arboretum"
},
}
)
data:extend(
{
{
type = "recipe-category",
name = "biofarm-mod-smelting"
},
{
type = "recipe-category",
name = "biofarm-mod-crushing"
},
{
type = "recipe-category",
name = "biofarm-mod-bioreactor"
},
{
type = "recipe-category",
name = "biofarm-mod-farm"
},
{
type = "recipe-category",
name = "biofarm-mod-greenhouse"
},
{
type = "recipe-category",
name = "bi-arboretum"
},
}
)

File diff suppressed because it is too large Load diff

View file

@ -1,223 +1,223 @@
local BioInd = require('common')('Bio_Industries_2')
local coal_processing = require("prototypes.Bio_Farm.coal_processing")
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
---- Bio Farm
data:extend({
{
type = "technology",
name = "bi-tech-bio-farming",
icon_size = 128,
icon = ICONPATH .. "Bio_Farm_Tech_128.png",
icons = {
{
icon = ICONPATH .. "Bio_Farm_Tech_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-seed-1"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-1"
},
{
type = "unlock-recipe",
recipe = "bi-logs-1"
},
{
type = "unlock-recipe",
recipe = "bi-bio-greenhouse"
},
{
type = "unlock-recipe",
recipe = "bi-bio-farm"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r1"
},
{
type = "unlock-recipe",
recipe = "bi-woodpulp"
},
{
type = "unlock-recipe",
recipe = "bi-resin-pulp"
},
{
type = "unlock-recipe",
recipe = "bi-wood-from-pulp"
},
},
prerequisites = {"lamp"},
unit = {
count = 25,
ingredients = {
{"automation-science-pack", 1}
},
time = 20
},
},
{
type = "technology",
name = "bi-tech-coal-processing-1",
localised_name = {"technology-name.bi-tech-coal-processing-1"},
localised_description = {"technology-description.bi-tech-coal-processing-1"},
icon_size = 128,
icon = ICONPATH .. "Coal_128.png",
icons = {
{
icon = ICONPATH .. "Coal_128.png",
icon_size = 128,
}
},
effects = coal_processing[1],
prerequisites = {"advanced-material-processing"},
unit = {
count = 150,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 30
},
},
{
type = "technology",
name = "bi-tech-coal-processing-2",
localised_name = {"technology-name.bi-tech-coal-processing-2"},
localised_description = {"technology-description.bi-tech-coal-processing-2"},
icon_size = 128,
icon = ICONPATH .. "Coal_128.png",
icons = {
{
icon = ICONPATH .. "Coal_128.png",
icon_size = 128,
}
},
effects = coal_processing[2],
prerequisites = {"bi-tech-coal-processing-1", "chemical-science-pack"},
unit = {
count = 150,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 35
},
},
{
type = "technology",
name = "bi-tech-coal-processing-3",
localised_name = {"technology-name.bi-tech-coal-processing-3"},
localised_description = {"technology-description.bi-tech-coal-processing-3"},
icon_size = 128,
icon = ICONPATH .. "Coal_128.png",
icons = {
{
icon = ICONPATH .. "Coal_128.png",
icon_size = 128,
}
},
effects = coal_processing[3],
prerequisites = {"bi-tech-coal-processing-2", "production-science-pack"},
unit = {
count = 250,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
},
time = 40
},
},
{
type = "technology",
name = "bi-tech-fertilizer",
icon_size = 128,
icon = ICONPATH .. "Fertilizer_128.png",
icons = {
{
icon = ICONPATH .. "Fertilizer_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-liquid-air"
},
{
type = "unlock-recipe",
recipe = "bi-nitrogen"
},
{
type = "unlock-recipe",
recipe = "bi-fertilizer-1"
},
{
type = "unlock-recipe",
recipe = "bi-seed-3"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-3"
},
{
type = "unlock-recipe",
recipe = "bi-logs-3"
},
{
type = "unlock-recipe",
recipe = "bi-bio-garden"
},
{
type = "unlock-recipe",
recipe = "bi-purified-air-1"
},
{
type = "unlock-recipe",
recipe = "bi-seed-bomb-basic"
},
{
type = "unlock-recipe",
recipe = "bi-seed-bomb-standard"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r2"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r4"
},
},
prerequisites = {
"fluid-handling",
"bi-tech-bio-farming"
},
unit = {
count = 250,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 30
}
}
})
local BioInd = require('common')('Bio_Industries_2')
local coal_processing = require("prototypes.Bio_Farm.coal_processing")
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
---- Bio Farm
data:extend({
{
type = "technology",
name = "bi-tech-bio-farming",
icon_size = 128,
icon = ICONPATH .. "Bio_Farm_Tech_128.png",
icons = {
{
icon = ICONPATH .. "Bio_Farm_Tech_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-seed-1"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-1"
},
{
type = "unlock-recipe",
recipe = "bi-logs-1"
},
{
type = "unlock-recipe",
recipe = "bi-bio-greenhouse"
},
{
type = "unlock-recipe",
recipe = "bi-bio-farm"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r1"
},
{
type = "unlock-recipe",
recipe = "bi-woodpulp"
},
{
type = "unlock-recipe",
recipe = "bi-resin-pulp"
},
{
type = "unlock-recipe",
recipe = "bi-wood-from-pulp"
},
},
prerequisites = {"lamp"},
unit = {
count = 25,
ingredients = {
{"automation-science-pack", 1}
},
time = 20
},
},
{
type = "technology",
name = "bi-tech-coal-processing-1",
localised_name = {"technology-name.bi-tech-coal-processing-1"},
localised_description = {"technology-description.bi-tech-coal-processing-1"},
icon_size = 128,
icon = ICONPATH .. "Coal_128.png",
icons = {
{
icon = ICONPATH .. "Coal_128.png",
icon_size = 128,
}
},
effects = coal_processing[1],
prerequisites = {"advanced-material-processing"},
unit = {
count = 150,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 30
},
},
{
type = "technology",
name = "bi-tech-coal-processing-2",
localised_name = {"technology-name.bi-tech-coal-processing-2"},
localised_description = {"technology-description.bi-tech-coal-processing-2"},
icon_size = 128,
icon = ICONPATH .. "Coal_128.png",
icons = {
{
icon = ICONPATH .. "Coal_128.png",
icon_size = 128,
}
},
effects = coal_processing[2],
prerequisites = {"bi-tech-coal-processing-1", "chemical-science-pack"},
unit = {
count = 150,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 35
},
},
{
type = "technology",
name = "bi-tech-coal-processing-3",
localised_name = {"technology-name.bi-tech-coal-processing-3"},
localised_description = {"technology-description.bi-tech-coal-processing-3"},
icon_size = 128,
icon = ICONPATH .. "Coal_128.png",
icons = {
{
icon = ICONPATH .. "Coal_128.png",
icon_size = 128,
}
},
effects = coal_processing[3],
prerequisites = {"bi-tech-coal-processing-2", "production-science-pack"},
unit = {
count = 250,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
},
time = 40
},
},
{
type = "technology",
name = "bi-tech-fertilizer",
icon_size = 128,
icon = ICONPATH .. "Fertilizer_128.png",
icons = {
{
icon = ICONPATH .. "Fertilizer_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-liquid-air"
},
{
type = "unlock-recipe",
recipe = "bi-nitrogen"
},
{
type = "unlock-recipe",
recipe = "bi-fertilizer-1"
},
{
type = "unlock-recipe",
recipe = "bi-seed-3"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-3"
},
{
type = "unlock-recipe",
recipe = "bi-logs-3"
},
{
type = "unlock-recipe",
recipe = "bi-bio-garden"
},
{
type = "unlock-recipe",
recipe = "bi-purified-air-1"
},
{
type = "unlock-recipe",
recipe = "bi-seed-bomb-basic"
},
{
type = "unlock-recipe",
recipe = "bi-seed-bomb-standard"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r2"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r4"
},
},
prerequisites = {
"fluid-handling",
"bi-tech-bio-farming"
},
unit = {
count = 250,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1}
},
time = 30
}
}
})

View file

@ -1,83 +1,83 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
data:extend(
{
{
type = "technology",
name = "bi-tech-advanced-biotechnology",
icon_size = 128,
icon = ICONPATH .. "Biomass_128.png",
icons = {
{
icon = ICONPATH .. "Biomass_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-seed-4"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-4"
},
{
type = "unlock-recipe",
recipe = "bi-logs-4"
},
{
type = "unlock-recipe",
recipe = "bi-adv-fertilizer-2"
},
{
type = "unlock-recipe",
recipe = "bi-seed-bomb-advanced"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r3"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r5"
},
-- Added for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
{
type = "unlock-recipe",
recipe = "bi-bio-reactor"
},
{
type = "unlock-recipe",
recipe = "bi-biomass-1"
},
-- Added for 0.18.29: Now that we always make advanced fertilizer, we can also add
-- the advanced recipe for purified air even if BI.Settings.BI_Bio_Fuel has been
-- turned off!
{
type = "unlock-recipe",
recipe = "bi-purified-air-2"
},
},
prerequisites = {
"bi-tech-fertilizer"
},
unit = {
count = 200,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 30
}
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
data:extend(
{
{
type = "technology",
name = "bi-tech-advanced-biotechnology",
icon_size = 128,
icon = ICONPATH .. "Biomass_128.png",
icons = {
{
icon = ICONPATH .. "Biomass_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-seed-4"
},
{
type = "unlock-recipe",
recipe = "bi-seedling-4"
},
{
type = "unlock-recipe",
recipe = "bi-logs-4"
},
{
type = "unlock-recipe",
recipe = "bi-adv-fertilizer-2"
},
{
type = "unlock-recipe",
recipe = "bi-seed-bomb-advanced"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r3"
},
{
type = "unlock-recipe",
recipe = "bi-arboretum-r5"
},
-- Added for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
{
type = "unlock-recipe",
recipe = "bi-bio-reactor"
},
{
type = "unlock-recipe",
recipe = "bi-biomass-1"
},
-- Added for 0.18.29: Now that we always make advanced fertilizer, we can also add
-- the advanced recipe for purified air even if BI.Settings.BI_Bio_Fuel has been
-- turned off!
{
type = "unlock-recipe",
recipe = "bi-purified-air-2"
},
},
prerequisites = {
"bi-tech-fertilizer"
},
unit = {
count = 200,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 30
}
},
})

View file

@ -1,182 +1,182 @@
local default_masks = require("collision-mask-defaults")
local BioInd = require('common')('Bio_Industries_2')
--[[
Big thanks to OwnlyMe and his "Robot Tree Farm" code!
https://mods.factorio.com/mod/robot_tree_farm
License: CC BY-SA 4.0
]]
-- Don't create prototypes for trees in this table!
local ignore_trees = BioInd.get_tree_ignore_list()
BioInd.show("Ignoring these trees", ignore_trees)
local COLLISION_BOX = {{-0.1, -0.1}, {0.1, 0.1}}
local TREE_LEVELS = 4
local extend = {}
local wooden, branch, leaf
for i = 1, TREE_LEVELS do
wooden = table.deepcopy(data.raw["optimized-particle"]["wooden-particle"])
wooden.name = "bio-" .. wooden.name .. "-" .. i
for _, pic in pairs(wooden.pictures) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
for _, pic in pairs(wooden.shadows) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
branch = table.deepcopy(data.raw["optimized-particle"]["branch-particle"])
branch.name = "bio-" .. branch.name .. "-" .. i
for _, pic in pairs(branch.pictures) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
for _, pic in pairs(branch.shadows) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
leaf = table.deepcopy(data.raw["optimized-particle"]["leaf-particle"])
leaf.name = "bio-" .. leaf.name .. "-" .. i
for _, pic in pairs(leaf.pictures) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*math.max(2, i)
end
for _, pic in pairs(leaf.shadows) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*math.max(2, i)
end
data:extend({wooden, branch, leaf})
end
local tree, stump
for id, prototype in pairs(data.raw.tree) do
if prototype.variations and not ignore_trees[id] then
for i = 1, TREE_LEVELS do
tree = table.deepcopy(prototype)
tree.name = "bio-tree-" .. tree.name .. "-" .. i
if i < (TREE_LEVELS-1) then
tree.localised_name = {"bi-misc.growing-tree"}
tree.localised_description = {"bi-misc.growing-tree-desc"}
else
tree.localised_name = {"bi-misc.young-tree"}
tree.localised_description = {"bi-misc.young-tree-desc"}
end
tree.max_health = math.floor(50 * i/TREE_LEVELS)
tree.flags = {"placeable-neutral", "breaths-air"}
tree.collision_mask = table.deepcopy(default_masks["tree"])
tree.autoplace = nil
tree.selection_box = {
{-0.9/TREE_LEVELS * i, -2.2/TREE_LEVELS * i},
{0.9/TREE_LEVELS * i, 0.6/TREE_LEVELS * i}
}
if BI.Settings.BI_Game_Tweaks_Small_Tree_Collisionbox then
tree.collision_box = COLLISION_BOX
end
tree.minable.mining_particle = "bio-wooden-particle-" .. i
-- The longer a tree has grown, the harder it is to mine
tree.minable.mining_time = 0.25 * i
-- Now the tree-level thingie starts to make sense: higher growing stages correspond
-- to a higher probability of getting something when the tree is mined!
tree.minable.results = {
{
type = "item",
name = (i < TREE_LEVELS) and "seedling" or "wood",
probability = i/TREE_LEVELS,
amount = 1,
}
}
-- minable.result will be ignored by Factorio if minable.results exists, but
-- in data-final-fixes, we check for minable.result == "wood" before setting
-- minable.results to yield a random number of wood. We therefore must remove
-- tree.minable.result!
tree.minable.result = nil
for var_id, variation in pairs(tree.variations) do
variation.trunk.scale = (variation.trunk.scale or 1) * i / TREE_LEVELS
if variation.trunk.shift then
variation.trunk.shift[1] = variation.trunk.shift[1]/TREE_LEVELS*i
variation.trunk.shift[2] = variation.trunk.shift[2]/TREE_LEVELS*i
end
-- This doesn't make sense, the condition can never be true! Either more
-- than 4 levels have been used originally, or it should be compared to just
-- TREE_LEVELS, not TREE_LEVELS/10 (i.e. typo)
-- EDIT: OwnlyMe's Robot Tree Farm has 20 grow stages per default (min 3, max 200),
-- so we should use a limit of i<=2.)
local max = 2
if i <= max then
variation.trunk.layers = {{
filename = "__Bio_Industries_2__/graphics/icons/Seedling_a.png",
priority = "extra-high",
width = 64,
height = 64,
scale = 0.5,
frame_count = 1,
tint= {
r = 0.7-0.5*i/max,
g = 0.7-0.5*i/max,
b = 0.7-0.5*i/max,
a = 0.7-0.5*i/max
}
}}
variation.trunk.frame_count = 1
end
variation.leaves.scale = (variation.leaves.scale or 1) * i / TREE_LEVELS
if variation.leaves.shift then
variation.leaves.shift[1] = (variation.leaves.shift[1] or 0)/TREE_LEVELS*i
variation.leaves.shift[2] = (variation.leaves.shift[2] or 0)/TREE_LEVELS*i
end
variation.leaf_generation.scale = (variation.leaf_generation.scale or 1) * i / TREE_LEVELS
variation.leaf_generation.offset_deviation = {{-0.5, -0.5}, {0.5, 0.5}}
variation.leaf_generation.initial_height = 2/TREE_LEVELS*i
variation.leaf_generation.initial_height_deviation = 1/TREE_LEVELS*i
variation.leaf_generation.entity_name = "bio-leaf-particle-" .. i
variation.branch_generation.scale = (variation.branch_generation.scale or 1) * i / TREE_LEVELS
variation.branch_generation.offset_deviation = {
{0.5*i/TREE_LEVELS, 0.5*i/TREE_LEVELS},
{0.5*i/TREE_LEVELS, 0.5*i/TREE_LEVELS}
}
variation.branch_generation.initial_height = 2/TREE_LEVELS*i
variation.branch_generation.initial_height_deviation = 2/TREE_LEVELS*i
variation.branch_generation.entity_name = "bio-branch-particle-" .. i
variation.shadow.scale = (variation.shadow.scale or 1) * i / TREE_LEVELS
if variation.shadow.shift then
variation.shadow.shift[1] = (variation.shadow.shift[1] or 0)/TREE_LEVELS*i
variation.shadow.shift[2] = (variation.shadow.shift[2] or 0)/TREE_LEVELS*i
end
end
stump = table.deepcopy(data.raw.corpse[tree.remains_when_mined])
if stump then
stump.name = "bio-tree-" .. stump.name .. "-" .. i
stump.time_before_removed = 60 * 5 -- 5 secs
tree.remains_when_mined = stump.name
tree.corpse = stump.name
table.insert(extend, tree)
for _, variation in pairs(stump.animation) do
variation.scale = (variation.scale or 1) * i / TREE_LEVELS
variation.shift[1] = variation.shift[1]/TREE_LEVELS*i
variation.shift[2] = variation.shift[2]/TREE_LEVELS*i
end
table.insert(extend, stump)
end
end
end
end
data:extend(extend)
local default_masks = require("collision-mask-defaults")
local BioInd = require('common')('Bio_Industries_2')
--[[
Big thanks to OwnlyMe and his "Robot Tree Farm" code!
https://mods.factorio.com/mod/robot_tree_farm
License: CC BY-SA 4.0
]]
-- Don't create prototypes for trees in this table!
local ignore_trees = BioInd.get_tree_ignore_list()
BioInd.show("Ignoring these trees", ignore_trees)
local COLLISION_BOX = {{-0.1, -0.1}, {0.1, 0.1}}
local TREE_LEVELS = 4
local extend = {}
local wooden, branch, leaf
for i = 1, TREE_LEVELS do
wooden = table.deepcopy(data.raw["optimized-particle"]["wooden-particle"])
wooden.name = "bio-" .. wooden.name .. "-" .. i
for _, pic in pairs(wooden.pictures) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
for _, pic in pairs(wooden.shadows) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
branch = table.deepcopy(data.raw["optimized-particle"]["branch-particle"])
branch.name = "bio-" .. branch.name .. "-" .. i
for _, pic in pairs(branch.pictures) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
for _, pic in pairs(branch.shadows) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*i
end
leaf = table.deepcopy(data.raw["optimized-particle"]["leaf-particle"])
leaf.name = "bio-" .. leaf.name .. "-" .. i
for _, pic in pairs(leaf.pictures) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*math.max(2, i)
end
for _, pic in pairs(leaf.shadows) do
pic.scale = (pic.scale or 1)/TREE_LEVELS*math.max(2, i)
end
data:extend({wooden, branch, leaf})
end
local tree, stump
for id, prototype in pairs(data.raw.tree) do
if prototype.variations and not ignore_trees[id] then
for i = 1, TREE_LEVELS do
tree = table.deepcopy(prototype)
tree.name = "bio-tree-" .. tree.name .. "-" .. i
if i < (TREE_LEVELS-1) then
tree.localised_name = {"bi-misc.growing-tree"}
tree.localised_description = {"bi-misc.growing-tree-desc"}
else
tree.localised_name = {"bi-misc.young-tree"}
tree.localised_description = {"bi-misc.young-tree-desc"}
end
tree.max_health = math.floor(50 * i/TREE_LEVELS)
tree.flags = {"placeable-neutral", "breaths-air"}
tree.collision_mask = table.deepcopy(default_masks["tree"])
tree.autoplace = nil
tree.selection_box = {
{-0.9/TREE_LEVELS * i, -2.2/TREE_LEVELS * i},
{0.9/TREE_LEVELS * i, 0.6/TREE_LEVELS * i}
}
if BI.Settings.BI_Game_Tweaks_Small_Tree_Collisionbox then
tree.collision_box = COLLISION_BOX
end
tree.minable.mining_particle = "bio-wooden-particle-" .. i
-- The longer a tree has grown, the harder it is to mine
tree.minable.mining_time = 0.25 * i
-- Now the tree-level thingie starts to make sense: higher growing stages correspond
-- to a higher probability of getting something when the tree is mined!
tree.minable.results = {
{
type = "item",
name = (i < TREE_LEVELS) and "seedling" or "wood",
probability = i/TREE_LEVELS,
amount = 1,
}
}
-- minable.result will be ignored by Factorio if minable.results exists, but
-- in data-final-fixes, we check for minable.result == "wood" before setting
-- minable.results to yield a random number of wood. We therefore must remove
-- tree.minable.result!
tree.minable.result = nil
for var_id, variation in pairs(tree.variations) do
variation.trunk.scale = (variation.trunk.scale or 1) * i / TREE_LEVELS
if variation.trunk.shift then
variation.trunk.shift[1] = variation.trunk.shift[1]/TREE_LEVELS*i
variation.trunk.shift[2] = variation.trunk.shift[2]/TREE_LEVELS*i
end
-- This doesn't make sense, the condition can never be true! Either more
-- than 4 levels have been used originally, or it should be compared to just
-- TREE_LEVELS, not TREE_LEVELS/10 (i.e. typo)
-- EDIT: OwnlyMe's Robot Tree Farm has 20 grow stages per default (min 3, max 200),
-- so we should use a limit of i<=2.)
local max = 2
if i <= max then
variation.trunk.layers = {{
filename = "__Bio_Industries_2__/graphics/icons/Seedling_a.png",
priority = "extra-high",
width = 64,
height = 64,
scale = 0.5,
frame_count = 1,
tint= {
r = 0.7-0.5*i/max,
g = 0.7-0.5*i/max,
b = 0.7-0.5*i/max,
a = 0.7-0.5*i/max
}
}}
variation.trunk.frame_count = 1
end
variation.leaves.scale = (variation.leaves.scale or 1) * i / TREE_LEVELS
if variation.leaves.shift then
variation.leaves.shift[1] = (variation.leaves.shift[1] or 0)/TREE_LEVELS*i
variation.leaves.shift[2] = (variation.leaves.shift[2] or 0)/TREE_LEVELS*i
end
variation.leaf_generation.scale = (variation.leaf_generation.scale or 1) * i / TREE_LEVELS
variation.leaf_generation.offset_deviation = {{-0.5, -0.5}, {0.5, 0.5}}
variation.leaf_generation.initial_height = 2/TREE_LEVELS*i
variation.leaf_generation.initial_height_deviation = 1/TREE_LEVELS*i
variation.leaf_generation.entity_name = "bio-leaf-particle-" .. i
variation.branch_generation.scale = (variation.branch_generation.scale or 1) * i / TREE_LEVELS
variation.branch_generation.offset_deviation = {
{0.5*i/TREE_LEVELS, 0.5*i/TREE_LEVELS},
{0.5*i/TREE_LEVELS, 0.5*i/TREE_LEVELS}
}
variation.branch_generation.initial_height = 2/TREE_LEVELS*i
variation.branch_generation.initial_height_deviation = 2/TREE_LEVELS*i
variation.branch_generation.entity_name = "bio-branch-particle-" .. i
variation.shadow.scale = (variation.shadow.scale or 1) * i / TREE_LEVELS
if variation.shadow.shift then
variation.shadow.shift[1] = (variation.shadow.shift[1] or 0)/TREE_LEVELS*i
variation.shadow.shift[2] = (variation.shadow.shift[2] or 0)/TREE_LEVELS*i
end
end
stump = table.deepcopy(data.raw.corpse[tree.remains_when_mined])
if stump then
stump.name = "bio-tree-" .. stump.name .. "-" .. i
stump.time_before_removed = 60 * 5 -- 5 secs
tree.remains_when_mined = stump.name
tree.corpse = stump.name
table.insert(extend, tree)
for _, variation in pairs(stump.animation) do
variation.scale = (variation.scale or 1) * i / TREE_LEVELS
variation.shift[1] = variation.shift[1]/TREE_LEVELS*i
variation.shift[2] = variation.shift[2]/TREE_LEVELS*i
end
table.insert(extend, stump)
end
end
end
end
data:extend(extend)

View file

@ -1,387 +1,387 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__base__/graphics/entity/boiler/"
require ("util")
require ("prototypes.Bio_Fuel.pipeConnectors")
bio_boiler_tint = {r = 0.5, g = 0.5, b = 0.1, a = 0.7}
-- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
data:extend({
-- BIOREACTOR
{
type = "assembling-machine",
name = "bi-bio-reactor",
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor"},
max_health = 100,
corpse = "big-remnants",
fluid_boxes = {
{
production_type = "input",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }}
},
{
production_type = "input",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, 0} }}
},
{
production_type = "input",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, 1} }}
},
{
production_type = "output",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = 1,
pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, -1} }}
},
{
production_type = "output",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = 1,
pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, 1} }}
},
},
fluid_boxes_off_when_no_fluid_recipe = true,
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
animation = {
filename = "__Bio_Industries_2__/graphics/entities/bioreactor/bioreactor.png",
priority = "high",
width = 128,
height = 150,
frame_count = 26,
line_length = 13,
animation_speed = 0.4,
shift = {0.55, -0.33}
},
energy_source = {
type = "electric",
usage_priority = "secondary-input"
},
crafting_categories = {"biofarm-mod-bioreactor"},
ingredient_count = 3,
crafting_speed = 1,
energy_usage = "10kW",
module_specification = {
module_slots = 3
},
allowed_effects = {"consumption", "speed", "productivity", "pollution"},
},
})
if BI.Settings.BI_Bio_Fuel then
data:extend({
--- Bio Boiler
{
type = "boiler",
name = "bi-bio-boiler",
localised_name = {"entity-name.bi-bio-boiler"},
localised_description = {"entity-description.bi-bio-boiler"},
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler"},
max_health = 300,
corpse = "small-remnants",
mode = "output-to-separate-pipe",
resistances = {
{
type = "fire",
percent = 100
},
{
type = "explosion",
percent = 100
},
{
type = "impact",
percent = 35
}
},
collision_box = {{-1.29, -0.79}, {1.29, 0.79}},
selection_box = {{-1.5, -1}, {1.5, 1}},
target_temperature = 165,
fluid_box = {
volume = 200,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {-1, 0.5}},
{flow_direction = "input-output", direction = defines.direction.north, position = {1, 0.5}}
},
production_type = "input-output",
filter = "water"
},
output_fluid_box = {
volume = 200,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "output", direction = defines.direction.north, position = {0, -0.5}}
},
production_type = "output",
filter = "steam"
},
energy_consumption = "3.6MW",
energy_source = {
type = "burner",
fuel_categories = { "chemical" },
effectivity = 1,
fuel_inventory_size = 2,
emissions_per_minute = { pollution = 15 },
smoke = {
{
name = "smoke",
north_position = util.by_pixel(-38, -47.5),
south_position = util.by_pixel(38.5, -32),
east_position = util.by_pixel(20, -70),
west_position = util.by_pixel(-19, -8.5),
frequency = 20,
starting_vertical_speed = 0.0,
starting_frame_deviation = 60
}
}
},
working_sound = {
sound = {
filename = "__base__/sound/boiler.ogg",
volume = 0.8
},
max_sounds_per_type = 3
},
structure = {
north = {
layers = {
{
filename = ENTITYPATH .. "boiler-N-idle.png",
priority = "extra-high",
width = 269,
height = 221,
shift = util.by_pixel(-1.25, 5.25),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-N-shadow.png",
priority = "extra-high",
width = 274,
height = 164,
scale = 0.5,
shift = util.by_pixel(20.5, 9),
draw_as_shadow = true,
}
}
},
east = {
layers = {
{
filename = ENTITYPATH .. "boiler-E-idle.png",
priority = "extra-high",
width = 216,
height = 301,
shift = util.by_pixel(-3, 1.25),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-E-shadow.png",
priority = "extra-high",
width = 184,
height = 194,
scale = 0.5,
shift = util.by_pixel(30, 9.5),
draw_as_shadow = true,
}
}
},
south = {
layers = {
{
filename = ENTITYPATH .. "boiler-S-idle.png",
priority = "extra-high",
width = 260,
height = 192,
shift = util.by_pixel(4, 13),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-S-shadow.png",
priority = "extra-high",
width = 311,
height = 131,
scale = 0.5,
shift = util.by_pixel(29.75, 15.75),
draw_as_shadow = true,
}
}
},
west = {
layers = {
{
filename = ENTITYPATH .. "boiler-W-idle.png",
priority = "extra-high",
width = 196,
height = 273,
shift = util.by_pixel(1.5, 7.75),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-W-shadow.png",
priority = "extra-high",
width = 206,
height = 218,
scale = 0.5,
shift = util.by_pixel(19.5, 6.5),
draw_as_shadow = true,
}
}
}
},
patch = {
east = {
filename = ENTITYPATH .. "boiler-E-patch.png",
width = 6,
height = 36,
shift = util.by_pixel(33.5, -13.5),
scale = 0.5,
tint = bio_boiler_tint,
},
},
fire_flicker_enabled = true,
fire = {
north = {
filename = ENTITYPATH .. "boiler-N-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 26,
height = 26,
animation_speed = 0.5,
shift = util.by_pixel(0, -8.5),
scale = 0.5
},
east = {
filename = ENTITYPATH .. "boiler-E-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 28,
height = 28,
animation_speed = 0.5,
shift = util.by_pixel(-9.5, -22),
scale = 0.5
},
south = {
filename = ENTITYPATH .. "boiler-S-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 26,
height = 16,
animation_speed = 0.5,
shift = util.by_pixel(-1, -26.5),
scale = 0.5
},
west = {
filename = ENTITYPATH .. "boiler-W-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 30,
height = 29,
animation_speed = 0.5,
shift = util.by_pixel(13, -23.25),
scale = 0.5
}
},
fire_glow_flicker_enabled = true,
fire_glow = {
north = {
filename = ENTITYPATH .. "boiler-N-light.png",
priority = "extra-high",
frame_count = 1,
width = 200,
height = 173,
shift = util.by_pixel(-1, -6.75),
blend_mode = "additive",
scale = 0.5
},
east = {
filename = ENTITYPATH .. "boiler-E-light.png",
priority = "extra-high",
frame_count = 1,
width = 139,
height = 244,
shift = util.by_pixel(0.25, -13),
blend_mode = "additive",
scale = 0.5
},
south = {
filename = ENTITYPATH .. "boiler-S-light.png",
priority = "extra-high",
frame_count = 1,
width = 200,
height = 162,
shift = util.by_pixel(1, 5.5),
blend_mode = "additive",
scale = 0.5
},
west = {
filename = ENTITYPATH .. "boiler-W-light.png",
priority = "extra-high",
frame_count = 1,
width = 136,
height = 217,
shift = util.by_pixel(2, -6.25),
blend_mode = "additive",
scale = 0.5
}
},
burning_cooldown = 20
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__base__/graphics/entity/boiler/"
require ("util")
require ("prototypes.Bio_Fuel.pipeConnectors")
bio_boiler_tint = {r = 0.5, g = 0.5, b = 0.1, a = 0.7}
-- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
data:extend({
-- BIOREACTOR
{
type = "assembling-machine",
name = "bi-bio-reactor",
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor"},
max_health = 100,
corpse = "big-remnants",
fluid_boxes = {
{
production_type = "input",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }}
},
{
production_type = "input",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {1, 0} }}
},
{
production_type = "input",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, 1} }}
},
{
production_type = "output",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = 1,
pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, -1} }}
},
{
production_type = "output",
pipe_picture = assembler2pipepicturesBioreactor(),
pipe_covers = pipecoverspicturesBioreactor(),
volume = 1000,
base_level = 1,
pipe_connections = {{ flow_direction = "output", direction = defines.direction.north, position = {-1, 1} }}
},
},
fluid_boxes_off_when_no_fluid_recipe = true,
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
animation = {
filename = "__Bio_Industries_2__/graphics/entities/bioreactor/bioreactor.png",
priority = "high",
width = 128,
height = 150,
frame_count = 26,
line_length = 13,
animation_speed = 0.4,
shift = {0.55, -0.33}
},
energy_source = {
type = "electric",
usage_priority = "secondary-input"
},
crafting_categories = {"biofarm-mod-bioreactor"},
ingredient_count = 3,
crafting_speed = 1,
energy_usage = "10kW",
module_specification = {
module_slots = 3
},
allowed_effects = {"consumption", "speed", "productivity", "pollution"},
},
})
if BI.Settings.BI_Bio_Fuel then
data:extend({
--- Bio Boiler
{
type = "boiler",
name = "bi-bio-boiler",
localised_name = {"entity-name.bi-bio-boiler"},
localised_description = {"entity-description.bi-bio-boiler"},
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler"},
max_health = 300,
corpse = "small-remnants",
mode = "output-to-separate-pipe",
resistances = {
{
type = "fire",
percent = 100
},
{
type = "explosion",
percent = 100
},
{
type = "impact",
percent = 35
}
},
collision_box = {{-1.29, -0.79}, {1.29, 0.79}},
selection_box = {{-1.5, -1}, {1.5, 1}},
target_temperature = 165,
fluid_box = {
volume = 200,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {-1, 0.5}},
{flow_direction = "input-output", direction = defines.direction.north, position = {1, 0.5}}
},
production_type = "input-output",
filter = "water"
},
output_fluid_box = {
volume = 200,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "output", direction = defines.direction.north, position = {0, -0.5}}
},
production_type = "output",
filter = "steam"
},
energy_consumption = "3.6MW",
energy_source = {
type = "burner",
fuel_categories = { "chemical" },
effectivity = 1,
fuel_inventory_size = 2,
emissions_per_minute = { pollution = 15 },
smoke = {
{
name = "smoke",
north_position = util.by_pixel(-38, -47.5),
south_position = util.by_pixel(38.5, -32),
east_position = util.by_pixel(20, -70),
west_position = util.by_pixel(-19, -8.5),
frequency = 20,
starting_vertical_speed = 0.0,
starting_frame_deviation = 60
}
}
},
working_sound = {
sound = {
filename = "__base__/sound/boiler.ogg",
volume = 0.8
},
max_sounds_per_type = 3
},
structure = {
north = {
layers = {
{
filename = ENTITYPATH .. "boiler-N-idle.png",
priority = "extra-high",
width = 269,
height = 221,
shift = util.by_pixel(-1.25, 5.25),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-N-shadow.png",
priority = "extra-high",
width = 274,
height = 164,
scale = 0.5,
shift = util.by_pixel(20.5, 9),
draw_as_shadow = true,
}
}
},
east = {
layers = {
{
filename = ENTITYPATH .. "boiler-E-idle.png",
priority = "extra-high",
width = 216,
height = 301,
shift = util.by_pixel(-3, 1.25),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-E-shadow.png",
priority = "extra-high",
width = 184,
height = 194,
scale = 0.5,
shift = util.by_pixel(30, 9.5),
draw_as_shadow = true,
}
}
},
south = {
layers = {
{
filename = ENTITYPATH .. "boiler-S-idle.png",
priority = "extra-high",
width = 260,
height = 192,
shift = util.by_pixel(4, 13),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-S-shadow.png",
priority = "extra-high",
width = 311,
height = 131,
scale = 0.5,
shift = util.by_pixel(29.75, 15.75),
draw_as_shadow = true,
}
}
},
west = {
layers = {
{
filename = ENTITYPATH .. "boiler-W-idle.png",
priority = "extra-high",
width = 196,
height = 273,
shift = util.by_pixel(1.5, 7.75),
scale = 0.5,
tint = bio_boiler_tint,
},
{
filename = ENTITYPATH .. "boiler-W-shadow.png",
priority = "extra-high",
width = 206,
height = 218,
scale = 0.5,
shift = util.by_pixel(19.5, 6.5),
draw_as_shadow = true,
}
}
}
},
patch = {
east = {
filename = ENTITYPATH .. "boiler-E-patch.png",
width = 6,
height = 36,
shift = util.by_pixel(33.5, -13.5),
scale = 0.5,
tint = bio_boiler_tint,
},
},
fire_flicker_enabled = true,
fire = {
north = {
filename = ENTITYPATH .. "boiler-N-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 26,
height = 26,
animation_speed = 0.5,
shift = util.by_pixel(0, -8.5),
scale = 0.5
},
east = {
filename = ENTITYPATH .. "boiler-E-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 28,
height = 28,
animation_speed = 0.5,
shift = util.by_pixel(-9.5, -22),
scale = 0.5
},
south = {
filename = ENTITYPATH .. "boiler-S-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 26,
height = 16,
animation_speed = 0.5,
shift = util.by_pixel(-1, -26.5),
scale = 0.5
},
west = {
filename = ENTITYPATH .. "boiler-W-fire.png",
priority = "extra-high",
frame_count = 64,
line_length = 8,
width = 30,
height = 29,
animation_speed = 0.5,
shift = util.by_pixel(13, -23.25),
scale = 0.5
}
},
fire_glow_flicker_enabled = true,
fire_glow = {
north = {
filename = ENTITYPATH .. "boiler-N-light.png",
priority = "extra-high",
frame_count = 1,
width = 200,
height = 173,
shift = util.by_pixel(-1, -6.75),
blend_mode = "additive",
scale = 0.5
},
east = {
filename = ENTITYPATH .. "boiler-E-light.png",
priority = "extra-high",
frame_count = 1,
width = 139,
height = 244,
shift = util.by_pixel(0.25, -13),
blend_mode = "additive",
scale = 0.5
},
south = {
filename = ENTITYPATH .. "boiler-S-light.png",
priority = "extra-high",
frame_count = 1,
width = 200,
height = 162,
shift = util.by_pixel(1, 5.5),
blend_mode = "additive",
scale = 0.5
},
west = {
filename = ENTITYPATH .. "boiler-W-light.png",
priority = "extra-high",
frame_count = 1,
width = 136,
height = 217,
shift = util.by_pixel(2, -6.25),
blend_mode = "additive",
scale = 0.5
}
},
burning_cooldown = 20
},
})
end

View file

@ -1,27 +1,27 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
{
type = "fluid",
name = "bi-Bio_Fuel",
icon = ICONPATH .. "bio-fuel.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
base_color = {r = 1.00, g = 0.35, b = 0.35},
flow_color = {r = 1.00, g = 0.35, b = 0.35},
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
{
type = "fluid",
name = "bi-Bio_Fuel",
icon = ICONPATH .. "bio-fuel.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
base_color = {r = 1.00, g = 0.35, b = 0.35},
flow_color = {r = 1.00, g = 0.35, b = 0.35},
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
},
})

View file

@ -1,67 +1,67 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
-- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
data:extend({
--- BioReactor
{
type = "item",
name = "bi-bio-reactor",
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
}
},
subgroup = "production-machine",
order = "z[bi]-a[bi-bio-reactor]",
place_result = "bi-bio-reactor",
stack_size = 10
},
})
if BI.Settings.BI_Bio_Fuel then
data:extend({
---- Cellulose
{
type = "item",
name = "bi-cellulose",
icon = ICONPATH .. "cellulose.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "cellulose.png",
icon_size = 64,
}
},
subgroup = "intermediate-product",
order = "b[cellulose]",
stack_size = 200
},
--- Bio Boiler
{
type = "item",
name = "bi-bio-boiler",
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "b[steam-power]-b[boiler]",
place_result = "bi-bio-boiler",
stack_size = 50
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
-- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
data:extend({
--- BioReactor
{
type = "item",
name = "bi-bio-reactor",
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bioreactor.png",
icon_size = 64,
}
},
subgroup = "production-machine",
order = "z[bi]-a[bi-bio-reactor]",
place_result = "bi-bio-reactor",
stack_size = 10
},
})
if BI.Settings.BI_Bio_Fuel then
data:extend({
---- Cellulose
{
type = "item",
name = "bi-cellulose",
icon = ICONPATH .. "cellulose.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "cellulose.png",
icon_size = 64,
}
},
subgroup = "intermediate-product",
order = "b[cellulose]",
stack_size = 200
},
--- Bio Boiler
{
type = "item",
name = "bi-bio-boiler",
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_boiler.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "b[steam-power]-b[boiler]",
place_result = "bi-bio-boiler",
stack_size = 50
},
})
end

View file

@ -1,76 +1,76 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__base__/graphics/entity/assembling-machine-2/"
local PIPEPATH = "__base__/graphics/entity/pipe-covers/"
function assembler2pipepicturesBioreactor()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = ENTITYPATH .. "assembling-machine-2-pipe-E.png",
priority = "extra-high",
width = 42,
height = 76,
shift = util.by_pixel(-24.5, 1),
scale = 0.5,
},
south = {
filename = ENTITYPATH .. "assembling-machine-2-pipe-S.png",
priority = "extra-high",
width = 88,
height = 61,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = ENTITYPATH .. "assembling-machine-2-pipe-W.png",
priority = "extra-high",
width = 39,
height = 73,
shift = util.by_pixel(25.75, 1.25),
scale = 0.5,
}
}
end
function pipecoverspicturesBioreactor()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
east = {
filename = PIPEPATH .. "pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
south = {
filename = PIPEPATH .. "pipe-cover-south.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
west = {
filename = PIPEPATH .. "pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
}
}
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__base__/graphics/entity/assembling-machine-2/"
local PIPEPATH = "__base__/graphics/entity/pipe-covers/"
function assembler2pipepicturesBioreactor()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
shift = util.by_pixel(2.25, 13.5),
scale = 0.5,
},
east = {
filename = ENTITYPATH .. "assembling-machine-2-pipe-E.png",
priority = "extra-high",
width = 42,
height = 76,
shift = util.by_pixel(-24.5, 1),
scale = 0.5,
},
south = {
filename = ENTITYPATH .. "assembling-machine-2-pipe-S.png",
priority = "extra-high",
width = 88,
height = 61,
shift = util.by_pixel(0, -31.25),
scale = 0.5,
},
west = {
filename = ENTITYPATH .. "assembling-machine-2-pipe-W.png",
priority = "extra-high",
width = 39,
height = 73,
shift = util.by_pixel(25.75, 1.25),
scale = 0.5,
}
}
end
function pipecoverspicturesBioreactor()
return {
north = {
filename = ICONPATH .. "empty.png",
priority = "extra-high",
width = 1,
height = 1,
scale = 0.5
},
east = {
filename = PIPEPATH .. "pipe-cover-east.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
south = {
filename = PIPEPATH .. "pipe-cover-south.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
},
west = {
filename = PIPEPATH .. "pipe-cover-west.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5
}
}
end

File diff suppressed because it is too large Load diff

View file

@ -1,45 +1,45 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
if BI.Settings.BI_Bio_Fuel then
data:extend({
{
type = "technology",
name = "bi-tech-organic-plastic",
icon_size = 128,
icon = ICONPATH .. "Cellulose_128.png",
icons = {
{
icon = ICONPATH .. "Cellulose_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-plastic-1"
},
{
type = "unlock-recipe",
recipe = "bi-plastic-2"
}
},
prerequisites = {
"bi-tech-advanced-biotechnology"
},
unit = {
count = 200,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
},
time = 30
}
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/technology/"
if BI.Settings.BI_Bio_Fuel then
data:extend({
{
type = "technology",
name = "bi-tech-organic-plastic",
icon_size = 128,
icon = ICONPATH .. "Cellulose_128.png",
icons = {
{
icon = ICONPATH .. "Cellulose_128.png",
icon_size = 128,
}
},
effects = {
{
type = "unlock-recipe",
recipe = "bi-plastic-1"
},
{
type = "unlock-recipe",
recipe = "bi-plastic-2"
}
},
prerequisites = {
"bi-tech-advanced-biotechnology"
},
unit = {
count = 200,
ingredients = {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
},
time = 30
}
},
})
end

View file

@ -1,79 +1,79 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
require ("util")
--- Bio Garden
data:extend({
{
type = "assembling-machine",
name = "bi-bio-garden",
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
}
},
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden"},
fast_replaceable_group = "bi-bio-garden",
max_health = 150,
corpse = "medium-remnants",
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
fluid_boxes = {
{
production_type = "input",
pipe_picture = assembler3pipepictures(),
pipe_covers = pipecoverspictures(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }}
},
},
fluid_boxes_off_when_no_fluid_recipe = true,
animation = {
filename = "__Bio_Industries_2__/graphics/entities/biogarden/bio_garden_x.png",
width = 160,
height = 160,
frame_count = 12,
line_length = 4,
animation_speed = 0.025,
shift = {0.45, 0}
},
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
working_sound = {
sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 0.8 } },
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5,
},
crafting_categories = {"clean-air"},
source_inventory_size = 1,
result_inventory_size = 1,
crafting_speed = 1.0,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = { pollution = -45 }, -- Negative value: pollution is absorbed!
},
energy_usage = "200kW",
ingredient_count = 1,
-- Changed for 0.18.34/1.1.4 -- Modules don't make sense for the gardens!
-- (Efficiency modules are also meant to reduce pollution, but as the base value
-- is negative, the resulting value is greater than the base value! )
module_specification = {
module_slots = 1
},
-- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens
-- won't be affected by beacons!
allowed_effects = {"consumption", "speed"},
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
require ("util")
--- Bio Garden
data:extend({
{
type = "assembling-machine",
name = "bi-bio-garden",
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
}
},
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-garden"},
fast_replaceable_group = "bi-bio-garden",
max_health = 150,
corpse = "medium-remnants",
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
fluid_boxes = {
{
production_type = "input",
pipe_picture = assembler3pipepictures(),
pipe_covers = pipecoverspictures(),
volume = 1000,
base_level = -1,
pipe_connections = {{ flow_direction = "input", direction = defines.direction.north, position = {0, -1} }}
},
},
fluid_boxes_off_when_no_fluid_recipe = true,
animation = {
filename = "__Bio_Industries_2__/graphics/entities/biogarden/bio_garden_x.png",
width = 160,
height = 160,
frame_count = 12,
line_length = 4,
animation_speed = 0.025,
shift = {0.45, 0}
},
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
working_sound = {
sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 0.8 } },
idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
apparent_volume = 1.5,
},
crafting_categories = {"clean-air"},
source_inventory_size = 1,
result_inventory_size = 1,
crafting_speed = 1.0,
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = { pollution = -45 }, -- Negative value: pollution is absorbed!
},
energy_usage = "200kW",
ingredient_count = 1,
-- Changed for 0.18.34/1.1.4 -- Modules don't make sense for the gardens!
-- (Efficiency modules are also meant to reduce pollution, but as the base value
-- is negative, the resulting value is greater than the base value! )
module_specification = {
module_slots = 1
},
-- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens
-- won't be affected by beacons!
allowed_effects = {"consumption", "speed"},
},
})

View file

@ -1,196 +1,196 @@
------------------------------------------------------------------------------------
-- Create fluid fertilizers, recipes, and unlocks if the setting requires it! --
------------------------------------------------------------------------------------
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local function make_colors(color)
local r, g, b = color.r, color.g, color.b
local black = {r = 0, g = 0, b = 0, a = .25}
local function mult(v, f)
return (v * f) % 1
end
ret = {
base = color,
flow = {r = mult(r, 3), g = mult(g, 3), b = mult(b, 3), a = .25},
primary = {r = r, g = g, b = b, a = .5},
secondary = {r = mult(r, .5), g = mult(g, .5), b = mult(b, .5), a = .25},
tertiary = {r = mult(r, 2), g = mult(g, 2), b = mult(b, 2), a = .25},
secondary = black,
}
return ret
end
local fertilizer_fluid_colors = make_colors({r = 0.098, g = 0.811, b = 0.269, a = .5})
local adv_fertilizer_fluid_colors = make_colors({r = 0, g = 1, b = 0.071, a = .5})
data:extend({
------------------------------------------------------------------------------------
-- FLUIDS --
------------------------------------------------------------------------------------
-- Fertilizer fluid
{
type = "fluid",
name = "bi-fertilizer-fluid",
icon = ICONPATH .. "fluid_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
icons = {
{
icon = ICONPATH .. "fluid_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
-- 19cf44
base_color = fertilizer_fluid_colors.base,
flow_color = fertilizer_fluid_colors.flow,
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
order = "a[fluid]-b[fertilizer]"
},
-- Advanced fertilizer fluid
{
type = "fluid",
name = "bi-adv-fertilizer-fluid",
icon = ICONPATH .. "fluid_advanced_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
icons = {
{
icon = ICONPATH .. "fluid_advanced_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
--00ff12
base_color = adv_fertilizer_fluid_colors.base,
flow_color = adv_fertilizer_fluid_colors.flow,
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
order = "a[fluid]-b[fertilizer-advanced]"
},
------------------------------------------------------------------------------------
-- RECIPES --
------------------------------------------------------------------------------------
-- Fertilizer fluid
{
type = "recipe",
name = "bi-fertilizer-fluid",
icon = ICONPATH .. "fluid_fertilizer_recipe_64.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "fluid_fertilizer_recipe_64.png",
icon_size = 64,
}
},
category = "chemistry",
energy_required = 5,
ingredients = {
{type = "item", name = "fertilizer", amount = 3},
{type = "fluid", name = "water", amount = 100},
},
results = {
{type = "fluid", name = "bi-fertilizer-fluid", amount = 100}
},
main_product = "",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
subgroup = "bio-bio-farm-intermediate-product",
order = "b[bi-fertilizer]-b[bi-fertilizer-fluid-1]",
crafting_machine_tint = {
-- Kettle
primary = fertilizer_fluid_colors.primary,
secondary = fertilizer_fluid_colors.secondary,
-- Chimney
tertiary = fertilizer_fluid_colors.tertiary,
quaternary = fertilizer_fluid_colors.quaternary,
},
},
-- Advanced fertilizer fluid
{
type = "recipe",
name = "bi-adv-fertilizer-fluid",
icon = ICONPATH .. "fluid_advanced_fertilizer_recipe_64.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "fluid_advanced_fertilizer_recipe_64.png",
icon_size = 64,
}
},
category = "chemistry",
energy_required = 5,
ingredients = {
{type = "item", name = "bi-adv-fertilizer", amount = 3},
{type = "fluid", name = "water", amount = 100},
},
results = {
{type = "fluid", name = "bi-adv-fertilizer-fluid", amount = 100}
},
main_product = "",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
subgroup = "bio-bio-farm-intermediate-product",
order = "b[bi-fertilizer]-b[bi-fertilizer-fluid-2]",
crafting_machine_tint = {
primary = adv_fertilizer_fluid_colors.primary,
secondary = adv_fertilizer_fluid_colors.secondary,
-- Chimney
tertiary = adv_fertilizer_fluid_colors.tertiary,
quaternary = adv_fertilizer_fluid_colors.quaternary,
},
},
})
------------------------------------------------------------------------------------
-- UNLOCKS --
------------------------------------------------------------------------------------
BioInd.writeDebug("Unlocking fluid fertilizers!")
thxbob.lib.tech.add_recipe_unlock ("bi-tech-fertilizer", "bi-fertilizer-fluid")
thxbob.lib.tech.add_recipe_unlock ("bi-tech-advanced-biotechnology", "bi-adv-fertilizer-fluid")
------------------------------------------------------------------------------------
-- CHANGE RECIPES --
------------------------------------------------------------------------------------
-- Purified air (fertilizer)
thxbob.lib.recipe.remove_ingredient("bi-purified-air-1", "fertilizer")
thxbob.lib.recipe.remove_ingredient("bi-purified-air-1", "water")
thxbob.lib.recipe.add_new_ingredient("bi-purified-air-1", {
type = "fluid",
name = "bi-fertilizer-fluid",
amount = 50
})
data.raw.recipe["bi-purified-air-1"].localised_description = {"recipe-description.bi-purified-air-1-fluid"}
-- Purified air (advanced fertilizer)
thxbob.lib.recipe.remove_ingredient("bi-purified-air-2", "bi-adv-fertilizer")
thxbob.lib.recipe.remove_ingredient("bi-purified-air-2", "water")
thxbob.lib.recipe.add_new_ingredient("bi-purified-air-2", {
type = "fluid",
name = "bi-adv-fertilizer-fluid",
amount = 50
})
data.raw.recipe["bi-purified-air-2"].localised_description = {"recipe-description.bi-purified-air-2-fluid"}
------------------------------------------------------------------------------------
-- Create fluid fertilizers, recipes, and unlocks if the setting requires it! --
------------------------------------------------------------------------------------
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local function make_colors(color)
local r, g, b = color.r, color.g, color.b
local black = {r = 0, g = 0, b = 0, a = .25}
local function mult(v, f)
return (v * f) % 1
end
ret = {
base = color,
flow = {r = mult(r, 3), g = mult(g, 3), b = mult(b, 3), a = .25},
primary = {r = r, g = g, b = b, a = .5},
secondary = {r = mult(r, .5), g = mult(g, .5), b = mult(b, .5), a = .25},
tertiary = {r = mult(r, 2), g = mult(g, 2), b = mult(b, 2), a = .25},
secondary = black,
}
return ret
end
local fertilizer_fluid_colors = make_colors({r = 0.098, g = 0.811, b = 0.269, a = .5})
local adv_fertilizer_fluid_colors = make_colors({r = 0, g = 1, b = 0.071, a = .5})
data:extend({
------------------------------------------------------------------------------------
-- FLUIDS --
------------------------------------------------------------------------------------
-- Fertilizer fluid
{
type = "fluid",
name = "bi-fertilizer-fluid",
icon = ICONPATH .. "fluid_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
icons = {
{
icon = ICONPATH .. "fluid_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
-- 19cf44
base_color = fertilizer_fluid_colors.base,
flow_color = fertilizer_fluid_colors.flow,
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
order = "a[fluid]-b[fertilizer]"
},
-- Advanced fertilizer fluid
{
type = "fluid",
name = "bi-adv-fertilizer-fluid",
icon = ICONPATH .. "fluid_advanced_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
icons = {
{
icon = ICONPATH .. "fluid_advanced_fertilizer_64.png",
icon_size = 64,
icon_mipmaps = 1,
}
},
default_temperature = 25,
max_temperature = 100,
heat_capacity = "1kJ",
--00ff12
base_color = adv_fertilizer_fluid_colors.base,
flow_color = adv_fertilizer_fluid_colors.flow,
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
order = "a[fluid]-b[fertilizer-advanced]"
},
------------------------------------------------------------------------------------
-- RECIPES --
------------------------------------------------------------------------------------
-- Fertilizer fluid
{
type = "recipe",
name = "bi-fertilizer-fluid",
icon = ICONPATH .. "fluid_fertilizer_recipe_64.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "fluid_fertilizer_recipe_64.png",
icon_size = 64,
}
},
category = "chemistry",
energy_required = 5,
ingredients = {
{type = "item", name = "fertilizer", amount = 3},
{type = "fluid", name = "water", amount = 100},
},
results = {
{type = "fluid", name = "bi-fertilizer-fluid", amount = 100}
},
main_product = "",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
subgroup = "bio-bio-farm-intermediate-product",
order = "b[bi-fertilizer]-b[bi-fertilizer-fluid-1]",
crafting_machine_tint = {
-- Kettle
primary = fertilizer_fluid_colors.primary,
secondary = fertilizer_fluid_colors.secondary,
-- Chimney
tertiary = fertilizer_fluid_colors.tertiary,
quaternary = fertilizer_fluid_colors.quaternary,
},
},
-- Advanced fertilizer fluid
{
type = "recipe",
name = "bi-adv-fertilizer-fluid",
icon = ICONPATH .. "fluid_advanced_fertilizer_recipe_64.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "fluid_advanced_fertilizer_recipe_64.png",
icon_size = 64,
}
},
category = "chemistry",
energy_required = 5,
ingredients = {
{type = "item", name = "bi-adv-fertilizer", amount = 3},
{type = "fluid", name = "water", amount = 100},
},
results = {
{type = "fluid", name = "bi-adv-fertilizer-fluid", amount = 100}
},
main_product = "",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
allow_as_intermediate = false,
subgroup = "bio-bio-farm-intermediate-product",
order = "b[bi-fertilizer]-b[bi-fertilizer-fluid-2]",
crafting_machine_tint = {
primary = adv_fertilizer_fluid_colors.primary,
secondary = adv_fertilizer_fluid_colors.secondary,
-- Chimney
tertiary = adv_fertilizer_fluid_colors.tertiary,
quaternary = adv_fertilizer_fluid_colors.quaternary,
},
},
})
------------------------------------------------------------------------------------
-- UNLOCKS --
------------------------------------------------------------------------------------
BioInd.writeDebug("Unlocking fluid fertilizers!")
thxbob.lib.tech.add_recipe_unlock ("bi-tech-fertilizer", "bi-fertilizer-fluid")
thxbob.lib.tech.add_recipe_unlock ("bi-tech-advanced-biotechnology", "bi-adv-fertilizer-fluid")
------------------------------------------------------------------------------------
-- CHANGE RECIPES --
------------------------------------------------------------------------------------
-- Purified air (fertilizer)
thxbob.lib.recipe.remove_ingredient("bi-purified-air-1", "fertilizer")
thxbob.lib.recipe.remove_ingredient("bi-purified-air-1", "water")
thxbob.lib.recipe.add_new_ingredient("bi-purified-air-1", {
type = "fluid",
name = "bi-fertilizer-fluid",
amount = 50
})
data.raw.recipe["bi-purified-air-1"].localised_description = {"recipe-description.bi-purified-air-1-fluid"}
-- Purified air (advanced fertilizer)
thxbob.lib.recipe.remove_ingredient("bi-purified-air-2", "bi-adv-fertilizer")
thxbob.lib.recipe.remove_ingredient("bi-purified-air-2", "water")
thxbob.lib.recipe.add_new_ingredient("bi-purified-air-2", {
type = "fluid",
name = "bi-adv-fertilizer-fluid",
amount = 50
})
data.raw.recipe["bi-purified-air-2"].localised_description = {"recipe-description.bi-purified-air-2-fluid"}

View file

@ -1,42 +1,42 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
-------- Bio Garden
data:extend({
{
type = "item",
name = "bi-bio-garden",
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
}
},
subgroup = "production-machine",
order = "x[bi]-b[bi-bio-garden]",
place_result = "bi-bio-garden",
stack_size = 10
},
{
type = "item",
name = "bi-purified-air",
icon = ICONPATH .. "Clean_Air2.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Clean_Air2.png",
icon_size = 64,
}
},
hidden = true,
subgroup = "bio-bio-gardens-fluid",
order = "bi-purified-air",
stack_size = 100
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
-------- Bio Garden
data:extend({
{
type = "item",
name = "bi-bio-garden",
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
}
},
subgroup = "production-machine",
order = "x[bi]-b[bi-bio-garden]",
place_result = "bi-bio-garden",
stack_size = 10
},
{
type = "item",
name = "bi-purified-air",
icon = ICONPATH .. "Clean_Air2.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Clean_Air2.png",
icon_size = 64,
}
},
hidden = true,
subgroup = "bio-bio-gardens-fluid",
order = "bi-purified-air",
stack_size = 100
},
})

View file

@ -1,9 +1,9 @@
data:extend({
-- Bio Garden
{
type = "recipe-category",
name = "clean-air"
}
})
data:extend({
-- Bio Garden
{
type = "recipe-category",
name = "clean-air"
}
})

View file

@ -1,102 +1,102 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
--- Bio Gardens
data:extend({
--- Garden (ENTITY)
{
type = "recipe",
name = "bi-bio-garden",
localised_name = {"entity-name.bi-bio-garden"},
localised_description = {"entity-description.bi-bio-garden"},
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 10,
ingredients = {
{type="item", name="stone-wall", amount=12},
{type="item", name="stone-crushed", amount=50},
{type="item", name="seedling", amount=50}
},
results = {{type="item", name="bi-bio-garden", amount=1}},
main_product = "",
subgroup = "bio-bio-gardens-fluid",
order = "a[bi]",
allow_as_intermediate = 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 -- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Clean Air 1
{
type = "recipe",
name = "bi-purified-air-1",
icon = ICONPATH .. "clean-air_mk1.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "clean-air_mk1.png",
icon_size = 64,
}
},
order = "zzz-clean-air",
category = "clean-air",
subgroup = "bio-bio-gardens-fluid",
order = "bi-purified-air-1",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 40,
ingredients = {
{type = "fluid", name = "water", amount = 50},
{type = "item", name = "fertilizer", amount = 1}
},
results = {
{type = "item", name = "bi-purified-air", amount = 1, probability = 0},
},
main_product = "",
},
--- Clean Air 2
{
type = "recipe",
name = "bi-purified-air-2",
icon = ICONPATH .. "clean-air_mk2.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "clean-air_mk2.png",
icon_size = 64,
}
},
order = "zzz-clean-air2",
category = "clean-air",
subgroup = "bio-bio-gardens-fluid",
order = "bi-purified-air-2",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 100,
ingredients = {
{type = "fluid", name = "water", amount = 50},
{type = "item", name = "bi-adv-fertilizer", amount = 1},
},
results = {
{type = "item", name = "bi-purified-air", amount = 1, probability = 0},
},
main_product = "",
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
--- Bio Gardens
data:extend({
--- Garden (ENTITY)
{
type = "recipe",
name = "bi-bio-garden",
localised_name = {"entity-name.bi-bio-garden"},
localised_description = {"entity-description.bi-bio-garden"},
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_garden_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 10,
ingredients = {
{type="item", name="stone-wall", amount=12},
{type="item", name="stone-crushed", amount=50},
{type="item", name="seedling", amount=50}
},
results = {{type="item", name="bi-bio-garden", amount=1}},
main_product = "",
subgroup = "bio-bio-gardens-fluid",
order = "a[bi]",
allow_as_intermediate = 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 -- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Clean Air 1
{
type = "recipe",
name = "bi-purified-air-1",
icon = ICONPATH .. "clean-air_mk1.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "clean-air_mk1.png",
icon_size = 64,
}
},
order = "zzz-clean-air",
category = "clean-air",
subgroup = "bio-bio-gardens-fluid",
order = "bi-purified-air-1",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 40,
ingredients = {
{type = "fluid", name = "water", amount = 50},
{type = "item", name = "fertilizer", amount = 1}
},
results = {
{type = "item", name = "bi-purified-air", amount = 1, probability = 0},
},
main_product = "",
},
--- Clean Air 2
{
type = "recipe",
name = "bi-purified-air-2",
icon = ICONPATH .. "clean-air_mk2.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "clean-air_mk2.png",
icon_size = 64,
}
},
order = "zzz-clean-air2",
category = "clean-air",
subgroup = "bio-bio-gardens-fluid",
order = "bi-purified-air-2",
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 100,
ingredients = {
{type = "fluid", name = "water", amount = 50},
{type = "item", name = "bi-adv-fertilizer", amount = 1},
},
results = {
{type = "item", name = "bi-purified-air", amount = 1, probability = 0},
},
main_product = "",
},
})

View file

@ -1,450 +1,450 @@
local tile_graphics = require("__base__/prototypes/tile/tile-graphics")
local BioInd = require('common')('Bio_Industries_2')
require ("util")
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/"
if BI.Settings.BI_Solar_Additions then
local sounds = {}
sounds.walking_sound = {}
for i = 1, 11 do
sounds.walking_sound[i] = {
filename = "__base__/sound/walking/concrete-" .. i ..".ogg",
volume = 1.2
}
end
data:extend({
------- Bio Farm Solar Panel
{
type = "solar-panel",
name = "bi-bio-solar-farm",
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm"},
max_health = 600,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 80}},
collision_box = {{-4.2, -4.2}, {4.2, 4.2}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
energy_source = {
type = "electric",
usage_priority = "solar"
},
picture = {
filename = ENTITYPATH .. "Bio_Solar_Farm_On.png",
priority = "low",
width = 312,
height = 289,
frame_count = 1,
direction_count = 1,
--scale = 3/2,
shift = {0.30, 0}
},
production = "3600kW"
},
---- BI Accumulator
{
type = "accumulator",
name = "bi-bio-accumulator",
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator"},
max_health = 500,
corpse = "big-remnants",
collision_box = {{-1.75, -1.75}, {1.75, 1.75}},
selection_box = {{-2, -2}, {2, 2}},
--collision_box = {{-2, -2}, {2, 2}},
--selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
energy_source = {
type = "electric",
buffer_capacity = "300MJ",
usage_priority = "tertiary",
input_flow_limit = "20MW",
output_flow_limit = "20MW"
},
picture = {
filename = ENTITYPATH .. "bi_LargeAccumulator.png",
priority = "extra-high",
width = 245,
height = 245,
shift = {0.75, -0.5},
scale = 0.75,
},
charge_animation = {
filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png",
width = 250,
height = 250,
line_length = 8,
frame_count = 24,
shift = {0.75, -0.5},
scale = 0.75,
animation_speed = 0.5
},
charge_cooldown = 30,
charge_light = {intensity = 0.3, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}},
discharge_animation = {
filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png",
width = 250,
height = 250,
line_length = 8,
frame_count = 24,
shift = {0.75, -0.5},
scale = 0.75,
animation_speed = 0.5
},
discharge_cooldown = 60,
discharge_light = {intensity = 0.7, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}},
working_sound = {
sound = {
filename = "__base__/sound/accumulator-working.ogg",
volume = 1
},
idle_sound = {
filename = "__base__/sound/accumulator-idle.ogg",
volume = 0.4
},
max_sounds_per_type = 5
},
circuit_wire_connection_point = {
shadow = {
red = {0.984375, 1.10938},
green = {0.890625, 1.10938}
},
wire = {
red = {0.6875, 0.59375},
green = {0.6875, 0.71875}
}
},
--circuit_connector_sprites = get_circuit_connector_sprites({0.46875, 0.5}, {0.46875, 0.8125}, 26),
circuit_wire_max_distance = 9,
default_output_signal = {type = "virtual", name = "signal-A"}
},
---- Large Substation
{
type = "electric-pole",
name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"},
localised_description = {"entity-description.bi-large-substation"},
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-large-substation"},
max_health = 600,
corpse = "big-remnants",
dying_explosion = "big-explosion",
track_coverage_during_build_by_moving = true,
resistances = {
{
type = "fire",
percent = 90
}
},
collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
drawing_box = {{-2.5, -5}, {2.5, 2.5}},
maximum_wire_distance = 25,
-- Changed for 0.18.34/1.1.4
supply_area_distance = 50.5,
pictures = {
filename = ENTITYPATH .. "bi_LargeSubstation.png",
priority = "high",
width = 450,
height = 380,
shift = {1, -0.5},
direction_count = 1,
scale = 0.5,
},
working_sound = {
sound = { filename = "__base__/sound/substation.ogg" },
apparent_volume = 1.8,
audible_distance_modifier = 0.5,
probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds
},
connection_points = {
{
shadow = {
copper = {1.9, -0.6},
green = {1.3, -0.6},
red = {2.65, -0.6}
},
wire = {
copper = {-0.25, -2.71875},
green = {-0.84375, -2.71875},
red = {0.34375, -2.71875}
}
},
},
radius_visualisation_picture = {
filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png",
width = 12,
height = 12,
--scale = 3,
--shift = {0.6, -0.6},
priority = "extra-high-no-scale"
},
},
---- Solar Floor
{
type = "tile",
name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"},
localised_description = {"entity-description.bi-solar-mat"},
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
needs_correction = false,
minable = {hardness = 0.1, mining_time = 0.25, result = "bi-solar-mat"},
mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" },
collision_mask = { layers = { ground_tile = true }},
collision_box = {{-0.5, -0.5}, {0.5, 0.5}},
walking_speed_modifier = 1.45,
layer = 62,
decorative_removal_probability = 1,
variants = {
transition = tile_graphics.generic_masked_tile_transitions1,
main = {
{
picture = ENTITYPATH .. "solar1.png",
count = 1,
size = 1,
probability = 1,
},
},
inner_corner = {
picture = ENTITYPATH .. "solar-inner-corner.png",
count = 8
},
outer_corner = {
picture = ENTITYPATH .. "solar-outer-corner.png",
count = 8
},
side = {
picture = ENTITYPATH .. "solar-side.png",
count = 8
},
u_transition = {
picture = ENTITYPATH .. "solar-u.png",
count = 8
},
o_transition = {
picture = ENTITYPATH .. "solar-o.png",
count = 1
}
},
walking_sound = sounds.walking_sound,
map_color = {r = 93, g = 138, b = 168},
vehicle_friction_modifier = dirt_vehicle_speed_modifer
},
})
data:extend({
------- Boiler for Solar Plant / Boiler
{
type = "boiler",
name = "bi-solar-boiler",
icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 1, result = "bi-solar-boiler"},
max_health = 400,
corpse = "small-remnants",
vehicle_impact_sound = sounds.generic_impact,
mode = "output-to-separate-pipe",
resistances = {
{
type = "fire",
percent = 100
},
{
type = "explosion",
percent = 30
},
{
type = "impact",
percent = 30
}
},
collision_box = {{-4.2, -4.2}, {4.2, 4.2}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
target_temperature = 235,
fluid_box = {
volume = 200,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {4, 0}},
{flow_direction = "input-output", direction = defines.direction.north, position = {-4, 0}},
},
production_type = "input-output",
filter = "water"
},
output_fluid_box = {
volume = 200,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {0, 4}},
{flow_direction = "input-output", direction = defines.direction.north, position = {0, -4}},
},
production_type = "output",
filter = "steam"
},
energy_consumption = "1.799MW",
energy_source = {
type = "electric",
input_priority = "primary",
usage_priority = "primary-input",
--emissions_per_minute = 0 -- NO Emmisions
},
working_sound = {
sound = {
filename = "__base__/sound/boiler.ogg",
volume = 0.9
},
max_sounds_per_type = 3
},
structure = {
north = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
}
},
east = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
},
},
south = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
}
},
west = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
}
}
},
fire_flicker_enabled = false,
fire = {},
fire_glow_flicker_enabled = false,
fire_glow = {
north = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0.09, -2.8},
scale = 1.5,
blend_mode = "additive",
},
east = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0, -3},
blend_mode = "additive",
},
south = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0, -3},
blend_mode = "additive",
},
west = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0, -3},
blend_mode = "additive",
},
},
burning_cooldown = 20
},
})
end
local tile_graphics = require("__base__/prototypes/tile/tile-graphics")
local BioInd = require('common')('Bio_Industries_2')
require ("util")
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/"
if BI.Settings.BI_Solar_Additions then
local sounds = {}
sounds.walking_sound = {}
for i = 1, 11 do
sounds.walking_sound[i] = {
filename = "__base__/sound/walking/concrete-" .. i ..".ogg",
volume = 1.2
}
end
data:extend({
------- Bio Farm Solar Panel
{
type = "solar-panel",
name = "bi-bio-solar-farm",
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm"},
max_health = 600,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 80}},
collision_box = {{-4.2, -4.2}, {4.2, 4.2}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
energy_source = {
type = "electric",
usage_priority = "solar"
},
picture = {
filename = ENTITYPATH .. "Bio_Solar_Farm_On.png",
priority = "low",
width = 312,
height = 289,
frame_count = 1,
direction_count = 1,
--scale = 3/2,
shift = {0.30, 0}
},
production = "3600kW"
},
---- BI Accumulator
{
type = "accumulator",
name = "bi-bio-accumulator",
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-bio-accumulator"},
max_health = 500,
corpse = "big-remnants",
collision_box = {{-1.75, -1.75}, {1.75, 1.75}},
selection_box = {{-2, -2}, {2, 2}},
--collision_box = {{-2, -2}, {2, 2}},
--selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
energy_source = {
type = "electric",
buffer_capacity = "300MJ",
usage_priority = "tertiary",
input_flow_limit = "20MW",
output_flow_limit = "20MW"
},
picture = {
filename = ENTITYPATH .. "bi_LargeAccumulator.png",
priority = "extra-high",
width = 245,
height = 245,
shift = {0.75, -0.5},
scale = 0.75,
},
charge_animation = {
filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png",
width = 250,
height = 250,
line_length = 8,
frame_count = 24,
shift = {0.75, -0.5},
scale = 0.75,
animation_speed = 0.5
},
charge_cooldown = 30,
charge_light = {intensity = 0.3, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}},
discharge_animation = {
filename = ENTITYPATH .. "bi_LargeAccumulatorAnimated.png",
width = 250,
height = 250,
line_length = 8,
frame_count = 24,
shift = {0.75, -0.5},
scale = 0.75,
animation_speed = 0.5
},
discharge_cooldown = 60,
discharge_light = {intensity = 0.7, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}},
working_sound = {
sound = {
filename = "__base__/sound/accumulator-working.ogg",
volume = 1
},
idle_sound = {
filename = "__base__/sound/accumulator-idle.ogg",
volume = 0.4
},
max_sounds_per_type = 5
},
circuit_wire_connection_point = {
shadow = {
red = {0.984375, 1.10938},
green = {0.890625, 1.10938}
},
wire = {
red = {0.6875, 0.59375},
green = {0.6875, 0.71875}
}
},
--circuit_connector_sprites = get_circuit_connector_sprites({0.46875, 0.5}, {0.46875, 0.8125}, 26),
circuit_wire_max_distance = 9,
default_output_signal = {type = "virtual", name = "signal-A"}
},
---- Large Substation
{
type = "electric-pole",
name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"},
localised_description = {"entity-description.bi-large-substation"},
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.5, result = "bi-large-substation"},
max_health = 600,
corpse = "big-remnants",
dying_explosion = "big-explosion",
track_coverage_during_build_by_moving = true,
resistances = {
{
type = "fire",
percent = 90
}
},
collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
drawing_box = {{-2.5, -5}, {2.5, 2.5}},
maximum_wire_distance = 25,
-- Changed for 0.18.34/1.1.4
supply_area_distance = 50.5,
pictures = {
filename = ENTITYPATH .. "bi_LargeSubstation.png",
priority = "high",
width = 450,
height = 380,
shift = {1, -0.5},
direction_count = 1,
scale = 0.5,
},
working_sound = {
sound = { filename = "__base__/sound/substation.ogg" },
apparent_volume = 1.8,
audible_distance_modifier = 0.5,
probability = 1 / (3 * 60) -- average pause between the sound is 3 seconds
},
connection_points = {
{
shadow = {
copper = {1.9, -0.6},
green = {1.3, -0.6},
red = {2.65, -0.6}
},
wire = {
copper = {-0.25, -2.71875},
green = {-0.84375, -2.71875},
red = {0.34375, -2.71875}
}
},
},
radius_visualisation_picture = {
filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png",
width = 12,
height = 12,
--scale = 3,
--shift = {0.6, -0.6},
priority = "extra-high-no-scale"
},
},
---- Solar Floor
{
type = "tile",
name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"},
localised_description = {"entity-description.bi-solar-mat"},
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
needs_correction = false,
minable = {hardness = 0.1, mining_time = 0.25, result = "bi-solar-mat"},
mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" },
collision_mask = { layers = { ground_tile = true }},
collision_box = {{-0.5, -0.5}, {0.5, 0.5}},
walking_speed_modifier = 1.45,
layer = 62,
decorative_removal_probability = 1,
variants = {
transition = tile_graphics.generic_masked_tile_transitions1,
main = {
{
picture = ENTITYPATH .. "solar1.png",
count = 1,
size = 1,
probability = 1,
},
},
inner_corner = {
picture = ENTITYPATH .. "solar-inner-corner.png",
count = 8
},
outer_corner = {
picture = ENTITYPATH .. "solar-outer-corner.png",
count = 8
},
side = {
picture = ENTITYPATH .. "solar-side.png",
count = 8
},
u_transition = {
picture = ENTITYPATH .. "solar-u.png",
count = 8
},
o_transition = {
picture = ENTITYPATH .. "solar-o.png",
count = 1
}
},
walking_sound = sounds.walking_sound,
map_color = {r = 93, g = 138, b = 168},
vehicle_friction_modifier = dirt_vehicle_speed_modifer
},
})
data:extend({
------- Boiler for Solar Plant / Boiler
{
type = "boiler",
name = "bi-solar-boiler",
icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Boiler_Boiler_Icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 1, result = "bi-solar-boiler"},
max_health = 400,
corpse = "small-remnants",
vehicle_impact_sound = sounds.generic_impact,
mode = "output-to-separate-pipe",
resistances = {
{
type = "fire",
percent = 100
},
{
type = "explosion",
percent = 30
},
{
type = "impact",
percent = 30
}
},
collision_box = {{-4.2, -4.2}, {4.2, 4.2}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
target_temperature = 235,
fluid_box = {
volume = 200,
base_level = -1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {4, 0}},
{flow_direction = "input-output", direction = defines.direction.north, position = {-4, 0}},
},
production_type = "input-output",
filter = "water"
},
output_fluid_box = {
volume = 200,
base_level = 1,
pipe_covers = pipecoverspictures(),
pipe_connections = {
{flow_direction = "input-output", direction = defines.direction.north, position = {0, 4}},
{flow_direction = "input-output", direction = defines.direction.north, position = {0, -4}},
},
production_type = "output",
filter = "steam"
},
energy_consumption = "1.799MW",
energy_source = {
type = "electric",
input_priority = "primary",
usage_priority = "primary-input",
--emissions_per_minute = 0 -- NO Emmisions
},
working_sound = {
sound = {
filename = "__base__/sound/boiler.ogg",
volume = 0.9
},
max_sounds_per_type = 3
},
structure = {
north = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
}
},
east = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
},
},
south = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
}
},
west = {
layers = {
{
filename = ENTITYPATH .. "Bio_Solar_Boiler.png",
priority = "high",
width = 288,
height = 288,
},
}
}
},
fire_flicker_enabled = false,
fire = {},
fire_glow_flicker_enabled = false,
fire_glow = {
north = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0.09, -2.8},
scale = 1.5,
blend_mode = "additive",
},
east = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0, -3},
blend_mode = "additive",
},
south = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0, -3},
blend_mode = "additive",
},
west = {
filename = "__Bio_Industries_2__/graphics/entities/small-lamp/light-on-patch.png",
priority = "extra-high",
frame_count = 1,
width = 62,
height = 62,
shift = {0, -3},
blend_mode = "additive",
},
},
burning_cooldown = 20
},
})
end

View file

@ -1,114 +1,114 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if BI.Settings.BI_Solar_Additions then
data:extend({
-- Solar Farm
{
type = "item",
name = "bi-bio-solar-farm",
localised_name = {"entity-name.bi-bio-solar-farm"},
localised_description = {"entity-description.bi-bio-solar-farm"},
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]-a[bi-bio-solar-farm]",
place_result = "bi-bio-solar-farm",
stack_size = 10,
},
--- Solar Mat
{
type = "item",
name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"},
localised_description = {"entity-description.bi-solar-mat"},
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "d[solar-panel]-aa[solar-panel-1-a]",
stack_size = 400,
place_as_tile = {
result = "bi-solar-mat",
condition_size = 4,
condition = { layers = { water_tile = true }}
}
},
--- BI Accumulator
{
type = "item",
name = "bi-bio-accumulator",
localised_name = {"entity-name.bi-bio-accumulator"},
localised_description = {"entity-description.bi-bio-accumulator"},
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "e[accumulator]-a[bi-accumulator]",
place_result = "bi-bio-accumulator",
stack_size = 5
},
--- Large Substation
{
type = "item",
name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"},
localised_description = {"entity-description.bi-large-substation"},
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[substation]-b[large-substation]",
place_result = "bi-large-substation",
stack_size = 10
},
----- Solar Boiler - Boiler
{
type = "item",
name = "bi-solar-boiler",
localised_name = {"entity-name.bi-solar-boiler"},
localised_description = {"entity-description.bi-solar-boiler"},
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "b[steam-power]-c[steam-engine]",
place_result = "bi-solar-boiler",
stack_size = 20,
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if BI.Settings.BI_Solar_Additions then
data:extend({
-- Solar Farm
{
type = "item",
name = "bi-bio-solar-farm",
localised_name = {"entity-name.bi-bio-solar-farm"},
localised_description = {"entity-description.bi-bio-solar-farm"},
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]-a[bi-bio-solar-farm]",
place_result = "bi-bio-solar-farm",
stack_size = 10,
},
--- Solar Mat
{
type = "item",
name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"},
localised_description = {"entity-description.bi-solar-mat"},
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "d[solar-panel]-aa[solar-panel-1-a]",
stack_size = 400,
place_as_tile = {
result = "bi-solar-mat",
condition_size = 4,
condition = { layers = { water_tile = true }}
}
},
--- BI Accumulator
{
type = "item",
name = "bi-bio-accumulator",
localised_name = {"entity-name.bi-bio-accumulator"},
localised_description = {"entity-description.bi-bio-accumulator"},
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "e[accumulator]-a[bi-accumulator]",
place_result = "bi-bio-accumulator",
stack_size = 5
},
--- Large Substation
{
type = "item",
name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"},
localised_description = {"entity-description.bi-large-substation"},
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[substation]-b[large-substation]",
place_result = "bi-large-substation",
stack_size = 10
},
----- Solar Boiler - Boiler
{
type = "item",
name = "bi-solar-boiler",
localised_name = {"entity-name.bi-solar-boiler"},
localised_description = {"entity-description.bi-solar-boiler"},
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
}
},
subgroup = "energy",
order = "b[steam-power]-c[steam-engine]",
place_result = "bi-solar-boiler",
stack_size = 20,
},
})
end

View file

@ -1,158 +1,158 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if BI.Settings.BI_Solar_Additions then
data:extend({
--- Bio Solar Farm
{
type = "recipe",
name = "bi-bio-solar-farm",
localised_name = {"entity-name.bi-bio-solar-farm"},
localised_description = {"entity-description.bi-bio-solar-farm"},
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 60,
ingredients = {
{type="item", name="solar-panel", amount=50},
{type="item", name="medium-electric-pole", amount=25},
{type="item", name="concrete", amount=400},
},
results = {{type="item", name="bi-bio-solar-farm", amount=1}},
main_product = "",
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]-a[bi-bio-solar-farm]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
-- solar boiler
{
type = "recipe",
name = "bi-solar-boiler-hidden-panel",
localised_name = {"entity-name.bi-solar-boiler"},
localised_description = {"entity-description.bi-solar-boiler"},
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 15,
ingredients = {
{type="item", name="solar-panel", amount=30},
{type="item", name="storage-tank", amount=4},
{type="item", name="boiler", amount=1},
},
results = {{type="item", name="bi-solar-boiler", amount=1}},
main_product = "",
subgroup = "energy",
order = "b[steam-power]-c[steam-engine]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
-- solar mat
{
type = "recipe",
name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"},
localised_description = {"entity-description.bi-solar-mat"},
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 5,
ingredients = {
{type="item", name="steel-plate", amount=1},
{type="item", name="advanced-circuit", amount=3},
{type="item", name="copper-cable", amount=4}
},
results = {{type="item", name="bi-solar-mat", amount=1}},
main_product = "",
subgroup = "energy",
order = "d[solar-panel]-aa[solar-panel-1-a]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
--- BI Accumulator
{
type = "recipe",
name = "bi-bio-accumulator",
localised_name = {"entity-name.bi-bio-accumulator"},
localised_description = {"entity-description.bi-bio-accumulator"},
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
}
},
energy_required = 60,
enabled = false,
ingredients = {
{type="item", name="accumulator", amount=50},
{type="item", name="copper-cable", amount=50},
{type="item", name="concrete", amount=200},
},
results = {{type="item", name="bi-bio-accumulator", amount=1}},
main_product = "",
subgroup = "energy",
order = "e[accumulator]-a[bi-accumulator]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
-- Large Substation
{
type = "recipe",
name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"},
localised_description = {"entity-description.bi-large-substation"},
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
}
},
enabled = false,
ingredients = {
{type="item", name="steel-plate", amount=10},
{type="item", name="concrete", amount=200},
{type="item", name="substation", amount=4}
},
results = {{type="item", name="bi-large-substation", amount=1}},
main_product = "",
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[substation]-b[large-substation]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
})
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if BI.Settings.BI_Solar_Additions then
data:extend({
--- Bio Solar Farm
{
type = "recipe",
name = "bi-bio-solar-farm",
localised_name = {"entity-name.bi-bio-solar-farm"},
localised_description = {"entity-description.bi-bio-solar-farm"},
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 60,
ingredients = {
{type="item", name="solar-panel", amount=50},
{type="item", name="medium-electric-pole", amount=25},
{type="item", name="concrete", amount=400},
},
results = {{type="item", name="bi-bio-solar-farm", amount=1}},
main_product = "",
subgroup = "energy",
order = "d[solar-panel]-a[solar-panel]-a[bi-bio-solar-farm]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
-- solar boiler
{
type = "recipe",
name = "bi-solar-boiler-hidden-panel",
localised_name = {"entity-name.bi-solar-boiler"},
localised_description = {"entity-description.bi-solar-boiler"},
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 15,
ingredients = {
{type="item", name="solar-panel", amount=30},
{type="item", name="storage-tank", amount=4},
{type="item", name="boiler", amount=1},
},
results = {{type="item", name="bi-solar-boiler", amount=1}},
main_product = "",
subgroup = "energy",
order = "b[steam-power]-c[steam-engine]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
-- solar mat
{
type = "recipe",
name = "bi-solar-mat",
localised_name = {"entity-name.bi-solar-mat"},
localised_description = {"entity-description.bi-solar-mat"},
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 5,
ingredients = {
{type="item", name="steel-plate", amount=1},
{type="item", name="advanced-circuit", amount=3},
{type="item", name="copper-cable", amount=4}
},
results = {{type="item", name="bi-solar-mat", amount=1}},
main_product = "",
subgroup = "energy",
order = "d[solar-panel]-aa[solar-panel-1-a]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
--- BI Accumulator
{
type = "recipe",
name = "bi-bio-accumulator",
localised_name = {"entity-name.bi-bio-accumulator"},
localised_description = {"entity-description.bi-bio-accumulator"},
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeAccumulator.png",
icon_size = 64,
}
},
energy_required = 60,
enabled = false,
ingredients = {
{type="item", name="accumulator", amount=50},
{type="item", name="copper-cable", amount=50},
{type="item", name="concrete", amount=200},
},
results = {{type="item", name="bi-bio-accumulator", amount=1}},
main_product = "",
subgroup = "energy",
order = "e[accumulator]-a[bi-accumulator]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
-- Large Substation
{
type = "recipe",
name = "bi-large-substation",
localised_name = {"entity-name.bi-large-substation"},
localised_description = {"entity-description.bi-large-substation"},
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_LargeSubstation_icon.png",
icon_size = 64,
}
},
enabled = false,
ingredients = {
{type="item", name="steel-plate", amount=10},
{type="item", name="concrete", amount=200},
{type="item", name="substation", amount=4}
},
results = {{type="item", name="bi-large-substation", amount=1}},
main_product = "",
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[substation]-b[large-substation]",
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
allow_decomposition = true, -- Changed for 0.18.34/1.1.4
},
})
end

View file

@ -1,36 +1,36 @@
------- Bio Farm Solar Panel
{
type = "solar-panel",
name = "bi-bio-solar-farm",
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm"},
max_health = 600,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 80}},
collision_box = {{-4.2, -4.2}, {4.2, 4.2}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
energy_source = {
type = "electric",
usage_priority = "solar"
},
picture = {
filename = ENTITYPATH .. "Bio_Solar_Farm_On.png",
priority = "low",
width = 312,
height = 289,
frame_count = 1,
direction_count = 1,
--scale = 3/2,
shift = {0.30, 0}
},
production = "3600kW"
},
------- Bio Farm Solar Panel
{
type = "solar-panel",
name = "bi-bio-solar-farm",
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "Bio_Solar_Farm_Icon.png",
icon_size = 64,
}
},
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.25, mining_time = 0.5, result = "bi-bio-solar-farm"},
max_health = 600,
corpse = "big-remnants",
dying_explosion = "medium-explosion",
resistances = {{type = "fire", percent = 80}},
collision_box = {{-4.2, -4.2}, {4.2, 4.2}},
selection_box = {{-4.5, -4.5}, {4.5, 4.5}},
energy_source = {
type = "electric",
usage_priority = "solar"
},
picture = {
filename = ENTITYPATH .. "Bio_Solar_Farm_On.png",
priority = "low",
width = 312,
height = 289,
frame_count = 1,
direction_count = 1,
--scale = 3/2,
shift = {0.30, 0}
},
production = "3600kW"
},

View file

@ -1,31 +1,31 @@
------- Hidden Solar Panel for Solar Mat
{
type = "solar-panel",
name = "bi-musk-mat-hidden-panel",
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
flags = {"not-blueprintable", "not-deconstructable", "placeable-off-grid", "not-on-map", "not-repairable"},
selectable_in_game = false,
max_health = 1,
resistances = {{type = "fire", percent = 100}},
collision_mask = { layers = { ground_tile = true }},
collision_box = {{-0.0, -0.0}, {0.0, 0.0}},
selection_box = {{0, 0}, {0, 0}},
energy_source = {
type = "electric",
usage_priority = "solar"
},
picture = {
filename = ICONPATH .. "empty.png",
priority = "low",
width = 1,
height = 1,
},
production = "10kW"
},
------- Hidden Solar Panel for Solar Mat
{
type = "solar-panel",
name = "bi-musk-mat-hidden-panel",
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "solar-mat.png",
icon_size = 64,
}
},
flags = {"not-blueprintable", "not-deconstructable", "placeable-off-grid", "not-on-map", "not-repairable"},
selectable_in_game = false,
max_health = 1,
resistances = {{type = "fire", percent = 100}},
collision_mask = { layers = { ground_tile = true }},
collision_box = {{-0.0, -0.0}, {0.0, 0.0}},
selection_box = {{0, 0}, {0, 0}},
energy_source = {
type = "electric",
usage_priority = "solar"
},
picture = {
filename = ICONPATH .. "empty.png",
priority = "low",
width = 1,
height = 1,
},
production = "10kW"
},

View file

@ -1,10 +1,10 @@
data:extend({
--- Damage for Dart Turret Ammo
{
type = "damage-type",
name = "bob-pierce"
},
})
data:extend({
--- Damage for Dart Turret Ammo
{
type = "damage-type",
name = "bob-pierce"
},
})

View file

@ -1,323 +1,323 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Basic Dart
{
type = "ammo",
name = "bi-dart-magazine-basic",
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aaa]-a[basic-clips]-aa[firearm-magazine]",
stack_size = 400
},
--- Standard Dart
{
type = "ammo",
name = "bi-dart-magazine-standard",
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
{
type = "damage",
damage = { amount = 2 , type = "bob-pierce"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aab]-a[basic-clips]-ab[firearm-magazine]",
stack_size = 400
},
--- Enhanced Dart
{
type = "ammo",
name = "bi-dart-magazine-enhanced",
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
{
type = "damage",
damage = { amount = 2 , type = "bob-pierce"}
},
{
type = "damage",
damage = { amount = 2 , type = "acid"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aac]-a[basic-clips]-ac[firearm-magazine]",
stack_size = 400
},
--- Poison Dart
{
type = "ammo",
name = "bi-dart-magazine-poison",
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
{
type = "damage",
damage = { amount = 2 , type = "bob-pierce"}
},
{
type = "damage",
damage = { amount = 2 , type = "acid"}
},
{
type = "damage",
damage = { amount = 2 , type = "poison"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aad]-a[basic-clips]-ad[firearm-magazine]",
stack_size = 400
},
})
function turret_pic(inputs)
return
{
layers = {
{
filename = "__Bio_Industries_2__/graphics/entities/bio_turret/bio_turret.png",
priority = "medium",
scale = 0.5,
width = 224,
height = 160,
direction_count = inputs.direction_count and inputs.direction_count or 64,
frame_count = 1,
line_length = inputs.line_length and inputs.line_length or 8,
axially_symmetrical = false,
run_mode = inputs.run_mode and inputs.run_mode or "forward",
shift = { 0.25, -0.25 },
}
}
}
end
--- Dart Turret
data:extend({
{
type = "ammo-turret",
name = "bi-dart-turret",
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
}
},
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.25, result = "bi-dart-turret"},
max_health = 300,
corpse = "medium-remnants",
collision_box = {{-0.2, -0.2 }, {0.2, 0.2}},
selection_box = {{-0.4, -0.4 }, {0.4, 0.4}},
rotation_speed = 0.05,
preparing_speed = 0.08,
folding_speed = 0.08,
dying_explosion = "medium-explosion",
inventory_size = 1,
automated_ammo_count = 14,
attacking_speed = 1, -- makes nothing, it's animation's parameter
folded_animation = turret_pic{direction_count = 8, line_length = 1},
preparing_animation = turret_pic{direction_count = 8, line_length = 1},
prepared_animation = turret_pic{},
attacking_animation = turret_pic{},
folding_animation = turret_pic{direction_count = 8, line_length = 1, run_mode = "backward"},
-- darkfrei: wood impact sound for woods!
impact_category = "wood",
attack_parameters = {
type = "projectile",
ammo_category = "Bio_Turret_Ammo",
cooldown = 3.6, -- cooldown = 6 -- darkfrei: means cooldown 6/60 sec or 10 shoots at second; = 60 is one shoot/sec
projectile_creation_distance = 1.41,
projectile_center = {-0.0625, 0.55},
-- darkfrei: darts haven't shells :)
--[[ shell_particle = {
name = "shell-particle",
direction_deviation = 0.1,
speed = 0.15,
speed_deviation = 0.03,
center = {-0.0625, 0},
creation_distance = -1.925,
starting_frame_speed = 0.2,
starting_frame_speed_deviation = 0.1
}, ]]
range = 20,
sound = {
filename = "__Bio_Industries_2__/sound/dart-turret.ogg",
volume = 0.85
},
},
call_for_help_radius = 40,
graphics_set = {}
},
})
--- Dart Rifle
data:extend({
{
type = "gun",
name = "bi-dart-rifle",
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
}
},
subgroup = "gun",
order = "a[basic-clips]-ab[submachine-gun]",
attack_parameters = {
type = "projectile",
ammo_category = "Bio_Turret_Ammo",
cooldown = 5,
movement_slow_down_factor = 0.5,
--shell_particle = {},
projectile_creation_distance = 1.125,
range = 17,
sound = {
filename = "__Bio_Industries_2__/sound/dart-turret.ogg",
volume = 0.65
},
},
stack_size = 5
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Basic Dart
{
type = "ammo",
name = "bi-dart-magazine-basic",
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aaa]-a[basic-clips]-aa[firearm-magazine]",
stack_size = 400
},
--- Standard Dart
{
type = "ammo",
name = "bi-dart-magazine-standard",
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
{
type = "damage",
damage = { amount = 2 , type = "bob-pierce"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aab]-a[basic-clips]-ab[firearm-magazine]",
stack_size = 400
},
--- Enhanced Dart
{
type = "ammo",
name = "bi-dart-magazine-enhanced",
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
{
type = "damage",
damage = { amount = 2 , type = "bob-pierce"}
},
{
type = "damage",
damage = { amount = 2 , type = "acid"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aac]-a[basic-clips]-ac[firearm-magazine]",
stack_size = 400
},
--- Poison Dart
{
type = "ammo",
name = "bi-dart-magazine-poison",
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
}
},
ammo_category = "bullet",
ammo_type = {
category = "Bio_Turret_Ammo",
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
type = "create-explosion",
entity_name = "explosion-gunshot",
},
target_effects = {
{
type = "create-entity",
entity_name = "explosion-hit"
},
{
type = "damage",
damage = { amount = 3 , type = "physical"}
},
{
type = "damage",
damage = { amount = 2 , type = "bob-pierce"}
},
{
type = "damage",
damage = { amount = 2 , type = "acid"}
},
{
type = "damage",
damage = { amount = 2 , type = "poison"}
},
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "[aad]-a[basic-clips]-ad[firearm-magazine]",
stack_size = 400
},
})
function turret_pic(inputs)
return
{
layers = {
{
filename = "__Bio_Industries_2__/graphics/entities/bio_turret/bio_turret.png",
priority = "medium",
scale = 0.5,
width = 224,
height = 160,
direction_count = inputs.direction_count and inputs.direction_count or 64,
frame_count = 1,
line_length = inputs.line_length and inputs.line_length or 8,
axially_symmetrical = false,
run_mode = inputs.run_mode and inputs.run_mode or "forward",
shift = { 0.25, -0.25 },
}
}
}
end
--- Dart Turret
data:extend({
{
type = "ammo-turret",
name = "bi-dart-turret",
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
}
},
flags = {"placeable-player", "player-creation"},
minable = {mining_time = 0.25, result = "bi-dart-turret"},
max_health = 300,
corpse = "medium-remnants",
collision_box = {{-0.2, -0.2 }, {0.2, 0.2}},
selection_box = {{-0.4, -0.4 }, {0.4, 0.4}},
rotation_speed = 0.05,
preparing_speed = 0.08,
folding_speed = 0.08,
dying_explosion = "medium-explosion",
inventory_size = 1,
automated_ammo_count = 14,
attacking_speed = 1, -- makes nothing, it's animation's parameter
folded_animation = turret_pic{direction_count = 8, line_length = 1},
preparing_animation = turret_pic{direction_count = 8, line_length = 1},
prepared_animation = turret_pic{},
attacking_animation = turret_pic{},
folding_animation = turret_pic{direction_count = 8, line_length = 1, run_mode = "backward"},
-- darkfrei: wood impact sound for woods!
impact_category = "wood",
attack_parameters = {
type = "projectile",
ammo_category = "Bio_Turret_Ammo",
cooldown = 3.6, -- cooldown = 6 -- darkfrei: means cooldown 6/60 sec or 10 shoots at second; = 60 is one shoot/sec
projectile_creation_distance = 1.41,
projectile_center = {-0.0625, 0.55},
-- darkfrei: darts haven't shells :)
--[[ shell_particle = {
name = "shell-particle",
direction_deviation = 0.1,
speed = 0.15,
speed_deviation = 0.03,
center = {-0.0625, 0},
creation_distance = -1.925,
starting_frame_speed = 0.2,
starting_frame_speed_deviation = 0.1
}, ]]
range = 20,
sound = {
filename = "__Bio_Industries_2__/sound/dart-turret.ogg",
volume = 0.85
},
},
call_for_help_radius = 40,
graphics_set = {}
},
})
--- Dart Rifle
data:extend({
{
type = "gun",
name = "bi-dart-rifle",
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
}
},
subgroup = "gun",
order = "a[basic-clips]-ab[submachine-gun]",
attack_parameters = {
type = "projectile",
ammo_category = "Bio_Turret_Ammo",
cooldown = 5,
movement_slow_down_factor = 0.5,
--shell_particle = {},
projectile_creation_distance = 1.125,
range = 17,
sound = {
filename = "__Bio_Industries_2__/sound/dart-turret.ogg",
volume = 0.65
},
},
stack_size = 5
},
})

View file

@ -1,9 +1,9 @@
data:extend({
{
type = "ammo-category",
name = "Bio_Turret_Ammo",
order = "1"
},
})
data:extend({
{
type = "ammo-category",
name = "Bio_Turret_Ammo",
order = "1"
},
})

View file

@ -1,24 +1,24 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Conversion Turret
{
type = "item",
name = "bi-dart-turret",
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
}
},
subgroup = "defensive-structure",
order = "aa[turret]-a[gun-turret]",
place_result = "bi-dart-turret",
stack_size = 50
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Conversion Turret
{
type = "item",
name = "bi-dart-turret",
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
}
},
subgroup = "defensive-structure",
order = "aa[turret]-a[gun-turret]",
place_result = "bi-dart-turret",
stack_size = 50
},
})

View file

@ -1,187 +1,187 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Basic Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-basic",
localised_name = {"item-name.bi-dart-magazine-basic"},
localised_description = {"item-description.bi-dart-magazine-basic"},
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
}
},
enabled = true,
energy_required = 4,
ingredients = {
{type="item", name="wood", amount=10},
},
results = {{type="item", name="bi-dart-magazine-basic", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-1",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Standard Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-standard",
localised_name = {"item-name.bi-dart-magazine-standard"},
localised_description = {"item-description.bi-dart-magazine-standard"},
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 5,
ingredients = {
{type="item", name="bi-dart-magazine-basic", amount=10},
{type="item", name="copper-plate", amount=5},
},
results = {{type="item", name="bi-dart-magazine-standard", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-2",
},
--- Enhanced Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-enhanced",
localised_name = {"item-name.bi-dart-magazine-enhanced"},
localised_description = {"item-description.bi-dart-magazine-enhanced"},
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 6,
ingredients = {
{type="item", name="bi-dart-magazine-standard", amount=10},
{type="item", name="plastic-bar", amount=5},
},
results = {{type="item", name="bi-dart-magazine-enhanced", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-3",
},
--- Poison Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-poison",
localised_name = {"item-name.bi-dart-magazine-poison"},
localised_description = {"item-description.bi-dart-magazine-poison"},
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 8,
ingredients = {
{type="item", name="bi-dart-magazine-enhanced", amount=10},
{type="item", name="poison-capsule", amount=5},
},
results = {{type="item", name="bi-dart-magazine-poison", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-4",
},
--- Dart Turret
{
type = "recipe",
name = "bi-dart-turret",
localised_name = {"entity-name.bi-dart-turret"},
localised_description = {"entity-description.bi-dart-turret"},
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
}
},
enabled = true,
energy_required = 8,
ingredients = {
{type="item", name="iron-gear-wheel", amount=5},
{type="item", name="wood", amount=20},
},
results = {{type="item", name="bi-dart-turret", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "defensive-structure",
order = "b[turret]-e[bi-dart-turret]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Dart Rifle
{
type = "recipe",
name = "bi-dart-rifle",
localised_name = {"item-name.bi-dart-rifle"},
localised_description = {"item-description.bi-dart-rifle"},
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
}
},
enabled = true,
energy_required = 8,
ingredients = {
{type="item", name="copper-plate", amount=5},
{type="item", name="wood", amount=15},
},
results = {{type="item", name="bi-dart-rifle", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "gun",
order = "a[basic-clips]-b[bi-dart-rifle]"
},
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Basic Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-basic",
localised_name = {"item-name.bi-dart-magazine-basic"},
localised_description = {"item-description.bi-dart-magazine-basic"},
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "basic_dart_icon.png",
icon_size = 64,
}
},
enabled = true,
energy_required = 4,
ingredients = {
{type="item", name="wood", amount=10},
},
results = {{type="item", name="bi-dart-magazine-basic", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-1",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Standard Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-standard",
localised_name = {"item-name.bi-dart-magazine-standard"},
localised_description = {"item-description.bi-dart-magazine-standard"},
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "standard_dart_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 5,
ingredients = {
{type="item", name="bi-dart-magazine-basic", amount=10},
{type="item", name="copper-plate", amount=5},
},
results = {{type="item", name="bi-dart-magazine-standard", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-2",
},
--- Enhanced Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-enhanced",
localised_name = {"item-name.bi-dart-magazine-enhanced"},
localised_description = {"item-description.bi-dart-magazine-enhanced"},
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "enhanced_dart_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 6,
ingredients = {
{type="item", name="bi-dart-magazine-standard", amount=10},
{type="item", name="plastic-bar", amount=5},
},
results = {{type="item", name="bi-dart-magazine-enhanced", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-3",
},
--- Poison Dart Ammo
{
type = "recipe",
name = "bi-dart-magazine-poison",
localised_name = {"item-name.bi-dart-magazine-poison"},
localised_description = {"item-description.bi-dart-magazine-poison"},
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "poison_dart_icon.png",
icon_size = 64,
}
},
enabled = false,
energy_required = 8,
ingredients = {
{type="item", name="bi-dart-magazine-enhanced", amount=10},
{type="item", name="poison-capsule", amount=5},
},
results = {{type="item", name="bi-dart-magazine-poison", amount=10}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "bi-ammo",
order = "[bio-ammo]-a-[darts]-4",
},
--- Dart Turret
{
type = "recipe",
name = "bi-dart-turret",
localised_name = {"entity-name.bi-dart-turret"},
localised_description = {"entity-description.bi-dart-turret"},
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bio_turret_icon.png",
icon_size = 64,
}
},
enabled = true,
energy_required = 8,
ingredients = {
{type="item", name="iron-gear-wheel", amount=5},
{type="item", name="wood", amount=20},
},
results = {{type="item", name="bi-dart-turret", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "defensive-structure",
order = "b[turret]-e[bi-dart-turret]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Dart Rifle
{
type = "recipe",
name = "bi-dart-rifle",
localised_name = {"item-name.bi-dart-rifle"},
localised_description = {"item-description.bi-dart-rifle"},
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "bi_dart_rifle_icon.png",
icon_size = 64,
}
},
enabled = true,
energy_required = 8,
ingredients = {
{type="item", name="copper-plate", amount=5},
{type="item", name="wood", amount=15},
},
results = {{type="item", name="bi-dart-rifle", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "gun",
order = "a[basic-clips]-b[bi-dart-rifle]"
},
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
})

View file

@ -1,59 +1,59 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if not mods["Natural_Evolution_Buildings"] then
-- Simplified code in 0.17.39/0.18.6
local techs = data.raw.technology
-- Turret attack modifier
for index, modifier in pairs({
-- Keeping indices isn't really necessary here (and in the following), but should help
-- to avoid mistakes if this file is edited in the future.
[1] = 0.1,
[2] = 0.1,
[3] = 0.2,
[4] = 0.2,
[5] = 0.2,
[6] = 0.4,
[7] = 0.7,
}) do
table.insert(techs["physical-projectile-damage-" .. tostring(index)].effects, {
type = "turret-attack",
turret_id = "bi-dart-turret",
modifier = modifier
})
end
-- Shooting speed modifier
for index, modifier in pairs({
[1] = 0.1,
[2] = 0.2,
[3] = 0.2,
[4] = 0.2,
[5] = 0.2,
[6] = 0.4,
}) do
table.insert(techs["weapon-shooting-speed-" .. tostring(index)].effects, {
type = "gun-speed",
ammo_category = "Bio_Turret_Ammo",
modifier = modifier
})
end
-- Ammo damage modifier
for index, modifier in pairs({
[1] = 0.1,
[2] = 0.1,
[3] = 0.2,
[4] = 0.2,
[5] = 0.2,
[6] = 0.4,
[7] = 0.4,
}) do
table.insert(techs["physical-projectile-damage-" .. tostring(index)].effects, {
type = "ammo-damage",
ammo_category = "Bio_Turret_Ammo",
modifier = modifier
})
end
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
if not mods["Natural_Evolution_Buildings"] then
-- Simplified code in 0.17.39/0.18.6
local techs = data.raw.technology
-- Turret attack modifier
for index, modifier in pairs({
-- Keeping indices isn't really necessary here (and in the following), but should help
-- to avoid mistakes if this file is edited in the future.
[1] = 0.1,
[2] = 0.1,
[3] = 0.2,
[4] = 0.2,
[5] = 0.2,
[6] = 0.4,
[7] = 0.7,
}) do
table.insert(techs["physical-projectile-damage-" .. tostring(index)].effects, {
type = "turret-attack",
turret_id = "bi-dart-turret",
modifier = modifier
})
end
-- Shooting speed modifier
for index, modifier in pairs({
[1] = 0.1,
[2] = 0.2,
[3] = 0.2,
[4] = 0.2,
[5] = 0.2,
[6] = 0.4,
}) do
table.insert(techs["weapon-shooting-speed-" .. tostring(index)].effects, {
type = "gun-speed",
ammo_category = "Bio_Turret_Ammo",
modifier = modifier
})
end
-- Ammo damage modifier
for index, modifier in pairs({
[1] = 0.1,
[2] = 0.1,
[3] = 0.2,
[4] = 0.2,
[5] = 0.2,
[6] = 0.4,
[7] = 0.4,
}) do
table.insert(techs["physical-projectile-damage-" .. tostring(index)].effects, {
type = "ammo-damage",
ammo_category = "Bio_Turret_Ammo",
modifier = modifier
})
end
end

View file

@ -1,169 +1,169 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
log("BI.Settings.BI_Game_Tweaks_Disassemble: " .. tostring(BI.Settings.BI_Game_Tweaks_Disassemble))
if BI.Settings.BI_Game_Tweaks_Disassemble then
log("Enabling disassemble recipes!")
--- Bio Tweaks
data:extend({
-- Item subgroup
{
type = "item-subgroup",
name = "bio-disassemble",
group = "bio-industries",
order = "zzzz",
},
-- Recipes
{
type = "recipe",
name = "bi-burner-mining-drill-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "burner-mining-drill_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "burner-mining-drill_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-a[bi-burner-mining-drill-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "burner-mining-drill", amount = 1},
},
results = {
{type="item", name="stone", amount=4},
{type="item", name="iron-plate", amount=4}
},
main_product = "",
},
{
type = "recipe",
name = "bi-burner-inserter-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "burner_inserter_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "burner_inserter_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-b[bi-burner-inserter-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "burner-inserter", amount = 1},
},
results = {
{type="item", name="iron-plate", amount=2},
},
main_product = "",
},
{
type = "recipe",
name = "bi-long-handed-inserter-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "long_handed_inserter_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "long_handed_inserter_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-c[bi-long-handed-inserter-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "long-handed-inserter", amount = 1},
},
results = {
{type="item", name="iron-gear-wheel", amount=1},
{type="item", name="iron-plate", amount=1},
{type="item", name="electronic-circuit", amount=1},
},
main_product = "",
},
{
type = "recipe",
name = "bi-stone-furnace-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "stone_furnace_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "stone_furnace_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-d[bi-stone-furnace-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "stone-furnace", amount = 1},
},
results = {
{type="item", name="stone", amount=3},
},
main_product = "",
},
{
type = "recipe",
name = "bi-steel-furnace-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "steel-furnace_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "steel-furnace_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-e[bi-steel-furnace-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "steel-furnace", amount = 1},
},
results = {
{type="item", name="steel-plate", amount=4},
{type="item", name="stone-brick", amount=4}
},
main_product = "",
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
log("BI.Settings.BI_Game_Tweaks_Disassemble: " .. tostring(BI.Settings.BI_Game_Tweaks_Disassemble))
if BI.Settings.BI_Game_Tweaks_Disassemble then
log("Enabling disassemble recipes!")
--- Bio Tweaks
data:extend({
-- Item subgroup
{
type = "item-subgroup",
name = "bio-disassemble",
group = "bio-industries",
order = "zzzz",
},
-- Recipes
{
type = "recipe",
name = "bi-burner-mining-drill-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "burner-mining-drill_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "burner-mining-drill_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-a[bi-burner-mining-drill-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "burner-mining-drill", amount = 1},
},
results = {
{type="item", name="stone", amount=4},
{type="item", name="iron-plate", amount=4}
},
main_product = "",
},
{
type = "recipe",
name = "bi-burner-inserter-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "burner_inserter_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "burner_inserter_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-b[bi-burner-inserter-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "burner-inserter", amount = 1},
},
results = {
{type="item", name="iron-plate", amount=2},
},
main_product = "",
},
{
type = "recipe",
name = "bi-long-handed-inserter-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "long_handed_inserter_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "long_handed_inserter_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-c[bi-long-handed-inserter-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "long-handed-inserter", amount = 1},
},
results = {
{type="item", name="iron-gear-wheel", amount=1},
{type="item", name="iron-plate", amount=1},
{type="item", name="electronic-circuit", amount=1},
},
main_product = "",
},
{
type = "recipe",
name = "bi-stone-furnace-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "stone_furnace_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "stone_furnace_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-d[bi-stone-furnace-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "stone-furnace", amount = 1},
},
results = {
{type="item", name="stone", amount=3},
},
main_product = "",
},
{
type = "recipe",
name = "bi-steel-furnace-disassemble",
localised_description = {"recipe-description.bi-disassemble-recipes"},
icon = ICONPATH .. "steel-furnace_disassemble.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "steel-furnace_disassemble.png",
icon_size = 64,
}
},
category = "advanced-crafting",
subgroup = "bio-disassemble",
order = "a[Disassemble]-e[bi-steel-furnace-disassemble]",
enabled = false,
allow_as_intermediate = false,
always_show_made_in = true,
allow_decomposition = false,
energy_required = 2,
ingredients = {
{type = "item", name = "steel-furnace", amount = 1},
},
results = {
{type="item", name="steel-plate", amount=4},
{type="item", name="stone-brick", amount=4}
},
main_product = "",
},
})
end

View file

@ -1,99 +1,99 @@
local BioInd = require('common')('Bio_Industries_2')
if mods["IndustrialRevolution"] then
------------------------------------------------------------------------------------
-- Our large wooden poles are unlocked by the "Logistics" research and require small
-- electric poles, which are unlocked by IR2 after the Iron Age has been reached. So,
-- if IR2 is active, we won't unlock our poles and use IR2's large wooden poles for
-- our huge poles instead.
------------------------------------------------------------------------------------
local big_pole = "bi-wooden-pole-big"
thxbob.lib.tech.remove_recipe_unlock ("logistics", big_pole)
thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-1", big_pole)
-- Adjust localizations
for k, v in ipairs({"electric-pole", "item", "recipe"}) do
BioInd.show("Changing localization for", v)
data.raw[v][big_pole].localised_name = {"entity-name.bi-wooden-pole-bigger"}
data.raw[v][big_pole].localised_description = {"entity-description.bi-wooden-pole-bigger"}
end
------------------------------------------------------------------------------------
-- IR2 disables the "solar-energy" technology, so our Solar boiler, Solar farm, and
-- Musk floor will never be unlocked. Move the unlocks to IR2's technologies!
------------------------------------------------------------------------------------
thxbob.lib.tech.add_recipe_unlock ("ir2-solar-energy-1", "bi-solar-boiler-hidden-panel")
thxbob.lib.tech.add_recipe_unlock ("ir2-solar-energy-2", "bi-bio-solar-farm")
thxbob.lib.tech.add_recipe_unlock ("ir2-solar-energy-2", "bi-solar-mat")
------------------------------------------------------------------------------------
-- Put recipe for Bio stone bricks in the same subgroup as concrete!
------------------------------------------------------------------------------------
data.raw.recipe["bi-stone-brick"].subgroup = "ir2-tiles"
------------------------------------------------------------------------------------
-- Replace "crushed stone" with "gravel"!
------------------------------------------------------------------------------------
local i_old = "stone-crushed"
local i_new = "gravel"
local replaced, recipe, add
for recipe_name, recipe in pairs(data.raw.recipe) do
-- Ingredients
replaced = thxbob.lib.recipe.replace_ingredient(recipe_name, i_old, i_new)
BioInd.writeDebug("Replaced ingredient %s with %s in recipe %s: %s", {i_old, i_new, recipe_name, replaced})
-- Results
thxbob.lib.result_check(recipe) -- Make sure we have results!
for r, result in ipairs(recipe and recipe.results or {}) do
if result.name == i_old then
-- Store the properties of the original result
add = {
type = result.type,
name = i_new,
amount = result.amount
}
thxbob.lib.recipe.remove_result(recipe_name, i_old)
thxbob.lib.item.add(recipe.results, add)
else
BioInd.show("Skipping", result.name)
end
end
-- Don't forget to change main_product as well!
if recipe and recipe.main_product and recipe.main_product == i_old then
recipe.main_product = i_new
end
end
-- Add recipe unlocks
local crushing = {
["bi-crushed-stone-1"] = "grinding-1",
["bi-crushed-stone-2"] = "grinding-2",
["bi-crushed-stone-3"] = "grinding-2",
["bi-crushed-stone-4"] = "grinding-3",
["bi-crushed-stone-5"] = "grinding-3",
}
local r
for recipe, category in pairs(crushing) do
r = data.raw.recipe[recipe]
r.category = category
r.localised_name = {"recipe-name." .. recipe .. "_IR"}
if recipe == "bi-crushed-stone-1" then
r.localised_description = {"recipe-description.bi-crushed-stone-1_IR"}
else
r.localised_description = {"recipe-description.bi-crushed-stone_IR"}
end
thxbob.lib.tech.add_recipe_unlock("ir2-" .. category, recipe)
end
-- Our stone crusher should be able to craft the recipes that can be made by
-- IR2's Copper crusher ("grinding-1") and Electric crusher ("grinding-2")!
local crusher = data.raw.furnace["bi-stone-crusher"]
if crusher then
table.insert(crusher.crafting_categories, "grinding-1")
table.insert(crusher.crafting_categories, "grinding-2")
table.insert(crusher.crafting_categories, "powdering-1")
table.insert(crusher.crafting_categories, "powdering-2")
end
end
local BioInd = require('common')('Bio_Industries_2')
if mods["IndustrialRevolution"] then
------------------------------------------------------------------------------------
-- Our large wooden poles are unlocked by the "Logistics" research and require small
-- electric poles, which are unlocked by IR2 after the Iron Age has been reached. So,
-- if IR2 is active, we won't unlock our poles and use IR2's large wooden poles for
-- our huge poles instead.
------------------------------------------------------------------------------------
local big_pole = "bi-wooden-pole-big"
thxbob.lib.tech.remove_recipe_unlock ("logistics", big_pole)
thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-1", big_pole)
-- Adjust localizations
for k, v in ipairs({"electric-pole", "item", "recipe"}) do
BioInd.show("Changing localization for", v)
data.raw[v][big_pole].localised_name = {"entity-name.bi-wooden-pole-bigger"}
data.raw[v][big_pole].localised_description = {"entity-description.bi-wooden-pole-bigger"}
end
------------------------------------------------------------------------------------
-- IR2 disables the "solar-energy" technology, so our Solar boiler, Solar farm, and
-- Musk floor will never be unlocked. Move the unlocks to IR2's technologies!
------------------------------------------------------------------------------------
thxbob.lib.tech.add_recipe_unlock ("ir2-solar-energy-1", "bi-solar-boiler-hidden-panel")
thxbob.lib.tech.add_recipe_unlock ("ir2-solar-energy-2", "bi-bio-solar-farm")
thxbob.lib.tech.add_recipe_unlock ("ir2-solar-energy-2", "bi-solar-mat")
------------------------------------------------------------------------------------
-- Put recipe for Bio stone bricks in the same subgroup as concrete!
------------------------------------------------------------------------------------
data.raw.recipe["bi-stone-brick"].subgroup = "ir2-tiles"
------------------------------------------------------------------------------------
-- Replace "crushed stone" with "gravel"!
------------------------------------------------------------------------------------
local i_old = "stone-crushed"
local i_new = "gravel"
local replaced, recipe, add
for recipe_name, recipe in pairs(data.raw.recipe) do
-- Ingredients
replaced = thxbob.lib.recipe.replace_ingredient(recipe_name, i_old, i_new)
BioInd.writeDebug("Replaced ingredient %s with %s in recipe %s: %s", {i_old, i_new, recipe_name, replaced})
-- Results
thxbob.lib.result_check(recipe) -- Make sure we have results!
for r, result in ipairs(recipe and recipe.results or {}) do
if result.name == i_old then
-- Store the properties of the original result
add = {
type = result.type,
name = i_new,
amount = result.amount
}
thxbob.lib.recipe.remove_result(recipe_name, i_old)
thxbob.lib.item.add(recipe.results, add)
else
BioInd.show("Skipping", result.name)
end
end
-- Don't forget to change main_product as well!
if recipe and recipe.main_product and recipe.main_product == i_old then
recipe.main_product = i_new
end
end
-- Add recipe unlocks
local crushing = {
["bi-crushed-stone-1"] = "grinding-1",
["bi-crushed-stone-2"] = "grinding-2",
["bi-crushed-stone-3"] = "grinding-2",
["bi-crushed-stone-4"] = "grinding-3",
["bi-crushed-stone-5"] = "grinding-3",
}
local r
for recipe, category in pairs(crushing) do
r = data.raw.recipe[recipe]
r.category = category
r.localised_name = {"recipe-name." .. recipe .. "_IR"}
if recipe == "bi-crushed-stone-1" then
r.localised_description = {"recipe-description.bi-crushed-stone-1_IR"}
else
r.localised_description = {"recipe-description.bi-crushed-stone_IR"}
end
thxbob.lib.tech.add_recipe_unlock("ir2-" .. category, recipe)
end
-- Our stone crusher should be able to craft the recipes that can be made by
-- IR2's Copper crusher ("grinding-1") and Electric crusher ("grinding-2")!
local crusher = data.raw.furnace["bi-stone-crusher"]
if crusher then
table.insert(crusher.crafting_categories, "grinding-1")
table.insert(crusher.crafting_categories, "grinding-2")
table.insert(crusher.crafting_categories, "powdering-1")
table.insert(crusher.crafting_categories, "powdering-2")
end
end

View file

@ -1,162 +1,162 @@
if not BI.Settings.BI_Bigger_Wooden_Chests then
return
end
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Creating bigger wooden chests!")
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local WOODPATH = BioInd.modRoot .. "/graphics/entities/wood_products/"
local SNDPATH = "__base__/sound/"
local sounds = {}
sounds.open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" }
sounds.close_sound = { filename = SNDPATH .. "wooden-chest-close.ogg" }
sounds.walking_sound = {}
for i = 1, 11 do
sounds.walking_sound[i] = {
filename = SNDPATH .. "walking/concrete-" .. i ..".ogg",
volume = 1.2
}
end
------------------------------------------------------------------------------------
-- Rename the vanill wooden chest! --
------------------------------------------------------------------------------------
data.raw.container["wooden-chest"].localised_name = {"entity-name.bi-wooden-chest"}
------------------------------------------------------------------------------------
-- Create the bigger wooden chests! --
------------------------------------------------------------------------------------
------- Large Wooden Chest
data:extend({
{
type = "container",
name = "bi-wooden-chest-large",
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "bi-wooden-chest-large"},
max_health = 200,
corpse = "small-remnants",
collision_box = {{-0.7, -0.7}, {0.7, 0.7}},
selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
fast_replaceable_group = "container",
inventory_size = 128, -- 64
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
impact_category = "wood",
picture = {
filename = WOODPATH .. "large_wooden_chest.png",
priority = "extra-high",
width = 184,
height = 132,
shift = {0.5, 0},
scale = 0.5,
},
circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
circuit_connector_sprites = circuit_connector_definitions["chest"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance
},
})
------- Huge Wooden Chest
data:extend({
{
type = "container",
name = "bi-wooden-chest-huge",
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
}
},
scale_info_icons = true,
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1.5, result = "bi-wooden-chest-huge"},
max_health = 350,
corpse = "small-remnants",
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
fast_replaceable_group = "container",
inventory_size = 432, --144
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
impact_category = "wood",
picture = {
filename = WOODPATH .. "huge_wooden_chest.png",
priority = "extra-high",
width = 184,
height = 132,
shift = {0.5, 0},
scale = 0.75,
},
circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
circuit_connector_sprites = circuit_connector_definitions["chest"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance
},
})
------- Giga Wooden Chest
data:extend({
{
type = "container",
name = "bi-wooden-chest-giga",
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
}
},
scale_info_icons = true,
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 3.5, result = "bi-wooden-chest-giga"},
max_health = 350,
corpse = "big-remnants",
collision_box = {{-2.8, -2.8}, {2.8, 2.8}},
selection_box = {{-3, -3}, {3, 3}},
fast_replaceable_group = "container",
inventory_size = 1728, --576
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
impact_category = "wood",
picture = {
filename = WOODPATH .. "giga_wooden_chest.png",
priority = "extra-high",
width = 501,
height = 366,
shift = {0.88, -0.170},
scale = 0.5,
},
circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
circuit_connector_sprites = circuit_connector_definitions["chest"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance
},
})
if not BI.Settings.BI_Bigger_Wooden_Chests then
return
end
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Creating bigger wooden chests!")
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local WOODPATH = BioInd.modRoot .. "/graphics/entities/wood_products/"
local SNDPATH = "__base__/sound/"
local sounds = {}
sounds.open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" }
sounds.close_sound = { filename = SNDPATH .. "wooden-chest-close.ogg" }
sounds.walking_sound = {}
for i = 1, 11 do
sounds.walking_sound[i] = {
filename = SNDPATH .. "walking/concrete-" .. i ..".ogg",
volume = 1.2
}
end
------------------------------------------------------------------------------------
-- Rename the vanill wooden chest! --
------------------------------------------------------------------------------------
data.raw.container["wooden-chest"].localised_name = {"entity-name.bi-wooden-chest"}
------------------------------------------------------------------------------------
-- Create the bigger wooden chests! --
------------------------------------------------------------------------------------
------- Large Wooden Chest
data:extend({
{
type = "container",
name = "bi-wooden-chest-large",
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
}
},
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1, result = "bi-wooden-chest-large"},
max_health = 200,
corpse = "small-remnants",
collision_box = {{-0.7, -0.7}, {0.7, 0.7}},
selection_box = {{-1.0, -1.0}, {1.0, 1.0}},
fast_replaceable_group = "container",
inventory_size = 128, -- 64
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
impact_category = "wood",
picture = {
filename = WOODPATH .. "large_wooden_chest.png",
priority = "extra-high",
width = 184,
height = 132,
shift = {0.5, 0},
scale = 0.5,
},
circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
circuit_connector_sprites = circuit_connector_definitions["chest"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance
},
})
------- Huge Wooden Chest
data:extend({
{
type = "container",
name = "bi-wooden-chest-huge",
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
}
},
scale_info_icons = true,
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 1.5, result = "bi-wooden-chest-huge"},
max_health = 350,
corpse = "small-remnants",
collision_box = {{-1.2, -1.2}, {1.2, 1.2}},
selection_box = {{-1.5, -1.5}, {1.5, 1.5}},
fast_replaceable_group = "container",
inventory_size = 432, --144
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
impact_category = "wood",
picture = {
filename = WOODPATH .. "huge_wooden_chest.png",
priority = "extra-high",
width = 184,
height = 132,
shift = {0.5, 0},
scale = 0.75,
},
circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
circuit_connector_sprites = circuit_connector_definitions["chest"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance
},
})
------- Giga Wooden Chest
data:extend({
{
type = "container",
name = "bi-wooden-chest-giga",
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
}
},
scale_info_icons = true,
-- This is necessary for "Space Exploration" (if not true, the entity can only be
-- placed on Nauvis)!
se_allow_in_space = true,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 3.5, result = "bi-wooden-chest-giga"},
max_health = 350,
corpse = "big-remnants",
collision_box = {{-2.8, -2.8}, {2.8, 2.8}},
selection_box = {{-3, -3}, {3, 3}},
fast_replaceable_group = "container",
inventory_size = 1728, --576
open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" },
close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" },
impact_category = "wood",
picture = {
filename = WOODPATH .. "giga_wooden_chest.png",
priority = "extra-high",
width = 501,
height = 366,
shift = {0.88, -0.170},
scale = 0.5,
},
circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
circuit_connector_sprites = circuit_connector_definitions["chest"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance
},
})

View file

@ -1,77 +1,77 @@
if not BI.Settings.BI_Bigger_Wooden_Chests then
return
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
BioInd.writeDebug("Creating items for bigger wooden chests!")
data:extend({
--- Large wooden chest 2 x 2
{
type = "item",
name = "bi-wooden-chest-large",
localised_name = {"entity-name.bi-wooden-chest-large"},
localised_description = {"entity-description.bi-wooden-chest-large"},
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
}
},
fuel_category = "chemical",
fuel_value = "32MJ",
subgroup = "storage",
order = "a[items]-aa[wooden-chest]",
place_result = "bi-wooden-chest-large",
stack_size = 48
},
--- Huge wooden chest 3 x 3
{
type = "item",
name = "bi-wooden-chest-huge",
localised_name = {"entity-name.bi-wooden-chest-huge"},
localised_description = {"entity-description.bi-wooden-chest-huge"},
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
}
},
fuel_category = "chemical",
fuel_value = "200MJ",
subgroup = "storage",
order = "a[items]-ab[wooden-chest]",
place_result = "bi-wooden-chest-huge",
stack_size = 32
},
--- Giga wooden chest 6 x 6
{
type = "item",
name = "bi-wooden-chest-giga",
localised_name = {"entity-name.bi-wooden-chest-giga"},
localised_description = {"entity-description.bi-wooden-chest-giga"},
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
}
},
fuel_category = "chemical",
fuel_value = "400MJ",
subgroup = "storage",
order = "a[items]-ac[wooden-chest]",
place_result = "bi-wooden-chest-giga",
stack_size = 16
},
})
if not BI.Settings.BI_Bigger_Wooden_Chests then
return
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
BioInd.writeDebug("Creating items for bigger wooden chests!")
data:extend({
--- Large wooden chest 2 x 2
{
type = "item",
name = "bi-wooden-chest-large",
localised_name = {"entity-name.bi-wooden-chest-large"},
localised_description = {"entity-description.bi-wooden-chest-large"},
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
}
},
fuel_category = "chemical",
fuel_value = "32MJ",
subgroup = "storage",
order = "a[items]-aa[wooden-chest]",
place_result = "bi-wooden-chest-large",
stack_size = 48
},
--- Huge wooden chest 3 x 3
{
type = "item",
name = "bi-wooden-chest-huge",
localised_name = {"entity-name.bi-wooden-chest-huge"},
localised_description = {"entity-description.bi-wooden-chest-huge"},
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
}
},
fuel_category = "chemical",
fuel_value = "200MJ",
subgroup = "storage",
order = "a[items]-ab[wooden-chest]",
place_result = "bi-wooden-chest-huge",
stack_size = 32
},
--- Giga wooden chest 6 x 6
{
type = "item",
name = "bi-wooden-chest-giga",
localised_name = {"entity-name.bi-wooden-chest-giga"},
localised_description = {"entity-description.bi-wooden-chest-giga"},
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
}
},
fuel_category = "chemical",
fuel_value = "400MJ",
subgroup = "storage",
order = "a[items]-ac[wooden-chest]",
place_result = "bi-wooden-chest-giga",
stack_size = 16
},
})

View file

@ -1,103 +1,103 @@
if not BI.Settings.BI_Bigger_Wooden_Chests then
return
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
BioInd.writeDebug("Creating recipes for bigger wooden chests!")
data:extend({
--- Large Wooden Chest
{
type = "recipe",
name = "bi-wooden-chest-large",
localised_name = {"entity-name.bi-wooden-chest-large"},
localised_description = {"entity-description.bi-wooden-chest-large"},
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
}
},
energy_required = 2,
enabled = false,
ingredients = {
{type="item", name="copper-plate", amount=16},
{type="item", name="resin", amount=24},
{type="item", name="wooden-chest", amount=8}
},
results = {{type="item", name="bi-wooden-chest-large", amount=1}},
main_product = "",
requester_paste_multiplier = 4,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "storage",
order = "a[items]-aa[wooden-chest]",
},
--- Huge Wooden Chest
{
type = "recipe",
name = "bi-wooden-chest-huge",
localised_name = {"entity-name.bi-wooden-chest-huge"},
localised_description = {"entity-description.bi-wooden-chest-huge"},
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
}
},
energy_required = 2,
enabled = false,
ingredients = {
{type="item", name="iron-stick", amount=32},
{type="item", name="stone-brick", amount=32},
{type="item", name="bi-wooden-chest-large", amount=16}
},
results = {{type="item", name="bi-wooden-chest-huge", amount=1}},
main_product = "",
requester_paste_multiplier = 4,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "storage",
order = "a[items]-ab[wooden-chest]",
},
--- Giga Wooden Chest
{
type = "recipe",
name = "bi-wooden-chest-giga",
localised_name = {"entity-name.bi-wooden-chest-giga"},
localised_description = {"entity-description.bi-wooden-chest-giga"},
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
}
},
energy_required = 4,
enabled = false,
ingredients = {
{type="item", name="steel-plate", amount=32},
{type="item", name="concrete", amount=32},
{type="item", name="bi-wooden-chest-huge", amount=16}
},
results = {{type="item", name="bi-wooden-chest-giga", amount=1}},
main_product = "",
requester_paste_multiplier = 4,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "storage",
order = "a[items]-ac[wooden-chest]",
},
})
if not BI.Settings.BI_Bigger_Wooden_Chests then
return
end
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
BioInd.writeDebug("Creating recipes for bigger wooden chests!")
data:extend({
--- Large Wooden Chest
{
type = "recipe",
name = "bi-wooden-chest-large",
localised_name = {"entity-name.bi-wooden-chest-large"},
localised_description = {"entity-description.bi-wooden-chest-large"},
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "large_wooden_chest_icon.png",
icon_size = 64,
}
},
energy_required = 2,
enabled = false,
ingredients = {
{type="item", name="copper-plate", amount=16},
{type="item", name="resin", amount=24},
{type="item", name="wooden-chest", amount=8}
},
results = {{type="item", name="bi-wooden-chest-large", amount=1}},
main_product = "",
requester_paste_multiplier = 4,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "storage",
order = "a[items]-aa[wooden-chest]",
},
--- Huge Wooden Chest
{
type = "recipe",
name = "bi-wooden-chest-huge",
localised_name = {"entity-name.bi-wooden-chest-huge"},
localised_description = {"entity-description.bi-wooden-chest-huge"},
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge_wooden_chest_icon.png",
icon_size = 64,
}
},
energy_required = 2,
enabled = false,
ingredients = {
{type="item", name="iron-stick", amount=32},
{type="item", name="stone-brick", amount=32},
{type="item", name="bi-wooden-chest-large", amount=16}
},
results = {{type="item", name="bi-wooden-chest-huge", amount=1}},
main_product = "",
requester_paste_multiplier = 4,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "storage",
order = "a[items]-ab[wooden-chest]",
},
--- Giga Wooden Chest
{
type = "recipe",
name = "bi-wooden-chest-giga",
localised_name = {"entity-name.bi-wooden-chest-giga"},
localised_description = {"entity-description.bi-wooden-chest-giga"},
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "giga_wooden_chest_icon.png",
icon_size = 64,
}
},
energy_required = 4,
enabled = false,
ingredients = {
{type="item", name="steel-plate", amount=32},
{type="item", name="concrete", amount=32},
{type="item", name="bi-wooden-chest-huge", amount=16}
},
results = {{type="item", name="bi-wooden-chest-giga", amount=1}},
main_product = "",
requester_paste_multiplier = 4,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "storage",
order = "a[items]-ac[wooden-chest]",
},
})

File diff suppressed because it is too large Load diff

View file

@ -1,116 +1,116 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Big Wooden Electric Pole
{
type = "item",
name = "bi-wooden-pole-big",
localised_name = {"entity-name.bi-wooden-pole-big"},
localised_description = {"entity-description.bi-wooden-pole-big"},
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[energy]-b[small-electric-pole]",
place_result = "bi-wooden-pole-big",
fuel_value = "14MJ",
fuel_category = "chemical",
stack_size = 50
},
--- Huge Wooden Pole
{
type = "item",
name = "bi-wooden-pole-huge",
localised_name = {"entity-name.bi-wooden-pole-huge"},
localised_description = {"entity-description.bi-wooden-pole-huge"},
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[big-electric-pole]",
place_result = "bi-wooden-pole-huge",
fuel_value = "90MJ",
fuel_category = "chemical",
stack_size = 50
},
-- Wooden Fence
{
type = "item",
name = "bi-wooden-fence",
localised_name = {"entity-name.bi-wooden-fence"},
localised_description = {"entity-description.bi-wooden-fence"},
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
}
},
subgroup = "defensive-structure",
order = "a-a[stone-wall]-a[wooden-fence]",
place_result = "bi-wooden-fence",
fuel_value = "4MJ",
fuel_category = "chemical",
stack_size = 50
},
--- Wood Pipe
{
type = "item",
name = "bi-wood-pipe",
localised_name = {"entity-name.bi-wood-pipe"},
localised_description = {"entity-description.bi-wood-pipe"},
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1a[pipe]",
place_result = "bi-wood-pipe",
fuel_value = "4MJ",
fuel_category = "chemical",
stack_size = 100
},
--- Wood Pipe to Ground
{
type = "item",
name = "bi-wood-pipe-to-ground",
localised_name = {"entity-name.bi-wood-pipe-to-ground"},
localised_description = {"entity-description.bi-wood-pipe-to-ground"},
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1b[pipe-to-ground]",
place_result = "bi-wood-pipe-to-ground",
fuel_value = "20MJ",
fuel_category = "chemical",
stack_size = 50
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Big Wooden Electric Pole
{
type = "item",
name = "bi-wooden-pole-big",
localised_name = {"entity-name.bi-wooden-pole-big"},
localised_description = {"entity-description.bi-wooden-pole-big"},
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[energy]-b[small-electric-pole]",
place_result = "bi-wooden-pole-big",
fuel_value = "14MJ",
fuel_category = "chemical",
stack_size = 50
},
--- Huge Wooden Pole
{
type = "item",
name = "bi-wooden-pole-huge",
localised_name = {"entity-name.bi-wooden-pole-huge"},
localised_description = {"entity-description.bi-wooden-pole-huge"},
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[big-electric-pole]",
place_result = "bi-wooden-pole-huge",
fuel_value = "90MJ",
fuel_category = "chemical",
stack_size = 50
},
-- Wooden Fence
{
type = "item",
name = "bi-wooden-fence",
localised_name = {"entity-name.bi-wooden-fence"},
localised_description = {"entity-description.bi-wooden-fence"},
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
}
},
subgroup = "defensive-structure",
order = "a-a[stone-wall]-a[wooden-fence]",
place_result = "bi-wooden-fence",
fuel_value = "4MJ",
fuel_category = "chemical",
stack_size = 50
},
--- Wood Pipe
{
type = "item",
name = "bi-wood-pipe",
localised_name = {"entity-name.bi-wood-pipe"},
localised_description = {"entity-description.bi-wood-pipe"},
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1a[pipe]",
place_result = "bi-wood-pipe",
fuel_value = "4MJ",
fuel_category = "chemical",
stack_size = 100
},
--- Wood Pipe to Ground
{
type = "item",
name = "bi-wood-pipe-to-ground",
localised_name = {"entity-name.bi-wood-pipe-to-ground"},
localised_description = {"entity-description.bi-wood-pipe-to-ground"},
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
}
},
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1b[pipe-to-ground]",
place_result = "bi-wood-pipe-to-ground",
fuel_value = "20MJ",
fuel_category = "chemical",
stack_size = 50
},
})

View file

@ -1,198 +1,198 @@
local pipes_sheet = {
straight_vertical_single = {
number = 11,
position = {x = 0, y = 0},
size = {x = 8, y = 8},
},
ending_right = {
number = 12,
position = {x = 8, y = 0},
size = {x = 6, y = 8},
shift = {x = 1, y = 0}, --where must be center
},
straight_horizontal_window = {
number = 13,
position = {x = 14, y = 0},
size = {x = 4, y = 8},
},
straight_horizontal = {
number = 14,
position = {x = 18, y = 0},
size = {x = 4, y = 8},
},
ending_left = {
number = 15,
position = {x = 22, y = 0},
size = {x = 6, y = 8},
shift = {x = -1, y = 0},
},
ending_down = {
number = 21,
position = {x = 0, y = 8},
size = {x = 8, y = 6},
shift = {x = 0, y = 1},
},
straight_vertical_window = {
number = 31,
position = {x = 0, y = 14},
size = {x = 8, y = 4},
},
straight_vertical = {
number = 41,
position = {x = 0, y = 18},
size = {x = 8, y = 4},
},
ending_up = {
number = 51,
position = {x = 0, y = 22},
size = {x = 8, y = 6},
shift = {x = 0, y = -1},
},
corner_down_right = {
number = 22,
position = {x = 8, y = 8},
size = {x = 6, y = 6},
shift = {x = 1, y = 1},
},
t_down = {
number = 23,
position = {x = 14, y = 8},
size = {x = 4, y = 6},
shift = {x = 0, y = 1},
},
corner_down_left = {
number = 24,
position = {x = 18, y = 8},
size = {x = 6, y = 6},
shift = {x = -1, y = 1},
},
t_right = {
number = 32,
position = {x = 8, y = 14},
size = {x = 6, y = 4},
shift = {x = 1, y = 0},
},
cross = {
number = 33,
position = {x = 14, y = 14},
size = {x = 4, y = 4},
},
t_left = {
number = 34,
position = {x = 18, y = 14},
size = {x = 6, y = 4},
shift = {x = -1, y = 0},
},
corner_up_right = {
number = 42,
position = {x = 8, y = 18},
size = {x = 6, y = 6},
shift = {x = 1, y = -1},
},
t_up = {
number = 43,
position = {x = 14, y = 18},
size = {x = 4, y = 6},
shift = {x = 0, y = -1},
},
corner_up_left = {
number = 44,
position = {x = 18, y = 18},
size = {x = 6, y = 6},
shift = {x = -1, y = -1},
},
--data.raw[pipe-to-ground][pipe-to-ground].pictures.up
down = {
number = 25,
position = {x = 24, y = 8},
size = {x = 8, y = 6},
shift = {x = 0, y = 1},
},
up = {
number = 35,
position = {x = 24, y = 14},
size = {x = 8, y = 6},
shift = {x = 0, y = -1}, -- not 26
},
right = {
number = 52,
position = {x = 8, y = 24},
size = {x = 6, y = 8},
shift = {x = 1, y = 0},
},
left = {
number = 53,
position = {x = 14, y = 24},
size = {x = 6, y = 8},
shift = {x = -1, y = 0},
}
}
local sheet_path = "__Bio_Industries_2__/graphics/entities/wood_products/wood_pipe/"
local sheet_name = "pipe_sheet.png"
function change_graphics (was_picture, sheet_element, quality)
local picture = {}
local k = 1
if not sheet_element.shift then
sheet_element.shift = {x = 0, y = 0}
end
--BioInd.writeDebug("lq")
picture = was_picture
k = 1
--BioInd.writeDebug("%s Quality: %s", {sheet_element.number, quality})
if not (picture) then
return
end
local size = sheet_element.size
if type(size) == "number" then
size = {x = size, y = size}
elseif type(size) == "table" and not (size.x and size.y) then
size = {x = size[1], y = size[2]}
end
picture.filename = sheet_path .. quality .. "_" .. sheet_name
picture.size = {8 * k * size.x, 8 * k * size.y}
picture.scale = 1/k
picture.x = 8 * k * (sheet_element.position.x or sheet_element.position[1])
picture.y = 8 * k * (sheet_element.position.y or sheet_element.position[2])
picture.shift = {}
--picture.shift.x = -8/32 * k * sheet_element.shift.x
--picture.shift.y = -8/32 * k * sheet_element.shift.y
picture.shift.x = -8/32 * (sheet_element.shift.x or sheet_element.shift[1])
picture.shift.y = -8/32 * (sheet_element.shift.y or sheet_element.shift[2])
--BioInd.writeDebug("%s Quality: %s - Success", {sheet_element.number, quality})
end
-------------------------------pipes
--local pipe_pictures = data.raw.pipe.pipe.pictures
local pipe_pictures = data.raw.pipe["bi-wood-pipe"].pictures
for i, was_picture in pairs (pipe_pictures) do
for j, sheet_element in pairs (pipes_sheet) do
if i == j then
--BioInd.writeDebug("%s", {i}))
change_graphics (was_picture, sheet_element, "hq")
change_graphics (was_picture, sheet_element, "lq")
end
end
end
--------------------------------underground pipes
local pipe_to_ground_pictures = data.raw["pipe-to-ground"]["bi-wood-pipe-to-ground"].pictures
for i, was_picture in pairs (pipe_to_ground_pictures) do
for j, sheet_element in pairs (pipes_sheet) do
if i == j then
--BioInd.writeDebug("%s", {i})
change_graphics (was_picture, sheet_element, "hq")
change_graphics (was_picture, sheet_element, "lq")
end
end
end
local pipes_sheet = {
straight_vertical_single = {
number = 11,
position = {x = 0, y = 0},
size = {x = 8, y = 8},
},
ending_right = {
number = 12,
position = {x = 8, y = 0},
size = {x = 6, y = 8},
shift = {x = 1, y = 0}, --where must be center
},
straight_horizontal_window = {
number = 13,
position = {x = 14, y = 0},
size = {x = 4, y = 8},
},
straight_horizontal = {
number = 14,
position = {x = 18, y = 0},
size = {x = 4, y = 8},
},
ending_left = {
number = 15,
position = {x = 22, y = 0},
size = {x = 6, y = 8},
shift = {x = -1, y = 0},
},
ending_down = {
number = 21,
position = {x = 0, y = 8},
size = {x = 8, y = 6},
shift = {x = 0, y = 1},
},
straight_vertical_window = {
number = 31,
position = {x = 0, y = 14},
size = {x = 8, y = 4},
},
straight_vertical = {
number = 41,
position = {x = 0, y = 18},
size = {x = 8, y = 4},
},
ending_up = {
number = 51,
position = {x = 0, y = 22},
size = {x = 8, y = 6},
shift = {x = 0, y = -1},
},
corner_down_right = {
number = 22,
position = {x = 8, y = 8},
size = {x = 6, y = 6},
shift = {x = 1, y = 1},
},
t_down = {
number = 23,
position = {x = 14, y = 8},
size = {x = 4, y = 6},
shift = {x = 0, y = 1},
},
corner_down_left = {
number = 24,
position = {x = 18, y = 8},
size = {x = 6, y = 6},
shift = {x = -1, y = 1},
},
t_right = {
number = 32,
position = {x = 8, y = 14},
size = {x = 6, y = 4},
shift = {x = 1, y = 0},
},
cross = {
number = 33,
position = {x = 14, y = 14},
size = {x = 4, y = 4},
},
t_left = {
number = 34,
position = {x = 18, y = 14},
size = {x = 6, y = 4},
shift = {x = -1, y = 0},
},
corner_up_right = {
number = 42,
position = {x = 8, y = 18},
size = {x = 6, y = 6},
shift = {x = 1, y = -1},
},
t_up = {
number = 43,
position = {x = 14, y = 18},
size = {x = 4, y = 6},
shift = {x = 0, y = -1},
},
corner_up_left = {
number = 44,
position = {x = 18, y = 18},
size = {x = 6, y = 6},
shift = {x = -1, y = -1},
},
--data.raw[pipe-to-ground][pipe-to-ground].pictures.up
down = {
number = 25,
position = {x = 24, y = 8},
size = {x = 8, y = 6},
shift = {x = 0, y = 1},
},
up = {
number = 35,
position = {x = 24, y = 14},
size = {x = 8, y = 6},
shift = {x = 0, y = -1}, -- not 26
},
right = {
number = 52,
position = {x = 8, y = 24},
size = {x = 6, y = 8},
shift = {x = 1, y = 0},
},
left = {
number = 53,
position = {x = 14, y = 24},
size = {x = 6, y = 8},
shift = {x = -1, y = 0},
}
}
local sheet_path = "__Bio_Industries_2__/graphics/entities/wood_products/wood_pipe/"
local sheet_name = "pipe_sheet.png"
function change_graphics (was_picture, sheet_element, quality)
local picture = {}
local k = 1
if not sheet_element.shift then
sheet_element.shift = {x = 0, y = 0}
end
--BioInd.writeDebug("lq")
picture = was_picture
k = 1
--BioInd.writeDebug("%s Quality: %s", {sheet_element.number, quality})
if not (picture) then
return
end
local size = sheet_element.size
if type(size) == "number" then
size = {x = size, y = size}
elseif type(size) == "table" and not (size.x and size.y) then
size = {x = size[1], y = size[2]}
end
picture.filename = sheet_path .. quality .. "_" .. sheet_name
picture.size = {8 * k * size.x, 8 * k * size.y}
picture.scale = 1/k
picture.x = 8 * k * (sheet_element.position.x or sheet_element.position[1])
picture.y = 8 * k * (sheet_element.position.y or sheet_element.position[2])
picture.shift = {}
--picture.shift.x = -8/32 * k * sheet_element.shift.x
--picture.shift.y = -8/32 * k * sheet_element.shift.y
picture.shift.x = -8/32 * (sheet_element.shift.x or sheet_element.shift[1])
picture.shift.y = -8/32 * (sheet_element.shift.y or sheet_element.shift[2])
--BioInd.writeDebug("%s Quality: %s - Success", {sheet_element.number, quality})
end
-------------------------------pipes
--local pipe_pictures = data.raw.pipe.pipe.pictures
local pipe_pictures = data.raw.pipe["bi-wood-pipe"].pictures
for i, was_picture in pairs (pipe_pictures) do
for j, sheet_element in pairs (pipes_sheet) do
if i == j then
--BioInd.writeDebug("%s", {i}))
change_graphics (was_picture, sheet_element, "hq")
change_graphics (was_picture, sheet_element, "lq")
end
end
end
--------------------------------underground pipes
local pipe_to_ground_pictures = data.raw["pipe-to-ground"]["bi-wood-pipe-to-ground"].pictures
for i, was_picture in pairs (pipe_to_ground_pictures) do
for j, sheet_element in pairs (pipes_sheet) do
if i == j then
--BioInd.writeDebug("%s", {i})
change_graphics (was_picture, sheet_element, "hq")
change_graphics (was_picture, sheet_element, "lq")
end
end
end

View file

@ -1,160 +1,160 @@
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Big Electric Pole
{
type = "recipe",
name = "bi-wooden-pole-big",
localised_name = {"entity-name.bi-wooden-pole-big"},
localised_description = {"entity-description.bi-wooden-pole-big"},
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
}
},
enabled = false,
ingredients = {
{type="item", name="wood", amount=5},
{type="item", name="small-electric-pole", amount=2},
},
results = {{type="item", name="bi-wooden-pole-big", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[energy]-b[small-electric-pole]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Huge Wooden Pole
{
type = "recipe",
name = "bi-wooden-pole-huge",
localised_name = {"entity-name.bi-wooden-pole-huge"},
localised_description = {"entity-description.bi-wooden-pole-huge"},
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
}
},
enabled = false,
ingredients = {
{type="item", name="wood", amount=5},
{type="item", name="concrete", amount=100},
{type="item", name="bi-wooden-pole-big", amount=6},
},
results = {{type="item", name="bi-wooden-pole-huge", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[big-electric-pole]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Wooden Fence
{
type = "recipe",
name = "bi-wooden-fence",
localised_name = {"entity-name.bi-wooden-fence"},
localised_description = {"entity-description.bi-wooden-fence"},
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
}
},
enabled = true,
ingredients = {
{type="item", name="wood", amount=2},
},
results = {{type="item", name="bi-wooden-fence", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "defensive-structure",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Wood Pipe
{
type = "recipe",
name = "bi-wood-pipe",
localised_name = {"entity-name.bi-wood-pipe"},
localised_description = {"entity-description.bi-wood-pipe"},
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
}
},
energy_required = 1,
enabled = true,
ingredients = {
{type="item", name="copper-plate", amount=1},
{type="item", name="wood", amount=8}
},
results = {{type="item", name="bi-wood-pipe", amount=4}},
main_product = "",
requester_paste_multiplier = 15,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1a[pipe]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
-- Wood Pipe to Ground
{
type = "recipe",
name = "bi-wood-pipe-to-ground",
localised_name = {"entity-name.bi-wood-pipe-to-ground"},
localised_description = {"entity-description.bi-wood-pipe-to-ground"},
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
}
},
energy_required = 2,
enabled = true,
ingredients = {
{type="item", name="copper-plate", amount=4},
{type="item", name="bi-wood-pipe", amount=5}
},
results = {{type="item", name="bi-wood-pipe-to-ground", amount=2}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1b[pipe-to-ground]",
},
})
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
data:extend({
--- Big Electric Pole
{
type = "recipe",
name = "bi-wooden-pole-big",
localised_name = {"entity-name.bi-wooden-pole-big"},
localised_description = {"entity-description.bi-wooden-pole-big"},
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "big-wooden-pole.png",
icon_size = 64,
}
},
enabled = false,
ingredients = {
{type="item", name="wood", amount=5},
{type="item", name="small-electric-pole", amount=2},
},
results = {{type="item", name="bi-wooden-pole-big", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[energy]-b[small-electric-pole]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Huge Wooden Pole
{
type = "recipe",
name = "bi-wooden-pole-huge",
localised_name = {"entity-name.bi-wooden-pole-huge"},
localised_description = {"entity-description.bi-wooden-pole-huge"},
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "huge-wooden-pole.png",
icon_size = 64,
}
},
enabled = false,
ingredients = {
{type="item", name="wood", amount=5},
{type="item", name="concrete", amount=100},
{type="item", name="bi-wooden-pole-big", amount=6},
},
results = {{type="item", name="bi-wooden-pole-huge", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[energy]-d[big-electric-pole]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Wooden Fence
{
type = "recipe",
name = "bi-wooden-fence",
localised_name = {"entity-name.bi-wooden-fence"},
localised_description = {"entity-description.bi-wooden-fence"},
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wooden-fence.png",
icon_size = 64,
}
},
enabled = true,
ingredients = {
{type="item", name="wood", amount=2},
},
results = {{type="item", name="bi-wooden-fence", amount=1}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "defensive-structure",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
--- Wood Pipe
{
type = "recipe",
name = "bi-wood-pipe",
localised_name = {"entity-name.bi-wood-pipe"},
localised_description = {"entity-description.bi-wood-pipe"},
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "wood_pipe.png",
icon_size = 64,
}
},
energy_required = 1,
enabled = true,
ingredients = {
{type="item", name="copper-plate", amount=1},
{type="item", name="wood", amount=8}
},
results = {{type="item", name="bi-wood-pipe", amount=4}},
main_product = "",
requester_paste_multiplier = 15,
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1a[pipe]",
-- This is a custom property for use by "Krastorio 2" (it will change
-- ingredients/results; used for wood/wood pulp)
mod = "Bio_Industries_2",
},
-- Wood Pipe to Ground
{
type = "recipe",
name = "bi-wood-pipe-to-ground",
localised_name = {"entity-name.bi-wood-pipe-to-ground"},
localised_description = {"entity-description.bi-wood-pipe-to-ground"},
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
icons = {
{
icon = ICONPATH .. "pipe-to-ground-wood.png",
icon_size = 64,
}
},
energy_required = 2,
enabled = true,
ingredients = {
{type="item", name="copper-plate", amount=4},
{type="item", name="bi-wood-pipe", amount=5}
},
results = {{type="item", name="bi-wood-pipe-to-ground", amount=2}},
main_product = "",
allow_as_intermediate = false, -- Added for 0.18.34/1.1.4
always_show_made_in = false, -- Added for 0.18.34/1.1.4
allow_decomposition = true, -- Added for 0.18.34/1.1.4
subgroup = "energy-pipe-distribution",
order = "a[pipe]-1b[pipe-to-ground]",
},
})

View file

@ -1,255 +1,255 @@
data:extend(
{
{
type = "item-group",
name = "bio-industries",
order = "vaa-a",
inventory_order = "v-a",
icon = "__Bio_Industries_2__/graphics/technology/BioIndustries_64.png",
icon_size = 64,
icons = {
{
icon = "__Bio_Industries_2__/graphics/technology/BioIndustries_64.png",
icon_size = 64,
}
},
},
{
type = "item-subgroup",
name = "bio-bio-farm",
group = "bio-industries",
order = "a-a",
},
--- Bio Farm and Nursery
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-1",
group = "bio-industries",
order = "a-a",
},
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-2",
group = "bio-industries",
order = "a-b",
},
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-3",
group = "bio-industries",
order = "a-c",
},
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-entity",
group = "bio-industries",
order = "a-d",
},
---- Solar Entities
{
type = "item-subgroup",
name = "bio-bio-solar-entity",
group = "bio-industries",
order = "a-solar",
},
--- Coals and Cokery and Crushed Stone and Crusher
{
type = "item-subgroup",
name = "bio-bio-farm-raw",
group = "bio-industries",
order = "b-a",
},
{
type = "item-subgroup",
name = "bio-bio-farm-raw-entity",
group = "bio-industries",
order = "b-b",
},
----- Other Int Products
{
type = "item-subgroup",
name = "bio-bio-farm-intermediate-product",
group = "bio-industries",
order = "c-a",
},
---- Arboretum
{
type = "item-subgroup",
name = "bio-arboretum-fluid",
group = "bio-industries",
order = "c-c",
},
{
type = "item-subgroup",
name = "bio-arboretum-fluid-entity",
group = "bio-industries",
order = "c-d",
},
--- Bio Reactor and Bio-Mass
{
type = "item-subgroup",
name = "bio-bio-fuel-fluid",
group = "bio-industries",
order = "d-a-1"
},
{
type = "item-subgroup",
name = "bio-bio-fuel-fluid-entity",
group = "bio-industries",
order = "d-a-2"
},
---- Bio Fuel Solids
{
type = "item-subgroup",
name = "bio-bio-fuel-solid",
group = "bio-industries",
order = "e"
},
---- Bio Fuel OTHER
{
type = "item-subgroup",
name = "bio-bio-fuel-other",
group = "bio-industries",
order = "f"
},
---- Garden
{
type = "item-subgroup",
name = "bio-bio-gardens-fluid",
group = "bio-industries",
order = "x-a"
},
{
type = "item-subgroup",
name = "bio-bio-gardens-fluid-entity",
group = "bio-industries",
order = "x-b"
},
{
type = "item-subgroup",
name = "bio-transport",
group = "bio-industries",
order = "e-a",
},
{
type = "item-subgroup",
name = "bio-logistic-robots",
group = "bio-industries",
order = "f-a",
},
{
type = "item-subgroup",
name = "bio-logistic-roboport",
group = "bio-industries",
order = "f-b",
},
{
type = "item-subgroup",
name = "bio-tool",
group = "production",
order = "a-1",
},
{
type = "item-subgroup",
name = "bio-energy-boiler",
group = "production",
order = "b-a"
},
{
type = "item-subgroup",
name = "bio-energy-steam-engine",
group = "production",
order = "b-b"
},
{
type = "item-subgroup",
name = "bio-energy-solar-panel",
group = "production",
order = "b-c"
},
{
type = "item-subgroup",
name = "bio-energy-accumulator",
group = "production",
order = "b-d"
},
{
type = "item-subgroup",
name = "bio-extraction-machine",
group = "production",
order = "c-a",
},
{
type = "item-subgroup",
name = "bio-pump",
group = "production",
order = "c-b",
},
{
type = "item-subgroup",
name = "bio-smelting-machine",
group = "production",
order = "d-a",
},
{
type = "item-subgroup",
name = "bio-production-machine",
group = "production",
order = "e-a",
},
{
type = "item-subgroup",
name = "bio-assembly-machine",
group = "production",
order = "e-b",
},
{
type = "item-subgroup",
name = "bio-chemical-machine",
group = "production",
order = "e-c",
},
{
type = "item-subgroup",
name = "bio-electrolyser-machine",
group = "production",
order = "e-d",
},
{
type = "item-subgroup",
name = "bio-refinery-machine",
group = "production",
order = "e-e",
},
---- Ammo for Bio Turrets/Bio Cannon
{
type = "item-subgroup",
name = "bi-ammo",
group = "combat",
order = "b-[bi-ammo]"
},
--[[
{
type = "recipe-category",
name = "crafting-machine"
},
]]
}
)
data:extend(
{
{
type = "item-group",
name = "bio-industries",
order = "vaa-a",
inventory_order = "v-a",
icon = "__Bio_Industries_2__/graphics/technology/BioIndustries_64.png",
icon_size = 64,
icons = {
{
icon = "__Bio_Industries_2__/graphics/technology/BioIndustries_64.png",
icon_size = 64,
}
},
},
{
type = "item-subgroup",
name = "bio-bio-farm",
group = "bio-industries",
order = "a-a",
},
--- Bio Farm and Nursery
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-1",
group = "bio-industries",
order = "a-a",
},
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-2",
group = "bio-industries",
order = "a-b",
},
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-3",
group = "bio-industries",
order = "a-c",
},
{
type = "item-subgroup",
name = "bio-bio-farm-fluid-entity",
group = "bio-industries",
order = "a-d",
},
---- Solar Entities
{
type = "item-subgroup",
name = "bio-bio-solar-entity",
group = "bio-industries",
order = "a-solar",
},
--- Coals and Cokery and Crushed Stone and Crusher
{
type = "item-subgroup",
name = "bio-bio-farm-raw",
group = "bio-industries",
order = "b-a",
},
{
type = "item-subgroup",
name = "bio-bio-farm-raw-entity",
group = "bio-industries",
order = "b-b",
},
----- Other Int Products
{
type = "item-subgroup",
name = "bio-bio-farm-intermediate-product",
group = "bio-industries",
order = "c-a",
},
---- Arboretum
{
type = "item-subgroup",
name = "bio-arboretum-fluid",
group = "bio-industries",
order = "c-c",
},
{
type = "item-subgroup",
name = "bio-arboretum-fluid-entity",
group = "bio-industries",
order = "c-d",
},
--- Bio Reactor and Bio-Mass
{
type = "item-subgroup",
name = "bio-bio-fuel-fluid",
group = "bio-industries",
order = "d-a-1"
},
{
type = "item-subgroup",
name = "bio-bio-fuel-fluid-entity",
group = "bio-industries",
order = "d-a-2"
},
---- Bio Fuel Solids
{
type = "item-subgroup",
name = "bio-bio-fuel-solid",
group = "bio-industries",
order = "e"
},
---- Bio Fuel OTHER
{
type = "item-subgroup",
name = "bio-bio-fuel-other",
group = "bio-industries",
order = "f"
},
---- Garden
{
type = "item-subgroup",
name = "bio-bio-gardens-fluid",
group = "bio-industries",
order = "x-a"
},
{
type = "item-subgroup",
name = "bio-bio-gardens-fluid-entity",
group = "bio-industries",
order = "x-b"
},
{
type = "item-subgroup",
name = "bio-transport",
group = "bio-industries",
order = "e-a",
},
{
type = "item-subgroup",
name = "bio-logistic-robots",
group = "bio-industries",
order = "f-a",
},
{
type = "item-subgroup",
name = "bio-logistic-roboport",
group = "bio-industries",
order = "f-b",
},
{
type = "item-subgroup",
name = "bio-tool",
group = "production",
order = "a-1",
},
{
type = "item-subgroup",
name = "bio-energy-boiler",
group = "production",
order = "b-a"
},
{
type = "item-subgroup",
name = "bio-energy-steam-engine",
group = "production",
order = "b-b"
},
{
type = "item-subgroup",
name = "bio-energy-solar-panel",
group = "production",
order = "b-c"
},
{
type = "item-subgroup",
name = "bio-energy-accumulator",
group = "production",
order = "b-d"
},
{
type = "item-subgroup",
name = "bio-extraction-machine",
group = "production",
order = "c-a",
},
{
type = "item-subgroup",
name = "bio-pump",
group = "production",
order = "c-b",
},
{
type = "item-subgroup",
name = "bio-smelting-machine",
group = "production",
order = "d-a",
},
{
type = "item-subgroup",
name = "bio-production-machine",
group = "production",
order = "e-a",
},
{
type = "item-subgroup",
name = "bio-assembly-machine",
group = "production",
order = "e-b",
},
{
type = "item-subgroup",
name = "bio-chemical-machine",
group = "production",
order = "e-c",
},
{
type = "item-subgroup",
name = "bio-electrolyser-machine",
group = "production",
order = "e-d",
},
{
type = "item-subgroup",
name = "bio-refinery-machine",
group = "production",
order = "e-e",
},
---- Ammo for Bio Turrets/Bio Cannon
{
type = "item-subgroup",
name = "bi-ammo",
group = "combat",
order = "b-[bi-ammo]"
},
--[[
{
type = "recipe-category",
name = "crafting-machine"
},
]]
}
)

View file

@ -1,205 +1,204 @@
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = "__core__/graphics/"
local HIDDENPATH = BioInd.modRoot .. "/prototypes/compound_entities/"
BioInd.writeDebug("Entered prototypes.hidden_entities.lua of \"%s\".", {BioInd.modName})
------------------------------------------------------------------------------------
-- Keep a list of all hidden entities we create, so we can modify them easily in --
-- data-updates.lua or data-final-fixes.lua. --
------------------------------------------------------------------------------------
BI.hidden_entities = {}
BI.hidden_entities.types = {}
local no_sound = {
filename = "__base__/sound/silence-1sec.ogg",
}
------------------------------------------------------------------------------------
-- Some common properties that should be used by all hidden entity types --
------------------------------------------------------------------------------------
BI.hidden_entities.flags = {
"hide-alt-info",
"no-copy-paste",
"not-blueprintable",
"not-deconstructable",
"not-flammable",
"not-in-kill-statistics",
"not-on-map",
"not-repairable",
"not-upgradable",
"placeable-off-grid",
}
if not BioInd.is_debug then
table.insert(BI.hidden_entities.flags, "not-selectable-in-game")
end
BI.hidden_entities.collision_mask = nil
BI.hidden_entities.collision_box = {{0, 0}, {0, 0}}
BI.hidden_entities.selection_box = BioInd.is_debug and
{{-0.5, -0.5}, {0.5, 0.5}} or
{{0, 0}, {0, 0}}
BI.hidden_entities.selectable_in_game = BioInd.is_debug
BI.hidden_entities.max_health = 1
BI.hidden_entities.icon = ICONPATH .. "empty.png"
BI.hidden_entities.icon_size = 1
BI.hidden_entities.icon_mipmaps = 0
BI.hidden_entities.icons = {
{
icon = BI.hidden_entities.icon,
icon_size = BI.hidden_entities.icon_size,
icon_mipmaps = BI.hidden_entities.icon_mipmaps
}
}
BI.hidden_entities.picture = {
filename = ICONPATH .. "empty.png",
priority = "low",
size = 1,
frame_count = 1,
axially_symmetrical = false,
direction_count = 1,
}
BI.hidden_entities.overlay = BI.hidden_entities.picture
-- The resistances will be set in data-updates.lua, when all mods have had
-- a chance to create their damage types!
BI.hidden_entities.hide_resistances = true
BI.hidden_entities.sounds = {
build_sound = no_sound,
close_sound = no_sound,
mined_sound = no_sound,
open_sound = no_sound,
repair_sound = no_sound,
rotated_sound = no_sound,
vehicle_impact_sound = no_sound,
working_sound = no_sound,
}
BI.hidden_entities.misc = {
active_picture = BI.hidden_entities.picture,
circuit_wire_max_distance = 0,
corpse = "",
created_effect = nil,
created_smoke = nil,
damaged_trigger_effect = nil,
energy_source = {
render_no_network_icon = false,
render_no_power_icon = false,
},
fast_replaceable_group = "",
light = nil,
next_upgrade = "",
remove_decoratives = "false",
water_reflection = {pictures = BI.hidden_entities.picture},
}
------------------------------------------------------------------------------------
-- Apply the common properties to this hidden-entity prototype! --
------------------------------------------------------------------------------------
BI.set_common_properties = function(h_entity)
for s, sound in pairs(BI.hidden_entities.sounds) do
h_entity[s] = sound
end
for s, setting in pairs(BI.hidden_entities.misc) do
h_entity[s] = setting
end
h_entity.icon = BI.hidden_entities.icon
h_entity.icon_size = BI.hidden_entities.icon_size
h_entity.icon_mipmaps = BI.hidden_entities.icon_mipmaps
if BioInd.is_debug then
h_entity.icons = h_entity.icons or {
{
icon = h_entity.icon,
icon_size = h_entity.icon_size or 1,
icon_mipmaps = h_entity.icon_mipmaps
}
}
else
h_entity.icons = BI.hidden_entities.icons
end
h_entity.picture = BioInd.is_debug and h_entity.picture or BI.hidden_entities.picture
h_entity.pictures = BioInd.is_debug and h_entity.pictures or BI.hidden_entities.picture
h_entity.overlay = BioInd.is_debug and h_entity.overlay or BI.hidden_entities.overlay
h_entity.flags = BI.hidden_entities.flags
h_entity.selectable_in_game = BI.hidden_entities.selectable_in_game
h_entity.max_health = BI.hidden_entities.max_health
h_entity.collision_mask = BI.hidden_entities.collision_mask
h_entity.collision_box = BI.hidden_entities.collision_box
h_entity.selection_box = BI.hidden_entities.selection_box
h_entity.hidden = true
end
------------------------------------------------------------------------------------
-- Compile a list of the hidden-entity prototype of this compound entity! --
------------------------------------------------------------------------------------
-- The list of compound entities contains duplicate data for related entities (e.g.
-- curved and straight rails, or entities where an overlay is placed first). So, we
-- should look for the tables instead: They are guaranteed to be unique!
BI.make_hidden_entity_list = function(hidden_type)
BioInd.check_args(hidden_type, "string", "valid handle for hidden entities")
local name, entity_locale
for c_name, c_data in pairs(BioInd.compound_entities) do
BioInd.writeDebug("Checking %s for hidden %ss", {c_name, hidden_type})
local h_type = c_data.hidden[hidden_type]
if h_type then
name = h_type and h_type.name or c_data.base and c_data.base.name .. "-hidden-" .. hidden_type
-- Store the name of the compound entity -- we'll need it for the localization!
BI.hidden_entities.types[hidden_type] = BI.hidden_entities.types[hidden_type] or {}
-- If the base entity is just an overlay, it won't have its own localization key
-- but use the same localizations as the final entity. So, we'll check for the
-- "new_base_name" property first and use the base entity's name if it hasn't been
-- set.
BI.hidden_entities.types[hidden_type][name] = h_type.localize_entity or
c_data.new_base_name or
c_name
BioInd.writeDebug("Must create %s!", {name})
end
end
end
------------------------------------------------------------------------------------
-- Add a layer to a picture --
------------------------------------------------------------------------------------
-- The hidden entities DO need to have images, so that they can be identified in the
-- production tab!
BI.add_layer = function(layers, data)
BioInd.check_args(data, "table", "layer data")
layers = layers or {}
local name = data.name
local priority = data.priority
local height = data.height
local width = data.width
local size = data.size
local shadow = data.shadow
layers[#layers + 1] = {
filename = name,
priority = priority or "low",
width = width and width * 2,
height = height and height * 2,
size = size and size * 2,
draw_as_shadow = shadow,
scale = 0.5,
}
return layers
end
require(HIDDENPATH .. "hidden_lamps")
require(HIDDENPATH .. "hidden_panels")
require(HIDDENPATH .. "hidden_poles")
require(HIDDENPATH .. "hidden_radars")
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
local ICONPATH = "__core__/graphics/"
local HIDDENPATH = BioInd.modRoot .. "/prototypes/compound_entities/"
BioInd.writeDebug("Entered prototypes.hidden_entities.lua of \"%s\".", {BioInd.modName})
------------------------------------------------------------------------------------
-- Keep a list of all hidden entities we create, so we can modify them easily in --
-- data-updates.lua or data-final-fixes.lua. --
------------------------------------------------------------------------------------
BI.hidden_entities = {}
BI.hidden_entities.types = {}
local no_sound = {
filename = "__base__/sound/silence-1sec.ogg",
}
------------------------------------------------------------------------------------
-- Some common properties that should be used by all hidden entity types --
------------------------------------------------------------------------------------
BI.hidden_entities.flags = {
"hide-alt-info",
"no-copy-paste",
"not-blueprintable",
"not-deconstructable",
"not-flammable",
"not-in-kill-statistics",
"not-on-map",
"not-repairable",
"not-upgradable",
"placeable-off-grid",
}
if not BioInd.is_debug then
table.insert(BI.hidden_entities.flags, "not-selectable-in-game")
end
BI.hidden_entities.collision_mask = nil
BI.hidden_entities.collision_box = {{0, 0}, {0, 0}}
BI.hidden_entities.selection_box = BioInd.is_debug and
{{-0.5, -0.5}, {0.5, 0.5}} or
{{0, 0}, {0, 0}}
BI.hidden_entities.selectable_in_game = BioInd.is_debug
BI.hidden_entities.max_health = 1
BI.hidden_entities.icon = ICONPATH .. "empty.png"
BI.hidden_entities.icon_size = 1
BI.hidden_entities.icon_mipmaps = 0
BI.hidden_entities.icons = {
{
icon = BI.hidden_entities.icon,
icon_size = BI.hidden_entities.icon_size,
icon_mipmaps = BI.hidden_entities.icon_mipmaps
}
}
BI.hidden_entities.picture = {
filename = ICONPATH .. "empty.png",
priority = "low",
size = 1,
frame_count = 1,
axially_symmetrical = false,
direction_count = 1,
}
BI.hidden_entities.overlay = BI.hidden_entities.picture
-- The resistances will be set in data-updates.lua, when all mods have had
-- a chance to create their damage types!
BI.hidden_entities.hide_resistances = true
BI.hidden_entities.sounds = {
build_sound = no_sound,
close_sound = no_sound,
mined_sound = no_sound,
open_sound = no_sound,
repair_sound = no_sound,
rotated_sound = no_sound,
vehicle_impact_sound = no_sound,
working_sound = no_sound,
}
BI.hidden_entities.misc = {
active_picture = BI.hidden_entities.picture,
circuit_wire_max_distance = 0,
corpse = "",
created_effect = nil,
created_smoke = nil,
damaged_trigger_effect = nil,
energy_source = {
render_no_network_icon = false,
render_no_power_icon = false,
},
fast_replaceable_group = "",
light = nil,
next_upgrade = "",
remove_decoratives = "false",
water_reflection = {pictures = BI.hidden_entities.picture},
}
------------------------------------------------------------------------------------
-- Apply the common properties to this hidden-entity prototype! --
------------------------------------------------------------------------------------
BI.set_common_properties = function(h_entity)
for s, sound in pairs(BI.hidden_entities.sounds) do
h_entity[s] = sound
end
for s, setting in pairs(BI.hidden_entities.misc) do
h_entity[s] = setting
end
h_entity.icon = BI.hidden_entities.icon
h_entity.icon_size = BI.hidden_entities.icon_size
h_entity.icon_mipmaps = BI.hidden_entities.icon_mipmaps
if BioInd.is_debug then
h_entity.icons = h_entity.icons or {
{
icon = h_entity.icon,
icon_size = h_entity.icon_size or 1,
icon_mipmaps = h_entity.icon_mipmaps
}
}
else
h_entity.icons = BI.hidden_entities.icons
end
h_entity.picture = BioInd.is_debug and h_entity.picture or BI.hidden_entities.picture
h_entity.pictures = BioInd.is_debug and h_entity.pictures or BI.hidden_entities.picture
h_entity.overlay = BioInd.is_debug and h_entity.overlay or BI.hidden_entities.overlay
h_entity.flags = BI.hidden_entities.flags
h_entity.selectable_in_game = BI.hidden_entities.selectable_in_game
h_entity.max_health = BI.hidden_entities.max_health
h_entity.collision_mask = BI.hidden_entities.collision_mask
h_entity.collision_box = BI.hidden_entities.collision_box
h_entity.selection_box = BI.hidden_entities.selection_box
h_entity.hidden = true
end
------------------------------------------------------------------------------------
-- Compile a list of the hidden-entity prototype of this compound entity! --
------------------------------------------------------------------------------------
-- The list of compound entities contains duplicate data for related entities (e.g.
-- curved and straight rails, or entities where an overlay is placed first). So, we
-- should look for the tables instead: They are guaranteed to be unique!
BI.make_hidden_entity_list = function(hidden_type)
BioInd.check_args(hidden_type, "string", "valid handle for hidden entities")
local name, entity_locale
for c_name, c_data in pairs(BioInd.compound_entities) do
BioInd.writeDebug("Checking %s for hidden %ss", {c_name, hidden_type})
local h_type = c_data.hidden[hidden_type]
if h_type then
name = h_type and h_type.name or c_data.base and c_data.base.name .. "-hidden-" .. hidden_type
-- Store the name of the compound entity -- we'll need it for the localization!
BI.hidden_entities.types[hidden_type] = BI.hidden_entities.types[hidden_type] or {}
-- If the base entity is just an overlay, it won't have its own localization key
-- but use the same localizations as the final entity. So, we'll check for the
-- "new_base_name" property first and use the base entity's name if it hasn't been
-- set.
BI.hidden_entities.types[hidden_type][name] = h_type.localize_entity or
c_data.new_base_name or
c_name
BioInd.writeDebug("Must create %s!", {name})
end
end
end
------------------------------------------------------------------------------------
-- Add a layer to a picture --
------------------------------------------------------------------------------------
-- The hidden entities DO need to have images, so that they can be identified in the
-- production tab!
BI.add_layer = function(layers, data)
BioInd.check_args(data, "table", "layer data")
layers = layers or {}
local name = data.name
local priority = data.priority
local height = data.height
local width = data.width
local size = data.size
local shadow = data.shadow
layers[#layers + 1] = {
filename = name,
priority = priority or "low",
width = width and width * 2,
height = height and height * 2,
size = size and size * 2,
draw_as_shadow = shadow,
scale = 0.5,
}
return layers
end
require(HIDDENPATH .. "hidden_lamps")
require(HIDDENPATH .. "hidden_panels")
require(HIDDENPATH .. "hidden_radars")

View file

@ -1,74 +1,74 @@
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Entered prototypes.hidden_lamps.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
------------------------------------------------------------------------------------
-- Create the main prototype for hidden lamps. All others will be based on this! --
------------------------------------------------------------------------------------
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "lamp"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["small-lamp"])
BI.set_common_properties(h_entity)
------------------------------------------------------------------------------------
-- Lamp specific attributes!
h_entity.energy_source.type = "void"
h_entity.energy_source.usage_priority = "lamp"
h_entity.energy_usage_per_tick = "100kW"
h_entity.light = {intensity = 1, size = 45}
h_entity.light_when_colored= {intensity = 0, size = 0}
h_entity.signal_to_color_mapping = {}
h_entity.circuit_connector_sprites = {}
for l, led in ipairs({"red", "green", "blue", "light"}) do
h_entity.circuit_connector_sprites["led_" .. led] = BI.hidden_entities.picture
h_entity.circuit_connector_sprites["led_" .. led].intensity = 0
end
h_entity.picture_off = BI.hidden_entities.picture
h_entity.picture_on = BI.hidden_entities.picture
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
------------------------------------------------------------------------------------
-- Make the copies!
local lamp
local c_entities = BioInd.compound_entities
for lamp_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
lamp = table.deepcopy(h_entity)
lamp.name = lamp_name
lamp.localised_name = {"entity-name." .. locale_name}
lamp.localised_description = {"entity-description." .. locale_name}
-- Adjust properties for hidden lamp of Bio farm
if c_entities["bi-bio-farm"] and
lamp_name == c_entities["bi-bio-farm"].hidden[h_type].name then
lamp.icon = ICONPATH .. "Bio_Farm_Lamp.png"
lamp.icon_size = 64
lamp.BI_add_icon = true
BioInd.show("Adjusted properties of", lamp_name)
end
data:extend({lamp})
BioInd.show("Created", lamp_name)
end
------------------------------------------------------------------------------------
-- Testing
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Entered prototypes.hidden_lamps.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
------------------------------------------------------------------------------------
-- Create the main prototype for hidden lamps. All others will be based on this! --
------------------------------------------------------------------------------------
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "lamp"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["small-lamp"])
BI.set_common_properties(h_entity)
------------------------------------------------------------------------------------
-- Lamp specific attributes!
h_entity.energy_source.type = "void"
h_entity.energy_source.usage_priority = "lamp"
h_entity.energy_usage_per_tick = "100kW"
h_entity.light = {intensity = 1, size = 45}
h_entity.light_when_colored= {intensity = 0, size = 0}
h_entity.signal_to_color_mapping = {}
h_entity.circuit_connector_sprites = {}
for l, led in ipairs({"red", "green", "blue", "light"}) do
h_entity.circuit_connector_sprites["led_" .. led] = BI.hidden_entities.picture
h_entity.circuit_connector_sprites["led_" .. led].intensity = 0
end
h_entity.picture_off = BI.hidden_entities.picture
h_entity.picture_on = BI.hidden_entities.picture
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
------------------------------------------------------------------------------------
-- Make the copies!
local lamp
local c_entities = BioInd.compound_entities
for lamp_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
lamp = table.deepcopy(h_entity)
lamp.name = lamp_name
lamp.localised_name = {"entity-name." .. locale_name}
lamp.localised_description = {"entity-description." .. locale_name}
-- Adjust properties for hidden lamp of Bio farm
if c_entities["bi-bio-farm"] and
lamp_name == c_entities["bi-bio-farm"].hidden[h_type].name then
lamp.icon = ICONPATH .. "Bio_Farm_Lamp.png"
lamp.icon_size = 64
lamp.BI_add_icon = true
BioInd.show("Adjusted properties of", lamp_name)
end
data:extend({lamp})
BioInd.show("Created", lamp_name)
end
------------------------------------------------------------------------------------
-- Testing

View file

@ -1,102 +1,102 @@
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Entered prototypes.hidden_panels.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
------------------------------------------------------------------------------------
-- Create the main prototype for hidden lamps. All others will be based on this! --
------------------------------------------------------------------------------------
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "panel"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["solar-panel"])
BioInd.show("Panel data", h_entity)
BI.set_common_properties(h_entity)
BioInd.show("Panel data after set_common_properties", h_entity)
------------------------------------------------------------------------------------
-- Panel specific attributes!
h_entity.energy_source = {
type = "electric",
usage_priority = "solar"
}
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
-- Musk floor is not an entity, but a tile, so we don't have a compound-entity table
-- for it and must add it manually!
local Musk_name = "bi-musk-mat-hidden-panel"
BI.hidden_entities.types[h_key][Musk_name] = "bi-solar-mat"
------------------------------------------------------------------------------------
-- Make the copies!
local tmp, panel
local c_entities = BioInd.compound_entities
for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
panel = table.deepcopy(h_entity)
panel.name = panel_name
panel.localised_name = {"entity-name." .. locale_name}
panel.localised_description = {"entity-description." .. locale_name}
-- Adjust properties for hidden panel of Solar boiler
if c_entities["bi-solar-boiler"] and
panel_name == c_entities["bi-solar-boiler"].hidden[h_key].name then
panel.icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png"
panel.icon_size = 64
panel.BI_add_icon = true
panel.picture = {}
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.render_no_power_icon = true
panel.collision_box = {{-4.2, -4.2}, {4.2, 4.2}}
panel.production = "1.8MW"
BioInd.show("Adjusted properties of", panel_name)
-- Adjust properties for hidden panel of bio farms
elseif c_entities["bi-bio-farm"] and
c_entities["bi-bio-farm"].hidden[h_key] and
panel_name == c_entities["bi-bio-farm"].hidden[h_key].name then
panel.icon = ICONPATH .. "Bio_Farm_Solar.png"
panel.icon_size = 64
panel.BI_add_icon = true
panel.production = "100kW"
BioInd.show("Adjusted properties of", panel_name)
-- Adjust properties for hidden panel of Musk floor
elseif panel_name == Musk_name then
panel.icon = ICONPATH .. "solar-mat.png"
panel.icon_size = 64
panel.BI_add_icon = true
panel.production = "10kW"
BioInd.show("Adjusted properties of", panel_name)
end
data:extend({panel})
BioInd.show("Created", panel_name)
end
------------------------------------------------------------------------------------
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Entered prototypes.hidden_panels.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
------------------------------------------------------------------------------------
-- Create the main prototype for hidden lamps. All others will be based on this! --
------------------------------------------------------------------------------------
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "panel"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["solar-panel"])
BioInd.show("Panel data", h_entity)
BI.set_common_properties(h_entity)
BioInd.show("Panel data after set_common_properties", h_entity)
------------------------------------------------------------------------------------
-- Panel specific attributes!
h_entity.energy_source = {
type = "electric",
usage_priority = "solar"
}
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
-- Musk floor is not an entity, but a tile, so we don't have a compound-entity table
-- for it and must add it manually!
local Musk_name = "bi-musk-mat-hidden-panel"
BI.hidden_entities.types[h_key][Musk_name] = "bi-solar-mat"
------------------------------------------------------------------------------------
-- Make the copies!
local tmp, panel
local c_entities = BioInd.compound_entities
for panel_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
panel = table.deepcopy(h_entity)
panel.name = panel_name
panel.localised_name = {"entity-name." .. locale_name}
panel.localised_description = {"entity-description." .. locale_name}
-- Adjust properties for hidden panel of Solar boiler
if c_entities["bi-solar-boiler"] and
panel_name == c_entities["bi-solar-boiler"].hidden[h_key].name then
panel.icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png"
panel.icon_size = 64
panel.BI_add_icon = true
panel.picture = {}
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.render_no_power_icon = true
panel.collision_box = {{-4.2, -4.2}, {4.2, 4.2}}
panel.production = "1.8MW"
BioInd.show("Adjusted properties of", panel_name)
-- Adjust properties for hidden panel of bio farms
elseif c_entities["bi-bio-farm"] and
c_entities["bi-bio-farm"].hidden[h_key] and
panel_name == c_entities["bi-bio-farm"].hidden[h_key].name then
panel.icon = ICONPATH .. "Bio_Farm_Solar.png"
panel.icon_size = 64
panel.BI_add_icon = true
panel.production = "100kW"
BioInd.show("Adjusted properties of", panel_name)
-- Adjust properties for hidden panel of Musk floor
elseif panel_name == Musk_name then
panel.icon = ICONPATH .. "solar-mat.png"
panel.icon_size = 64
panel.BI_add_icon = true
panel.production = "10kW"
BioInd.show("Adjusted properties of", panel_name)
end
data:extend({panel})
BioInd.show("Created", panel_name)
end
------------------------------------------------------------------------------------

View file

@ -1,201 +0,0 @@
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries')
BioInd.writeDebug("Entered prototypes.hidden_poles.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
------------------------------------------------------------------------------------
-- Create the main prototype for hidden poles. All others will be based on this! --
------------------------------------------------------------------------------------
--~ local h_type = "electric-pole"
--~ local h_entity = table.deepcopy(data.raw[h_type]["small-electric-pole"])
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "pole"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["small-electric-pole"])
BI.set_common_properties(h_entity)
------------------------------------------------------------------------------------
-- Pole specific attributes!
h_entity.draw_copper_wires = BioInd.is_debug
h_entity.draw_circuit_wires = BioInd.is_debug
h_entity.maximum_wire_distance = 10
h_entity.supply_area_distance = 5
--~ hidden_pole.resistances = {}
--~ for damage, d in pairs(data.raw["damage-type"]) do
--~ hidden_pole.resistances[#hidden_pole.resistances +1] = {
--~ type = damage,
--~ percent = 100
--~ }
--~ end
--~ BioInd.show("hidden_pole.resistances", hidden_pole.resistances)
h_entity.connection_points = BioInd.is_debug and
h_entity.connection_points or {
{
shadow = {},
wire = { copper_wire_tweak = {0, 0} }
}
}
--~ h_entity.connection_points = h_entity.connection_points
h_entity.radius_visualisation_picture = BioInd.is_debug and
h_entity.radius_visualisation_picture or
BI.hidden_entities.picture
h_entity.energy_source = {
type = "electric",
usage_priority = "solar"
}
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
-- Musk floor is not an entity, but a tile, so we don't have a compound-entity table
-- for it and must add it manually!
local Musk_name = "bi-musk-mat-hidden-pole"
BI.hidden_entities.types[h_key][Musk_name] = "bi-solar-mat"
-- We only have one "connector" at the moment. No need to add another file just for that,
-- so let's add this connector manually to the list!
BI.hidden_entities.types[h_key]["bi-bio-farm-hidden-connector_pole"] = "bi-bio-farm"
local function shift_picture(pole, offset)
if not BioInd.is_debug then
pole.pictures.shift = offset or {0, 0}
end
end
------------------------------------------------------------------------------------
-- Make the copies!
local tmp, pole
local c_entities = BioInd.compound_entities
BioInd.writeDebug("BI.hidden_entities.types[%s]: %s", {h_key, BI.hidden_entities.types[h_key]})
--~ for pole_name, locale_name in pairs(pole_list) do
for pole_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
BioInd.show("pole_name", pole_name)
BioInd.show("locale_name", locale_name)
--~ pole = table.deepcopy(data.raw["electric-pole"]["bi-hidden-power-pole"])
pole = table.deepcopy(h_entity)
pole.name = pole_name
pole.localised_name = {"entity-name." .. locale_name}
pole.localised_description = {"entity-description." .. locale_name}
pole.icon_size = BioInd.is_debug and pole.icon_size or 64
------------------------------------------------------------------------------------
-- Adjust properties for hidden biofarm poles
------------------------------------------------------------------------------------
--~ if c_entities["bi-bio-farm"] then
--~ -- We have connectors on the roof of Bio farms, so we want to display connections
--~ if c_entities["bi-bio-farm"].hidden["connector"] and
--~ pole_name == c_entities["bi-bio-farm"].hidden["connector"].name then
local biofarm_connector = c_entities["bi-bio-farm"].hidden["connector"] and
pole_name == c_entities["bi-bio-farm"].hidden["connector"].name
local biofarm_pole = (c_entities["bi-bio-farm"].hidden[h_key] and
pole_name == c_entities["bi-bio-farm"].hidden[h_key].name)
if c_entities["bi-bio-farm"] and biofarm_connector or biofarm_pole then
-- We have connectors on the roof of Bio farms, so we want to display connections
--~ if (c_entities["bi-bio-farm"].hidden["connector"] and
--~ pole_name == c_entities["bi-bio-farm"].hidden["connector"].name) then
if biofarm_connector then
pole.draw_copper_wires = true
local vanilla = table.deepcopy(data.raw[h_type]["small-electric-pole"])
local cp = vanilla.connection_points[1]
local offset_y = 2.7
for img, img_data in ipairs({"shadow", "wire"}) do
cp[img_data].green = nil
cp[img_data].red = nil
cp[img_data].copper[1] = cp[img_data].copper[1] + (offset_x or 0)
cp[img_data].copper[2] = cp[img_data].copper[2] + (offset_y or 0)
end
pole.connection_points = BioInd.is_debug and vanilla.connection_points or {cp}
pole.pictures = BioInd.is_debug and vanilla.pictures or pole.pictures
--~ pole.supply_area_distance = 1
pole.supply_area_distance = 5
pole.maximum_wire_distance = 5
shift_picture(pole)
BioInd.show("Adjusted properties of", pole_name)
-- Hidden center pole for supplying the area around the building
--~ elseif pole_name == c_entities["bi-bio-farm"].hidden[h_key].name then
--~ elseif (c_entities["bi-bio-farm"].hidden[h_key] and
--~ pole_name == c_entities["bi-bio-farm"].hidden[h_key].name) then
else
--~ pole.draw_copper_wires = true
pole.maximum_wire_distance = 2
pole.supply_area_distance = 5
--~ pole.selection_box = {{-.25, -.25}, {.25, .25}}
--~ pole.selectable_in_game = true
shift_picture(pole)
BioInd.show("Adjusted properties of", pole_name)
end
------------------------------------------------------------------------------------
-- Adjust properties for hidden power-rail pole
------------------------------------------------------------------------------------
elseif (c_entities["bi-straight-rail-power"] and
c_entities["bi-straight-rail-power"].hidden[h_key] and
pole_name == c_entities["bi-straight-rail-power"].hidden[h_key].name) or
(c_entities["bi-curved-rail-power"] and
c_entities["bi-curved-rail-power"].hidden[h_key] and
pole_name == c_entities["bi-curved-rail-power"].hidden[h_key].name) then
--~ elseif pole_name == c_entities["bi-straight-rail-power"].hidden[h_key].name then
--~ pole.localised_name = {"entity-name.bi-rail-power"}
--~ pole.localised_description = {"entity-description.bi-rail-power"}
pole.maximum_wire_distance = 9
pole.supply_area_distance = 2
shift_picture(pole)
BioInd.show("Adjusted properties of", pole_name)
------------------------------------------------------------------------------------
-- Adjust properties for hidden pole of bio gardens
------------------------------------------------------------------------------------
elseif c_entities["bi-bio-garden"] and
-- This pole may have been removed because "Easy Gardens" is disabled!
c_entities["bi-bio-garden"].hidden[h_key] and
pole_name == c_entities["bi-bio-garden"].hidden[h_key].name then
pole.maximum_wire_distance = 4
pole.supply_area_distance = 1
shift_picture(pole)
BioInd.show("Adjusted properties of", pole_name)
------------------------------------------------------------------------------------
-- Adjust properties for hidden pole of Musk floor
------------------------------------------------------------------------------------
elseif pole_name == Musk_name then
pole.icon = ICONPATH .. "solar-mat.png"
pole.icon_size = 64
pole.maximum_wire_distance = 1
pole.supply_area_distance = 3
BioInd.show("Adjusted properties of", pole_name)
end
data:extend({pole})
BioInd.show("Created", pole_name)
end
------------------------------------------------------------------------------------
--~ -- Testing
--~ for k, v in pairs(data.raw[h_entity.type]) do
--~ BioInd.writeDebug("%s: %s", {k, v})
--~ end

View file

@ -1,134 +1,134 @@
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Entered prototypes.hidden_radars.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
require ("util")
------------------------------------------------------------------------------------
-- Create the main prototype for hidden radars. All others will be based on this! --
------------------------------------------------------------------------------------
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "radar"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["radar"])
BI.set_common_properties(h_entity)
------------------------------------------------------------------------------------
-- Lamp specific attributes!
h_entity.energy_source.type = "electric"
h_entity.energy_source.usage_priority = "secondary-input"
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
------------------------------------------------------------------------------------
-- Make the copies!
local radar
local c_entities = BioInd.compound_entities
for radar_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
radar = table.deepcopy(h_entity)
BioInd.show("radar_name", radar_name)
BioInd.show("locale_name", locale_name)
radar.name = radar_name
radar.localised_name = {"entity-name." .. locale_name}
radar.localised_description = {"entity-description." .. locale_name}
BioInd.show("radar_name", radar_name)
BioInd.show("radar.name", c_entities["bi-arboretum"].hidden[h_key].name)
-- Adjust properties for hidden radar of Bio cannon
if c_entities["bi-bio-cannon"] and
radar_name == c_entities["bi-bio-cannon"].hidden[h_key].name then
local base = c_entities["bi-bio-cannon"].base
base = data.raw[base.type][base.name]
radar.icon = ICONPATH .. "biocannon_icon.png"
radar.icon_size = 64
radar.BI_add_icon = true
radar.energy_per_sector = "22MJ"
radar.energy_per_nearby_scan = "400kW"
radar.energy_usage = "6kW"
-- The cannon can only shoot if the radar has power, so we need to show
-- if it is connected. Also, the collision_box of the radar should be big
-- enough that it is within reach even of poles with a small supply_area.
radar.collision_box = base.collision_box
radar.energy_source.render_no_network_icon = true
radar.energy_source.render_no_power_icon = true
radar.max_distance_of_nearby_sector_revealed = 5
radar.max_distance_of_sector_revealed = 5
BioInd.show("Adjusted properties of", radar_name)
-- Adjust properties for hidden radar of Terraformer
elseif c_entities["bi-arboretum"] and
radar_name == c_entities["bi-arboretum"].hidden[h_key].name then
radar.localised_name = {"entity-name." .. radar.name}
radar.icon = ICONPATH .. "Arboretum_Icon.png"
radar.icon_size = 64
radar.BI_add_icon = true
-- We want to be able to see the scanning progress of this radar!
for f, flag in pairs(radar.flags) do
if flag == "not-selectable-in-game" then
radar.flags[f] = nil
end
end
radar.selectable_in_game = true
-- For some reason, the default collision_mask (unset properties will be
-- set to the default value automatically at the end of the data stage)
-- must be set to make the radar selectable!
radar.collision_mask = nil
radar.collision_box = {{-0.70, -0.70}, {0.70, 0.70}}
radar.selection_box = {{-0.75, -0.75}, {0.75, 0.75}}
radar.energy_per_sector = "2MJ"
radar.energy_per_nearby_scan = "200kW"
radar.energy_source.emissions_per_minute = {}
radar.energy_usage = "150kW"
radar.max_distance_of_nearby_sector_revealed = 2
radar.max_distance_of_sector_revealed = 5
radar.max_health = 250
radar.pictures = {
layers = {
{
filename = "__base__/graphics/entity/radar/radar.png",
priority = "extra-high",
width = 196,
height = 254,
apply_projection = false,
direction_count = 64,
line_length = 8,
shift = util.by_pixel(1, -16),
scale = 0.25
}
}
}
BioInd.show("Adjusted properties of", radar_name)
end
data:extend({radar})
BioInd.show("Created", radar_name)
end
------------------------------------------------------------------------------------
-- Add functions that are also used in other files (debugging output etc.)
local BioInd = require('common')('Bio_Industries_2')
BioInd.writeDebug("Entered prototypes.hidden_radars.lua of \"%s\".", {BioInd.modName})
local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
require ("util")
------------------------------------------------------------------------------------
-- Create the main prototype for hidden radars. All others will be based on this! --
------------------------------------------------------------------------------------
-- The short name of the hidden entity (e.g. "lamp" or "pole")
local h_key = "radar"
-- The actual prototype type, identified by h_key
local h_type = BioInd.HE_map[h_key]
local h_entity = table.deepcopy(data.raw[h_type]["radar"])
BI.set_common_properties(h_entity)
------------------------------------------------------------------------------------
-- Lamp specific attributes!
h_entity.energy_source.type = "electric"
h_entity.energy_source.usage_priority = "secondary-input"
------------------------------------------------------------------------------------
-- Make a copy of the hidden-entity prototype for each compound entity! --
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
-- Compile a list of the hidden entities we'll need
BI.make_hidden_entity_list(h_key)
------------------------------------------------------------------------------------
-- Make the copies!
local radar
local c_entities = BioInd.compound_entities
for radar_name, locale_name in pairs(BI.hidden_entities.types[h_key]) do
radar = table.deepcopy(h_entity)
BioInd.show("radar_name", radar_name)
BioInd.show("locale_name", locale_name)
radar.name = radar_name
radar.localised_name = {"entity-name." .. locale_name}
radar.localised_description = {"entity-description." .. locale_name}
BioInd.show("radar_name", radar_name)
BioInd.show("radar.name", c_entities["bi-arboretum"].hidden[h_key].name)
-- Adjust properties for hidden radar of Bio cannon
if c_entities["bi-bio-cannon"] and
radar_name == c_entities["bi-bio-cannon"].hidden[h_key].name then
local base = c_entities["bi-bio-cannon"].base
base = data.raw[base.type][base.name]
radar.icon = ICONPATH .. "biocannon_icon.png"
radar.icon_size = 64
radar.BI_add_icon = true
radar.energy_per_sector = "22MJ"
radar.energy_per_nearby_scan = "400kW"
radar.energy_usage = "6kW"
-- The cannon can only shoot if the radar has power, so we need to show
-- if it is connected. Also, the collision_box of the radar should be big
-- enough that it is within reach even of poles with a small supply_area.
radar.collision_box = base.collision_box
radar.energy_source.render_no_network_icon = true
radar.energy_source.render_no_power_icon = true
radar.max_distance_of_nearby_sector_revealed = 5
radar.max_distance_of_sector_revealed = 5
BioInd.show("Adjusted properties of", radar_name)
-- Adjust properties for hidden radar of Terraformer
elseif c_entities["bi-arboretum"] and
radar_name == c_entities["bi-arboretum"].hidden[h_key].name then
radar.localised_name = {"entity-name." .. radar.name}
radar.icon = ICONPATH .. "Arboretum_Icon.png"
radar.icon_size = 64
radar.BI_add_icon = true
-- We want to be able to see the scanning progress of this radar!
for f, flag in pairs(radar.flags) do
if flag == "not-selectable-in-game" then
radar.flags[f] = nil
end
end
radar.selectable_in_game = true
-- For some reason, the default collision_mask (unset properties will be
-- set to the default value automatically at the end of the data stage)
-- must be set to make the radar selectable!
radar.collision_mask = nil
radar.collision_box = {{-0.70, -0.70}, {0.70, 0.70}}
radar.selection_box = {{-0.75, -0.75}, {0.75, 0.75}}
radar.energy_per_sector = "2MJ"
radar.energy_per_nearby_scan = "200kW"
radar.energy_source.emissions_per_minute = {}
radar.energy_usage = "150kW"
radar.max_distance_of_nearby_sector_revealed = 2
radar.max_distance_of_sector_revealed = 5
radar.max_health = 250
radar.pictures = {
layers = {
{
filename = "__base__/graphics/entity/radar/radar.png",
priority = "extra-high",
width = 196,
height = 254,
apply_projection = false,
direction_count = 64,
line_length = 8,
shift = util.by_pixel(1, -16),
scale = 0.25
}
}
}
BioInd.show("Adjusted properties of", radar_name)
end
data:extend({radar})
BioInd.show("Created", radar_name)
end
------------------------------------------------------------------------------------

View file

@ -1,239 +1,239 @@
------------------------------------------------------------------------------------
-- This file contains the data of all compound entities. It will be used in the --
-- data stage to create the prototypes for the hidden enitities, and during the --
-- control stage to combine the compound entities and pass on any optional data --
-- that may be required by the scripts.
------------------------------------------------------------------------------------
require("util")
-- During the data stage, we want to remove compound entities (or some of their
-- hidden entities) that have been disabled via startup setting, so that we don't
-- spam the game with unnecessary prototypes.
-- During the control stage, we build a separate list of all the compound entities
-- that are available and store it in a global table. We'll need a complete list in
-- this case, so that we can keep track of the removed prototypes and clean out the
-- obsolete tables. We can achieve this by checking for "script" or "data".
-- However, we may also need a complete list during the data stage (e.g. for finding
-- recipes, items etc. of removed compound entity parts). In this case, we'll need
-- to pass on a valid argument (anything not nil) to this function.
local ret = {}
-- Map short handles for hidden entities in the table to actual prototype types
ret.HE_map = {
ammo_turret = "ammo-turret",
assembler = "assembling-machine",
boiler = "boiler",
lamp = "lamp",
panel = "solar-panel",
connector = "electric-pole",
pole = "electric-pole",
radar = "radar"
}
ret.HE_map_reverse = {}
for k, v in pairs(ret.HE_map) do
ret.HE_map_reverse[v] = k
end
------------------------------------------------------------------------------------
-- List of compound entities
-- Key: name of the base entity
-- tab: name of the global table where data of these entity are stored
-- hidden: table containing the hidden entities needed by this entity
-- Key: handle of the hidden entity
-- Value: data needed when placing the hidden entity
-- localize_entity: Pointer to an entity name -- e.g. {"entity-name.NAME"} -- that
-- will be used to localize this entity. This is needed when the
-- same string is used for differently named entity names, such
-- as "straight-rail"/"curved-rail"/"rail-planner".
-- new_base_name: If the placed entity is used as overlay, it will be replaced
-- with this entity.
-- add_global_tables table of names of other tables in global that are needed by
-- this entity
-- add_global_values table of names and values of variables that should be added to
-- the global table if this compound entity is used
-- optional: Any optional data affecting the compound entity that must be
-- stored in the global table.
------------------------------------------------------------------------------------
-- Data of hidden entities
-- name: name of the entity prototype
-- type: prototype type
-- base_offset: Position of the hidden entity relative to the base entity
------------------------------------------------------------------------------------
-- We add full data for the base entities because their type can't be deduced from
-- their name. For the hidden entities, we just create the fields and fill in any
-- optional data that may be needed. Name and type of the prototypes will be added
-- later automatically.
ret.compound_entities = {
["bi-bio-farm"] = {
tab = "bi_bio_farm_table",
base = {
name = "bi-bio-farm",
type = ret.HE_map.assembler,
},
hidden = {
connector = {
name = "bi-bio-farm-hidden-connector_pole",
type = ret.HE_map.pole,
-- base_offset = {x = 1.0, y = 1.0},
-- base_offset = (script and script.active_mods["_debug"] or mods and mods["_debug"]) and
},
panel = {
-- name = "bi-bio-farm-hidden-panel",
-- type = ret.HE_map.panel,
},
lamp = {
-- name = "bi-bio-farm-hidden-lamp",
-- type = ret.HE_map.lamp
},
}
},
["bi-bio-garden"] = {
tab = "bi_bio_garden_table",
base = {
name = "bi-bio-garden",
type = ret.HE_map.assembler,
},
hidden = {
pole = {
-- name = "bi-bio-garden-hidden-pole",
-- type = ret.HE_map.pole,
},
}
},
["bi-bio-solar-farm"] = {
tab = "bi_solar_farm_table",
base = {
name = "bi-bio-solar-farm",
type = ret.HE_map.panel,
},
hidden = {
pole = {
-- name = "bi-solar-farm-hidden-pole",
-- type = ret.HE_map.pole,
},
}
},
["bi-solar-boiler"] = {
tab = "bi_solar_boiler_table",
base = {
name = "bi-solar-boiler",
type = ret.HE_map.boiler,
},
hidden = {
panel = {
-- name = "bi-solar-boiler-hidden-panel",
-- type = ret.HE_map.panel,
},
pole = {
-- name = "bi-solar-boiler-hidden-pole",
-- type = ret.HE_map.pole,
},
}
},
-- Built from blueprint
["bi-arboretum"] = {
tab = "bi_arboretum_table",
base = {
name = "bi-arboretum",
type = ret.HE_map.assembler,
},
hidden = {
radar = {
-- name = "bi-arboretum-hidden-radar",
-- type = ret.HE_map.radar,
base_offset = {x = -3.5, y = 3.5},
},
pole = {
-- name = "bi-arboretum-hidden-pole",
-- type = ret.HE_map.pole,
},
lamp = {
-- name = "bi-arboretum-hidden-lamp",
-- type = ret.HE_map.lamp,
},
},
add_global_tables = {"bi_arboretum_radar_table", "bi_arboretum_recipe_table"},
new_base_name = "bi-arboretum",
},
-- Built from blueprint
["bi-bio-cannon"] = {
tab = "bi_bio_cannon_table",
base = {
name = "bi-bio-cannon",
type = "ammo-turret",
},
hidden = {
radar = {
-- name = "bi-bio-cannon-hidden-radar",
-- type = ret.HE_map.radar,
},
},
add_global_values = { Bio_Cannon_Counter = 0 },
optional = {delay = 0},
new_base_name = "bi-bio-cannon",
},
}
------------------------------------------------------------------------------------
-- Fill in the missing names and types of the hidden entities' prototypes! --
------------------------------------------------------------------------------------
for c_name, c_data in pairs(ret.compound_entities) do
for h_key, h_data in pairs(c_data.hidden) do
h_data.name = h_data.name or c_name .. "-hidden-" .. h_key
h_data.type = h_data.type or ret.HE_map[h_key]
end
end
------------------------------------------------------------------------------------
-- Remove entries for disabled compound entities. Do this before making copies! --
------------------------------------------------------------------------------------
ret.get_HE_list = function(get_complete_list)
if get_complete_list or script then
else
local settings = settings.startup
local function get_settings(name)
return settings[name] and settings[name].value
end
-- Bio Cannon
if not get_settings("BI_Bio_Cannon") then
ret.compound_entities["bi-bio-cannon"] = nil
end
-- Solar additions
if not get_settings("BI_Solar_Additions") then
for e, entry in ipairs({"bi-bio-solar-farm", "bi-solar-boiler"}) do
ret.compound_entities[entry] = nil
end
end
-- Easy Bio gardens: We only need the hidden pole if the setting is enabled. (But we
-- want to keep the rest of the table even if the setting is disabled.)
if not get_settings("BI_Easy_Bio_Gardens") then
ret.compound_entities["bi-bio-garden"].hidden.pole = nil
end
end
-- Some entities share almost the same data, so we can copy them
local make_copies = {
-- Overlay entities
["bi-arboretum"] = { name = "bi-arboretum-area", type = ret.HE_map.ammo_turret },
["bi-bio-cannon"] = { name = "bi-bio-cannon-area", type = ret.HE_map.ammo_turret },
}
for old, new in pairs(make_copies) do
if ret.compound_entities[old] then
ret.compound_entities[new.name] = util.table.deepcopy(ret.compound_entities[old])
ret.compound_entities[new.name].base.type = new.type
ret.compound_entities[new.name].base.name = new.name
end
end
return ret.compound_entities
end
return ret
------------------------------------------------------------------------------------
-- This file contains the data of all compound entities. It will be used in the --
-- data stage to create the prototypes for the hidden enitities, and during the --
-- control stage to combine the compound entities and pass on any optional data --
-- that may be required by the scripts.
------------------------------------------------------------------------------------
require("util")
-- During the data stage, we want to remove compound entities (or some of their
-- hidden entities) that have been disabled via startup setting, so that we don't
-- spam the game with unnecessary prototypes.
-- During the control stage, we build a separate list of all the compound entities
-- that are available and store it in a global table. We'll need a complete list in
-- this case, so that we can keep track of the removed prototypes and clean out the
-- obsolete tables. We can achieve this by checking for "script" or "data".
-- However, we may also need a complete list during the data stage (e.g. for finding
-- recipes, items etc. of removed compound entity parts). In this case, we'll need
-- to pass on a valid argument (anything not nil) to this function.
local ret = {}
-- Map short handles for hidden entities in the table to actual prototype types
ret.HE_map = {
ammo_turret = "ammo-turret",
assembler = "assembling-machine",
boiler = "boiler",
lamp = "lamp",
panel = "solar-panel",
connector = "electric-pole",
pole = "electric-pole",
radar = "radar"
}
ret.HE_map_reverse = {}
for k, v in pairs(ret.HE_map) do
ret.HE_map_reverse[v] = k
end
------------------------------------------------------------------------------------
-- List of compound entities
-- Key: name of the base entity
-- tab: name of the global table where data of these entity are stored
-- hidden: table containing the hidden entities needed by this entity
-- Key: handle of the hidden entity
-- Value: data needed when placing the hidden entity
-- localize_entity: Pointer to an entity name -- e.g. {"entity-name.NAME"} -- that
-- will be used to localize this entity. This is needed when the
-- same string is used for differently named entity names, such
-- as "straight-rail"/"curved-rail"/"rail-planner".
-- new_base_name: If the placed entity is used as overlay, it will be replaced
-- with this entity.
-- add_global_tables table of names of other tables in global that are needed by
-- this entity
-- add_global_values table of names and values of variables that should be added to
-- the global table if this compound entity is used
-- optional: Any optional data affecting the compound entity that must be
-- stored in the global table.
------------------------------------------------------------------------------------
-- Data of hidden entities
-- name: name of the entity prototype
-- type: prototype type
-- base_offset: Position of the hidden entity relative to the base entity
------------------------------------------------------------------------------------
-- We add full data for the base entities because their type can't be deduced from
-- their name. For the hidden entities, we just create the fields and fill in any
-- optional data that may be needed. Name and type of the prototypes will be added
-- later automatically.
ret.compound_entities = {
["bi-bio-farm"] = {
tab = "bi_bio_farm_table",
base = {
name = "bi-bio-farm",
type = ret.HE_map.assembler,
},
hidden = {
connector = {
name = "bi-bio-farm-hidden-connector_pole",
type = ret.HE_map.pole,
-- base_offset = {x = 1.0, y = 1.0},
-- base_offset = (script and script.active_mods["_debug"] or mods and mods["_debug"]) and
},
panel = {
-- name = "bi-bio-farm-hidden-panel",
-- type = ret.HE_map.panel,
},
lamp = {
-- name = "bi-bio-farm-hidden-lamp",
-- type = ret.HE_map.lamp
},
}
},
["bi-bio-garden"] = {
tab = "bi_bio_garden_table",
base = {
name = "bi-bio-garden",
type = ret.HE_map.assembler,
},
hidden = {
pole = {
-- name = "bi-bio-garden-hidden-pole",
-- type = ret.HE_map.pole,
},
}
},
["bi-bio-solar-farm"] = {
tab = "bi_solar_farm_table",
base = {
name = "bi-bio-solar-farm",
type = ret.HE_map.panel,
},
hidden = {
pole = {
-- name = "bi-solar-farm-hidden-pole",
-- type = ret.HE_map.pole,
},
}
},
["bi-solar-boiler"] = {
tab = "bi_solar_boiler_table",
base = {
name = "bi-solar-boiler",
type = ret.HE_map.boiler,
},
hidden = {
panel = {
-- name = "bi-solar-boiler-hidden-panel",
-- type = ret.HE_map.panel,
},
pole = {
-- name = "bi-solar-boiler-hidden-pole",
-- type = ret.HE_map.pole,
},
}
},
-- Built from blueprint
["bi-arboretum"] = {
tab = "bi_arboretum_table",
base = {
name = "bi-arboretum",
type = ret.HE_map.assembler,
},
hidden = {
radar = {
-- name = "bi-arboretum-hidden-radar",
-- type = ret.HE_map.radar,
base_offset = {x = -3.5, y = 3.5},
},
pole = {
-- name = "bi-arboretum-hidden-pole",
-- type = ret.HE_map.pole,
},
lamp = {
-- name = "bi-arboretum-hidden-lamp",
-- type = ret.HE_map.lamp,
},
},
add_global_tables = {"bi_arboretum_radar_table", "bi_arboretum_recipe_table"},
new_base_name = "bi-arboretum",
},
-- Built from blueprint
["bi-bio-cannon"] = {
tab = "bi_bio_cannon_table",
base = {
name = "bi-bio-cannon",
type = "ammo-turret",
},
hidden = {
radar = {
-- name = "bi-bio-cannon-hidden-radar",
-- type = ret.HE_map.radar,
},
},
add_global_values = { Bio_Cannon_Counter = 0 },
optional = {delay = 0},
new_base_name = "bi-bio-cannon",
},
}
------------------------------------------------------------------------------------
-- Fill in the missing names and types of the hidden entities' prototypes! --
------------------------------------------------------------------------------------
for c_name, c_data in pairs(ret.compound_entities) do
for h_key, h_data in pairs(c_data.hidden) do
h_data.name = h_data.name or c_name .. "-hidden-" .. h_key
h_data.type = h_data.type or ret.HE_map[h_key]
end
end
------------------------------------------------------------------------------------
-- Remove entries for disabled compound entities. Do this before making copies! --
------------------------------------------------------------------------------------
ret.get_HE_list = function(get_complete_list)
if get_complete_list or script then
else
local settings = settings.startup
local function get_settings(name)
return settings[name] and settings[name].value
end
-- Bio Cannon
if not get_settings("BI_Bio_Cannon") then
ret.compound_entities["bi-bio-cannon"] = nil
end
-- Solar additions
if not get_settings("BI_Solar_Additions") then
for e, entry in ipairs({"bi-bio-solar-farm", "bi-solar-boiler"}) do
ret.compound_entities[entry] = nil
end
end
-- Easy Bio gardens: We only need the hidden pole if the setting is enabled. (But we
-- want to keep the rest of the table even if the setting is disabled.)
if not get_settings("BI_Easy_Bio_Gardens") then
ret.compound_entities["bi-bio-garden"].hidden.pole = nil
end
end
-- Some entities share almost the same data, so we can copy them
local make_copies = {
-- Overlay entities
["bi-arboretum"] = { name = "bi-arboretum-area", type = ret.HE_map.ammo_turret },
["bi-bio-cannon"] = { name = "bi-bio-cannon-area", type = ret.HE_map.ammo_turret },
}
for old, new in pairs(make_copies) do
if ret.compound_entities[old] then
ret.compound_entities[new.name] = util.table.deepcopy(ret.compound_entities[old])
ret.compound_entities[new.name].base.type = new.type
ret.compound_entities[new.name].base.name = new.name
end
end
return ret.compound_entities
end
return ret

View file

@ -1,205 +1,205 @@
local setting_list = {}
-- Add/enable stuff
setting_list.BI_Solar_Additions = {
type = "bool-setting",
name = "BI_Solar_Additions",
setting_type = "startup",
default_value = true,
order = "a[modifier]-a[Solar_Farm]",
}
setting_list.BI_Bio_Fuel = {
type = "bool-setting",
name = "BI_Bio_Fuel",
setting_type = "startup",
default_value = true,
order = "a[modifier]-b[Bio_Fuel]",
}
setting_list.BI_Bio_Cannon = {
type = "bool-setting",
name = "BI_Bio_Cannon",
setting_type = "startup",
default_value = true,
order = "a[modifier]-c[Bio_Cannon]",
}
setting_list.BI_Show_musk_floor_in_mapview = {
type = "bool-setting",
name = "BI_Show_musk_floor_in_mapview",
setting_type = "startup",
default_value = true,
order = "a[modifier]-d[Musk_floor]",
}
setting_list.BI_Easy_Bio_Gardens = {
type = "bool-setting",
name = "BI_Easy_Bio_Gardens",
setting_type = "startup",
default_value = false,
order = "a[modifier]-e[Fluid_fertilizer]",
}
setting_list.BI_Bigger_Wooden_Chests = {
type = "bool-setting",
name = "BI_Bigger_Wooden_Chests",
setting_type = "startup",
default_value = true,
order = "a[modifier]-b[Bigger_Wooden_Chests]",
}
-- Game tweaks
setting_list.BI_Game_Tweaks_Emissions_Multiplier = {
type = "bool-setting",
name = "BI_Game_Tweaks_Emissions_Multiplier",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-a[Fuel_emission_multiplier]",
per_user = true,
}
setting_list.BI_Game_Tweaks_Stack_Size = {
type = "bool-setting",
name = "BI_Game_Tweaks_Stack_Size",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-b[Stack_size]",
}
setting_list.BI_Game_Tweaks_Recipe = {
type = "bool-setting",
name = "BI_Game_Tweaks_Recipe",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-c1[Recipe]",
}
setting_list.BI_Game_Tweaks_Production_Science = {
type = "bool-setting",
name = "BI_Game_Tweaks_Production_Science",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-c3[Production_science]",
}
setting_list.BI_Game_Tweaks_Tree = {
type = "bool-setting",
name = "BI_Game_Tweaks_Tree",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-d1[Trees]",
}
setting_list.BI_Game_Tweaks_Small_Tree_Collisionbox = {
type = "bool-setting",
name = "BI_Game_Tweaks_Small_Tree_Collisionbox",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-d2[Tree_collision_box]",
}
setting_list.BI_Game_Tweaks_Player = {
type = "bool-setting",
name = "BI_Game_Tweaks_Player",
setting_type = "startup",
default_value = false,
order = "b[tweaks]-e[Player_tweaks]",
}
setting_list.BI_Game_Tweaks_Bot = {
type = "bool-setting",
name = "BI_Game_Tweaks_Bot",
setting_type = "startup",
default_value = false,
order = "b[tweaks]-f[Bot_tweaks]",
}
-- Compatibility with other mods (optional)
-- Industrial Revolution + AAI Industry
if not (mods["IndustrialRevolution"] or mods["aai-industry"]) then
setting_list.BI_Game_Tweaks_Disassemble = {
type = "bool-setting",
name = "BI_Game_Tweaks_Disassemble",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-c2[Disassemble]",
}
end
-- Lua API global Variable Viewer (gvv)
if mods["gvv"] then
setting_list.BI_Enable_gvv_support = {
type = "bool-setting",
name = "BI_Enable_gvv_support",
setting_type = "startup",
default_value = false,
order = "c[compatibility]-c1[debugging_gvv]",
}
end
local list = {}
for name, setting in pairs(setting_list) do
data:extend({setting})
end
--[[
Types of settings:
<EFBFBD> startup - game must be restarted if changed (such a setting may affect prototypes' changes)
<EFBFBD> runtime-global - per-world setting
<EFBFBD> runtime-per-user - per-user setting
Types of values:
<EFBFBD> bool-setting
<EFBFBD> double-setting
<EFBFBD> int-setting
<EFBFBD> string-setting
Files being processed by the game:
<EFBFBD> settings.lua
<EFBFBD> settings-updates.lua
<EFBFBD> settings-final-fixes.lua
Using in DATA.lua:
data:extend({
{
type = "int-setting",
name = "setting-name1",
setting_type = "runtime-per-user",
default_value = 25,
minimum_value = -20,
maximum_value = 100,
per_user = true,
},
{
type = "bool-setting",
name = "setting-name2",
setting_type = "runtime-per-user",
default_value = true,
per_user = true,
},
{
type = "double-setting",
name = "setting-name3",
setting_type = "runtime-per-user",
default_value = -23,
per_user = true,
},
{
type = "string-setting",
name = "setting-name4",
setting_type = "runtime-per-user",
default_value = "Hello",
allowed_values = {"Hello", "foo", "bar"},
per_user = true,
},
})
Using in LOCALE.cfg:
[mod-setting-name]
setting-name1=Seting name
[mod-setting-description]
setting-name1=Seting description
Using in CONTROL.lua and in other code for reading:
EVENT: on_runtime_mod_setting_changed - called when a player changed its setting
event.player_index
event.setting
GET: settings.startup["setting-name"].value - current value of startup setting; can be used in DATA.lua
GET: settings.storage["setting-name"].value - current value of per-world setting
GET: set = settings.get_player_settings(LuaPlayer) - current values for per-player settings; then use set["setting-name"].value
GET: settings.player - default values
]]
local setting_list = {}
-- Add/enable stuff
setting_list.BI_Solar_Additions = {
type = "bool-setting",
name = "BI_Solar_Additions",
setting_type = "startup",
default_value = true,
order = "a[modifier]-a[Solar_Farm]",
}
setting_list.BI_Bio_Fuel = {
type = "bool-setting",
name = "BI_Bio_Fuel",
setting_type = "startup",
default_value = true,
order = "a[modifier]-b[Bio_Fuel]",
}
setting_list.BI_Bio_Cannon = {
type = "bool-setting",
name = "BI_Bio_Cannon",
setting_type = "startup",
default_value = true,
order = "a[modifier]-c[Bio_Cannon]",
}
setting_list.BI_Show_musk_floor_in_mapview = {
type = "bool-setting",
name = "BI_Show_musk_floor_in_mapview",
setting_type = "startup",
default_value = true,
order = "a[modifier]-d[Musk_floor]",
}
setting_list.BI_Easy_Bio_Gardens = {
type = "bool-setting",
name = "BI_Easy_Bio_Gardens",
setting_type = "startup",
default_value = false,
order = "a[modifier]-e[Fluid_fertilizer]",
}
setting_list.BI_Bigger_Wooden_Chests = {
type = "bool-setting",
name = "BI_Bigger_Wooden_Chests",
setting_type = "startup",
default_value = true,
order = "a[modifier]-b[Bigger_Wooden_Chests]",
}
-- Game tweaks
setting_list.BI_Game_Tweaks_Emissions_Multiplier = {
type = "bool-setting",
name = "BI_Game_Tweaks_Emissions_Multiplier",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-a[Fuel_emission_multiplier]",
per_user = true,
}
setting_list.BI_Game_Tweaks_Stack_Size = {
type = "bool-setting",
name = "BI_Game_Tweaks_Stack_Size",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-b[Stack_size]",
}
setting_list.BI_Game_Tweaks_Recipe = {
type = "bool-setting",
name = "BI_Game_Tweaks_Recipe",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-c1[Recipe]",
}
setting_list.BI_Game_Tweaks_Production_Science = {
type = "bool-setting",
name = "BI_Game_Tweaks_Production_Science",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-c3[Production_science]",
}
setting_list.BI_Game_Tweaks_Tree = {
type = "bool-setting",
name = "BI_Game_Tweaks_Tree",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-d1[Trees]",
}
setting_list.BI_Game_Tweaks_Small_Tree_Collisionbox = {
type = "bool-setting",
name = "BI_Game_Tweaks_Small_Tree_Collisionbox",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-d2[Tree_collision_box]",
}
setting_list.BI_Game_Tweaks_Player = {
type = "bool-setting",
name = "BI_Game_Tweaks_Player",
setting_type = "startup",
default_value = false,
order = "b[tweaks]-e[Player_tweaks]",
}
setting_list.BI_Game_Tweaks_Bot = {
type = "bool-setting",
name = "BI_Game_Tweaks_Bot",
setting_type = "startup",
default_value = false,
order = "b[tweaks]-f[Bot_tweaks]",
}
-- Compatibility with other mods (optional)
-- Industrial Revolution + AAI Industry
if not (mods["IndustrialRevolution"] or mods["aai-industry"]) then
setting_list.BI_Game_Tweaks_Disassemble = {
type = "bool-setting",
name = "BI_Game_Tweaks_Disassemble",
setting_type = "startup",
default_value = true,
order = "b[tweaks]-c2[Disassemble]",
}
end
-- Lua API global Variable Viewer (gvv)
if mods["gvv"] then
setting_list.BI_Enable_gvv_support = {
type = "bool-setting",
name = "BI_Enable_gvv_support",
setting_type = "startup",
default_value = false,
order = "c[compatibility]-c1[debugging_gvv]",
}
end
local list = {}
for name, setting in pairs(setting_list) do
data:extend({setting})
end
--[[
Types of settings:
<EFBFBD> startup - game must be restarted if changed (such a setting may affect prototypes' changes)
<EFBFBD> runtime-global - per-world setting
<EFBFBD> runtime-per-user - per-user setting
Types of values:
<EFBFBD> bool-setting
<EFBFBD> double-setting
<EFBFBD> int-setting
<EFBFBD> string-setting
Files being processed by the game:
<EFBFBD> settings.lua
<EFBFBD> settings-updates.lua
<EFBFBD> settings-final-fixes.lua
Using in DATA.lua:
data:extend({
{
type = "int-setting",
name = "setting-name1",
setting_type = "runtime-per-user",
default_value = 25,
minimum_value = -20,
maximum_value = 100,
per_user = true,
},
{
type = "bool-setting",
name = "setting-name2",
setting_type = "runtime-per-user",
default_value = true,
per_user = true,
},
{
type = "double-setting",
name = "setting-name3",
setting_type = "runtime-per-user",
default_value = -23,
per_user = true,
},
{
type = "string-setting",
name = "setting-name4",
setting_type = "runtime-per-user",
default_value = "Hello",
allowed_values = {"Hello", "foo", "bar"},
per_user = true,
},
})
Using in LOCALE.cfg:
[mod-setting-name]
setting-name1=Seting name
[mod-setting-description]
setting-name1=Seting description
Using in CONTROL.lua and in other code for reading:
EVENT: on_runtime_mod_setting_changed - called when a player changed its setting
event.player_index
event.setting
GET: settings.startup["setting-name"].value - current value of startup setting; can be used in DATA.lua
GET: settings.storage["setting-name"].value - current value of per-world setting
GET: set = settings.get_player_settings(LuaPlayer) - current values for per-player settings; then use set["setting-name"].value
GET: settings.player - default values
]]

View file

@ -1,230 +1,230 @@
--------------------------------------------------------------------
-- If startup settings have been changed, we need to check some stuff.
-- Keep that in a separate file so the main control.lua is easier to
-- read!
--------------------------------------------------------------------
local settings_changed = {}
-- Adjust the force of hidden poles on Musk floor!
settings_changed.musk_floor = function()
log("Entered function settings_changed.musk_floor!")
-- Look for solar panels on every surface. They determine the force poles will use
-- if the electric grid overlay will be shown in mapview.
local sm_panel_name = "bi-musk-mat-hidden-panel"
local sm_pole_name = "bi-musk-mat-hidden-pole"
-- If dummy force is not used, force of a hidden pole should be that of the hidden solar panel.
-- That force will be "enemy" for poles/solar panels created with versions of Bio Industries
-- prior to 0.17.45/0.18.13 because of the bug. We can fix that for singleplayer games by setting
-- the force to player force. In multiplayer games, we can do this as well if all players are
-- on the same force. If there are several forces that have players, it's impossible to find out
-- which force built a certain musk floor tile, so "enemy" will still be used.
-- (Only fix in this case: Players must remove and rebuild all existing musk floor tiles!)
local force = nil
-- Always use dummy force if option is set
if BioInd.UseMuskForce then
force = BioInd.MuskForceName
-- Singleplayer mode: use force of first player
elseif not game.is_multiplayer() then
-- Apparently, this crashed for someone (https://mods.factorio.com/mod/Bio_Industries_2/discussion/649d41b778d997d29385b8cf).
-- Could it be that a game that was originally a multiplayer game has been saved and reused
-- as singleplayer game, but there was no player 1? Let's go over all players and break after
-- the first hit, so we make sure we'll get the single player whatever its index!
for p, player in pairs(game.players) do
force = player.force.name
break
end
-- Still got no force? Fall back to "player" -- as one of the 3 default forces,
-- it can't be removed, so we can use it!
force = force or "player"
-- Multiplayer game
else
local count = 0
-- Count forces with players
for _, check_force in pairs(game.forces) do
if next(check_force.players) then
force = check_force.name
count = count + 1
end
end
-- Several forces with players: reset force to nil now and use force of panel later
-- (If this happens in a game were musk floor was created the buggy way with "force == nil",
-- it will be impossible to determine which force built it, so the force will still be
-- the default, i.e. "enemy".)
if count > 1 then
force = nil
end
end
for name, surface in pairs(game.surfaces) do
BioInd.writeDebug("Looking for %s on surface %s", {sm_panel_name, name})
local sm_panel = surface.find_entities_filtered{name = sm_panel_name}
local sm_pole = {}
-- Look for hidden poles on position of hidden panels
for p, panel in ipairs(sm_panel) do
sm_pole = surface.find_entities_filtered{
name = sm_pole_name,
position = panel.position,
}
-- If more than one hidden pole exists at that position for some reason, remove all but the first!
if #sm_pole > 1 then
BioInd.writeDebug("Number of poles for panel %g: %g", {p, #sm_pole})
for i = 2, #sm_pole do
BioInd.writeDebug("Destroying pole number %g", {i})
sm_pole[i].destroy()
end
end
-- Set force of the pole
sm_pole[1].force = force or panel.force
end
end
BioInd.writeDebug("Electric grid overlay of musk floor will be %s in map view.",
{BioInd.UseMuskForce and "hidden" or "displayed"})
end
settings_changed.bio_garden = function()
BioInd.writeDebug("Entered function settings_changed.bio_garden!")
-- Has this setting been changed since the last time the game was run?
local current = BioInd.get_startup_setting("BI_Easy_Bio_Gardens")
BioInd.show("Last state of BI_Easy_Bio_Gardens", storage.mod_settings.BI_Easy_Bio_Gardens)
BioInd.show("Current state of BI_Easy_Bio_Gardens", current)
if storage.mod_settings.BI_Easy_Bio_Gardens ~= current then
BioInd.writeDebug("Setting has been changed!")
local pole, neighbours
-- This is the unmodified table!
local compound_entity = BioInd.compound_entities["bi-bio-garden"]
local hidden_entities = compound_entity.hidden
-- Check that all gardens are still valid
for g, garden in pairs(storage[compound_entity.tab]) do
-- Base entity doesn't exist -- remove hidden entities!''
if not (garden.base and garden.base.valid) then
-- Remove all hidden entities!
for hidden, h_name in pairs(compound_entity.hidden or {}) do
BioInd.show("hidden", hidden)
BioInd.writeDebug("Removing hidden entity %s %s", {
garden[hidden] and garden[hidden].valid and garden[hidden].name or "nil",
garden[hidden] and garden[hidden].valid and garden[hidden].unit_number or "nil"})
BioInd.remove_entity(garden[hidden])
garden[hidden] = nil
end
storage[compound_entity.tab][garden.entity.unit_number] = nil
end
end
-- For whatever reason, there may be hidden poles that aren't associated
-- with any garden. We want to remove these, so lets' compile a list of all
-- hidden poles first.
local remove_poles = {}
local found_poles
local pole_type = "electric-pole"
for s, surface in pairs(game.surfaces) do
-- Find poles on surface
found_poles = surface.find_entities_filtered{
name = compound_entity.hidden[pole_type].name,
type = "electric-pole",
}
-- Add them to list of removeable poles, indexed by unit_number
for p, pole in ipairs(found_poles) do
remove_poles[pole.unit_number] = pole
end
end
-- Setting is on, so we need to create the hidden poles
if current then
BioInd.writeDebug("Need to create hidden poles for %s Bio Gardens!",
{table_size(storage.bi_bio_garden_table) })
-- Restore the list of hidden entities
storage.compound_entities["bi-bio-garden"] = BioInd.compound_entities["bi-bio-garden"]
local base
for g, garden in pairs(storage.bi_bio_garden_table or {}) do
-- Make sure the base entity exists!
base = garden.base
pole = base and garden[pole_type]
BioInd.show("pole", pole)
-- There is a pole referenced in the table, and it is a valid entity
if pole and pole.valid then
-- Delete pole from list of removeable poles
BioInd.writeDebug("Pole exists -- keep it!")
remove_poles[pole.unit_number] = nil
-- There is no valid pole, let's create one!
elseif base then
-- Create hidden poles
pole = BioInd.create_entities(
storage[compound_entity.tab],
base,
{pole = hidden_entities[pole_type].name}
)
-- Add the new pole to the table
if pole then
storage[compound_entity.tab][base.unit_number][pole_type] = pole
BioInd.writeDebug("Stored %s %g in table: %s", {
base.name,
base.unit_number,
storage[compound_entity.tab][base.unit_number]
})
end
end
end
-- Setting is off -- disconnect and remove hidden poles!
else
BioInd.writeDebug("%s Bio Gardens found -- try to disconnect hidden poles!",
{table_size(storage.bi_bio_garden_table) })
-- Find hidden poles of registered gardens
BioInd.show("storage.bi_bio_garden_table", storage.bi_bio_garden_table)
for g, garden in pairs(storage.bi_bio_garden_table or {}) do
if garden[pole_type] then
-- Pole really exists: destroy the entity
if garden[pole_type].valid then
-- Disconnect to prevent random connections of other poles when
-- this one is removed
garden[pole_type].disconnect_neighbour()
-- Remove pole from the list of poles not associated with a garden
remove_poles[garden[pole_type].unit_number] = nil
-- Destroy pole
BioInd.remove_entity(garden[pole_type])
BioInd.show("Removed pole of garden", garden.base.unit_number)
end
garden[pole_type] = nil
BioInd.show("Removed pole from table of garden", garden.base.unit_number)
end
end
-- We don't want to create hidden poles if the setting is off,
-- so remove the pole from hidden entities!
storage.compound_entities["bi-bio-garden"].hidden[pole_type] = nil
BioInd.show("storage.compound_entities", storage.compound_entities)
end
-- Remove any hidden poles that are not associated with a garden
BioInd.writeDebug("Removing %s hidden poles not associated with a bio garden!",
{table_size(remove_poles)})
for p, pole in pairs(remove_poles) do
pole.destroy()
end
-- Update setting!
storage.mod_settings.BI_Easy_Bio_Gardens = current
BioInd.show("Updated setting to", storage.mod_settings.BI_Easy_Bio_Gardens)
else
BioInd.writeDebug("Nothing to do!")
end
end
return settings_changed
--------------------------------------------------------------------
-- If startup settings have been changed, we need to check some stuff.
-- Keep that in a separate file so the main control.lua is easier to
-- read!
--------------------------------------------------------------------
local settings_changed = {}
-- Adjust the force of hidden poles on Musk floor!
settings_changed.musk_floor = function()
log("Entered function settings_changed.musk_floor!")
-- Look for solar panels on every surface. They determine the force poles will use
-- if the electric grid overlay will be shown in mapview.
local sm_panel_name = "bi-musk-mat-hidden-panel"
local sm_pole_name = "bi-musk-mat-hidden-pole"
-- If dummy force is not used, force of a hidden pole should be that of the hidden solar panel.
-- That force will be "enemy" for poles/solar panels created with versions of Bio Industries
-- prior to 0.17.45/0.18.13 because of the bug. We can fix that for singleplayer games by setting
-- the force to player force. In multiplayer games, we can do this as well if all players are
-- on the same force. If there are several forces that have players, it's impossible to find out
-- which force built a certain musk floor tile, so "enemy" will still be used.
-- (Only fix in this case: Players must remove and rebuild all existing musk floor tiles!)
local force = nil
-- Always use dummy force if option is set
if BioInd.UseMuskForce then
force = BioInd.MuskForceName
-- Singleplayer mode: use force of first player
elseif not game.is_multiplayer() then
-- Apparently, this crashed for someone (https://mods.factorio.com/mod/Bio_Industries_2/discussion/649d41b778d997d29385b8cf).
-- Could it be that a game that was originally a multiplayer game has been saved and reused
-- as singleplayer game, but there was no player 1? Let's go over all players and break after
-- the first hit, so we make sure we'll get the single player whatever its index!
for p, player in pairs(game.players) do
force = player.force.name
break
end
-- Still got no force? Fall back to "player" -- as one of the 3 default forces,
-- it can't be removed, so we can use it!
force = force or "player"
-- Multiplayer game
else
local count = 0
-- Count forces with players
for _, check_force in pairs(game.forces) do
if next(check_force.players) then
force = check_force.name
count = count + 1
end
end
-- Several forces with players: reset force to nil now and use force of panel later
-- (If this happens in a game were musk floor was created the buggy way with "force == nil",
-- it will be impossible to determine which force built it, so the force will still be
-- the default, i.e. "enemy".)
if count > 1 then
force = nil
end
end
for name, surface in pairs(game.surfaces) do
BioInd.writeDebug("Looking for %s on surface %s", {sm_panel_name, name})
local sm_panel = surface.find_entities_filtered{name = sm_panel_name}
local sm_pole = {}
-- Look for hidden poles on position of hidden panels
for p, panel in ipairs(sm_panel) do
sm_pole = surface.find_entities_filtered{
name = sm_pole_name,
position = panel.position,
}
-- If more than one hidden pole exists at that position for some reason, remove all but the first!
if #sm_pole > 1 then
BioInd.writeDebug("Number of poles for panel %g: %g", {p, #sm_pole})
for i = 2, #sm_pole do
BioInd.writeDebug("Destroying pole number %g", {i})
sm_pole[i].destroy()
end
end
-- Set force of the pole
sm_pole[1].force = force or panel.force
end
end
BioInd.writeDebug("Electric grid overlay of musk floor will be %s in map view.",
{BioInd.UseMuskForce and "hidden" or "displayed"})
end
settings_changed.bio_garden = function()
BioInd.writeDebug("Entered function settings_changed.bio_garden!")
-- Has this setting been changed since the last time the game was run?
local current = BioInd.get_startup_setting("BI_Easy_Bio_Gardens")
BioInd.show("Last state of BI_Easy_Bio_Gardens", storage.mod_settings.BI_Easy_Bio_Gardens)
BioInd.show("Current state of BI_Easy_Bio_Gardens", current)
if storage.mod_settings.BI_Easy_Bio_Gardens ~= current then
BioInd.writeDebug("Setting has been changed!")
local pole, neighbours
-- This is the unmodified table!
local compound_entity = BioInd.compound_entities["bi-bio-garden"]
local hidden_entities = compound_entity.hidden
-- Check that all gardens are still valid
for g, garden in pairs(storage[compound_entity.tab]) do
-- Base entity doesn't exist -- remove hidden entities!''
if not (garden.base and garden.base.valid) then
-- Remove all hidden entities!
for hidden, h_name in pairs(compound_entity.hidden or {}) do
BioInd.show("hidden", hidden)
BioInd.writeDebug("Removing hidden entity %s %s", {
garden[hidden] and garden[hidden].valid and garden[hidden].name or "nil",
garden[hidden] and garden[hidden].valid and garden[hidden].unit_number or "nil"})
BioInd.remove_entity(garden[hidden])
garden[hidden] = nil
end
storage[compound_entity.tab][garden.entity.unit_number] = nil
end
end
-- For whatever reason, there may be hidden poles that aren't associated
-- with any garden. We want to remove these, so lets' compile a list of all
-- hidden poles first.
local remove_poles = {}
local found_poles
local pole_type = "electric-pole"
for s, surface in pairs(game.surfaces) do
-- Find poles on surface
found_poles = surface.find_entities_filtered{
name = compound_entity.hidden[pole_type].name,
type = "electric-pole",
}
-- Add them to list of removeable poles, indexed by unit_number
for p, pole in ipairs(found_poles) do
remove_poles[pole.unit_number] = pole
end
end
-- Setting is on, so we need to create the hidden poles
if current then
BioInd.writeDebug("Need to create hidden poles for %s Bio Gardens!",
{table_size(storage.bi_bio_garden_table) })
-- Restore the list of hidden entities
storage.compound_entities["bi-bio-garden"] = BioInd.compound_entities["bi-bio-garden"]
local base
for g, garden in pairs(storage.bi_bio_garden_table or {}) do
-- Make sure the base entity exists!
base = garden.base
pole = base and garden[pole_type]
BioInd.show("pole", pole)
-- There is a pole referenced in the table, and it is a valid entity
if pole and pole.valid then
-- Delete pole from list of removeable poles
BioInd.writeDebug("Pole exists -- keep it!")
remove_poles[pole.unit_number] = nil
-- There is no valid pole, let's create one!
elseif base then
-- Create hidden poles
pole = BioInd.create_entities(
storage[compound_entity.tab],
base,
{pole = hidden_entities[pole_type].name}
)
-- Add the new pole to the table
if pole then
storage[compound_entity.tab][base.unit_number][pole_type] = pole
BioInd.writeDebug("Stored %s %g in table: %s", {
base.name,
base.unit_number,
storage[compound_entity.tab][base.unit_number]
})
end
end
end
-- Setting is off -- disconnect and remove hidden poles!
else
BioInd.writeDebug("%s Bio Gardens found -- try to disconnect hidden poles!",
{table_size(storage.bi_bio_garden_table) })
-- Find hidden poles of registered gardens
BioInd.show("storage.bi_bio_garden_table", storage.bi_bio_garden_table)
for g, garden in pairs(storage.bi_bio_garden_table or {}) do
if garden[pole_type] then
-- Pole really exists: destroy the entity
if garden[pole_type].valid then
-- Disconnect to prevent random connections of other poles when
-- this one is removed
garden[pole_type].disconnect_neighbour()
-- Remove pole from the list of poles not associated with a garden
remove_poles[garden[pole_type].unit_number] = nil
-- Destroy pole
BioInd.remove_entity(garden[pole_type])
BioInd.show("Removed pole of garden", garden.base.unit_number)
end
garden[pole_type] = nil
BioInd.show("Removed pole from table of garden", garden.base.unit_number)
end
end
-- We don't want to create hidden poles if the setting is off,
-- so remove the pole from hidden entities!
storage.compound_entities["bi-bio-garden"].hidden[pole_type] = nil
BioInd.show("storage.compound_entities", storage.compound_entities)
end
-- Remove any hidden poles that are not associated with a garden
BioInd.writeDebug("Removing %s hidden poles not associated with a bio garden!",
{table_size(remove_poles)})
for p, pole in pairs(remove_poles) do
pole.destroy()
end
-- Update setting!
storage.mod_settings.BI_Easy_Bio_Gardens = current
BioInd.show("Updated setting to", storage.mod_settings.BI_Easy_Bio_Gardens)
else
BioInd.writeDebug("Nothing to do!")
end
end
return settings_changed

View file

@ -3,7 +3,7 @@ _________________
## Bio Industries
**Disclaimer:** This is a fork of [Bio Industries](https://mods.factorio.com/mod/Bio_Industries) to bring it to Factorio 2.x. The main reason for the fork is the preparation for [ATOM](https://mods.factorio.com/mod/all-the-overhaul-modpack). Space Age is currently not supported. Rails have been removed from the mod because of changed graphics requirements. If you want to contribute, feel free to contact me.
**Disclaimer:** This is a fork of Bio Industries to bring it to Factorio 2.x. The main reason for the fork is the preparation for [ATOM](https://mods.factorio.com/mod/all-the-overhaul-modpack). Space Age is currently not supported. Rails have been removed from the mod because of changed graphics requirements. If you want to contribute, feel free to contact me.
Bio Industries provides you with some very useful buildings and products.