Reformat code
This commit is contained in:
parent
7134f437e5
commit
bac183d1c1
9 changed files with 2438 additions and 2435 deletions
|
@ -244,14 +244,12 @@ BioInd.show("Need to check these tables in global", compound_entity_tables)
|
|||
if BioInd.UseMuskForce and not game.forces[BioInd.MuskForceName] then
|
||||
Create_dummy_force()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
local function On_Load()
|
||||
log("Entered On_Load!")
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
@ -390,7 +388,8 @@ local function On_Built(event)
|
|||
-- remove anything from it for real.
|
||||
local hidden_entities = util.table.deepcopy(base_entry.hidden)
|
||||
|
||||
BioInd.writeDebug("%s (%s) is a compound entity. Need to create %s", {base.name, base.unit_number, hidden_entities})
|
||||
BioInd.writeDebug("%s (%s) is a compound entity. Need to create %s",
|
||||
{ base.name, base.unit_number, hidden_entities })
|
||||
BioInd.show("hidden_entities", hidden_entities)
|
||||
local new_base
|
||||
local new_base_name = base_entry.new_base_name
|
||||
|
@ -520,7 +519,8 @@ BioInd.show("entity.unit_number", entity.unit_number)
|
|||
BioInd.show("compound_entity", compound_entity)
|
||||
BioInd.show("base_entry", base_entry)
|
||||
BioInd.show("compound_entity.tab", compound_entity and compound_entity.tab or "nil")
|
||||
BioInd.writeDebug("storage[%s]: %s", {compound_entity and compound_entity.tab or "nil", compound_entity and storage[compound_entity.tab] or "nil"})
|
||||
BioInd.writeDebug("storage[%s]: %s",
|
||||
{ compound_entity and compound_entity.tab or "nil", compound_entity and storage[compound_entity.tab] or "nil" })
|
||||
|
||||
-- Found a compound entity from our list!
|
||||
if base_entry then
|
||||
|
@ -633,7 +633,6 @@ BioInd.writeDebug("Entered function %s(%s)", {f_name, event})
|
|||
entity.name == storage.compound_entities["bi-arboretum"].hidden.radar.name or
|
||||
entity.name == "bi-power-to-rail-pole" or
|
||||
entity.name == "seedling" then
|
||||
|
||||
BioInd.writeDebug("Divert to On_Pre_Remove!")
|
||||
On_Pre_Remove(event)
|
||||
else
|
||||
|
@ -706,7 +705,6 @@ BioInd.writeDebug("Removing Musk floor tile from tables!")
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -787,7 +785,6 @@ BioInd.show("Got force from tile data", t.force or "false")
|
|||
-- Fertilizer/Advanced fertilizer has been used. Check if the tile was valid
|
||||
-- (no Musk floor, no wooden floor, no concrete etc.)
|
||||
elseif item and (item.name == "fertilizer" or item.name == "bi-adv-fertilizer") then
|
||||
|
||||
local restore_tiles = {}
|
||||
local products, remove_this
|
||||
|
||||
|
@ -852,7 +849,6 @@ BioInd.show("restore_tiles", restore_tiles)
|
|||
BioInd.writeDebug("%s has been built -- nothing to do!", { tile.name })
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
BioInd.writeDebug("Entered control_arboretum.lua")
|
||||
|
||||
---Arboretum Stuff
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
-- All tree Growing stuff
|
||||
local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(true)
|
||||
|
||||
|
@ -322,7 +321,6 @@ function seed_planted_arboretum(event, entity)
|
|||
plant_seed(event, 2000, 6000, false)
|
||||
end
|
||||
|
||||
|
||||
function summ_weight(tabl)
|
||||
local summ = 0
|
||||
for i, tree_weights in pairs(tabl or {}) do
|
||||
|
@ -524,7 +522,6 @@ local function Grow_tree_last_stage(last_stage_table)
|
|||
|
||||
--- 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({
|
||||
|
@ -590,7 +587,6 @@ BioInd.writeDebug("Entered function Grow_tree_stage(%s, %s)", {stage_table, stag
|
|||
}
|
||||
|
||||
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({
|
||||
|
@ -613,7 +609,6 @@ BioInd.writeDebug("Entered function Grow_tree_stage(%s, %s)", {stage_table, stag
|
|||
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
|
||||
|
|
|
@ -20,7 +20,6 @@ BI.Settings.BI_Game_Tweaks_Emissions_Multiplier = settings.startup["BI_Game_Twea
|
|||
|
||||
---- Game Tweaks ---- Tree
|
||||
if BI.Settings.BI_Game_Tweaks_Tree then
|
||||
|
||||
local new_results = {
|
||||
{
|
||||
type = "item",
|
||||
|
@ -32,8 +31,11 @@ if BI.Settings.BI_Game_Tweaks_Tree then
|
|||
|
||||
for tree_name, tree in pairs(data.raw["tree"] or {}) do
|
||||
if tree.minable and not ignore_trees[tree_name] then
|
||||
BioInd.writeDebug("Tree name: %s\tminable.result: %s\tminable.count: %s", {tree.name, (tree.minable and tree.minable.result or "nil"), (tree.minable and tree.minable.count or "nil")}, "line")
|
||||
BioInd.writeDebug("Tree name: %s\tminable.results: %s", {tree.name, (tree.minable and tree.minable.results or "nil")}, "line")
|
||||
BioInd.writeDebug("Tree name: %s\tminable.result: %s\tminable.count: %s",
|
||||
{ tree.name, (tree.minable and tree.minable.result or "nil"), (tree.minable and tree.minable.count or "nil") },
|
||||
"line")
|
||||
BioInd.writeDebug("Tree name: %s\tminable.results: %s",
|
||||
{ tree.name, (tree.minable and tree.minable.results or "nil") }, "line")
|
||||
--CHECK FOR SINGLE RESULTS
|
||||
-- mining.result may be set although mining.results exists (mining.result
|
||||
-- will be ignored in that case; happens, for example with IR2's rubber
|
||||
|
@ -138,7 +140,6 @@ BioInd.show("Checking character", char_name)
|
|||
ignore = false
|
||||
BioInd.show("Found whitelisted character name", char_name)
|
||||
for b, b_pattern in ipairs(blacklist) do
|
||||
|
||||
if char_name == b_pattern or char_name:match(b_pattern) then
|
||||
BioInd.writeDebug("%s is on the ignore list!", char_name)
|
||||
-- Mark character as found
|
||||
|
@ -201,7 +202,8 @@ if BI.Settings.BI_Game_Tweaks_Bot then
|
|||
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})
|
||||
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
|
||||
|
@ -325,8 +327,10 @@ if mods["Krastorio2"] then
|
|||
if recipe.mod == "Bio_Industries_2" then
|
||||
krastorio.recipes.multiplyIngredients(recipe.name, update, 4)
|
||||
krastorio.recipes.multiplyProducts(recipe.name, update, 4)
|
||||
BioInd.writeDebug("Changed ingredients for %s: %s", {recipe and recipe.name or "nil", recipe and recipe.ingredients or "nil"})
|
||||
BioInd.writeDebug("Changed results for %s: %s", {recipe and recipe.name or "nil", recipe and recipe.results or "nil"})
|
||||
BioInd.writeDebug("Changed ingredients for %s: %s",
|
||||
{ recipe and recipe.name or "nil", recipe and recipe.ingredients or "nil" })
|
||||
BioInd.writeDebug("Changed results for %s: %s",
|
||||
{ recipe and recipe.name or "nil", recipe and recipe.results or "nil" })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -404,7 +408,6 @@ if mods["space-exploration"] then
|
|||
end
|
||||
|
||||
if not mods["Natural_Evolution_Buildings"] then
|
||||
|
||||
local ammo_tweaks = {
|
||||
["bi-dart-magazine-basic"] = 400,
|
||||
["bi-dart-magazine-standard"] = 400,
|
||||
|
@ -422,7 +425,8 @@ end
|
|||
|
||||
if BI.Settings.Bio_Cannon then
|
||||
local default_target_masks = data.raw["utility-constants"].default.default_trigger_target_mask_by_type
|
||||
default_target_masks["unit-spawner"] = default_target_masks["unit-spawner"] or {"common"} -- everything should have "common", unless there is specific reason not to
|
||||
default_target_masks["unit-spawner"] = default_target_masks["unit-spawner"] or
|
||||
{ "common" } -- everything should have "common", unless there is specific reason not to
|
||||
table.insert(default_target_masks["unit-spawner"], "Bio_Cannon_Ammo")
|
||||
|
||||
for w, worm in pairs(data.raw.turret) do
|
||||
|
|
|
@ -156,7 +156,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-wooden-pole-huge", {
|
||||
type = "item",
|
||||
name = "tinned-copper-cable",
|
||||
amount = 15}
|
||||
amount = 15
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -166,7 +167,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-bio-solar-farm", {
|
||||
type = "item",
|
||||
name = "solar-panel-large",
|
||||
amount = 30}
|
||||
amount = 30
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -176,7 +178,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-large-substation", {
|
||||
type = "item",
|
||||
name = "substation-3",
|
||||
amount = 6}
|
||||
amount = 6
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -185,7 +188,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-large-substation", {
|
||||
type = "item",
|
||||
name = "electrum-alloy",
|
||||
amount = 10}
|
||||
amount = 10
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -195,7 +199,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-bio-accumulator", {
|
||||
type = "item",
|
||||
name = "large-accumulator",
|
||||
amount = 30}
|
||||
amount = 30
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -204,7 +209,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-bio-accumulator", {
|
||||
type = "item",
|
||||
name = "aluminium-plate",
|
||||
amount = 50}
|
||||
amount = 50
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -214,7 +220,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-solar-mat", {
|
||||
type = "item",
|
||||
name = "aluminium-plate",
|
||||
amount = 1}
|
||||
amount = 1
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -223,7 +230,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-solar-mat", {
|
||||
type = "item",
|
||||
name = "silicon-wafer",
|
||||
amount = 4}
|
||||
amount = 4
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -233,7 +241,8 @@ if BI.Settings.BI_Solar_Additions then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-solar-boiler-hidden-panel", {
|
||||
type = "item",
|
||||
name = "angels-electric-boiler",
|
||||
amount = 1}
|
||||
amount = 1
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
@ -294,7 +303,8 @@ if data.raw.item["alien-artifact"] then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-adv-fertilizer-1", {
|
||||
type = "item",
|
||||
name = "alien-artifact",
|
||||
amount = 5}
|
||||
amount = 5
|
||||
}
|
||||
)
|
||||
thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-adv-fertilizer-1")
|
||||
end
|
||||
|
@ -307,7 +317,8 @@ if mods["Natural_Evolution_Buildings"] then
|
|||
thxbob.lib.recipe.add_new_ingredient("bi-adv-fertilizer-1", {
|
||||
type = "fluid",
|
||||
name = "NE_enhanced-nutrient-solution",
|
||||
amount = 50}
|
||||
amount = 50
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -540,7 +551,6 @@ if BI.Settings.BI_Game_Tweaks_Disassemble then
|
|||
}) do
|
||||
thxbob.lib.tech.add_recipe_unlock(tech, recipe)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- Enable Productivity in Recipes
|
||||
|
|
|
@ -96,7 +96,6 @@ if not mods["Natural_Evolution_Buildings"] then
|
|||
require("prototypes.Bio_Cannon.projectiles-item")
|
||||
require("prototypes.Bio_Cannon.projectiles-recipe")
|
||||
require("prototypes.Bio_Cannon.projectiles-entity")
|
||||
|
||||
end
|
||||
|
||||
---- Add Bio Fuel & Plastic, etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue