Compare commits

...

5 commits
2.0.1 ... main

Author SHA1 Message Date
Simon Brodtmann
bac183d1c1 Reformat code 2025-07-07 23:10:51 +02:00
Simon Brodtmann
7134f437e5 Cleanup 2025-07-06 20:24:21 +02:00
Simon Brodtmann
9144d7492f Change line endings to \n 2025-07-06 20:17:23 +02:00
32c3dcadbe compat: Dropped incompatibility flag for Space Age. 2025-07-06 20:15:51 +02:00
Simon Brodtmann
6b957759d5 Fix changelog 2025-07-06 11:09:34 +02:00
122 changed files with 38888 additions and 40184 deletions

View file

@ -2,84 +2,84 @@
function Test_Spawn() function Test_Spawn()
local surface = game.surfaces['nauvis'] local surface = game.surfaces['nauvis']
surface.create_entity({name = "tree-01", position = {2, 10}, force = game.forces.player}) 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", 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-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-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-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-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", 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-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-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", 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-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", 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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-n", position = { 154, 10 }, force = game.forces.player })
surface.create_entity({name = "tree-wetland-o", position = {156, 10}, force = game.forces.player}) surface.create_entity({ name = "tree-wetland-o", position = { 156, 10 }, force = game.forces.player })
end end

View file

@ -4,7 +4,3 @@ Date: 06.07.2025
Bug Fixes: Bug Fixes:
- Fix locales - Fix locales
- Fix Musk floor - 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

View file

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

View file

@ -1,4 +1,3 @@
-- All tree Growing stuff -- All tree Growing stuff
local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(true) local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(true)
@ -8,25 +7,25 @@ Bi_Industries = {}
Bi_Industries.fertility = { Bi_Industries.fertility = {
["vegetation-green-grass-1"] = 100, ["vegetation-green-grass-1"] = 100,
["grass-1"] = 100, ["grass-1"] = 100,
["grass-3"] = 85, ["grass-3"] = 85,
["grass-2"] = 70, ["grass-2"] = 70,
["grass-4"] = 60, ["grass-4"] = 60,
["red-desert-0"] = 50, ["red-desert-0"] = 50,
["dirt-3"] = 40, ["dirt-3"] = 40,
["dirt-5"] = 37, ["dirt-5"] = 37,
["dirt-6"] = 34, ["dirt-6"] = 34,
["dirt-7"] = 31, ["dirt-7"] = 31,
["dirt-4"] = 28, ["dirt-4"] = 28,
["dry-dirt"] = 25, ["dry-dirt"] = 25,
["dirt-2"] = 22, ["dirt-2"] = 22,
["dirt-1"] = 19, ["dirt-1"] = 19,
["red-desert-2"] = 16, ["red-desert-2"] = 16,
["red-desert-3"] = 13, ["red-desert-3"] = 13,
["sand-3"] = 10, ["sand-3"] = 10,
["sand-2"] = 7, ["sand-2"] = 7,
["sand-1"] = 4, ["sand-1"] = 4,
["red-desert-1"] = 1, ["red-desert-1"] = 1,
["frozen-snow-0"] = 1, ["frozen-snow-0"] = 1,
["frozen-snow-1"] = 1, ["frozen-snow-1"] = 1,
["frozen-snow-2"] = 1, ["frozen-snow-2"] = 1,
@ -226,432 +225,428 @@ Bi_Industries.fertility = {
-- If we get passed on a tile_name, we can skip getting the tile at position! -- If we get passed on a tile_name, we can skip getting the tile at position!
local function get_tile_fertility(surface, position, tile_name) local function get_tile_fertility(surface, position, tile_name)
surface = BioInd.is_surface(surface) or BioInd.arg_err(surface or "nil", "surface") surface = BioInd.is_surface(surface) or BioInd.arg_err(surface or "nil", "surface")
position = BioInd.normalize_position(position) or BioInd.arg_err(position or "nil", "position") position = BioInd.normalize_position(position) or BioInd.arg_err(position or "nil", "position")
tile_name = tile_name or surface.get_tile(position.x, position.y).name tile_name = tile_name or surface.get_tile(position.x, position.y).name
local fertility = Bi_Industries.fertility[tile_name] local fertility = Bi_Industries.fertility[tile_name]
return fertility and {fertility = fertility, key = "fertilizer"} or return fertility and { fertility = fertility, key = "fertilizer" } or
{fertility = 1, key = "default"} { fertility = 1, key = "default" }
end end
local function plant_tree(tabl, tree, create_entity) local function plant_tree(tabl, tree, create_entity)
BioInd.check_args(tabl, "table") BioInd.check_args(tabl, "table")
BioInd.check_args(tree, "table") BioInd.check_args(tree, "table")
BioInd.check_args(tree.time, "number", "time") BioInd.check_args(tree.time, "number", "time")
-- tree.tree_name is only required if we really want to create a tree, -- tree.tree_name is only required if we really want to create a tree,
-- not if we just want to add a table entry! -- not if we just want to add a table entry!
if create_entity then if create_entity then
BioInd.check_args(tree.tree_name, "string", "tree_name") BioInd.check_args(tree.tree_name, "string", "tree_name")
end end
if not (tree.position and BioInd.normalize_position(tree.position)) then if not (tree.position and BioInd.normalize_position(tree.position)) then
BioInd.arg_err(tree.position or "nil", "position") BioInd.arg_err(tree.position or "nil", "position")
elseif not (tree.surface and BioInd.is_surface(tree.surface)) then elseif not (tree.surface and BioInd.is_surface(tree.surface)) then
BioInd.arg_err(tree.surface or "nil", "surface") BioInd.arg_err(tree.surface or "nil", "surface")
end end
local grow_until_tick = tree.time local grow_until_tick = tree.time
BioInd.show("grow_until_tick", grow_until_tick) BioInd.show("grow_until_tick", grow_until_tick)
tabl[grow_until_tick] = tabl[grow_until_tick] or {} tabl[grow_until_tick] = tabl[grow_until_tick] or {}
-- Update table -- Update table
table.insert(tabl[grow_until_tick], tree) table.insert(tabl[grow_until_tick], tree)
BioInd.writeDebug("Added tree to table!") BioInd.writeDebug("Added tree to table!")
-- Plant the new tree -- Plant the new tree
if create_entity then if create_entity then
tree.surface.create_entity({ tree.surface.create_entity({
name = tree.tree_name, name = tree.tree_name,
position = tree.position, position = tree.position,
force = "neutral" force = "neutral"
}) })
end end
end end
-- t_base, t_penalty: numbers; seedbomb: Boolean -- t_base, t_penalty: numbers; seedbomb: Boolean
local function plant_seed(event, t_base, t_penalty, seedbomb) local function plant_seed(event, t_base, t_penalty, seedbomb)
for a, arg in pairs({ for a, arg in pairs({
{arg = event, type = "table"}, { arg = event, type = "table" },
{arg = t_base, type = "number"}, { arg = t_base, type = "number" },
{arg = t_penalty, type = "number"} { arg = t_penalty, type = "number" }
}) do }) do
BioInd.check_args(arg.arg, arg.type, arg.desc) BioInd.check_args(arg.arg, arg.type, arg.desc)
end end
BioInd.show("event", event) BioInd.show("event", event)
BioInd.show("t_base", t_base) BioInd.show("t_base", t_base)
BioInd.show("t_penalty", t_penalty) BioInd.show("t_penalty", t_penalty)
BioInd.show("seedbomb", seedbomb) BioInd.show("seedbomb", seedbomb)
-- Seed Planted (Put the seedling in the table) -- Seed Planted (Put the seedling in the table)
local entity = event.entity or event.created_entity or local entity = event.entity or event.created_entity or
BioInd.arg_err("nil", "entity") BioInd.arg_err("nil", "entity")
local surface = BioInd.is_surface(entity.surface) or local surface = BioInd.is_surface(entity.surface) or
BioInd.arg_err(entity.surface or "nil", "surface") BioInd.arg_err(entity.surface or "nil", "surface")
local pos = BioInd.normalize_position(entity.position) or local pos = BioInd.normalize_position(entity.position) or
BioInd.arg_err(entity.position or "nil", "position") BioInd.arg_err(entity.position or "nil", "position")
-- Minimum will always be 1 -- Minimum will always be 1
local fertility = get_tile_fertility(surface, pos).fertility local fertility = get_tile_fertility(surface, pos).fertility
-- Things will grow faster on fertile than on barren tiles -- Things will grow faster on fertile than on barren tiles
-- (No penalty for tiles with maximum fertility) -- (No penalty for tiles with maximum fertility)
local grow_time = math.max(1, math.random(t_base) + t_penalty - (40 * fertility)) local grow_time = math.max(1, math.random(t_base) + t_penalty - (40 * fertility))
local tree_data = { local tree_data = {
position = pos, position = pos,
time = event.tick + grow_time, time = event.tick + grow_time,
surface = surface, surface = surface,
seed_bomb = seedbomb seed_bomb = seedbomb
} }
plant_tree(storage.bi.tree_growing, tree_data, false) plant_tree(storage.bi.tree_growing, tree_data, false)
end end
function seed_planted(event) function seed_planted(event)
plant_seed(event, 1000, 4000, false) plant_seed(event, 1000, 4000, false)
end end
function seed_planted_trigger(event) function seed_planted_trigger(event)
plant_seed(event, 2000, 6000, true) plant_seed(event, 2000, 6000, true)
end end
function seed_planted_arboretum(event, entity) function seed_planted_arboretum(event, entity)
event.created_entity = entity event.created_entity = entity
plant_seed(event, 2000, 6000, false) plant_seed(event, 2000, 6000, false)
end end
function summ_weight(tabl) function summ_weight(tabl)
local summ = 0 local summ = 0
for i, tree_weights in pairs(tabl or {}) do for i, tree_weights in pairs(tabl or {}) do
if (type(tree_weights) == "table") and tree_weights.weight then if (type(tree_weights) == "table") and tree_weights.weight then
summ = summ + tree_weights.weight summ = summ + tree_weights.weight
end
end end
end return summ
return summ
end end
function tree_from_max_index_tabl(max_index, tabl) function tree_from_max_index_tabl(max_index, tabl)
BioInd.check_args(max_index, "number") BioInd.check_args(max_index, "number")
local rnd_index = math.random(max_index) local rnd_index = math.random(max_index)
for tree_name, tree_weights in pairs(tabl or {}) do for tree_name, tree_weights in pairs(tabl or {}) do
if (type(tree_weights) == "table") and tree_weights.weight then if (type(tree_weights) == "table") and tree_weights.weight then
rnd_index = rnd_index - tree_weights.weight rnd_index = rnd_index - tree_weights.weight
if rnd_index <= 0 then if rnd_index <= 0 then
return tree_name return tree_name
end end
end
end end
end return nil
return nil
end end
local function random_tree(tile_name) local function random_tree(tile_name)
BioInd.show("[random_tree] tile_name", tile_name) BioInd.show("[random_tree] tile_name", tile_name)
if terrains[tile_name] then if terrains[tile_name] then
local trees_table = terrains[tile_name] local trees_table = terrains[tile_name]
local max_index = summ_weight(trees_table) local max_index = summ_weight(trees_table)
BioInd.writeDebug("Found %s in table terrains.\tmax_index: %s", BioInd.writeDebug("Found %s in table terrains.\tmax_index: %s",
{tile_name, max_index}) { tile_name, max_index })
return tree_from_max_index_tabl(max_index, trees_table) return tree_from_max_index_tabl(max_index, trees_table)
end end
end end
-- Settings used for the different grow stages -- Settings used for the different grow stages
local stage_settings = { local stage_settings = {
[1] = { [1] = {
fertilizer = {max = 1500, penalty = 3000, factor = 30}, fertilizer = { max = 1500, penalty = 3000, factor = 30 },
default = {max = 1500, penalty = 6000, factor = 30}, default = { max = 1500, penalty = 6000, factor = 30 },
}, },
[2] = { [2] = {
fertilizer = {max = 1000, penalty = 2000, factor = 20}, fertilizer = { max = 1000, penalty = 2000, factor = 20 },
default = {max = 1500, penalty = 6000, factor = 30}, default = { max = 1500, penalty = 6000, factor = 30 },
}, },
[3] = { [3] = {
fertilizer = {max = 1000, penalty = 2000, factor = 20}, fertilizer = { max = 1000, penalty = 2000, factor = 20 },
default = {max = 1500, penalty = 6000, factor = 30}, default = { max = 1500, penalty = 6000, factor = 30 },
}, },
} }
local function Grow_tree_first_stage(first_stage_table, event) local function Grow_tree_first_stage(first_stage_table, event)
BioInd.check_args(first_stage_table, "table") BioInd.check_args(first_stage_table, "table")
BioInd.check_args(event, "table") BioInd.check_args(event, "table")
local surface = BioInd.is_surface(first_stage_table.surface) or local surface = BioInd.is_surface(first_stage_table.surface) or
BioInd.arg_err(first_stage_table.surface or "nil", "surface") BioInd.arg_err(first_stage_table.surface or "nil", "surface")
local position = BioInd.normalize_position(first_stage_table.position) or local position = BioInd.normalize_position(first_stage_table.position) or
BioInd.arg_err(first_stage_table.position or "nil", "position") BioInd.arg_err(first_stage_table.position or "nil", "position")
local seed_bomb = first_stage_table.seed_bomb local seed_bomb = first_stage_table.seed_bomb
local tree = surface.find_entity("seedling", position) local tree = surface.find_entity("seedling", position)
local tree2 = surface.find_entity("seedling-2", position) local tree2 = surface.find_entity("seedling-2", position)
local tree3 = surface.find_entity("seedling-3", position) local tree3 = surface.find_entity("seedling-3", position)
BioInd.writeDebug("tree: %s\ttree2: %s\ttree3: %s", BioInd.writeDebug("tree: %s\ttree2: %s\ttree3: %s",
{tree and tree.valid and tree.name or "nil", { tree and tree.valid and tree.name or "nil",
tree2 and tree2.valid and tree2.name or "nil", tree2 and tree2.valid and tree2.name or "nil",
tree3 and tree3.valid and tree3.name or "nil"}) tree3 and tree3.valid and tree3.name or "nil" })
local tile_name = surface.get_tile(position).name local tile_name = surface.get_tile(position).name
-- fertility will be 1 if terrain type is not listed above, so very small chance to grow. -- fertility will be 1 if terrain type is not listed above, so very small chance to grow.
local f = get_tile_fertility(surface, position, tile_name) local f = get_tile_fertility(surface, position, tile_name)
local fertility, key = f.fertility, f.key
BioInd.show("fertility", fertility)
BioInd.show("key", key)
-- Random value. Tree will grow if this value is smaller than the 'Fertility' value
local growth_chance = math.random(100)
local tree_name, can_be_placed
if tree or tree2 or tree3 then
BioInd.writeDebug("Found a seedling!")
tree_name = random_tree(tile_name)
end
BioInd.show("tree_name", tree_name)
if tree then
BioInd.writeDebug("Have tree")
if tree.valid then
tree.destroy()
BioInd.writeDebug("Destroyed tree!")
end
if tree_name and key == "fertilizer" and not seed_bomb then
-- Depending on Terrain, choose tree type & Convert seedling into a tree
BioInd.writeDebug("Fertilizer and no seed bomb: New tree can grow!")
-- Grow the new tree
can_be_placed = surface.can_place_entity({
name = tree_name, position = position, force = "neutral"
})
BioInd.show("can_be_placed", can_be_placed)
BioInd.show("growth_chance", growth_chance)
BioInd.show("fertility", fertility)
BioInd.show(growth_chance.." <= ("..fertility.." + 5)", growth_chance <= (fertility + 5))
if can_be_placed and growth_chance <= (fertility + 5) then
BioInd.writeDebug("Can be placed etc!")
-- Trees will grow faster on Fertile than on barren tiles
local grow_time = math.max(1, math.random(2000) + 4000 - (40 * fertility))
BioInd.show("grow_time", grow_time)
local stage_1_tree_name = "bio-tree-"..tree_name.."-1"
if not (prototypes.item[stage_1_tree_name] or
prototypes.entity[stage_1_tree_name]) then
stage_1_tree_name = tree_name
end
BioInd.writeDebug("stage_1_tree_name: %s", {stage_1_tree_name})
local tree_data = {
tree_name = stage_1_tree_name,
final_tree = tree_name,
position = position,
time = event.tick + grow_time,
surface = surface
}
plant_tree(storage.bi.tree_growing_stage_1, tree_data, true)
end
end
end
--- Seed Bomb Code
BioInd.show("tree_name", tree_name)
BioInd.show("tree2", tree2)
BioInd.show("tree3", tree3)
if seed_bomb then
BioInd.writeDebug("Seed bomb was used!")
if tree2 and tree2.valid then
tree2.destroy()
BioInd.writeDebug("Removed tree2!")
end
if tree3 and tree3.valid then
tree3.destroy()
BioInd.writeDebug("Removed tree3!")
end
--- Depending on Terrain, choose tree type & Convert seedling into a tree
BioInd.show("key", key)
if key == "fertilizer" then
BioInd.writeDebug("Got Tile")
if tree_name then
BioInd.writeDebug("Found Tree: %s", {tree_name})
local new_tree = {name = tree_name, position = position, force = "neutral"}
can_be_placed = surface.can_place_entity(new_tree)
BioInd.show("can_be_placed", can_be_placed)
BioInd.show("growth_chance", growth_chance)
BioInd.show("fertility", fertility)
BioInd.show("growth_chance <= fertility", growth_chance <= fertility)
if can_be_placed and growth_chance <= fertility then
surface.create_entity(new_tree)
BioInd.writeDebug("Created new tree!")
end
else
BioInd.writeDebug("Tree not Found")
end
else
BioInd.writeDebug("Tile not Found")
end
end
end
local function Grow_tree_last_stage(last_stage_table)
BioInd.check_args(last_stage_table, "table")
BioInd.check_args(last_stage_table.tree_name, "string", "tree_name")
BioInd.check_args(last_stage_table.final_tree, "string", "final_tree")
local surface = BioInd.is_surface(last_stage_table.surface) or
BioInd.arg_err(last_stage_table.surface or "nil", "surface")
local position = BioInd.normalize_position(last_stage_table.position) or
BioInd.arg_err(last_stage_table.position or "nil", "position")
local tree_name = last_stage_table.tree_name
local final_tree = last_stage_table.final_tree
local tree = tree_name and surface.find_entity(tree_name, position)
if tree then
tree.destroy()
-- fertility will be 1 if terrain type not listed above, so very small change to grow.
local f = get_tile_fertility(surface, position)
local fertility, key = f.fertility, f.key local fertility, key = f.fertility, f.key
BioInd.show("fertility", fertility)
BioInd.show("key", key)
-- Random value. Tree will grow if this value is smaller than the 'Fertility' value -- Random value. Tree will grow if this value is smaller than the 'Fertility' value
local growth_chance = math.random(100) local growth_chance = math.random(100)
--- Convert growing tree to fully grown tree local tree_name, can_be_placed
if (key == "fertilizer" or growth_chance <= fertility) then if tree or tree2 or tree3 then
BioInd.writeDebug("Found a seedling!")
-- Grow the new tree tree_name = random_tree(tile_name)
BioInd.writeDebug("Final Tree Name: %s", {final_tree}) end
surface.create_entity({ BioInd.show("tree_name", tree_name)
name = final_tree,
position = position,
force = "neutral" if tree then
}) BioInd.writeDebug("Have tree")
if tree.valid then
tree.destroy()
BioInd.writeDebug("Destroyed tree!")
end
if tree_name and key == "fertilizer" and not seed_bomb then
-- Depending on Terrain, choose tree type & Convert seedling into a tree
BioInd.writeDebug("Fertilizer and no seed bomb: New tree can grow!")
-- Grow the new tree
can_be_placed = surface.can_place_entity({
name = tree_name, position = position, force = "neutral"
})
BioInd.show("can_be_placed", can_be_placed)
BioInd.show("growth_chance", growth_chance)
BioInd.show("fertility", fertility)
BioInd.show(growth_chance .. " <= (" .. fertility .. " + 5)", growth_chance <= (fertility + 5))
if can_be_placed and growth_chance <= (fertility + 5) then
BioInd.writeDebug("Can be placed etc!")
-- Trees will grow faster on Fertile than on barren tiles
local grow_time = math.max(1, math.random(2000) + 4000 - (40 * fertility))
BioInd.show("grow_time", grow_time)
local stage_1_tree_name = "bio-tree-" .. tree_name .. "-1"
if not (prototypes.item[stage_1_tree_name] or
prototypes.entity[stage_1_tree_name]) then
stage_1_tree_name = tree_name
end
BioInd.writeDebug("stage_1_tree_name: %s", { stage_1_tree_name })
local tree_data = {
tree_name = stage_1_tree_name,
final_tree = tree_name,
position = position,
time = event.tick + grow_time,
surface = surface
}
plant_tree(storage.bi.tree_growing_stage_1, tree_data, true)
end
end
end
--- Seed Bomb Code
BioInd.show("tree_name", tree_name)
BioInd.show("tree2", tree2)
BioInd.show("tree3", tree3)
if seed_bomb then
BioInd.writeDebug("Seed bomb was used!")
if tree2 and tree2.valid then
tree2.destroy()
BioInd.writeDebug("Removed tree2!")
end
if tree3 and tree3.valid then
tree3.destroy()
BioInd.writeDebug("Removed tree3!")
end
--- Depending on Terrain, choose tree type & Convert seedling into a tree
BioInd.show("key", key)
if key == "fertilizer" then
BioInd.writeDebug("Got Tile")
if tree_name then
BioInd.writeDebug("Found Tree: %s", { tree_name })
local new_tree = { name = tree_name, position = position, force = "neutral" }
can_be_placed = surface.can_place_entity(new_tree)
BioInd.show("can_be_placed", can_be_placed)
BioInd.show("growth_chance", growth_chance)
BioInd.show("fertility", fertility)
BioInd.show("growth_chance <= fertility", growth_chance <= fertility)
if can_be_placed and growth_chance <= fertility then
surface.create_entity(new_tree)
BioInd.writeDebug("Created new tree!")
end
else
BioInd.writeDebug("Tree not Found")
end
else
BioInd.writeDebug("Tile not Found")
end
end
end
local function Grow_tree_last_stage(last_stage_table)
BioInd.check_args(last_stage_table, "table")
BioInd.check_args(last_stage_table.tree_name, "string", "tree_name")
BioInd.check_args(last_stage_table.final_tree, "string", "final_tree")
local surface = BioInd.is_surface(last_stage_table.surface) or
BioInd.arg_err(last_stage_table.surface or "nil", "surface")
local position = BioInd.normalize_position(last_stage_table.position) or
BioInd.arg_err(last_stage_table.position or "nil", "position")
local tree_name = last_stage_table.tree_name
local final_tree = last_stage_table.final_tree
local tree = tree_name and surface.find_entity(tree_name, position)
if tree then
tree.destroy()
-- fertility will be 1 if terrain type not listed above, so very small change to grow.
local f = get_tile_fertility(surface, position)
local fertility, key = f.fertility, f.key
-- Random value. Tree will grow if this value is smaller than the 'Fertility' value
local growth_chance = math.random(100)
--- Convert growing tree to fully grown tree
if (key == "fertilizer" or growth_chance <= fertility) then
-- Grow the new tree
BioInd.writeDebug("Final Tree Name: %s", { final_tree })
surface.create_entity({
name = final_tree,
position = position,
force = "neutral"
})
end
end end
end
end end
local function Grow_tree_stage(stage_table, stage) local function Grow_tree_stage(stage_table, stage)
BioInd.writeDebug("Entered function Grow_tree_stage(%s, %s)", {stage_table, stage}) BioInd.writeDebug("Entered function Grow_tree_stage(%s, %s)", { stage_table, stage })
BioInd.check_args(stage_table, "table") BioInd.check_args(stage_table, "table")
BioInd.check_args(stage, "number") BioInd.check_args(stage, "number")
if stage == 4 then
Grow_tree_last_stage(stage_table)
else
for a, arg in pairs({
{arg = stage_table.tree_name, type = "string", desc = "tree_name"},
{arg = stage_table.final_tree, type = "string", desc = "final_tree"},
{arg = stage_table.time, type = "number", desc = "time"},
}) do
BioInd.check_args(arg.arg, arg.type, arg.desc)
end
local tree_name = stage_table.tree_name
local final_tree = stage_table.final_tree
local time_planted = stage_table.time
local surface = BioInd.is_surface(stage_table.surface) or
BioInd.arg_err(stage_table.surface or "nil", "surface")
local position = BioInd.normalize_position(stage_table.position) or
BioInd.arg_err(stage_table.position or "nil", "position")
local tree = tree_name and surface.find_entity(tree_name, position)
if tree then
tree.destroy()
local next_stage = stage + 1
--- Depending on Terrain, choose tree type & Convert seedling into a tree
local f = get_tile_fertility(surface, position)
local fertility, key = f.fertility, f.key
local next_stage_tree_name = "bio-tree-"..final_tree.."-"..next_stage
if not (prototypes.item[next_stage_tree_name] or
prototypes.entity[next_stage_tree_name]) then
next_stage_tree_name = final_tree
BioInd.writeDebug("Next stage %g: Prototype did not exist", {next_stage})
else
BioInd.writeDebug("Next stage %g: %s", {next_stage, next_stage_tree_name})
end
local can_be_placed = surface.can_place_entity{
name = next_stage_tree_name,
position = position,
force = "neutral"
}
if can_be_placed then
if next_stage_tree_name == final_tree then
BioInd.writeDebug("Tree reached final stage, don't insert")
surface.create_entity({
name = final_tree,
position = position,
force = "neutral"
})
else
-- Trees will grow faster on fertile than on barren tiles!
local s = stage_settings[stage][key]
local grow_time = math.max(1, math.random(s.max) + s.penalty - (s.factor * fertility))
local tree_data = {
tree_name = next_stage_tree_name,
final_tree = final_tree,
position = position,
time = time_planted + grow_time,
surface = surface
}
plant_tree(storage.bi["tree_growing_stage_"..next_stage], tree_data, true)
end
end
if stage == 4 then
Grow_tree_last_stage(stage_table)
else else
BioInd.writeDebug("Did not find that tree I was looking for...") for a, arg in pairs({
{ arg = stage_table.tree_name, type = "string", desc = "tree_name" },
{ arg = stage_table.final_tree, type = "string", desc = "final_tree" },
{ arg = stage_table.time, type = "number", desc = "time" },
}) do
BioInd.check_args(arg.arg, arg.type, arg.desc)
end
local tree_name = stage_table.tree_name
local final_tree = stage_table.final_tree
local time_planted = stage_table.time
local surface = BioInd.is_surface(stage_table.surface) or
BioInd.arg_err(stage_table.surface or "nil", "surface")
local position = BioInd.normalize_position(stage_table.position) or
BioInd.arg_err(stage_table.position or "nil", "position")
local tree = tree_name and surface.find_entity(tree_name, position)
if tree then
tree.destroy()
local next_stage = stage + 1
--- Depending on Terrain, choose tree type & Convert seedling into a tree
local f = get_tile_fertility(surface, position)
local fertility, key = f.fertility, f.key
local next_stage_tree_name = "bio-tree-" .. final_tree .. "-" .. next_stage
if not (prototypes.item[next_stage_tree_name] or
prototypes.entity[next_stage_tree_name]) then
next_stage_tree_name = final_tree
BioInd.writeDebug("Next stage %g: Prototype did not exist", { next_stage })
else
BioInd.writeDebug("Next stage %g: %s", { next_stage, next_stage_tree_name })
end
local can_be_placed = surface.can_place_entity {
name = next_stage_tree_name,
position = position,
force = "neutral"
}
if can_be_placed then
if next_stage_tree_name == final_tree then
BioInd.writeDebug("Tree reached final stage, don't insert")
surface.create_entity({
name = final_tree,
position = position,
force = "neutral"
})
else
-- Trees will grow faster on fertile than on barren tiles!
local s = stage_settings[stage][key]
local grow_time = math.max(1, math.random(s.max) + s.penalty - (s.factor * fertility))
local tree_data = {
tree_name = next_stage_tree_name,
final_tree = final_tree,
position = position,
time = time_planted + grow_time,
surface = surface
}
plant_tree(storage.bi["tree_growing_stage_" .. next_stage], tree_data, true)
end
end
else
BioInd.writeDebug("Did not find that tree I was looking for...")
end
end end
end
end end
---- Growing Tree ---- Growing Tree
--Event.register(-12, function(event) --Event.register(-12, function(event)
Event.register(defines.events.on_tick, function(event) Event.register(defines.events.on_tick, function(event)
if storage.bi.tree_growing_stage_1 == nil then if storage.bi.tree_growing_stage_1 == nil then
for i = 1, 4 do for i = 1, 4 do
storage.bi["tree_growing_stage_"..i] = storage.bi["tree_growing_stage_"..i] or {} storage.bi["tree_growing_stage_" .. i] = storage.bi["tree_growing_stage_" .. i] or {}
end
end end
end
local tick = event.tick local tick = event.tick
if storage.bi.tree_growing[tick] then if storage.bi.tree_growing[tick] then
for t, tree_data in pairs(storage.bi.tree_growing[tick]) do for t, tree_data in pairs(storage.bi.tree_growing[tick]) do
BioInd.writeDebug("Trying to move tree %s to first grow stage!", {t}) BioInd.writeDebug("Trying to move tree %s to first grow stage!", { t })
Grow_tree_first_stage(tree_data, event) Grow_tree_first_stage(tree_data, event)
end
BioInd.writeDebug("Removing storage.bi.tree_growing[%s]!", { tick })
storage.bi.tree_growing[tick] = nil
end end
BioInd.writeDebug("Removing storage.bi.tree_growing[%s]!", {tick})
storage.bi.tree_growing[tick] = nil
end
local stage_table local stage_table
for stage = 1, 4 do for stage = 1, 4 do
stage_table = storage.bi["tree_growing_stage_"..stage] stage_table = storage.bi["tree_growing_stage_" .. stage]
if stage_table[tick] then if stage_table[tick] then
for t, tree_data in pairs(stage_table[tick]) do for t, tree_data in pairs(stage_table[tick]) do
BioInd.writeDebug("Moving tree %s to next grow stage!", {t}) BioInd.writeDebug("Moving tree %s to next grow stage!", { t })
Grow_tree_stage(tree_data, stage) Grow_tree_stage(tree_data, stage)
end end
BioInd.writeDebug("Removing storage.bi.tree_growing_stage_%s[%s]!", BioInd.writeDebug("Removing storage.bi.tree_growing_stage_%s[%s]!",
{stage, tick}) { stage, tick })
stage_table[tick] = nil stage_table[tick] = nil
end
end end
end
end) end)

View file

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

File diff suppressed because it is too large Load diff

View file

@ -10,93 +10,92 @@ if not thxbob then thxbob = {} end
if not thxbob.lib then thxbob.lib = {} end if not thxbob.lib then thxbob.lib = {} end
for var, name in pairs({ for var, name in pairs({
Bio_Cannon = "BI_Bio_Cannon", Bio_Cannon = "BI_Bio_Cannon",
BI_Bio_Fuel = "BI_Bio_Fuel", BI_Bio_Fuel = "BI_Bio_Fuel",
BI_Easy_Bio_Gardens = "BI_Easy_Bio_Gardens", BI_Easy_Bio_Gardens = "BI_Easy_Bio_Gardens",
BI_Bigger_Wooden_Chests = "BI_Bigger_Wooden_Chests", BI_Bigger_Wooden_Chests = "BI_Bigger_Wooden_Chests",
BI_Game_Tweaks_Stack_Size = "BI_Game_Tweaks_Stack_Size", BI_Game_Tweaks_Stack_Size = "BI_Game_Tweaks_Stack_Size",
BI_Game_Tweaks_Recipe = "BI_Game_Tweaks_Recipe", BI_Game_Tweaks_Recipe = "BI_Game_Tweaks_Recipe",
BI_Game_Tweaks_Tree = "BI_Game_Tweaks_Tree", BI_Game_Tweaks_Tree = "BI_Game_Tweaks_Tree",
BI_Game_Tweaks_Small_Tree_Collisionbox = "BI_Game_Tweaks_Small_Tree_Collisionbox", BI_Game_Tweaks_Small_Tree_Collisionbox = "BI_Game_Tweaks_Small_Tree_Collisionbox",
BI_Game_Tweaks_Player = "BI_Game_Tweaks_Player", BI_Game_Tweaks_Player = "BI_Game_Tweaks_Player",
BI_Game_Tweaks_Disassemble = "BI_Game_Tweaks_Disassemble", BI_Game_Tweaks_Disassemble = "BI_Game_Tweaks_Disassemble",
BI_Game_Tweaks_Bot = "BI_Game_Tweaks_Bot", BI_Game_Tweaks_Bot = "BI_Game_Tweaks_Bot",
BI_Solar_Additions = "BI_Solar_Additions" BI_Solar_Additions = "BI_Solar_Additions"
}) do }) do
BI.Settings[var] = BioInd.get_startup_setting(name) BI.Settings[var] = BioInd.get_startup_setting(name)
end end
--- Help Files --- Help Files
require ("libs.item-functions") -- From Bob's Libary require("libs.item-functions") -- From Bob's Libary
require ("libs.recipe-functions") -- From Bob's Libary require("libs.recipe-functions") -- From Bob's Libary
require ("libs.technology-functions") -- From Bob's Libary require("libs.technology-functions") -- From Bob's Libary
require ("libs.functions") -- From Bob's Libary require("libs.functions") -- From Bob's Libary
require ("libs.category-functions") -- From Bob's Libary require("libs.category-functions") -- From Bob's Libary
require ("libs.bi_functions") -- Functions require("libs.bi_functions") -- Functions
require ("prototypes.category") require("prototypes.category")
--- Bio Farm --- Bio Farm
require ("prototypes.Bio_Farm.entities") require("prototypes.Bio_Farm.entities")
require ("prototypes.Bio_Farm.item") require("prototypes.Bio_Farm.item")
require ("prototypes.Bio_Farm.recipe") require("prototypes.Bio_Farm.recipe")
require ("prototypes.Bio_Farm.liquids") require("prototypes.Bio_Farm.liquids")
require ("prototypes.Bio_Farm.recipe-categories") require("prototypes.Bio_Farm.recipe-categories")
require ("prototypes.Bio_Farm.pipeConnectors") require("prototypes.Bio_Farm.pipeConnectors")
require ("prototypes.Bio_Farm.technology") require("prototypes.Bio_Farm.technology")
require ("prototypes.Bio_Farm.tree_entities") require("prototypes.Bio_Farm.tree_entities")
-- Bio Garden -- Bio Garden
require ("prototypes.Bio_Garden.entities") require("prototypes.Bio_Garden.entities")
require ("prototypes.Bio_Garden.item") require("prototypes.Bio_Garden.item")
require ("prototypes.Bio_Garden.recipe") require("prototypes.Bio_Garden.recipe")
require ("prototypes.Bio_Garden.recipe-categories") require("prototypes.Bio_Garden.recipe-categories")
--- Bio Solar Farm --- Bio Solar Farm
require ("prototypes.Bio_Solar_Farm.entities") require("prototypes.Bio_Solar_Farm.entities")
require ("prototypes.Bio_Solar_Farm.item") require("prototypes.Bio_Solar_Farm.item")
require ("prototypes.Bio_Solar_Farm.recipe") require("prototypes.Bio_Solar_Farm.recipe")
--- Wood Products --- Wood Products
require ("prototypes.Wood_Products.entities") require("prototypes.Wood_Products.entities")
require ("prototypes.Wood_Products.item") require("prototypes.Wood_Products.item")
require ("prototypes.Wood_Products.recipe") require("prototypes.Wood_Products.recipe")
require ("prototypes.Wood_Products.containers-entities") require("prototypes.Wood_Products.containers-entities")
require ("prototypes.Wood_Products.containers-item") require("prototypes.Wood_Products.containers-item")
require ("prototypes.Wood_Products.containers-recipe") require("prototypes.Wood_Products.containers-recipe")
if not mods["Natural_Evolution_Buildings"] then if not mods["Natural_Evolution_Buildings"] then
--- Dart Turret (Bio turret) --- Dart Turret (Bio turret)
require ("prototypes.Bio_Turret.item-group") require("prototypes.Bio_Turret.item-group")
require ("prototypes.Bio_Turret.damage-type") require("prototypes.Bio_Turret.damage-type")
require ("prototypes.Bio_Turret.item") require("prototypes.Bio_Turret.item")
require ("prototypes.Bio_Turret.recipe") require("prototypes.Bio_Turret.recipe")
require ("prototypes.Bio_Turret.entity") require("prototypes.Bio_Turret.entity")
--- Bio Cannon --- Bio Cannon
-- Items Groups -- Items Groups
require ("prototypes.Bio_Cannon.item-group") require("prototypes.Bio_Cannon.item-group")
-- Cannon -- Cannon
require ("prototypes.Bio_Cannon.item") require("prototypes.Bio_Cannon.item")
require ("prototypes.Bio_Cannon.recipe") require("prototypes.Bio_Cannon.recipe")
require ("prototypes.Bio_Cannon.entity") require("prototypes.Bio_Cannon.entity")
require ("prototypes.Bio_Cannon.technology") require("prototypes.Bio_Cannon.technology")
-- Projectiles
require ("prototypes.Bio_Cannon.projectiles-item")
require ("prototypes.Bio_Cannon.projectiles-recipe")
require ("prototypes.Bio_Cannon.projectiles-entity")
-- Projectiles
require("prototypes.Bio_Cannon.projectiles-item")
require("prototypes.Bio_Cannon.projectiles-recipe")
require("prototypes.Bio_Cannon.projectiles-entity")
end end
---- Add Bio Fuel & Plastic, etc. ---- Add Bio Fuel & Plastic, etc.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -1,9 +0,0 @@
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

@ -8,13 +8,13 @@
"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.", "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": [ "dependencies": [
"base >= 2.0.55", "base >= 2.0.55",
"? space-age",
"kry_stdlib >= 2.0.6", "kry_stdlib >= 2.0.6",
"? alien-biomes", "? alien-biomes",
"? Krastorio2", "? Krastorio2",
"(?) angelspetrochem", "(?) angelspetrochem",
"(?) Transport_Drones", "(?) Transport_Drones",
"(?) Natural_Evolution_Buildings", "(?) Natural_Evolution_Buildings",
"(?) Natural_Evolution_Enemies", "(?) Natural_Evolution_Enemies"
"!space-age"
] ]
} }

Binary file not shown.

View file

@ -1,102 +0,0 @@
[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

@ -1,569 +0,0 @@
[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

@ -1,107 +0,0 @@
[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

@ -1,508 +0,0 @@
[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,5 +1,5 @@
local setting_list = {} local setting_list = {}
-- Add/enable stuff -- Add/enable stuff
setting_list.BI_Solar_Additions = { setting_list.BI_Solar_Additions = {
type = "bool-setting", type = "bool-setting",
name = "BI_Solar_Additions", name = "BI_Solar_Additions",
@ -48,7 +48,7 @@ setting_list.BI_Bigger_Wooden_Chests = {
order = "a[modifier]-b[Bigger_Wooden_Chests]", order = "a[modifier]-b[Bigger_Wooden_Chests]",
} }
-- Game tweaks -- Game tweaks
setting_list.BI_Game_Tweaks_Emissions_Multiplier = { setting_list.BI_Game_Tweaks_Emissions_Multiplier = {
type = "bool-setting", type = "bool-setting",
name = "BI_Game_Tweaks_Emissions_Multiplier", name = "BI_Game_Tweaks_Emissions_Multiplier",
@ -71,7 +71,7 @@ setting_list.BI_Game_Tweaks_Recipe = {
default_value = true, default_value = true,
order = "b[tweaks]-c1[Recipe]", order = "b[tweaks]-c1[Recipe]",
} }
setting_list.BI_Game_Tweaks_Production_Science = { setting_list.BI_Game_Tweaks_Production_Science = {
type = "bool-setting", type = "bool-setting",
name = "BI_Game_Tweaks_Production_Science", name = "BI_Game_Tweaks_Production_Science",
setting_type = "startup", setting_type = "startup",
@ -109,32 +109,32 @@ setting_list.BI_Game_Tweaks_Bot = {
-- Compatibility with other mods (optional) -- Compatibility with other mods (optional)
-- Industrial Revolution + AAI Industry -- Industrial Revolution + AAI Industry
if not (mods["IndustrialRevolution"] or mods["aai-industry"]) then if not (mods["IndustrialRevolution"] or mods["aai-industry"]) then
setting_list.BI_Game_Tweaks_Disassemble = { setting_list.BI_Game_Tweaks_Disassemble = {
type = "bool-setting", type = "bool-setting",
name = "BI_Game_Tweaks_Disassemble", name = "BI_Game_Tweaks_Disassemble",
setting_type = "startup", setting_type = "startup",
default_value = true, default_value = true,
order = "b[tweaks]-c2[Disassemble]", order = "b[tweaks]-c2[Disassemble]",
} }
end end
-- Lua API global Variable Viewer (gvv) -- Lua API global Variable Viewer (gvv)
if mods["gvv"] then if mods["gvv"] then
setting_list.BI_Enable_gvv_support = { setting_list.BI_Enable_gvv_support = {
type = "bool-setting", type = "bool-setting",
name = "BI_Enable_gvv_support", name = "BI_Enable_gvv_support",
setting_type = "startup", setting_type = "startup",
default_value = false, default_value = false,
order = "c[compatibility]-c1[debugging_gvv]", order = "c[compatibility]-c1[debugging_gvv]",
} }
end end
local list = {} local list = {}
for name, setting in pairs(setting_list) do for name, setting in pairs(setting_list) do
data:extend({setting}) data:extend({ setting })
end end
--[[ --[[
Types of settings: Types of settings:

View file

@ -9,222 +9,222 @@ local settings_changed = {}
-- Adjust the force of hidden poles on Musk floor! -- Adjust the force of hidden poles on Musk floor!
settings_changed.musk_floor = function() settings_changed.musk_floor = function()
log("Entered function settings_changed.musk_floor!") log("Entered function settings_changed.musk_floor!")
-- Look for solar panels on every surface. They determine the force poles will use -- Look for solar panels on every surface. They determine the force poles will use
-- if the electric grid overlay will be shown in mapview. -- if the electric grid overlay will be shown in mapview.
local sm_panel_name = "bi-musk-mat-hidden-panel" local sm_panel_name = "bi-musk-mat-hidden-panel"
local sm_pole_name = "bi-musk-mat-hidden-pole" 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. -- 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 -- 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 -- 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 -- 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 -- 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. -- 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!) -- (Only fix in this case: Players must remove and rebuild all existing musk floor tiles!)
local force = nil local force = nil
-- Always use dummy force if option is set -- Always use dummy force if option is set
if BioInd.UseMuskForce then if BioInd.UseMuskForce then
force = BioInd.MuskForceName force = BioInd.MuskForceName
-- Singleplayer mode: use force of first player -- Singleplayer mode: use force of first player
elseif not game.is_multiplayer() then elseif not game.is_multiplayer() then
-- Apparently, this crashed for someone (https://mods.factorio.com/mod/Bio_Industries_2/discussion/649d41b778d997d29385b8cf). -- 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 -- 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 -- 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! -- the first hit, so we make sure we'll get the single player whatever its index!
for p, player in pairs(game.players) do for p, player in pairs(game.players) do
force = player.force.name force = player.force.name
break 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
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"
-- Set force of the pole -- Multiplayer game
sm_pole[1].force = force or panel.force 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 end
end
BioInd.writeDebug("Electric grid overlay of musk floor will be %s in map view.", for name, surface in pairs(game.surfaces) do
{BioInd.UseMuskForce and "hidden" or "displayed"}) 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 end
settings_changed.bio_garden = function() settings_changed.bio_garden = function()
BioInd.writeDebug("Entered function settings_changed.bio_garden!") BioInd.writeDebug("Entered function settings_changed.bio_garden!")
-- Has this setting been changed since the last time the game was run? -- Has this setting been changed since the last time the game was run?
local current = BioInd.get_startup_setting("BI_Easy_Bio_Gardens") 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("Last state of BI_Easy_Bio_Gardens", storage.mod_settings.BI_Easy_Bio_Gardens)
BioInd.show("Current state of BI_Easy_Bio_Gardens", current) BioInd.show("Current state of BI_Easy_Bio_Gardens", current)
if storage.mod_settings.BI_Easy_Bio_Gardens ~= current then if storage.mod_settings.BI_Easy_Bio_Gardens ~= current then
BioInd.writeDebug("Setting has been changed!") BioInd.writeDebug("Setting has been changed!")
local pole, neighbours local pole, neighbours
-- This is the unmodified table! -- This is the unmodified table!
local compound_entity = BioInd.compound_entities["bi-bio-garden"] local compound_entity = BioInd.compound_entities["bi-bio-garden"]
local hidden_entities = compound_entity.hidden local hidden_entities = compound_entity.hidden
-- Check that all gardens are still valid -- Check that all gardens are still valid
for g, garden in pairs(storage[compound_entity.tab]) do for g, garden in pairs(storage[compound_entity.tab]) do
-- Base entity doesn't exist -- remove hidden entities!'' -- Base entity doesn't exist -- remove hidden entities!''
if not (garden.base and garden.base.valid) then if not (garden.base and garden.base.valid) then
-- Remove all hidden entities! -- Remove all hidden entities!
for hidden, h_name in pairs(compound_entity.hidden or {}) do for hidden, h_name in pairs(compound_entity.hidden or {}) do
BioInd.show("hidden", hidden) BioInd.show("hidden", hidden)
BioInd.writeDebug("Removing hidden entity %s %s", { 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].name or "nil",
garden[hidden] and garden[hidden].valid and garden[hidden].unit_number or "nil"}) garden[hidden] and garden[hidden].valid and garden[hidden].unit_number or "nil" })
BioInd.remove_entity(garden[hidden]) BioInd.remove_entity(garden[hidden])
garden[hidden] = nil garden[hidden] = nil
end
storage[compound_entity.tab][garden.entity.unit_number] = nil
end
end end
storage[compound_entity.tab][garden.entity.unit_number] = nil
end
end
-- For whatever reason, there may be hidden poles that aren't associated -- 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 -- with any garden. We want to remove these, so lets' compile a list of all
-- hidden poles first. -- hidden poles first.
local remove_poles = {} local remove_poles = {}
local found_poles local found_poles
local pole_type = "electric-pole" local pole_type = "electric-pole"
for s, surface in pairs(game.surfaces) do for s, surface in pairs(game.surfaces) do
-- Find poles on surface -- Find poles on surface
found_poles = surface.find_entities_filtered{ found_poles = surface.find_entities_filtered {
name = compound_entity.hidden[pole_type].name, name = compound_entity.hidden[pole_type].name,
type = "electric-pole", type = "electric-pole",
} }
-- Add them to list of removeable poles, indexed by unit_number -- Add them to list of removeable poles, indexed by unit_number
for p, pole in ipairs(found_poles) do for p, pole in ipairs(found_poles) do
remove_poles[pole.unit_number] = pole remove_poles[pole.unit_number] = pole
end 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
end
-- Setting is off -- disconnect and remove hidden poles! -- 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 else
BioInd.writeDebug("%s Bio Gardens found -- try to disconnect hidden poles!", BioInd.writeDebug("Nothing to do!")
{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 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 end
return settings_changed return settings_changed