diff --git a/Bio_Industries_2/changelog.txt b/Bio_Industries_2/changelog.txt index 95b2e10..454cfb6 100644 --- a/Bio_Industries_2/changelog.txt +++ b/Bio_Industries_2/changelog.txt @@ -1,4 +1,84 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.26 +Date: 21.10.2025 + Changes: + - Add Brazilian translations (thanks Slondo) +--------------------------------------------------------------------------------------------------- +Version: 2.0.25 +Date: 18.10.2025 + Bug Fixes: + - More mod compatibility fixes +--------------------------------------------------------------------------------------------------- +Version: 2.0.24 +Date: 18.10.2025 + Bug Fixes: + - Krastorio2: Compatibility fixes +--------------------------------------------------------------------------------------------------- +Version: 2.0.23 +Date: 17.10.2025 + Bug Fixes: + - Fixed crash when placing bio gardens + - Match bio garden pollution reduction by the amount of trees equivalent the description states + - Correct typo in internal recipe name to fix the localisation +--------------------------------------------------------------------------------------------------- +Version: 2.0.22 +Date: 16.10.2025 + Bug Fixes: + - Krastorio2: Compatibility fixes +--------------------------------------------------------------------------------------------------- +Version: 2.0.21 +Date: 11.10.2025 + Bug Fixes: + - Krastorio2: Compatibility fixes +--------------------------------------------------------------------------------------------------- +Version: 2.0.20 +Date: 12.09.2025 + Changes: + - Code Clean up + - More Updates to Bob's Compatibility + - Added a few milestones +--------------------------------------------------------------------------------------------------- +Version: 2.0.19 +Date: 11.09.2025 + Bug Fixes: + - Fix Bio Reactor graphic shift when selecting a recipe with 3 fluid inputs. +--------------------------------------------------------------------------------------------------- +Version: 2.0.18 +Date: 10.09.2025 + Bug Fixes: + - Fix crash with Krastorio 2 (Spaced Out) +--------------------------------------------------------------------------------------------------- +Version: 2.0.17 +Date: 10.09.2025 + Changes: + - More Updates to Bob's Compatibility +--------------------------------------------------------------------------------------------------- +Version: 2.0.16 +Date: 09.09.2025 + Bug Fixes: + - Fixed missing fertilizer icon, attempt 2 +--------------------------------------------------------------------------------------------------- +Version: 2.0.15 +Date: 09.09.2025 + Bug Fixes: + - Fixed missing icon "Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_recipe_64.png not found" +--------------------------------------------------------------------------------------------------- +Version: 2.0.14 +Date: 09.09.2025 + Bug Fixes: + - Fixed missing 'liquid-air' in not playing with Bob's +--------------------------------------------------------------------------------------------------- +Version: 2.0.13 +Date: 09.09.2025 + Changes: + - Updated Rail to remove Decorative when placed + - Updated Bob's Compatibility +--------------------------------------------------------------------------------------------------- +Version: 2.0.12 +Date: 05.09.2025 + Changes: + - Updated Wood Rail Graphic. No more ugly Tint. (Thanks Snouz!) +--------------------------------------------------------------------------------------------------- Version: 2.0.11 Date: 04.09.2025 Bug Fixes: diff --git a/Bio_Industries_2/common.lua b/Bio_Industries_2/common.lua index 1bd793e..dbd8620 100644 --- a/Bio_Industries_2/common.lua +++ b/Bio_Industries_2/common.lua @@ -692,12 +692,16 @@ return function(mod_name) compound_entity.hidden.pole and compound_entity.hidden.pole.name then local wire_reach = prototypes.entity[compound_entity.hidden.pole.name] and - prototypes.entity[compound_entity.hidden.pole.name].max_wire_distance + prototypes.entity[compound_entity.hidden.pole.name].get_max_wire_distance() if not wire_reach then error("Prototype for hidden pole of Bio gardens doesn't exist!") end - pole.disconnect_neighbour() + local wire_connector + for _, connector in pairs(pole.get_wire_connectors()) do + wire_connector = connector + connector.disconnect_all() + end -- Each pole can only have 5 connections. Let's connect to other hidden -- poles first! @@ -712,7 +716,7 @@ return function(mod_name) for n, neighbour in pairs(neighbours or {}) do if pole ~= neighbour then - connected = pole.connect_neighbour(neighbour) + connected = wire_connector.connect_to(neighbour) common.writeDebug("Connected pole %g to %s %g: %s", { pole.unit_number, neighbour.name, neighbour.unit_number, connected }) end @@ -728,7 +732,7 @@ return function(mod_name) }) common.writeDebug("Pole %g has %s neighbours", { pole.unit_number, #neighbours }) for n, neighbour in pairs(neighbours or {}) do - connected = pole.connect_neighbour(neighbour) + connected = wire_connector.connect_to(neighbour) common.writeDebug("Connected pole %g to neighbour %s (%g): %s", { pole.unit_number, neighbour.name, neighbour.unit_number, connected }) end diff --git a/Bio_Industries_2/control.lua b/Bio_Industries_2/control.lua index fb3669f..c9237e1 100644 --- a/Bio_Industries_2/control.lua +++ b/Bio_Industries_2/control.lua @@ -18,12 +18,9 @@ require("util") require("libs/util_ext") require("control_tree") require("control_arboretum") +require("remote") -- milestones ----************** Used for Testing ----- ---require ("Test_Spawn") ----************* - local function Create_dummy_force() -- Create dummy force for musk floor if electric grid overlay should NOT be shown in map view diff --git a/Bio_Industries_2/data-final-fixes.lua b/Bio_Industries_2/data-final-fixes.lua index 5b488e0..8c658d3 100644 --- a/Bio_Industries_2/data-final-fixes.lua +++ b/Bio_Industries_2/data-final-fixes.lua @@ -265,9 +265,11 @@ if BI.Settings.BI_Game_Tweaks_Emissions_Multiplier then ["solid-fuel"] = 1.00, ["solid-carbon"] = 1.05, ["carbon"] = 1.05, - ["wood-bricks"] = 1.20, + ["bob-carbon"] = 1.05, + ["wood-bricks"] = 1.10, ["rocket-fuel"] = 1.20, ["bi-seed"] = 1.30, + ["tree-seed"] = 1.30, ["seedling"] = 1.30, ["bi-wooden-pole-big"] = 1.30, ["bi-wooden-pole-huge"] = 1.30, @@ -316,13 +318,21 @@ if mods["Krastorio2"] or mods["Krastorio2-spaced-out"] then -- require more wood/wood pulp. local update = { "wood", "bi-woodpulp", - "bi-seed", "seedling", "water", + "bi-seed", "tree-seed","seedling", "water" } local multiply = function(items) for _, item in pairs(items) do for _, updateItem in pairs(update) do if item.name == updateItem then - item.amount = item.amount * 4 + if item.amount then + item.amount = item.amount * 4 + end + if item.amount_min then + item.amount_min = item.amount_min * 4 + end + if item.amount_max then + item.amount_max = item.amount_max * 4 + end end end end @@ -357,11 +367,11 @@ if not fertilizer.place_as_tile then condition_size = 1, condition = { layers = { water_tile = true } } } - fertilizer.icon = ICONPATH .. "fertilizer_64.png" + fertilizer.icon = ICONPATH .. "fertilizer.png" fertilizer.icon_size = 64 fertilizer.icons = { { - icon = ICONPATH .. "fertilizer_64.png", + icon = ICONPATH .. "fertilizer.png", icon_size = 64, } } @@ -393,6 +403,7 @@ if mods["space-exploration"] then local tweaks = { ["bi-solar-mat"] = 400, ["bi-seed"] = 800, + ["tree-seed"] = 800, ["seedling"] = 400, ["bi-woodpulp"] = 800, ["bi-ash"] = 400, diff --git a/Bio_Industries_2/data-updates.lua b/Bio_Industries_2/data-updates.lua index f3129be..99dd0a5 100644 --- a/Bio_Industries_2/data-updates.lua +++ b/Bio_Industries_2/data-updates.lua @@ -1,5 +1,6 @@ local BioInd = require('common')('Bio_Industries_2') + for var, name in pairs({ Bio_Cannon = "BI_Bio_Cannon", BI_Bio_Fuel = "BI_Bio_Fuel", @@ -18,8 +19,10 @@ end BioInd.show("BI.Settings.BI_Easy_Bio_Gardens", BI.Settings.BI_Easy_Bio_Gardens) local ICONPATH = "__Bio_Industries_2__/graphics/icons/" +local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ICONPATH_PY = "__Bio_Industries_2__/graphics/icons/mod_py/" +local ICONPATH_BA = BioInd.modRoot .. "/graphics/icons/mod_bobangels/" ----Update the Wood Pipe Images require("prototypes.Wood_Products.pipes") @@ -134,8 +137,8 @@ end --- Adds Solar Farm, Solar Plant, Musk Floor, Bio Accumulator and Substation to Tech tree if BI.Settings.BI_Solar_Additions then if data.raw.technology["bob-solar-energy-2"] then - thxbob.lib.tech.add_recipe_unlock("bob-electric-energy-accumulators-3", "bi-bio-accumulator") - thxbob.lib.tech.add_recipe_unlock("electric-energy-distribution-2", "bi-large-substation") + thxbob.lib.tech.add_recipe_unlock("bob-electric-energy-accumulators-2", "bi-bio-accumulator") + thxbob.lib.tech.add_recipe_unlock("electric-energy-distribution-2", "bi-large-substation") thxbob.lib.tech.add_recipe_unlock("bob-solar-energy-2", "bi-bio-solar-farm") thxbob.lib.tech.add_recipe_unlock("bob-solar-energy-2", "bi-solar-boiler-hidden-panel") else @@ -153,33 +156,40 @@ if BI.Settings.BI_Solar_Additions then --- Electric redo if Bob' Electric -- Huge Electric Pole - if data.raw.item["tinned-copper-cable"] then + if data.raw.item["bob-tinned-copper-cable"] then thxbob.lib.recipe.remove_ingredient("bi-wooden-pole-huge", "wood") thxbob.lib.recipe.add_new_ingredient("bi-wooden-pole-huge", { type = "item", - name = "tinned-copper-cable", + name = "bob-tinned-copper-cable", amount = 15 } ) end -- Solar Farm - if data.raw.item["solar-panel-large"] then + if data.raw.item["bob-solar-panel-2"] then thxbob.lib.recipe.remove_ingredient("bi-bio-solar-farm", "solar-panel") thxbob.lib.recipe.add_new_ingredient("bi-bio-solar-farm", { type = "item", - name = "solar-panel-large", + name = "bob-solar-panel-2", amount = 30 } ) end -- Huge Sub Station - if data.raw.item["substation-3"] then + if data.raw.item["bob-substation-3"] then thxbob.lib.recipe.remove_ingredient("bi-large-substation", "substation") thxbob.lib.recipe.add_new_ingredient("bi-large-substation", { type = "item", - name = "substation-3", + name = "bob-substation-3", + amount = 6 + } + ) + thxbob.lib.recipe.remove_ingredient("bi-large-substation", "steel-plate") + thxbob.lib.recipe.add_new_ingredient("bi-large-substation", { + type = "item", + name = "bi-wooden-pole-huge", amount = 6 } ) @@ -206,32 +216,32 @@ if BI.Settings.BI_Solar_Additions then ) end - if data.raw.item["aluminium-plate"] then + if data.raw.item["bob-aluminium-plate"] then thxbob.lib.recipe.remove_ingredient("bi-bio-accumulator", "copper-cable") thxbob.lib.recipe.add_new_ingredient("bi-bio-accumulator", { type = "item", - name = "aluminium-plate", + name = "bob-aluminium-plate", amount = 50 } ) end -- Solar Mat - if data.raw.item["aluminium-plate"] then + if data.raw.item["bob-aluminium-plate"] then thxbob.lib.recipe.remove_ingredient("bi-solar-mat", "steel-plate") thxbob.lib.recipe.add_new_ingredient("bi-solar-mat", { type = "item", - name = "aluminium-plate", + name = "bob-aluminium-plate", amount = 1 } ) end - if data.raw.item["silicon-wafer"] then + if data.raw.item["bob-silicon-wafer"] then thxbob.lib.recipe.remove_ingredient("bi-solar-mat", "copper-cable") thxbob.lib.recipe.add_new_ingredient("bi-solar-mat", { type = "item", - name = "silicon-wafer", + name = "bob-silicon-wafer", amount = 4 } ) @@ -252,6 +262,7 @@ end require("prototypes.Bio_Farm.compatible_recipes") -- Bob and Angels mesh require("prototypes.Bio_Farm.technology2") + -- Replace fertilizer/advanced fertilizer + water with fluid fertilizers in Bio garden recipes! BioInd.show("data-updates.lua -- BI.Settings.BI_Easy_Bio_Gardens", BI.Settings.BI_Easy_Bio_Gardens) if BI.Settings.BI_Easy_Bio_Gardens then @@ -325,22 +336,6 @@ if mods["Natural_Evolution_Buildings"] then end ------------- Support for Bob's Greenhouse -if data.raw["item"]["bob-greenhouse"] then - data.raw["item"]["seedling"].place_result = "seedling" - data.raw["item"]["seedling"].icon = ICONPATH .. "Seedling.png" - data.raw["item"]["seedling"].icon_size = 64 - data.raw["item"]["fertilizer"].icon = ICONPATH .. "fertilizer.png" - data.raw["item"]["fertilizer"].icon_size = 64 - - data.raw["item"]["fertilizer"].place_as_tile = { - result = BioInd.AB_tiles() and "vegetation-green-grass-3" or "grass-3", - condition_size = 1, - condition = { layers = { water_tile = true } } - } -end - - if settings.startup["angels-use-angels-barreling"] and settings.startup["angels-use-angels-barreling"].value then data.raw.technology["bi-tech-fertilizer"].prerequisites = { "bi-tech-bio-farming", @@ -431,12 +426,10 @@ end -- We may need liquid air and nitrogen -- but not if any of the following mods is active! - -local ICONPATH = BioInd.modRoot .. "/graphics/icons/" - -- We only want to create nitrogen if it doesn't exist yet. We then also need to create -- liquid air. -if not data.raw.fluid["nitrogen"] then + +if not data.raw.fluid["nitrogen"] and not data.raw.fluid["kr-nitrogen"] then data:extend({ { type = "fluid", @@ -495,20 +488,23 @@ if not data.raw.fluid["nitrogen"] then -- Recipes for "bi-liquid-air" and "bi-nitrogen" aren't needed! else + local oxygen = data.raw.fluid["kr-oxygen"] and "kr-oxygen" or "oxygen" + local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen" + -- Remove recipe unlocks thxbob.lib.tech.remove_recipe_unlock("bi-tech-fertilizer", "bi-liquid-air") thxbob.lib.tech.remove_recipe_unlock("bi-tech-fertilizer", "bi-nitrogen") BioInd.writeDebug("Removed recipe unlocks for \"bi-liquid-air\" and \"bi-nitrogen\"") -- Replace liquid air with oxygen (from Krastorio/K2) in recipes for Algae Biomass 2 and 3 - if data.raw.fluid.oxygen then - thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "oxygen") - thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "oxygen") + if data.raw.fluid[oxygen] then + thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", oxygen) + thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", oxygen) BioInd.writeDebug("Replaced \"liquid-air\" with \"oxygen\" in recipes \"bi-biomass-2\" and \"bi-biomass-3\"") -- Perhaps there is no oxygen? But there's nitrogen for sure, so we fall back to that! - elseif data.raw.fluid.nitrogen then - thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "nitrogen") - thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "nitrogen") + elseif data.raw.fluid[nitrogen] then + thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", nitrogen) + thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", nitrogen) BioInd.writeDebug("Replaced \"liquid-air\" with \"nitrogen\" in recipes \"bi-biomass-2\" and \"bi-biomass-3\"") end @@ -518,6 +514,230 @@ else BioInd.writeDebug("Removed recipes for \"nitrogen\" and \"liquid air\".") end + + -- Replace nitrogen (BI) with bob-nitrogen (Bob's) in recipe "bi-nitrogen" +if data.raw.fluid["bob-nitrogen"] then + local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen" + thxbob.lib.recipe.remove_result("bi-nitrogen", nitrogen) + thxbob.lib.recipe.add_result("bi-nitrogen", { + type = "fluid", + name = "bob-nitrogen", + amount = 40 + }) + + thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", nitrogen, "bob-nitrogen") + thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", nitrogen, "bob-nitrogen") + + BioInd.writeDebug("Update nitrogen compatibility for Bob's") + +end + +-- Replace liquid-air (BI) with bob-liquid-air (Bob's) in recipe "bi-liquid-air" +if data.raw.fluid["bob-liquid-air"] then + + thxbob.lib.recipe.remove_result("bi-liquid-air", "liquid-air") + thxbob.lib.recipe.add_result("bi-liquid-air", { + type = "fluid", + name = "bob-liquid-air", + amount = 100 + }) + + thxbob.lib.recipe.replace_ingredient("bi-nitrogen", "liquid-air", "bob-liquid-air") + thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "bob-liquid-air") + thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "bob-liquid-air") + + BioInd.writeDebug("Update liquid-air compatibility for Bob's") + +end + +------------ Support for Bob's Greenhouse +-- Replace bob-fertiliser (Bob's) with fertilizer (BI) in recipe "bob-fertiliser" +if data.raw["item"]["bob-greenhouse"] then + + data.raw["item"]["bob-fertiliser"].icon = ICONPATH .. "fertilizer.png" + data.raw["item"]["bob-fertiliser"].icon_size = 64 + data.raw["recipe"]["bob-fertiliser"].icon = ICONPATH .. "fertilizer.png" + data.raw["recipe"]["bob-fertiliser"].icon_size = 64 + + thxbob.lib.recipe.remove_result("bob-fertiliser", "bob-fertiliser") + thxbob.lib.recipe.add_result("bob-fertiliser", { + type = "item", + name = "fertilizer", + amount = 1 + }) + + + thxbob.lib.recipe.replace_ingredient("bob-advanced-greenhouse-cycle", "bob-fertiliser", "fertilizer") + + data.raw["item"]["bob-fertiliser"].place_as_tile = { + result = BioInd.AB_tiles() and "vegetation-green-grass-3" or "grass-3", + condition_size = 1, + condition = { layers = { water_tile = true } } + } + + + data.raw["item"]["bob-seedling"].place_result = "seedling" + data.raw["item"]["bob-seedling"].icon = ICONPATH .. "Seedling.png" + data.raw["item"]["bob-seedling"].icon_size = 64 + data.raw["recipe"]["bob-seedling"].icon = ICONPATH .. "Seedling.png" + data.raw["recipe"]["bob-seedling"].icon_size = 64 + data.raw["recipe"]["bob-seedling"].main_product = "seedling" + + + thxbob.lib.recipe.replace_ingredient("bob-basic-greenhouse-cycle", "bob-seedling", "seedling") + thxbob.lib.recipe.replace_ingredient("bob-advanced-greenhouse-cycle", "bob-seedling", "seedling") + thxbob.lib.recipe.remove_result("bob-seedling", "bob-seedling") + thxbob.lib.recipe.add_result("bob-seedling", { + type = "item", + name = "seedling", + amount_min = 1, + amount_max = 6 + }) + + + BioInd.writeDebug("Update fertiliser compatibility for Bob's") + +end + + + -- Replace Bob's Resin with BI Resin +if data.raw.item["bob-resin"] then + + if data.raw.recipe["bob-resin-wood"] then + thxbob.lib.recipe.remove_result("bob-resin-wood", "bob-resin") + thxbob.lib.recipe.add_result("bob-resin-wood", { + type = "item", + name = "resin", + amount = 1 + }) + BioInd.writeDebug("Replace Bob's Resin with BI Resin in Recipe 'bob-resin-wood'") + end + + if data.raw.recipe["bob-resin-oil"] then + thxbob.lib.recipe.remove_result("bob-resin-oil", "bob-resin") + thxbob.lib.recipe.add_result("bob-resin-oil", { + type = "item", + name = "resin", + amount = 1 + }) + BioInd.writeDebug("Replace Bob's Resin with BI Resin in Recipe 'bob-resin-oil'") + end + + if data.raw.recipe["bob-rubber"] then + data.raw.recipe["bob-rubber"].icon = ICONPATH_BA .. "rubber.png" + data.raw.recipe["bob-rubber"].icon_size = 32 + thxbob.lib.recipe.replace_ingredient("bob-rubber", "bob-resin", "resin") + BioInd.writeDebug("Replace Bob's Resin with BI Resin in Recipe 'bob-rubber'") + end + + if data.raw.recipe["bob-phenolic-board"] then + thxbob.lib.recipe.replace_ingredient("bob-phenolic-board", "bob-resin", "resin") + BioInd.writeDebug("Replace Bob's Resin with BI Resin in Recipe 'bob-phenolic-board'") + end + + if data.raw.recipe["bob-solder"] then + thxbob.lib.recipe.replace_ingredient("bob-solder", "bob-resin", "resin") + BioInd.writeDebug("Replace Bob's Resin with BI Resin in Recipe 'bob-solder'") + end + + +end + +--- Updaet seeds to work with Space Age if present. + +if data.raw.item["tree-seed"] then + + --data.raw.item["bi-seed"] = nil -- We can remove BI's seed, since it won't be used. + data.raw.item["bi-seed"].plant_result = "tree-plant" + data.raw.item["bi-seed"].place_result = "tree-plant" + data.raw.item["tree-seed"].stack_size = 200 -- Update tree seed stack size + + thxbob.lib.recipe.remove_result("bi-seed-1", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-1", { + type = "item", + name = "tree-seed", + amount_min = 30, + amount_max = 50 + }) + thxbob.lib.recipe.remove_result("bi-seed-2", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-2", { + type = "item", + name = "tree-seed", + amount_min = 40, + amount_max = 60 + }) + thxbob.lib.recipe.remove_result("bi-seed-3", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-3", { + type = "item", + name = "tree-seed", + amount_min = 50, + amount_max = 70 + }) + thxbob.lib.recipe.remove_result("bi-seed-4", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-4", { + type = "item", + name = "tree-seed", + amount_min = 60, + amount_max = 100 + }) + + thxbob.lib.recipe.replace_ingredient("bi-seed-1", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seed-2", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seed-3", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seed-4", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seedling-1", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seedling-2", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seedling-3", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seedling-4", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seed-bomb-basic", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seed-bomb-standard", "bi-seed", "tree-seed") + thxbob.lib.recipe.replace_ingredient("bi-seed-bomb-advanced", "bi-seed", "tree-seed") + + if data.raw.recipe["bi-seed-bomb-basic-recycling"] then + + thxbob.lib.recipe.remove_result("bi-seed-bomb-basic-recycling", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-bomb-basic-recycling", { + type = "item", + name = "tree-seed", + amount = 100, + }) + + end + + if data.raw.recipe["bi-seed-bomb-standard-recycling"] then + + thxbob.lib.recipe.remove_result("bi-seed-bomb-standard-recycling", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-bomb-standard-recycling", { + type = "item", + name = "tree-seed", + amount = 100, + }) + + end + + if data.raw.recipe["bi-seed-bomb-advanced-recycling"] then + + thxbob.lib.recipe.remove_result("bi-seed-bomb-advanced-recycling", "bi-seed") + thxbob.lib.recipe.add_result("bi-seed-bomb-advanced-recycling", { + type = "item", + name = "tree-seed", + amount = 100, + }) + + end + + if data.raw.item["tree-plant"] then + bobmods.lib.recipe.update_recycling_recipe({ + "bi-seed-bomb-basic", + "bi-seed-bomb-standard", + "bi-seed-bomb-advanced", + }) + end + + BioInd.writeDebug("Replace BI's Seed with Space Age Tree-seed") + +end + -- Moved here from data-final-fixes.lua for 0.18.34/1.1.4! (Fixes https://mods.factorio.com/mod/Bio_Industries/discussion/5ff570bd916993002371332a) ---- Game Tweaks ---- Recipes if BI.Settings.BI_Game_Tweaks_Recipe then @@ -537,7 +757,8 @@ if BI.Settings.BI_Game_Tweaks_Recipe then thxbob.lib.recipe.add_new_ingredient("bi-rail-wood", { type = "item", name = "stone-crushed", amount = 6 }) end - -- vanilla rail recipe update + -- vanilla rail update + --- Recipe thxbob.lib.recipe.remove_ingredient("rail", "iron-stick") thxbob.lib.recipe.add_new_ingredient("rail", { type = "item", name = "concrete", amount = 2 }) data.raw["legacy-straight-rail"]["legacy-straight-rail"].icon = ICONPATH_E .. "rail-concrete.png" @@ -547,6 +768,39 @@ if BI.Settings.BI_Game_Tweaks_Recipe then thxbob.lib.tech.add_recipe_unlock("railway", "bi-rail-wood") thxbob.lib.tech.add_recipe_unlock("railway", "bi-rail-wood-to-concrete") + --- Update Vanilla Images - Look more like concrete + require("prototypes.Wood_Products.rail-pictures-vanilla") + data.raw["straight-rail"]["straight-rail"].pictures = new_rail_pictures_vanilla("straight") + data.raw["half-diagonal-rail"]["half-diagonal-rail"].pictures = new_rail_pictures_vanilla("half-diagonal") + data.raw["curved-rail-a"]["curved-rail-a"].pictures = new_rail_pictures_vanilla("curved-a") + data.raw["curved-rail-b"]["curved-rail-b"].pictures = new_rail_pictures_vanilla("curved-b") + --- remnants + data.raw["rail-remnants"]["straight-rail-remnants"].pictures = new_rail_remnants_pictures_vanilla("straight") + data.raw["rail-remnants"]["half-diagonal-rail-remnants"].pictures = new_rail_remnants_pictures_vanilla("half-diagonal") + data.raw["rail-remnants"]["curved-rail-a-remnants"].pictures = new_rail_remnants_pictures_vanilla("curved-a") + data.raw["rail-remnants"]["curved-rail-b-remnants"].pictures = new_rail_remnants_pictures_vanilla("curved-b") + --- Let me try and remove decoratives at the same time + data.raw["rail-planner"]["rail"].remove_decoratives = "true" + data.raw["straight-rail"]["straight-rail"].remove_decoratives = "true" + data.raw["half-diagonal-rail"]["half-diagonal-rail"].remove_decoratives = "true" + data.raw["curved-rail-a"]["curved-rail-a"].remove_decoratives = "true" + data.raw["curved-rail-b"]["curved-rail-b"].remove_decoratives = "true" + data.raw["rail-planner"]["rail"].removes_soft_decoratives = true + data.raw["straight-rail"]["straight-rail"].removes_soft_decoratives = true + data.raw["half-diagonal-rail"]["half-diagonal-rail"].removes_soft_decoratives = true + data.raw["curved-rail-a"]["curved-rail-a"].removes_soft_decoratives = true + data.raw["curved-rail-b"]["curved-rail-b"].removes_soft_decoratives = true + + data.raw["rail-planner"]["bi-rail-wood"].remove_decoratives = "true" + data.raw["straight-rail"]["bi-straight-rail-wood"].remove_decoratives = "true" + data.raw["half-diagonal-rail"]["bi-half-diagonal-rail-wood"].remove_decoratives = "true" + data.raw["curved-rail-a"]["bi-curved-rail-a-wood"].remove_decoratives = "true" + data.raw["curved-rail-b"]["bi-curved-rail-b-wood"].remove_decoratives = "true" + data.raw["rail-planner"]["bi-rail-wood"].removes_soft_decoratives = true + data.raw["straight-rail"]["bi-straight-rail-wood"].removes_soft_decoratives = true + data.raw["half-diagonal-rail"]["bi-half-diagonal-rail-wood"].removes_soft_decoratives = true + data.raw["curved-rail-a"]["bi-curved-rail-a-wood"].removes_soft_decoratives = true + data.raw["curved-rail-b"]["bi-curved-rail-b-wood"].removes_soft_decoratives = true end diff --git a/Bio_Industries_2/data.lua b/Bio_Industries_2/data.lua index d785bb6..9ca4147 100644 --- a/Bio_Industries_2/data.lua +++ b/Bio_Industries_2/data.lua @@ -28,13 +28,13 @@ end --- Help Files +require("libs.functions") -- From Bob's Libary +require("libs.error-functions") -- From Bob's Libary require("libs.item-functions") -- From Bob's Libary require("libs.recipe-functions") -- From Bob's Libary require("libs.technology-functions") -- From Bob's Libary -require("libs.functions") -- From Bob's Libary require("libs.category-functions") -- From Bob's Libary require("libs.bi_functions") -- Functions - require("prototypes.category") @@ -46,7 +46,6 @@ require("prototypes.Bio_Farm.item") require("prototypes.Bio_Farm.recipe") require("prototypes.Bio_Farm.liquids") require("prototypes.Bio_Farm.recipe-categories") -require("prototypes.Bio_Farm.pipeConnectors") require("prototypes.Bio_Farm.technology") require("prototypes.Bio_Farm.tree_entities") diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-E_l.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-E_l.png deleted file mode 100644 index b88fcdf..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-E_l.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-E_r.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-E_r.png deleted file mode 100644 index befc747..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-E_r.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-N_l.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-N_l.png deleted file mode 100644 index fc348f0..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-N_l.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-N_r.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-N_r.png deleted file mode 100644 index 42f3876..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-N_r.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-S_l.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-S_l.png deleted file mode 100644 index 278aa54..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-S_l.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-S_r.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-S_r.png deleted file mode 100644 index af3491c..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-S_r.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-W_l.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-W_l.png deleted file mode 100644 index 3b246d3..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-W_l.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-W_r.png b/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-W_r.png deleted file mode 100644 index e6e00ed..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_farm/biofarm_pipes/Bio_Farm-pipe-W_r.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-E.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-E.png similarity index 100% rename from Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-E.png rename to Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-E.png diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-N-exp.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-N-exp.png similarity index 100% rename from Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-N-exp.png rename to Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-N-exp.png diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-S.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-S.png similarity index 100% rename from Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-S.png rename to Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-S.png diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-W.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-W.png similarity index 100% rename from Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/hr-assembling-machine-3-pipe-W.png rename to Bio_Industries_2/graphics/entities/bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-W.png diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-E.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-E.png deleted file mode 100644 index 8275572..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-E.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-N.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-N.png deleted file mode 100644 index 58f4c75..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-N.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-S.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-S.png deleted file mode 100644 index ea31edf..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-S.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-W.png b/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-W.png deleted file mode 100644 index 5312d0f..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_greenhouse/pipe/assembling-machine-3-pipe-W.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-e.png b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-e.png index 6111448..53a6e38 100644 Binary files a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-e.png and b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-e.png differ diff --git a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-s.png b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-s.png index 46d9864..df32b61 100644 Binary files a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-s.png and b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-s.png differ diff --git a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-w.png b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-w.png index 6239713..8c72efb 100644 Binary files a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-w.png and b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/bioreactor-pipe-w.png differ diff --git a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-e.png b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-e.png deleted file mode 100644 index 53a6e38..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-e.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-s.png b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-s.png deleted file mode 100644 index df32b61..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-s.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-w.png b/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-w.png deleted file mode 100644 index 8c72efb..0000000 Binary files a/Bio_Industries_2/graphics/entities/bio_reactor/pipes/hr_bioreactor-pipe-w.png and /dev/null differ diff --git a/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-concrete.png b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-concrete.png new file mode 100644 index 0000000..9329ab1 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-concrete.png differ diff --git a/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-wood.png b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-wood.png new file mode 100644 index 0000000..3bd8aca Binary files /dev/null and b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-wood.png differ diff --git a/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-ties-concrete.png b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-ties-concrete.png new file mode 100644 index 0000000..8cf3f39 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-ties-concrete.png differ diff --git a/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-ties-wood.png b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-ties-wood.png new file mode 100644 index 0000000..9f7f181 Binary files /dev/null and b/Bio_Industries_2/graphics/entities/wood_products/rails/new_rail/rail-ties-wood.png differ diff --git a/Bio_Industries_2/graphics/icons/fertilizer_sulfur.png b/Bio_Industries_2/graphics/icons/fertilizer_sulfur.png index 14ab8fa..470e5d5 100644 Binary files a/Bio_Industries_2/graphics/icons/fertilizer_sulfur.png and b/Bio_Industries_2/graphics/icons/fertilizer_sulfur.png differ diff --git a/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_recipe_64.png b/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer.png similarity index 100% rename from Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_recipe_64.png rename to Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer.png diff --git a/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_64.png b/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_64.png index 76ff8e4..a2c61c5 100644 Binary files a/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_64.png and b/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_64.png differ diff --git a/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_recipe.png b/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_recipe.png new file mode 100644 index 0000000..a2c61c5 Binary files /dev/null and b/Bio_Industries_2/graphics/icons/fluid_advanced_fertilizer_recipe.png differ diff --git a/Bio_Industries_2/graphics/icons/fluid_fertilizer.png b/Bio_Industries_2/graphics/icons/fluid_fertilizer.png new file mode 100644 index 0000000..146acc9 Binary files /dev/null and b/Bio_Industries_2/graphics/icons/fluid_fertilizer.png differ diff --git a/Bio_Industries_2/graphics/icons/mod_bobangels/liquid-air.png b/Bio_Industries_2/graphics/icons/mod_bobangels/liquid-air.png new file mode 100644 index 0000000..eb88c9a Binary files /dev/null and b/Bio_Industries_2/graphics/icons/mod_bobangels/liquid-air.png differ diff --git a/Bio_Industries_2/graphics/icons/mod_bobangels/rubber.png b/Bio_Industries_2/graphics/icons/mod_bobangels/rubber.png new file mode 100644 index 0000000..560e775 Binary files /dev/null and b/Bio_Industries_2/graphics/icons/mod_bobangels/rubber.png differ diff --git a/Bio_Industries_2/graphics/icons/entity_old/Arboretum_Icon.png b/Bio_Industries_2/graphics/icons/old/Arboretum_Icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Arboretum_Icon.png rename to Bio_Industries_2/graphics/icons/old/Arboretum_Icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Arboretum_Icon_64.png b/Bio_Industries_2/graphics/icons/old/Arboretum_Icon_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Arboretum_Icon_64.png rename to Bio_Industries_2/graphics/icons/old/Arboretum_Icon_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Cabeling.png b/Bio_Industries_2/graphics/icons/old/Bio_Farm_Cabeling.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Cabeling.png rename to Bio_Industries_2/graphics/icons/old/Bio_Farm_Cabeling.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Icon.png b/Bio_Industries_2/graphics/icons/old/Bio_Farm_Icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Icon.png rename to Bio_Industries_2/graphics/icons/old/Bio_Farm_Icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Icon_64.png b/Bio_Industries_2/graphics/icons/old/Bio_Farm_Icon_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Icon_64.png rename to Bio_Industries_2/graphics/icons/old/Bio_Farm_Icon_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Lamp.png b/Bio_Industries_2/graphics/icons/old/Bio_Farm_Lamp.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Lamp.png rename to Bio_Industries_2/graphics/icons/old/Bio_Farm_Lamp.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Solar.png b/Bio_Industries_2/graphics/icons/old/Bio_Farm_Solar.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Farm_Solar.png rename to Bio_Industries_2/graphics/icons/old/Bio_Farm_Solar.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_64.png b/Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_64.png rename to Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_Boiler_Icon.png b/Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_Boiler_Icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_Boiler_Icon.png rename to Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_Boiler_Icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_Icon.png b/Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_Icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_Icon.png rename to Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_Icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_Panel_Icon.png b/Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_Panel_Icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Boiler_Panel_Icon.png rename to Bio_Industries_2/graphics/icons/old/Bio_Solar_Boiler_Panel_Icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Farm_64.png b/Bio_Industries_2/graphics/icons/old/Bio_Solar_Farm_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Farm_64.png rename to Bio_Industries_2/graphics/icons/old/Bio_Solar_Farm_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Farm_Icon.png b/Bio_Industries_2/graphics/icons/old/Bio_Solar_Farm_Icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/Bio_Solar_Farm_Icon.png rename to Bio_Industries_2/graphics/icons/old/Bio_Solar_Farm_Icon.png diff --git a/Bio_Industries_2/graphics/icons/advanced_fertilizer.png b/Bio_Industries_2/graphics/icons/old/advanced_fertilizer.png similarity index 100% rename from Bio_Industries_2/graphics/icons/advanced_fertilizer.png rename to Bio_Industries_2/graphics/icons/old/advanced_fertilizer.png diff --git a/Bio_Industries_2/graphics/icons/advanced_fertilizer_64.png b/Bio_Industries_2/graphics/icons/old/advanced_fertilizer_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/advanced_fertilizer_64.png rename to Bio_Industries_2/graphics/icons/old/advanced_fertilizer_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bi_LargeAccumulator.png b/Bio_Industries_2/graphics/icons/old/bi_LargeAccumulator.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bi_LargeAccumulator.png rename to Bio_Industries_2/graphics/icons/old/bi_LargeAccumulator.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bi_LargeAccumulator_64.png b/Bio_Industries_2/graphics/icons/old/bi_LargeAccumulator_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bi_LargeAccumulator_64.png rename to Bio_Industries_2/graphics/icons/old/bi_LargeAccumulator_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bi_LargeSubstation_64.png b/Bio_Industries_2/graphics/icons/old/bi_LargeSubstation_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bi_LargeSubstation_64.png rename to Bio_Industries_2/graphics/icons/old/bi_LargeSubstation_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bi_LargeSubstation_icon.png b/Bio_Industries_2/graphics/icons/old/bi_LargeSubstation_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bi_LargeSubstation_icon.png rename to Bio_Industries_2/graphics/icons/old/bi_LargeSubstation_icon.png diff --git a/Bio_Industries_2/graphics/icons/bi_wood_resin_pulp.png b/Bio_Industries_2/graphics/icons/old/bi_wood_resin_pulp.png similarity index 100% rename from Bio_Industries_2/graphics/icons/bi_wood_resin_pulp.png rename to Bio_Industries_2/graphics/icons/old/bi_wood_resin_pulp.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/big-wooden-pole.png b/Bio_Industries_2/graphics/icons/old/big-wooden-pole.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/big-wooden-pole.png rename to Bio_Industries_2/graphics/icons/old/big-wooden-pole.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/big-wooden-pole_64.png b/Bio_Industries_2/graphics/icons/old/big-wooden-pole_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/big-wooden-pole_64.png rename to Bio_Industries_2/graphics/icons/old/big-wooden-pole_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_boiler.png b/Bio_Industries_2/graphics/icons/old/bio_boiler.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_boiler.png rename to Bio_Industries_2/graphics/icons/old/bio_boiler.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_garden_64.png b/Bio_Industries_2/graphics/icons/old/bio_garden_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_garden_64.png rename to Bio_Industries_2/graphics/icons/old/bio_garden_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_garden_icon.png b/Bio_Industries_2/graphics/icons/old/bio_garden_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_garden_icon.png rename to Bio_Industries_2/graphics/icons/old/bio_garden_icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_greenhouse.png b/Bio_Industries_2/graphics/icons/old/bio_greenhouse.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_greenhouse.png rename to Bio_Industries_2/graphics/icons/old/bio_greenhouse.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_greenhouse_64.png b/Bio_Industries_2/graphics/icons/old/bio_greenhouse_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_greenhouse_64.png rename to Bio_Industries_2/graphics/icons/old/bio_greenhouse_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_turret_icon.png b/Bio_Industries_2/graphics/icons/old/bio_turret_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_turret_icon.png rename to Bio_Industries_2/graphics/icons/old/bio_turret_icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bio_turret_icon_64.png b/Bio_Industries_2/graphics/icons/old/bio_turret_icon_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bio_turret_icon_64.png rename to Bio_Industries_2/graphics/icons/old/bio_turret_icon_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/biocannon_icon.png b/Bio_Industries_2/graphics/icons/old/biocannon_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/biocannon_icon.png rename to Bio_Industries_2/graphics/icons/old/biocannon_icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/biocannon_icon_64.png b/Bio_Industries_2/graphics/icons/old/biocannon_icon_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/biocannon_icon_64.png rename to Bio_Industries_2/graphics/icons/old/biocannon_icon_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bioreactor.png b/Bio_Industries_2/graphics/icons/old/bioreactor.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bioreactor.png rename to Bio_Industries_2/graphics/icons/old/bioreactor.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/bioreactor_64.png b/Bio_Industries_2/graphics/icons/old/bioreactor_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/bioreactor_64.png rename to Bio_Industries_2/graphics/icons/old/bioreactor_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/cokery.png b/Bio_Industries_2/graphics/icons/old/cokery.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/cokery.png rename to Bio_Industries_2/graphics/icons/old/cokery.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/cokery_64.png b/Bio_Industries_2/graphics/icons/old/cokery_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/cokery_64.png rename to Bio_Industries_2/graphics/icons/old/cokery_64.png diff --git a/Bio_Industries_2/graphics/icons/cokery_alt.png b/Bio_Industries_2/graphics/icons/old/cokery_alt.png similarity index 100% rename from Bio_Industries_2/graphics/icons/cokery_alt.png rename to Bio_Industries_2/graphics/icons/old/cokery_alt.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/curved-rail-concrete.png b/Bio_Industries_2/graphics/icons/old/curved-rail-concrete.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/curved-rail-concrete.png rename to Bio_Industries_2/graphics/icons/old/curved-rail-concrete.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/curved-rail-wood.png b/Bio_Industries_2/graphics/icons/old/curved-rail-wood.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/curved-rail-wood.png rename to Bio_Industries_2/graphics/icons/old/curved-rail-wood.png diff --git a/Bio_Industries_2/graphics/icons/fertilizer_64.png b/Bio_Industries_2/graphics/icons/old/fertilizer_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/fertilizer_64.png rename to Bio_Industries_2/graphics/icons/old/fertilizer_64.png diff --git a/Bio_Industries_2/graphics/icons/old/fertilizer_sulfur.png b/Bio_Industries_2/graphics/icons/old/fertilizer_sulfur.png new file mode 100644 index 0000000..14ab8fa Binary files /dev/null and b/Bio_Industries_2/graphics/icons/old/fertilizer_sulfur.png differ diff --git a/Bio_Industries_2/graphics/icons/old/fluid_advanced_fertilizer_64.png b/Bio_Industries_2/graphics/icons/old/fluid_advanced_fertilizer_64.png new file mode 100644 index 0000000..76ff8e4 Binary files /dev/null and b/Bio_Industries_2/graphics/icons/old/fluid_advanced_fertilizer_64.png differ diff --git a/Bio_Industries_2/graphics/icons/fluid_fertilizer_recipe_64.png b/Bio_Industries_2/graphics/icons/old/fluid_fertilizer_recipe_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/fluid_fertilizer_recipe_64.png rename to Bio_Industries_2/graphics/icons/old/fluid_fertilizer_recipe_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/giga_wooden_chest_64.png b/Bio_Industries_2/graphics/icons/old/giga_wooden_chest_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/giga_wooden_chest_64.png rename to Bio_Industries_2/graphics/icons/old/giga_wooden_chest_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/giga_wooden_chest_icon.png b/Bio_Industries_2/graphics/icons/old/giga_wooden_chest_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/giga_wooden_chest_icon.png rename to Bio_Industries_2/graphics/icons/old/giga_wooden_chest_icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/huge-wooden-pole.png b/Bio_Industries_2/graphics/icons/old/huge-wooden-pole.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/huge-wooden-pole.png rename to Bio_Industries_2/graphics/icons/old/huge-wooden-pole.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/huge-wooden-pole_64.png b/Bio_Industries_2/graphics/icons/old/huge-wooden-pole_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/huge-wooden-pole_64.png rename to Bio_Industries_2/graphics/icons/old/huge-wooden-pole_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/huge_wooden_chest_64.png b/Bio_Industries_2/graphics/icons/old/huge_wooden_chest_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/huge_wooden_chest_64.png rename to Bio_Industries_2/graphics/icons/old/huge_wooden_chest_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/huge_wooden_chest_icon.png b/Bio_Industries_2/graphics/icons/old/huge_wooden_chest_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/huge_wooden_chest_icon.png rename to Bio_Industries_2/graphics/icons/old/huge_wooden_chest_icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/large_wooden_chest_64.png b/Bio_Industries_2/graphics/icons/old/large_wooden_chest_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/large_wooden_chest_64.png rename to Bio_Industries_2/graphics/icons/old/large_wooden_chest_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/large_wooden_chest_icon.png b/Bio_Industries_2/graphics/icons/old/large_wooden_chest_icon.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/large_wooden_chest_icon.png rename to Bio_Industries_2/graphics/icons/old/large_wooden_chest_icon.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/pipe-to-ground-wood.png b/Bio_Industries_2/graphics/icons/old/pipe-to-ground-wood.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/pipe-to-ground-wood.png rename to Bio_Industries_2/graphics/icons/old/pipe-to-ground-wood.png diff --git a/Bio_Industries_2/graphics/icons/old/plastic_bar_1.png b/Bio_Industries_2/graphics/icons/old/plastic_bar_1.png new file mode 100644 index 0000000..0e41055 Binary files /dev/null and b/Bio_Industries_2/graphics/icons/old/plastic_bar_1.png differ diff --git a/Bio_Industries_2/graphics/icons/entity_old/rail-wood.png b/Bio_Industries_2/graphics/icons/old/rail-wood.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/rail-wood.png rename to Bio_Industries_2/graphics/icons/old/rail-wood.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/solar-mat.png b/Bio_Industries_2/graphics/icons/old/solar-mat.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/solar-mat.png rename to Bio_Industries_2/graphics/icons/old/solar-mat.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/stone_crusher.png b/Bio_Industries_2/graphics/icons/old/stone_crusher.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/stone_crusher.png rename to Bio_Industries_2/graphics/icons/old/stone_crusher.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/stone_crusher_64.png b/Bio_Industries_2/graphics/icons/old/stone_crusher_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/stone_crusher_64.png rename to Bio_Industries_2/graphics/icons/old/stone_crusher_64.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/straight-rail-concrete.png b/Bio_Industries_2/graphics/icons/old/straight-rail-concrete.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/straight-rail-concrete.png rename to Bio_Industries_2/graphics/icons/old/straight-rail-concrete.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/straight-rail-wood.png b/Bio_Industries_2/graphics/icons/old/straight-rail-wood.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/straight-rail-wood.png rename to Bio_Industries_2/graphics/icons/old/straight-rail-wood.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/wood_pipe.png b/Bio_Industries_2/graphics/icons/old/wood_pipe.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/wood_pipe.png rename to Bio_Industries_2/graphics/icons/old/wood_pipe.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/wood_pipe_alt.png b/Bio_Industries_2/graphics/icons/old/wood_pipe_alt.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/wood_pipe_alt.png rename to Bio_Industries_2/graphics/icons/old/wood_pipe_alt.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/wooden-fence.png b/Bio_Industries_2/graphics/icons/old/wooden-fence.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/wooden-fence.png rename to Bio_Industries_2/graphics/icons/old/wooden-fence.png diff --git a/Bio_Industries_2/graphics/icons/entity_old/woodrail_64.png b/Bio_Industries_2/graphics/icons/old/woodrail_64.png similarity index 100% rename from Bio_Industries_2/graphics/icons/entity_old/woodrail_64.png rename to Bio_Industries_2/graphics/icons/old/woodrail_64.png diff --git a/Bio_Industries_2/graphics/icons/plastic_bar_1.png b/Bio_Industries_2/graphics/icons/plastic_bar_1.png index 0e41055..8119eac 100644 Binary files a/Bio_Industries_2/graphics/icons/plastic_bar_1.png and b/Bio_Industries_2/graphics/icons/plastic_bar_1.png differ diff --git a/Bio_Industries_2/graphics/icons/tree-seed-1.png b/Bio_Industries_2/graphics/icons/tree-seed-1.png new file mode 100644 index 0000000..3866f0f Binary files /dev/null and b/Bio_Industries_2/graphics/icons/tree-seed-1.png differ diff --git a/Bio_Industries_2/graphics/icons/tree-seed-2.png b/Bio_Industries_2/graphics/icons/tree-seed-2.png new file mode 100644 index 0000000..7af15ac Binary files /dev/null and b/Bio_Industries_2/graphics/icons/tree-seed-2.png differ diff --git a/Bio_Industries_2/graphics/icons/tree-seed-3.png b/Bio_Industries_2/graphics/icons/tree-seed-3.png new file mode 100644 index 0000000..56c306d Binary files /dev/null and b/Bio_Industries_2/graphics/icons/tree-seed-3.png differ diff --git a/Bio_Industries_2/graphics/icons/tree-seed-4.png b/Bio_Industries_2/graphics/icons/tree-seed-4.png new file mode 100644 index 0000000..6f1b122 Binary files /dev/null and b/Bio_Industries_2/graphics/icons/tree-seed-4.png differ diff --git a/Bio_Industries_2/info.json b/Bio_Industries_2/info.json index c50efc8..c56a238 100644 --- a/Bio_Industries_2/info.json +++ b/Bio_Industries_2/info.json @@ -1,6 +1,6 @@ { "name": "Bio_Industries_2", - "version": "2.0.11", + "version": "2.0.26", "factorio_version": "2.0", "title": "Bio Industries", "author": "TheSAguy - Had a few Ideas, Pi-C (Programming Genius), Snouz (Graphics Wizard), Cackling Fiend - Conversion to F2.0", diff --git a/Bio_Industries_2/libs/category-functions.lua b/Bio_Industries_2/libs/category-functions.lua index 45ca837..4ced9cf 100644 --- a/Bio_Industries_2/libs/category-functions.lua +++ b/Bio_Industries_2/libs/category-functions.lua @@ -1,117 +1,130 @@ -local BioInd = require('common')('Bio_Industries_2') - -if not thxbob.lib.machine then thxbob.lib.machine = {} end - - -function thxbob.lib.machine.has_category(machine, category_in) - local hasit = false - if machine and machine.crafting_categories then - for i, category in pairs(machine.crafting_categories) do - if category == category_in then - hasit = true - end - end - end - return hasit -end - -function thxbob.lib.machine.add_category(machine, category) - if machine and data.raw["recipe-category"][category] then - if not machine.crafting_categories then - machine.crafting_categories = {category} - elseif not thxbob.lib.machine.has_category(machine, category) then - table.insert(machine.crafting_categories, category) - end - else - if not data.raw["recipe-category"][category] then - BioInd.writeDebug("Crafting category %s does not exist.", {category}) - end - end -end - -function thxbob.lib.machine.if_add_category(machine, category, category_to_add) - if machine and data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then - if thxbob.lib.machine.has_category(machine, category) then - thxbob.lib.machine.add_category(machine, category_to_add) - end - else - if not data.raw["recipe-category"][category] then - BioInd.writeDebug("Crafting category %s does not exist.", {category}) - end - if not data.raw["recipe-category"][category_to_add] then - BioInd.writeDebug("Crafting category %s does not exist.", {category_to_add}) - end - end -end - -function thxbob.lib.machine.type_if_add_category(machine_type, category, category_to_add) - if data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then - for i, machine in pairs(data.raw[machine_type]) do - thxbob.lib.machine.if_add_category(machine, category, category_to_add) - end - else - if not data.raw["recipe-category"][category] then - BioInd.writeDebug("Crafting category %s does not exist.", {category}) - end - if not data.raw["recipe-category"][category_to_add] then - BioInd.writeDebug("Crafting category %s does not exist.", {category_to_add}) - end - end -end - - -function thxbob.lib.machine.has_resource_category(machine, category_in) - local hasit = false - if machine and machine.resource_categories then - for i, category in pairs(machine.resource_categories) do - if category == category_in then - hasit = true - end - end - end - return hasit -end - -function thxbob.lib.machine.add_resource_category(machine, category) - if machine and data.raw["resource-category"][category] then - if not machine.resource_categories then - machine.resource_categories = {category} - elseif not thxbob.lib.machine.has_resource_category(machine, category) then - table.insert(machine.resource_categories, category) - end - else - if not data.raw["resource-category"][category] then - BioInd.writeDebug("Resource category %s does not exist.", {category}) - end - end -end - -function thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add) - if machine and data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then - if thxbob.lib.machine.has_resource_category(machine, category) then - thxbob.lib.machine.add_resource_category(machine, category_to_add) - end - else - if not data.raw["resource-category"][category] then - BioInd.writeDebug("Resource category %s does not exist.", {category}) - end - if not data.raw["resource-category"][category_to_add] then - BioInd.writeDebug("Resource category %s does not exist.", {category_to_add}) - end - end -end - -function thxbob.lib.machine.type_if_add_resource_category(machine_type, category, category_to_add) - if data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then - for i, machine in pairs(data.raw[machine_type]) do - thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add) - end - else - if not data.raw["resource-category"][category] then - BioInd.writeDebug("Resource category %s does not exist.", {category}) - end - if not data.raw["resource-category"][category_to_add] then - BioInd.writeDebug("Resource category %s does not exist.", {category_to_add}) - end - end -end +local BioInd = require('common')('Bio_Industries_2') + +if not thxbob.lib.machine then + thxbob.lib.machine = {} +end + +function thxbob.lib.machine.has_category(machine, category_in) + local hasit = false + if machine and machine.crafting_categories then + for i, category in pairs(machine.crafting_categories) do + if category == category_in then + hasit = true + end + end + end + return hasit +end + +function thxbob.lib.machine.add_category(machine, category) + if machine and data.raw["recipe-category"][category] then + if not machine.crafting_categories then + machine.crafting_categories = { category } + elseif not thxbob.lib.machine.has_category(machine, category) then + table.insert(machine.crafting_categories, category) + end + else + if not data.raw["recipe-category"][category] then + log("Crafting category " .. category .. " does not exist.") + end + end +end + +function thxbob.lib.machine.if_add_category(machine, category, category_to_add) + if machine and data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then + if thxbob.lib.machine.has_category(machine, category) then + thxbob.lib.machine.add_category(machine, category_to_add) + end + else + if not data.raw["recipe-category"][category] then + log("Crafting category " .. category .. " does not exist.") + end + if not data.raw["recipe-category"][category_to_add] then + log("Crafting category " .. category_to_add .. " does not exist.") + end + end +end + +function thxbob.lib.machine.type_if_add_category(machine_type, category, category_to_add) + if data.raw["recipe-category"][category] and data.raw["recipe-category"][category_to_add] then + for i, machine in pairs(data.raw[machine_type]) do + thxbob.lib.machine.if_add_category(machine, category, category_to_add) + end + else + if not data.raw["recipe-category"][category] then + log("Crafting category " .. category .. " does not exist.") + end + if not data.raw["recipe-category"][category_to_add] then + log("Crafting category " .. category_to_add .. " does not exist.") + end + end +end + +function thxbob.lib.machine.has_resource_category(machine, category_in) + local hasit = false + if machine and machine.resource_categories then + for i, category in pairs(machine.resource_categories) do + if category == category_in then + hasit = true + end + end + end + return hasit +end + +function thxbob.lib.machine.add_resource_category(machine, category) + if machine and data.raw["resource-category"][category] then + if not machine.resource_categories then + machine.resource_categories = { category } + elseif not thxbob.lib.machine.has_resource_category(machine, category) then + table.insert(machine.resource_categories, category) + end + else + if not data.raw["resource-category"][category] then + log("Resource category " .. category .. " does not exist.") + end + end +end + +function thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add) + if machine and data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then + if thxbob.lib.machine.has_resource_category(machine, category) then + thxbob.lib.machine.add_resource_category(machine, category_to_add) + end + else + if not data.raw["resource-category"][category] then + log("Resource category " .. category .. " does not exist.") + end + if not data.raw["resource-category"][category_to_add] then + log("Resource category " .. category_to_add .. " does not exist.") + end + end +end + +function thxbob.lib.machine.type_if_add_resource_category(machine_type, category, category_to_add) + if data.raw["resource-category"][category] and data.raw["resource-category"][category_to_add] then + for i, machine in pairs(data.raw[machine_type]) do + thxbob.lib.machine.if_add_resource_category(machine, category, category_to_add) + end + else + if not data.raw["resource-category"][category] then + log(debug.traceback()) + log("Resource category " .. category .. " does not exist.") + end + if not data.raw["resource-category"][category_to_add] then + log(debug.traceback()) + log("Resource category " .. category_to_add .. " does not exist.") + end + end +end + +function thxbob.lib.machine.copy_categories_from(machine_type, from_name, to_name) + local from_machine = data.raw[machine_type][from_name] + local to_machine = data.raw[machine_type][to_name] + + if from_machine and to_machine then + for _, category in pairs(from_machine.crafting_categories) do + thxbob.lib.machine.add_category(to_machine, category) + end + end +end diff --git a/Bio_Industries_2/libs/error-functions.lua b/Bio_Industries_2/libs/error-functions.lua new file mode 100644 index 0000000..889c6b5 --- /dev/null +++ b/Bio_Industries_2/libs/error-functions.lua @@ -0,0 +1,154 @@ +local BioInd = require('common')('Bio_Industries_2') + +if not thxbob.lib.error then + thxbob.lib.error = {} +end + +function thxbob.lib.error.technology(technology, name, desc) + if name == nil then + name = "Technology" + end + if desc == nil then + desc = name + end + if technology == nil then + log(name .. " variable not passed") + elseif type(technology) == "table" then + log(name .. " variable is a table.") + elseif not (type(technology) == "string") then + log(name .. " variable not a string.") + elseif not data.raw.technology[technology] then + log(desc .. " " .. technology .. " does not exist.") + end +end + +function thxbob.lib.error.recipe(recipe, name, desc) + if name == nil then + name = "Recipe" + end + if desc == nil then + desc = name + end + if recipe == nil then + log(name .. " variable not passed") + elseif type(recipe) == "table" then + log(name .. " variable is a table.") + elseif not (type(recipe) == "string") then + log(name .. " variable not a string.") + elseif not data.raw.recipe[recipe] then + log(desc .. " " .. recipe .. " does not exist.") + end +end + +function thxbob.lib.error.resource(resource, name, desc) + if name == nil then + name = "Resource" + end + if desc == nil then + desc = name + end + if resource == nil then + log(name .. " variable not passed") + elseif type(resource) == "table" then + log(name .. " variable is a table.") + elseif not (type(resource) == "string") then + log(name .. " variable not a string.") + elseif not data.raw.resource[resource] then + log(desc .. " " .. resource .. " does not exist.") + end +end + +function thxbob.lib.error.item(item, name) + if name == nil then + name = "Item" + end + if item == nil then + log(name .. " variable not passed") + elseif type(item) == "table" then + log(name .. " variable is a table.") + elseif not (type(item) == "string") then + log(name .. " variable not a string.") + else + local item_type = thxbob.lib.item.get_type(item) + if not item_type then + log(name .. " " .. item .. " not a valid item of any type.") + end + end +end + +function thxbob.lib.error.item_of_type(item, item_type_in, name) + if name == nil then + name = "Item" + end + if item == nil then + log(name .. " variable not passed") + elseif type(item) == "table" then + log(name .. " variable is a table.") + elseif not (type(item) == "string") then + log(name .. " variable not a string.") + else + local item_type = thxbob.lib.item.get_type(item) + if not item_type then + log(name .. " " .. item .. " does not exist.") + elseif item_type ~= item_type_in then + log(name .. " " .. item .. " is of type: " .. item_type .. ", expected: " .. item_type_in) + end + end +end + +function thxbob.lib.error.ingredient(ingredient, name) + if name == nil then + name = "Ingredient" + end + if ingredient == nil then + log(name .. " variable not passed") + elseif not (type(ingredient == "table")) then + log(name .. " variable not a table") + elseif not (type(ingredient.name) == "string") then + log(name .. ".name variable not a string.") + elseif thxbob.lib.item.get_type(ingredient.name) == nil then + log(name .. ".name not a valid item of any type.") + end + if not (type(ingredient.amount) == "number") then + log(name .. ".amount variable not a number.") + end + if not (ingredient.type == "item" or ingredient.type == "fluid") then + log(name .. ".type not a valid ingredient item type") + end +end + +function thxbob.lib.error.result(result, name) + if name == nil then + name = "Result" + end + if result == nil then + log(name .. " variable not passed") + return + elseif not (type(result == "table")) then + log(name .. " variable not a table") + elseif not (type(result.name) == "string") then + log(name .. ".name variable not a string.") + elseif thxbob.lib.item.get_type(result.name) == nil then + log(name .. ".name not a valid item of any type.") + end + if result.amount then + if type(result.amount) == "number" then + log(name .. ".amount variable not a number.") + end + elseif result.amount_min and result.amount_max then + if not (type(result.amount_min) == "number") then + log(name .. ".amount_min variable not a number.") + end + if not (type(result.amount_max) == "number") then + log(name .. ".amount_max variable not a number.") + end + end + if result.probability then + if not (type(result.probability) == "number") then + log(name .. ".probability not a number") + end + end + if not (result.type == "item" or result.type == "fluid") then + log(name .. ".type not a valid result item type") + end +end diff --git a/Bio_Industries_2/libs/functions.lua b/Bio_Industries_2/libs/functions.lua index 77b38e2..9c39f42 100644 --- a/Bio_Industries_2/libs/functions.lua +++ b/Bio_Industries_2/libs/functions.lua @@ -1,80 +1,80 @@ -local BioInd = require('common')('Bio_Industries_2') - - --- Merges table2's contents into table1. -function thxbob.lib.table_merge(table1, table2) - for index, value in pairs(table2) do - if type(value) == "table" then - if type(table1[index]) == "table" then - thxbob.lib.table_merge(table1[index], table2[index]) - else - table1[index] = util.table.deepcopy(table2[index]) - end - else - table1[index] = value - end - end -end - - --- Converts recipe.result to recipe.results! -function thxbob.lib.result_check(object) -BioInd.show("Entered function result_check", object) - if object then - object.results = object.results or {} - - if object.result then - local item = thxbob.lib.item.basic_item({name = object.result}) -BioInd.show("item", item) - if object.result_count then - item.amount = object.result_count - object.result_count = nil - end - -BioInd.show("object.result", object.result) - thxbob.lib.item.add_new(object.results, item) -BioInd.show("object.results after add_new", object.results) - - if object.ingredients then -- It's a recipe - if not object.main_product then - if object.icon or object.subgroup or object.order or item.type ~= "item" then -- if we already have one, add the rest -BioInd.writeDebug("data.raw[%s][%s]: %s", {item.type, object.result, data.raw[item.type][object.result] or "nil"}) - if (not object.icon) and data.raw[item.type][object.result] and - data.raw[item.type][object.result].icon then - object.icon = data.raw[item.type][object.result].icon - object.icon_size = data.raw[item.type][object.result].icon_size - -- Make sure objects also have an icons definition - elseif not object.icons and data.raw[item.type][object.result] and - data.raw[item.type][object.result].icons and - -- Don't assume that an icon already exists, - -- it could be set later on! - data.raw[item.type][object.result].icon then - object.icons = { - {icon = data.raw[item.type][object.result].icon, icon_size = 64} - } - end - if not object.subgroup and data.raw[item.type][object.result] and - data.raw[item.type][object.result].subgroup then - object.subgroup = data.raw[item.type][object.result].subgroup - end - if not object.order and data.raw[item.type][object.result] and - data.raw[item.type][object.result].order then - object.order = data.raw[item.type][object.result].order - end - else -- otherwise just use main_product as a cheap way to set them all. - object.main_product = object.result - end - end - end - object.result = nil - end - - else - BioInd.writeDebug("%s does not exist.", {object}) - end -end - - -function thxbob.lib.belt_speed_ips(ips) - return ips * 1/480 -end +local BioInd = require('common')('Bio_Industries_2') + +-- Merges table2's contents into table1. +function thxbob.lib.table_merge(table1, table2) + for index, value in pairs(table2) do + if type(value) == "table" then + if type(table1[index]) == "table" then + thxbob.lib.table_merge(table1[index], table2[index]) + else + table1[index] = util.table.deepcopy(table2[index]) + end + else + table1[index] = value + end + end +end + +function thxbob.lib.minable_result_check(object) + if object then + if object.results == nil then + object.results = {} + end + + if object.result then + local item = thxbob.lib.item.ingredient({ type = "item", name = object.result, amount = 1 }) + if object.count then + item.amount = object.count + object.count = nil + end + thxbob.lib.item.add_new(object.results, item) + + object.result = nil + end + else + log(object .. " does not exist.") + end +end + +function thxbob.lib.belt_speed_ips(ips) + return ips * 1 / 480 +end + +--Inserts the new item into the table only if it doesn't already exist. (Index optional. Designed to insert strings only.) +function thxbob.lib.safe_insert(array, new_item, index) + local addit = true + for i, item in pairs(array) do + if item == new_item then + addit = false + end + end + if addit then + if index then + table.insert(array, index, new_item) + else + table.insert(array, new_item) + end + end +end + +--takes an item/fluid/entity(maybe even recipe) and returns a complete icons array. +--if it has no icons= tag, it builds one from icon and icon_size. +--Example use thxbob.lib.icons_from_item(data.raw.item.wood) +function thxbob.lib.icons_from_item(item) + if item and type(item) == "table" then + local icons = {} + if item.icons then + icons = item.icons + elseif item.icon then + icons = { { icon = item.icon, icon_size = item.icon_size or 64 } } + else + icons = nil + log(debug.traceback()) + log(item.name .. " has no valid icons.") + end + return icons + end + log(debug.traceback()) + log("object does not exist.") + return nil +end diff --git a/Bio_Industries_2/libs/item-functions.lua b/Bio_Industries_2/libs/item-functions.lua index 87452ca..d3983c4 100644 --- a/Bio_Industries_2/libs/item-functions.lua +++ b/Bio_Industries_2/libs/item-functions.lua @@ -1,178 +1,363 @@ -local BioInd = require('common')('Bio_Industries_2') - -if not thxbob.lib.item then thxbob.lib.item = {} end - - -function thxbob.lib.item.get_type(name) - local item_types = { - "ammo", - "armor", - "capsule", - "fluid", - "gun", - "item", - "module", - "tool", - "item-with-entity-data" - } - local item_type = nil - for i, type_name in pairs(item_types) do - if data.raw[type_name][name] then item_type = type_name end - end - return item_type -end - -function thxbob.lib.item.get_basic_type(name) - local item_type = "item" - if data.raw.fluid[name] then item_type = "fluid" end - return item_type -end - - -function thxbob.lib.item.basic_item(inputs) - local item = {} - - if inputs.name then - item.name = inputs.name - else - item.name = inputs[1] - end - - if inputs.amount then - item.amount = inputs.amount - else - if inputs[2] then - item.amount = inputs[2] - end - end - if not item.amount then - item.amount = 1 - end - - if inputs.type then - item.type = inputs.type - else - item.type = thxbob.lib.item.get_basic_type(item.name) - end - - if item.type == "item" then - if item.amount > 0 and item.amount < 1 then - item.amount = 1 - else - item.amount = math.floor(item.amount) - end - end - - return item -end - -function thxbob.lib.item.item(inputs) - local item = {} - - if inputs.name then - item.name = inputs.name - else - item.name = inputs[1] - end - - if inputs.amount then - item.amount = inputs.amount - else - if inputs[2] then - item.amount = inputs[2] - end - end - if not item.amount then - if inputs.amount_min and inputs.amount_max then - item.amount_min = inputs.amount_min - item.amount_max = inputs.amount_max - else - item.amount = 1 - end - end - if inputs.probability then item.probability = inputs.probability end - - if inputs.type then - item.type = inputs.type - else - item.type = thxbob.lib.item.get_basic_type(item.name) - end - - return item -end - - -function thxbob.lib.item.combine(item1_in, item2_in) - local item = {} - local item1 = thxbob.lib.item.item(item1_in) - local item2 = thxbob.lib.item.item(item2_in) - - item.name = item1.name - item.type = item1.type - - if item1.amount and item2.amount then - item.amount = item1.amount + item2.amount - elseif item1.amount_min and item1.amount_max and item2.amount_min and item2.amount_max then - item.amount_min = item1.amount_min + item2.amount_min - item.amount_max = item1.amount_max + item2.amount_max - else - if item1.amount_min and item1.amount_max and item2.amount then - item.amount_min = item1.amount_min + item2.amount - item.amount_max = item1.amount_max + item2.amount - elseif item1.amount and item2.amount_min and item2.amount_max then - item.amount_min = item1.amount + item2.amount_min - item.amount_max = item1.amount + item2.amount_max - end - end - - if item1.probability and item2.probability then - item.probability = (item1.probability + item2.probability) / 2 - elseif item1.probability then - item.probability = (item1.probability + 1) / 2 - elseif item2.probability then - item.probability = (item2.probability + 1) / 2 - end - - return item -end - - -function thxbob.lib.item.add(list, item_in) --increments amount if exists - local item = thxbob.lib.item.item(item_in) - local addit = true - for i, object in pairs(list) do - if object[1] == item.name or object.name == item.name then - addit = false - list[i] = thxbob.lib.item.combine(object, item) - end - end - if addit then table.insert(list, item) end -end - -function thxbob.lib.item.add_new(list, item_in) --ignores if exists - local item = thxbob.lib.item.item(item_in) - local addit = true - for i, object in pairs(list) do - if item.name == thxbob.lib.item.basic_item(object).name then addit = false end - end - if addit then - table.insert(list, item) - end -end - -function thxbob.lib.item.remove(list, item) - for i, object in ipairs(list) do - if object[1] == item or object.name == item then - table.remove(list, i) - end - end -end - -function thxbob.lib.item.set(list, item_in) - local item = thxbob.lib.item.item(item_in) - for i, object in pairs(list) do - if object[1] == item.name or object.name == item.name then - list[i] = item - end - end -end +local BioInd = require('common')('Bio_Industries_2') + + +if not thxbob.lib.item then + thxbob.lib.item = {} +end + +function thxbob.lib.item.get_type(name) --returns actual item type + local item_type = nil + if type(name) == "string" then + for type_name, _ in pairs(defines.prototypes["item"]) do + if data.raw[type_name] and data.raw[type_name][name] then + item_type = type_name + end + end + if data.raw.fluid and data.raw.fluid[name] then + item_type = "fluid" + end + else + log("Item name is not a string") + end + return item_type +end + +function thxbob.lib.item.get_basic_type(name) --returns fluid for fluid, item for all other types. + local item_type = thxbob.lib.item.get_type(name) + if not (item_type == "fluid" or item_type == nil) then + item_type = "item" + end + return item_type +end + +function thxbob.lib.item.get_basic_type_simple(name) --assumes type is item, even if the item doesn't exist + local item_type = "item" + if data.raw.fluid[name] then + item_type = "fluid" + end + return item_type +end + +function thxbob.lib.item.ingredient_simple(inputs) --doesn't care if the item actually exists or not, returns if a valid ingredient structure can be determined. + local item = {} + + if type(inputs) == "table" then + if inputs.name and type(inputs.name) == "string" then + item.name = inputs.name + else + log(debug.traceback()) + log("Unable to determine an ingredient name") + return nil + end + + if inputs.amount and type(inputs.amount) == "number" then + item.amount = inputs.amount + else + log(debug.traceback()) + log("Unable to determine an ingredient amount") + return nil + end + + if inputs.type then + item.type = inputs.type + else + log(debug.traceback()) + log("Unable to determine an ingredient type") + return nil + end + + if item.type == "item" then + if type(item.amount) ~= "number" or item.amount < 1 then + item.amount = 1 + else + item.amount = math.floor(item.amount) + end + end + if item.type == "fluid" then + item.temperature = inputs.temperature + item.minimum_temperature = inputs.minimum_temperature + item.maximum_temperature = inputs.maximum_temperature + item.fluidbox_index = inputs.fluidbox_index + item.fluidbox_multiplier = inputs.fluidbox_multiplier + end + + item.ignored_by_stats = inputs.ignored_by_stats + + return item + else + log(debug.traceback()) + thxbob.lib.error.ingredient(item) + return nil + end +end + +function thxbob.lib.item.ingredient(inputs) --returns a valid ingredient only if the item exists. + local item = thxbob.lib.item.ingredient_simple(inputs) + if item then + return item + else + if inputs and inputs.name then + log(inputs.name) + end + log(debug.traceback()) + thxbob.lib.error.ingredient(inputs) + return nil + end +end + +--Same as ingredient, but has support for amount_min, amount_max and probability +function thxbob.lib.item.result_simple(inputs) + local item = {} + + if type(inputs) == "table" then + if inputs.name and type(inputs.name) == "string" then + item.name = inputs.name + else + log(debug.traceback()) + log("Unable to determine a result name") + return nil + end + + if inputs.amount and type(inputs.amount) == "number" then + item.amount = inputs.amount + elseif inputs.amount_min and inputs.amount_max then + item.amount_min = inputs.amount_min + item.amount_max = inputs.amount_max + else + log(debug.traceback()) + log("Unable to determine a result amount") + return nil + end + + if inputs.probability then + item.probability = inputs.probability + end + + if inputs.type then + item.type = inputs.type + else + item.type = thxbob.lib.item.get_basic_type_simple(item.name) + end + + if item.type == "item" then + if item.amount then + if type(item.amount) ~= "number" or item.amount < 1 then + item.amount = 1 + else + item.amount = math.floor(item.amount) + end + end + if item.amount_min then + if type(item.amount_min) ~= "number" or item.amount_min < 1 then + item.amount_min = 0 + else + item.amount_min = math.floor(item.amount_min) + end + end + if item.amount_max then + if type(item.amount_max) ~= "number" or item.amount_max < 1 then + item.amount_max = 1 + else + item.amount_max = math.ceil(item.amount_max) + end + end + end + if item.type == "fluid" then + item.fluidbox_index = inputs.fluidbox_index + item.temperature = inputs.temperature + else + item.extra_count_fraction = inputs.extra_count_fraction + item.percent_spoiled = inputs.percent_spoiled + end + + item.ignored_by_stats = inputs.ignored_by_stats + item.ignored_by_productivity = inputs.ignored_by_productivity + item.show_details_in_recipe_tooltip = inputs.show_details_in_recipe_tooltip + end + + if + type(item.name) == "string" + and (type(item.amount) == "number" or (type(item.amount_min) == "number" and type(item.amount_max) == "number")) + and (item.probability == nil or type(item.probability) == "number") + and (item.type == "item" or item.type == "fluid") + then + return item + else + log(debug.traceback()) + thxbob.lib.error.result(item) + return nil + end +end + +function thxbob.lib.item.result(inputs) --returns a valid result only if the item exists. + local item = thxbob.lib.item.result_simple(inputs) + if item then + return item + else + if inputs and inputs.name then + log(inputs.name) + end + log(debug.traceback()) + thxbob.lib.error.result(inputs) + return nil + end +end + +function thxbob.lib.item.combine(item1_in, item2_in) + local item = {} + local item1 = thxbob.lib.item.result(item1_in) + local item2 = thxbob.lib.item.result(item2_in) + + if item1 and item2 then + item.name = item1.name + item.type = item1.type + + if item1.amount and item2.amount then + item.amount = item1.amount + item2.amount + elseif item1.amount_min and item1.amount_max and item2.amount_min and item2.amount_max then + item.amount_min = item1.amount_min + item2.amount_min + item.amount_max = item1.amount_max + item2.amount_max + elseif item1.amount_min and item1.amount_max and item2.amount then + item.amount_min = item1.amount_min + item2.amount + item.amount_max = item1.amount_max + item2.amount + elseif item1.amount and item2.amount_min and item2.amount_max then + item.amount_min = item1.amount + item2.amount_min + item.amount_max = item1.amount + item2.amount_max + end + + if item1.probability and item2.probability then + item.probability = (item1.probability + item2.probability) / 2 + elseif item1.probability then + item.probability = (item1.probability + 1) / 2 + elseif item2.probability then + item.probability = (item2.probability + 1) / 2 + end + + if item1.ignored_by_productivity and item2.ignored_by_productivity then + item.ignored_by_productivity = item1.ignored_by_productivity + item2.ignored_by_productivity + elseif item1.ignored_by_productivity then + item.ignored_by_productivity = item1.ignored_by_productivity + elseif item2.ignored_by_productivity then + item.ignored_by_productivity = item2.ignored_by_productivity + end + + if item1.ignored_by_stats and item2.ignored_by_stats then + item.ignored_by_stats = item1.ignored_by_stats + item2.ignored_by_stats + elseif item1.ignored_by_stats then + item.ignored_by_stats = item1.ignored_by_stats + elseif item2.ignored_by_stats then + item.ignored_by_stats = item2.ignored_by_stats + end + + item.fluidbox_index = item1.fluidbox_index or item2.fluidbox_index + + return item + else + return nil + end +end + +function thxbob.lib.item.add(list, item_in) --increments amount if exists + local item = thxbob.lib.item.result(item_in) + if type(list) == "table" and item then + local addit = true + for i, object in pairs(list) do + if object.name == item.name then + addit = false + list[i] = thxbob.lib.item.combine(object, item) + end + end + if addit then + table.insert(list, item) + end + end +end + +function thxbob.lib.item.add_new(list, item_in) --ignores if exists + local item = thxbob.lib.item.result(item_in) + if type(list) == "table" and item then + local addit = true + for i, object in pairs(list) do + local basic_object = thxbob.lib.item.result(object) + if basic_object and item.name == basic_object.name then + addit = false + end + end + if addit then + table.insert(list, item) + end + end +end + +function thxbob.lib.item.remove(list, item) + if type(list) == "table" and type(item) == "string" then + for i, object in ipairs(list) do + if object.name == item then + table.remove(list, i) + end + end + else + log(debug.traceback()) + thxbob.lib.error.item(item) + end +end + +function thxbob.lib.item.set(list, item_in) + local item = thxbob.lib.item.result(item_in) + if type(list) == "table" and item then + local addit = true + for i, object in pairs(list) do + if object.name == item.name then + list[i] = item + addit = false + end + end + if addit then + table.insert(list, item) + end + end +end + +function thxbob.lib.item.hide(item_name) + if type(item_name) == "string" then + local item = data.raw.item[item_name] or data.raw.fluid[item_name] + if item then + item.hidden = true + end + else + log(debug.traceback()) + thxbob.lib.error.item(item_name) + end +end + +function thxbob.lib.item.hide_entity(type_name, entity_name) + if type(type_name) == "string" and type(entity_name) == "string" then + local entities = data.raw[type_name] + if entities then + local entity = entities[entity_name] + if entity then + entity.hidden = true + end + end + else + log(debug.traceback()) + thxbob.lib.error.item(entity_name) + end +end + +function thxbob.lib.item.set_subgroup(item_name, subgroup) + if type(item_name) == "string" and type(subgroup) == "string" then + local item = data.raw.item[item_name] + if item then + item.subgroup = subgroup + else + item = data.raw.fluid[item_name] + if item then + item.subgroup = subgroup + end + end + else + log(debug.traceback()) + thxbob.lib.error.item(item_name) + end +end diff --git a/Bio_Industries_2/libs/recipe-functions.lua b/Bio_Industries_2/libs/recipe-functions.lua index 452f9f6..4825276 100644 --- a/Bio_Industries_2/libs/recipe-functions.lua +++ b/Bio_Industries_2/libs/recipe-functions.lua @@ -1,163 +1,560 @@ -local BioInd = require('common')('Bio_Industries_2') - -if not thxbob.lib.recipe then thxbob.lib.recipe = {} end - - -function thxbob.lib.recipe.replace_ingredient(recipe, old, new) - local retval = false - if data.raw.recipe[recipe] and thxbob.lib.item.get_type(new) then - - local amount = 0 - if data.raw.recipe[recipe].ingredients then - for i, ingredient in pairs(data.raw.recipe[recipe].ingredients) do - local item = thxbob.lib.item.basic_item(ingredient) - if item.name == old then - amount = item.amount + amount - end - end - if amount > 0 then - if thxbob.lib.item.get_type(old) == "fluid" and thxbob.lib.item.get_type(new) == "item" then - amount = math.ceil(amount / 10) - end - if thxbob.lib.item.get_type(old) == "item" and thxbob.lib.item.get_type(new) == "fluid" then - amount = amount * 10 - end - thxbob.lib.recipe.remove_ingredient(recipe, old) - thxbob.lib.recipe.add_ingredient(recipe, {new, amount}) - return true - else - return false - end - end - else - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - if not thxbob.lib.item.get_type(new) then - BioInd.writeDebug("Ingredient %s does not exist.", {new}) - end - end - - return retval -end - - -function thxbob.lib.recipe.replace_ingredient_in_all(old, new) - if thxbob.lib.item.get_basic_type(new) then - for i, recipe in pairs(data.raw.recipe) do - thxbob.lib.recipe.replace_ingredient(recipe.name, old, new) - end - else - BioInd.writeDebug("Ingredient %s does not exist.", {new}) - end -end - - -function thxbob.lib.recipe.remove_ingredient(recipe, item) - if data.raw.recipe[recipe] then - if data.raw.recipe[recipe].ingredients then - thxbob.lib.item.remove(data.raw.recipe[recipe].ingredients, item) - end - - else - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end -end - - -function thxbob.lib.recipe.add_new_ingredient(recipe, item) - if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then - if data.raw.recipe[recipe].ingredients then - thxbob.lib.item.add_new(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item)) - end - - else - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - if not thxbob.lib.item.get_type(item) then - BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name}) - end - end -end - -function thxbob.lib.recipe.add_ingredient(recipe, item) - if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then - if data.raw.recipe[recipe].ingredients then - thxbob.lib.item.add(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item)) - end - - else - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then - BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name}) - end - end -end - -function thxbob.lib.recipe.set_ingredient(recipe, item) - if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then - if data.raw.recipe[recipe].ingredients then - thxbob.lib.item.set(data.raw.recipe[recipe].ingredients, thxbob.lib.item.basic_item(item)) - end - - else - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then - BioInd.writeDebug("Ingredient %s does not exist.", {thxbob.lib.item.basic_item(item).name}) - end - end -end - - -function thxbob.lib.recipe.add_result(recipe, item) - if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then - if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then - thxbob.lib.result_check(data.raw.recipe[recipe]) - thxbob.lib.item.add(data.raw.recipe[recipe].results, item) - end - - else - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then - BioInd.writeDebug("Item %s does not exist.", {thxbob.lib.item.basic_item(item).name}) - end - end -end - -function thxbob.lib.recipe.set_result(recipe, item) - if data.raw.recipe[recipe] and thxbob.lib.item.get_type(thxbob.lib.item.basic_item(item).name) then - if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then - thxbob.lib.result_check(data.raw.recipe[recipe]) - thxbob.lib.item.set(data.raw.recipe[recipe].results, item) - end - - else - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - if not thxbob.lib.item.get_basic_type(thxbob.lib.item.basic_item(item).name) then - BioInd.writeDebug("Item %s does not exist.", {thxbob.lib.item.basic_item(item).name}) - end - end -end - -function thxbob.lib.recipe.remove_result(recipe, item) -local f_name = "remove_result" -BioInd.writeDebug("Entered function %s(%s, %s)", {f_name, recipe, item}) - if data.raw.recipe[recipe] then - if data.raw.recipe[recipe].result or data.raw.recipe[recipe].results then - thxbob.lib.result_check(data.raw.recipe[recipe]) - thxbob.lib.item.remove(data.raw.recipe[recipe].results, item) - end - - else - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end -end \ No newline at end of file +local BioInd = require('common')('Bio_Industries_2') + +if not thxbob.lib.recipe then + thxbob.lib.recipe = {} +end + +local function quantity_convertion(amount, old, new) + if thxbob.lib.item.get_type(old) == "fluid" and thxbob.lib.item.get_type(new) == "item" then + amount = math.ceil(amount / 10) + end + if thxbob.lib.item.get_type(old) == "item" and thxbob.lib.item.get_type(new) == "fluid" then + amount = amount * 10 + end + return amount +end + +local function get_old_quantity(ingredients, old) + local amount = 0 + for i, ingredient in pairs(ingredients) do + local item = thxbob.lib.item.ingredient_simple(ingredient) + if item then + if item.name == old then + amount = item.amount + amount + end + else + log("recipe contains an invalid ingredient") + end + end + return amount +end + +local function replace_ingredient(ingredients, old, new, new_type) + local amount = get_old_quantity(ingredients, old) + if amount > 0 then + amount = quantity_convertion(amount, old, new) + thxbob.lib.item.remove(ingredients, old) + thxbob.lib.item.add(ingredients, { type = new_type, name = new, amount = amount }) + return true + end + return false +end + +function thxbob.lib.recipe.replace_ingredient(recipe, old, new) + if type(recipe) == "string" and type(old) == "string" and type(new) == "string" and data.raw.recipe[recipe] then + local retval = false + local new_type = thxbob.lib.item.get_type(new) + + if new_type and data.raw.recipe[recipe].ingredients then + new_type = new_type == "fluid" and "fluid" or "item" + if replace_ingredient(data.raw.recipe[recipe].ingredients, old, new, new_type) then + retval = true + end + end + + return retval + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + thxbob.lib.error.item(old) + thxbob.lib.error.item(new) + return false + end +end + +function thxbob.lib.recipe.replace_ingredient_in_all(old, new) + if type(old) == "string" and type(new) == "string" and thxbob.lib.item.get_type(new) then + for i, recipe in pairs(data.raw.recipe) do + thxbob.lib.recipe.replace_ingredient(recipe.name, old, new) + end + else + log(debug.traceback()) + thxbob.lib.error.item(old) + thxbob.lib.error.item(new) + end +end + +function thxbob.lib.recipe.remove_ingredient(recipe, item) + if type(recipe) == "string" and type(item) == "string" and data.raw.recipe[recipe] then + if data.raw.recipe[recipe].ingredients then + thxbob.lib.item.remove(data.raw.recipe[recipe].ingredients, item) + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + thxbob.lib.error.item(item) + end +end + +function thxbob.lib.recipe.clear_ingredients(recipe) + if type(recipe) == "string" and data.raw.recipe[recipe] then + if data.raw.recipe[recipe].ingredients then + data.raw.recipe[recipe].ingredients = {} + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end +end + +function thxbob.lib.recipe.add_new_ingredient(recipe, item_in) + local item = thxbob.lib.item.ingredient(item_in) + if + type(recipe) == "string" + and data.raw.recipe[recipe] + and item + and type(item) == "table" + and thxbob.lib.item.get_type(item.name) + then + if data.raw.recipe[recipe].ingredients then + thxbob.lib.item.add_new(data.raw.recipe[recipe].ingredients, item) + end + else + if not (type(recipe) == "string" and data.raw.recipe[recipe]) then + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end + end +end + +function thxbob.lib.recipe.add_ingredient(recipe, item_in) + local item = thxbob.lib.item.ingredient(item_in) + if + type(recipe) == "string" + and data.raw.recipe[recipe] + and item + and type(item) == "table" + and thxbob.lib.item.get_type(item.name) + then + if data.raw.recipe[recipe].ingredients then + thxbob.lib.item.add(data.raw.recipe[recipe].ingredients, item) + end + else + if not (type(recipe) == "string" and data.raw.recipe[recipe]) then + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end + end +end + +function thxbob.lib.recipe.add_ingredients(recipe, ingredients) + if type(recipe) == "string" and data.raw.recipe[recipe] and type(ingredients) == "table" then + for i, ingredient in pairs(ingredients) do + thxbob.lib.recipe.add_ingredient(recipe, ingredient) + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end +end + +function thxbob.lib.recipe.set_ingredient(recipe, item_in) + local item = thxbob.lib.item.ingredient(item_in) + if + type(recipe) == "string" + and data.raw.recipe[recipe] + and item + and type(item) == "table" + and thxbob.lib.item.get_type(item.name) + then + if data.raw.recipe[recipe].ingredients then + thxbob.lib.item.set(data.raw.recipe[recipe].ingredients, item) + end + else + if not (type(recipe) == "string" and data.raw.recipe[recipe]) then + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end + end +end + +function thxbob.lib.recipe.set_ingredients(recipe, ingredients) + if type(recipe) == "string" and data.raw.recipe[recipe] and type(ingredients) == "table" then + thxbob.lib.recipe.clear_ingredients(recipe) + thxbob.lib.recipe.add_ingredients(recipe, ingredients) + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end +end + +function thxbob.lib.recipe.add_result(recipe, item_in) + local item = thxbob.lib.item.result(item_in) + if + type(recipe) == "string" + and data.raw.recipe[recipe] + and item + and type(item) == "table" + and thxbob.lib.item.get_type(item.name) + then + if data.raw.recipe[recipe].results then + thxbob.lib.item.add(data.raw.recipe[recipe].results, item) + end + else + if not (type(recipe) == "string" and data.raw.recipe[recipe]) then + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end + end +end + +function thxbob.lib.recipe.set_result(recipe, item_in) + local item = thxbob.lib.item.result(item_in) + if + type(recipe) == "string" + and data.raw.recipe[recipe] + and item + and type(item) == "table" + and thxbob.lib.item.get_type(item.name) + then + if data.raw.recipe[recipe].results then + thxbob.lib.item.set(data.raw.recipe[recipe].results, item) + end + else + if not (type(recipe) == "string" and data.raw.recipe[recipe]) then + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end + end +end + +function thxbob.lib.recipe.remove_result(recipe, item) + if type(recipe) == "string" and type(item) == "string" and data.raw.recipe[recipe] then + if data.raw.recipe[recipe].results then + thxbob.lib.item.remove(data.raw.recipe[recipe].results, item) + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + thxbob.lib.error.item(item) + end +end + +function thxbob.lib.recipe.enabled(recipe, bool) + if type(recipe) == "string" and type(bool) == "boolean" and data.raw.recipe[recipe] then + data.raw.recipe[recipe].enabled = bool or false + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + if not (type(bool) == "boolean") then + log("Variable Bool is missing or not of type Boolean") + end + end +end + +function thxbob.lib.recipe.hide(recipe) + if type(recipe) == "string" and data.raw.recipe[recipe] then + local prototype = data.raw.recipe[recipe] + prototype.hidden = true + prototype.enabled = false + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end +end + +function thxbob.lib.recipe.set_energy_required(recipe, time) + if type(recipe) == "string" and type(time) == "number" and data.raw.recipe[recipe] then + data.raw.recipe[recipe].energy_required = time + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + if not (type(time) == "number") then + log("Variable Time is missing or not of type Number") + end + end +end + +local function duplicate_ingredient_check(recipe_name, ingredients) + local new_ingredients = {} + local items = {} + local rebuild = false + for i, ingredient in ipairs(ingredients) do + local item = thxbob.lib.item.ingredient(ingredient) + if item then -- duplicate value + if items[item.name] then + rebuild = true + log("Duplicate item " .. item.name .. " found on recipe " .. recipe_name .. ".") + else + items[item.name] = true + thxbob.lib.item.add(new_ingredients, ingredient) + end + else --invalid value + rebuild = true + log("Invalid item found on recipe " .. recipe_name .. ".") + end + end + if rebuild == true then + return new_ingredients + end +end + +local function duplicate_ingredient_check_full(recipe) + if type(recipe) == "string" and data.raw.recipe[recipe] then + if data.raw.recipe[recipe].ingredients then + local ingredients = duplicate_ingredient_check(recipe, data.raw.recipe[recipe].ingredients) + if ingredients then + data.raw.recipe[recipe].ingredients = ingredients + end + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe) + end +end + +function thxbob.lib.recipe.ingredients_cleanup() + log("Running recipe ingredients cleanup...") + for recipe_name, recipe in pairs(data.raw.recipe) do + duplicate_ingredient_check_full(recipe_name) + end +end + +function thxbob.lib.recipe.set_subgroup(recipe_name, subgroup) + if type(recipe_name) == "string" and type(subgroup) == "string" then + local recipe = data.raw.recipe[recipe_name] + if recipe then + recipe.subgroup = subgroup + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe_name) + end +end + +function thxbob.lib.recipe.set_category(recipe_name, category) + if type(recipe_name) == "string" and type(category) == "string" then + local recipe = data.raw.recipe[recipe_name] + if recipe then + recipe.category = category + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe_name) + end +end + +function thxbob.lib.recipe.allow_productivity(recipe_name) + if type(recipe_name) == "string" then + local recipe = data.raw.recipe[recipe_name] + if recipe then + recipe.allow_productivity = true + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe_name) + end +end + +function thxbob.lib.recipe.disallow_productivity(recipe_name) + if type(recipe_name) == "string" then + local recipe = data.raw.recipe[recipe_name] + if recipe then + recipe.allow_productivity = false + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe_name) + end +end + +function thxbob.lib.recipe.add_additional_category(recipe_name, category_name) + local recipe = data.raw.recipe[recipe_name] + local category = data.raw["recipe-category"][category_name] + if recipe and category then + recipe.additional_categories = recipe.additional_categories or {} + thxbob.lib.safe_insert(recipe.additional_categories, category_name) + end +end + +if mods["quality"] then + function thxbob.lib.recipe.update_recycling_recipe_icon(recipe_name, icon_name, size) + --Does not handle multiple icons + local target_recipe = data.raw.recipe[recipe_name] + local image_size = size or 64 + if type(icon_name) == "string" then + if target_recipe then + target_recipe.icons[2].icon = icon_name + target_recipe.icons[2].icon_size = image_size + target_recipe.icons[2].scale = 0.4 / (image_size / 64) + else + log(debug.traceback()) + log("Recycling recipe " .. recipe_name .. " not found") + end + else + log(debug.traceback()) + log("Invalid icon input") + end + end + + function thxbob.lib.recipe.update_recycling_recipe_single(recipe_name, replace_icon) + --Requires that the target recycling recipe's prefix is the same as the source used for recipe_name + if type(recipe_name) == "string" then + local target_recipe_name = recipe_name .. "-recycling" + local source_recipe = data.raw.recipe[recipe_name] + local target_recipe = data.raw.recipe[target_recipe_name] + if source_recipe then + if target_recipe then + local new_time = source_recipe.energy_required or 0.5 + target_recipe.energy_required = new_time / 16 + target_recipe.results = {} + local source_output_amount = 1 + for i, source_results in pairs(source_recipe.results) do + if source_results.name == recipe_name then + source_output_amount = source_results.amount + end + end + for i, outputs in pairs(source_recipe.ingredients) do + if source_recipe.ingredients[i].type == "item" then + table.insert(target_recipe.results, { + type = "item", + name = source_recipe.ingredients[i].name, + amount = source_recipe.ingredients[i].amount / source_output_amount / 4, + extra_count_fraction = source_recipe.ingredients[i].amount / source_output_amount % 4 / 4, + }) + end + end + + --Tries to find replacement icon if item of same name exists. If not, icon replacement will have do be done manually if desired. + if replace_icon == true then + local item_type = thxbob.lib.item.get_type(recipe_name) + local recipe_icon = target_recipe.icons[2].icon + local recipe_icon_size = target_recipe.icons[2].icon_size or 64 + if item_type and data.raw[item_type][recipe_name] then + if data.raw[item_type][recipe_name].icon then + recipe_icon = data.raw[item_type][recipe_name].icon + recipe_icon_size = data.raw[item_type][recipe_name].icon_size or 64 + thxbob.lib.recipe.update_recycling_recipe_icon(target_recipe_name, recipe_icon, recipe_icon_size) + elseif data.raw[item_type][recipe_name].icons then + target_recipe.icons = { { icon = "__quality__/graphics/icons/recycling.png" } } + for i, icon_replacement in pairs(data.raw[item_type][recipe_name].icons) do + local image_size = icon_replacement.icon_size or 64 + local image_scale = icon_replacement.scale or 1 + table.insert(target_recipe.icons, { + icon = icon_replacement.icon, + icon_size = image_size, + scale = 0.4 * image_scale / (image_size / 64), + shift = util.mul_shift(icon_replacement.shift, 0.8), + tint = icon_replacement.tint, + }) + end + table.insert(target_recipe.icons, { icon = "__quality__/graphics/icons/recycling-top.png" }) + end + end + end + else + log(debug.traceback()) + log("Recycling recipe " .. target_recipe_name .. " not found") + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe_name) + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recipe_name) + end + end + + function thxbob.lib.recipe.update_recycling_recipe(recipe_name) + if type(recipe_name) == "string" then + thxbob.lib.recipe.update_recycling_recipe_single(recipe_name, true) + end + if type(recipe_name) == "table" then + for i, single_recipe in pairs(recipe_name) do + thxbob.lib.recipe.update_recycling_recipe_single(single_recipe, true) + end + end + end + + function thxbob.lib.recipe.update_recycling_recipe_from_recipe(recycling_recipe, desired_recipe, replace_icon) + if + type(recycling_recipe) == "string" + and data.raw.recipe[recycling_recipe] + and string.sub(data.raw.recipe[recycling_recipe].name, -10) == "-recycling" + then + if type(desired_recipe) == "string" and data.raw.recipe[desired_recipe] then + local item_name = string.sub(recycling_recipe, 1, -11) + local target_recipe = data.raw.recipe[recycling_recipe] + local source_recipe = data.raw.recipe[desired_recipe] + local new_time = source_recipe.energy_required or 0.5 + target_recipe.energy_required = new_time / 16 + target_recipe.results = {} + local source_output_amount = 1 + for i, source_results in pairs(source_recipe.results) do + if source_results.name == item_name then + source_output_amount = source_results.amount + end + end + for i, outputs in pairs(source_recipe.ingredients) do + if source_recipe.ingredients[i].type == "item" then + table.insert(target_recipe.results, { + type = "item", + name = source_recipe.ingredients[i].name, + amount = source_recipe.ingredients[i].amount / source_output_amount / 4, + extra_count_fraction = source_recipe.ingredients[i].amount / source_output_amount % 4 / 4, + }) + end + end + + if replace_icon == true then + local item_type = thxbob.lib.item.get_type(item_name) + local recipe_icon = target_recipe.icons[2].icon + local recipe_icon_size = target_recipe.icons[2].icon_size or 64 + if item_type and data.raw[item_type][item_name] then + if data.raw[item_type][item_name].icon then + recipe_icon = data.raw[item_type][item_name].icon + recipe_icon_size = data.raw[item_type][item_name].icon_size or 64 + thxbob.lib.recipe.update_recycling_recipe_icon(recycling_recipe, recipe_icon, recipe_icon_size) + elseif data.raw[item_type][item_name].icons then + target_recipe.icons = { { icon = "__quality__/graphics/icons/recycling.png" } } + for i, icon_replacement in pairs(data.raw[item_type][item_name].icons) do + local image_size = icon_replacement.icon_size or 64 + local image_scale = icon_replacement.scale or 1 + table.insert(target_recipe.icons, { + icon = icon_replacement.icon, + icon_size = image_size, + scale = 0.4 * image_scale / (image_size / 64), + shift = util.mul_shift(icon_replacement.shift, 0.8), + tint = icon_replacement.tint, + }) + end + table.insert(target_recipe.icons, { icon = "__quality__/graphics/icons/recycling-top.png" }) + end + end + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(desired_recipe) + end + else + log(debug.traceback()) + thxbob.lib.error.recipe(recycling_recipe) + end + end +else + function thxbob.lib.recipe.update_recycling_recipe_icon() + log(debug.traceback()) + log("Improper function call. Cannot update recycling without Quality mod.") + end + + function thxbob.lib.recipe.update_recycling_recipe_single() + log(debug.traceback()) + log("Improper function call. Cannot update recycling without Quality mod.") + end + + function thxbob.lib.recipe.update_recycling_recipe() + log(debug.traceback()) + log("Improper function call. Cannot update recycling without Quality mod.") + end + + function thxbob.lib.recipe.update_recycling_recipe_to_self_recipe() + log(debug.traceback()) + log("Improper function call. Cannot update recycling without Quality mod.") + end + + function thxbob.lib.recipe.update_recycling_recipe_from_recipe() + log(debug.traceback()) + log("Improper function call. Cannot update recycling without Quality mod.") + end +end diff --git a/Bio_Industries_2/libs/technology-functions.lua b/Bio_Industries_2/libs/technology-functions.lua index e388125..1534cf1 100644 --- a/Bio_Industries_2/libs/technology-functions.lua +++ b/Bio_Industries_2/libs/technology-functions.lua @@ -1,173 +1,419 @@ -local BioInd = require('common')('Bio_Industries_2') - -if not thxbob.lib.tech then thxbob.lib.tech = {} end - - -function thxbob.lib.tech.replace_science_pack(technology, old, new) - if data.raw.technology[technology] and data.raw.tool[new] then - local doit = false - local amount = 0 - for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do - if ingredient[1] == old then - doit = true - amount = ingredient[2] + amount - end - if ingredient.name == old then - doit = true - amount = ingredient.amount + amount - end - end - if doit then - thxbob.lib.tech.remove_science_pack(technology, old) - thxbob.lib.tech.add_science_pack(technology, new, amount) - end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end - if not data.raw.tool[new] then - BioInd.writeDebug("Science pack %s does not exist.", {new}) - end - end -end - -function thxbob.lib.tech.add_new_science_pack(technology, pack, amount) - if data.raw.technology[technology] and data.raw.tool[pack] then - local addit = true - for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do - if ingredient[1] == pack or ingredient.name == pack then addit = false end - end - if addit then table.insert(data.raw.technology[technology].unit.ingredients, {pack, amount}) end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end - if not data.raw.tool[pack] then - BioInd.writeDebug("Science pack %s does not exist.", {pack}) - end - end -end - -function thxbob.lib.tech.add_science_pack(technology, pack, amount) - if data.raw.technology[technology] and data.raw.tool[pack] then - local addit = true - for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do - if ingredient[1] == pack then - addit = false - ingredient[2] = ingredient[2] + amount - end - if ingredient.name == pack then - addit = false - ingredient.amount = ingredient.amount + amount - end - end - if addit then - table.insert(data.raw.technology[technology].unit.ingredients, {pack, amount}) - end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology " .. tostring(technology) .. " does not exist.") - end - if not data.raw.tool[pack] then - BioInd.writeDebug("Science pack %s does not exist.", {pack}) - end - end -end - -function thxbob.lib.tech.remove_science_pack(technology, pack) - if data.raw.technology[technology] then - for i, ingredient in pairs(data.raw.technology[technology].unit.ingredients) do - if ingredient[1] == pack or ingredient.name == pack then - table.remove(data.raw.technology[technology].unit.ingredients, i) - end - end - else - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end -end - - -function thxbob.lib.tech.add_recipe_unlock(technology, recipe) - if data.raw.technology[technology] and data.raw.recipe[recipe] then - local addit = true - if not data.raw.technology[technology].effects then - data.raw.technology[technology].effects = {} - end - for i, effect in pairs(data.raw.technology[technology].effects) do - if effect.type == "unlock-recipe" and effect.recipe == recipe then addit = false end - end - if addit then table.insert(data.raw.technology[technology].effects, {type = "unlock-recipe", recipe = recipe}) end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end - if not data.raw.recipe[recipe] then - BioInd.writeDebug("Recipe %s does not exist.", {recipe}) - end - end -end - -function thxbob.lib.tech.remove_recipe_unlock(technology, recipe) - if data.raw.technology[technology] and data.raw.technology[technology].effects then - for i, effect in pairs(data.raw.technology[technology].effects) do - if effect.type == "unlock-recipe" and effect.recipe == recipe then - table.remove(data.raw.technology[technology].effects, i) - end - end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end - end -end - -function thxbob.lib.tech.replace_prerequisite(technology, old, new) - if data.raw.technology[technology] and data.raw.technology[new] then - for i, prerequisite in ipairs(data.raw.technology[technology].prerequisites) do - if prerequisite == old then - thxbob.lib.tech.remove_prerequisite(technology, old) - thxbob.lib.tech.add_prerequisite(technology, new) - end - end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end - if not data.raw.technology[new] then - BioInd.writeDebug("Technology %s does not exist.", {new}) - end - end -end - -function thxbob.lib.tech.add_prerequisite(technology, prerequisite) - if data.raw.technology[technology] and data.raw.technology[prerequisite] then - local addit = true - if data.raw.technology[technology].prerequisites then - for i, check in ipairs(data.raw.technology[technology].prerequisites) do - if check == prerequisite then addit = false end - end - else - data.raw.technology[technology].prerequisites = {} - end - if addit then table.insert(data.raw.technology[technology].prerequisites, prerequisite) end - else - if not data.raw.technology[technology] then - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end - if not data.raw.technology[prerequisite] then - BioInd.writeDebug("Technology %s does not exist.", {prerequisite}) - end - end -end - -function thxbob.lib.tech.remove_prerequisite(technology, prerequisite) - if data.raw.technology[technology] then - for i, check in ipairs(data.raw.technology[technology].prerequisites) do - if check == prerequisite then - table.remove(data.raw.technology[technology].prerequisites, i) - end - end - else - BioInd.writeDebug("Technology %s does not exist.", {technology}) - end -end +local BioInd = require('common')('Bio_Industries_2') + +if not thxbob.lib.tech then + thxbob.lib.tech = {} +end + +local function add_new_science_pack(technology, pack, amount) + if technology.unit and technology.unit.ingredients then + local addit = true + for i, ingredient in pairs(technology.unit.ingredients) do + if ingredient[1] == pack then + addit = false + end + end + if addit then + table.insert(technology.unit.ingredients, { pack, amount }) + end + end +end + +local function add_science_pack(technology, pack, amount) + if technology.unit and technology.unit.ingredients then + local addit = true + for i, ingredient in pairs(technology.unit.ingredients) do + if ingredient[1] == pack then + addit = false + ingredient[2] = ingredient[2] + amount + end + end + if addit then + table.insert(technology.unit.ingredients, { pack, amount }) + end + end +end + +local function remove_science_pack(technology, pack) + if technology.unit and technology.unit.ingredients then + for i, ingredient in pairs(technology.unit.ingredients) do + if ingredient[1] == pack then + table.remove(technology.unit.ingredients, i) + end + end + end +end + +local function replace_science_pack(technology, old, new) + if technology.unit and technology.unit.ingredients then + local doit = false + local amount = 0 + for i, ingredient in pairs(technology.unit.ingredients) do + if ingredient[1] == old then + doit = true + amount = ingredient[2] + amount + end + end + if doit then + remove_science_pack(technology, old) + add_science_pack(technology, new, amount) + end + end +end + +function thxbob.lib.tech.replace_science_pack(technology, old, new) + if + type(technology) == "string" + and type(old) == "string" + and type(new) == "string" + and data.raw.technology[technology] + -- data.raw.tool[old] and + and data.raw.tool[new] + then + if data.raw.technology[technology].unit then + replace_science_pack(data.raw.technology[technology], old, new) + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.item_of_type(old, "tool", "Old science pack") + thxbob.lib.error.item_of_type(new, "tool", "New science pack") + end +end + +function thxbob.lib.tech.add_new_science_pack(technology, pack, amount) + if + type(technology) == "string" + and type(pack) == "string" + and type(amount) == "number" + and data.raw.technology[technology] + and data.raw.tool[pack] + then + if data.raw.technology[technology].unit then + add_new_science_pack(data.raw.technology[technology], pack, amount) + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.item_of_type(pack, "tool", "Science pack") + end +end + +function thxbob.lib.tech.add_science_pack(technology, pack, amount) + if + type(technology) == "string" + and type(pack) == "string" + and type(amount) == "number" + and data.raw.technology[technology] + and data.raw.tool[pack] + then + if data.raw.technology[technology].unit then + add_science_pack(data.raw.technology[technology], pack, amount) + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.item_of_type(pack, "tool", "Science pack") + end +end + +function thxbob.lib.tech.add_science_packs(technology, science_packs) + if type(technology) == "string" and type(science_packs) == "table" then + for i, science_pack in pairs(science_packs) do + if + type(science_pack) == "table" + and type(science_pack[1]) == "string" + and data.raw.tool[science_pack[1]] + and type(science_pack[2]) == "number" + then + thxbob.lib.tech.add_science_pack(technology, science_pack[1], science_pack[2]) + end + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + end +end + +function thxbob.lib.tech.remove_science_pack(technology, pack) + if type(technology) == "string" and type(pack) == "string" and data.raw.technology[technology] then + if data.raw.technology[technology].unit then + remove_science_pack(data.raw.technology[technology], pack) + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + end +end + +function thxbob.lib.tech.clear_science_packs(technology) + if type(technology) == "string" and data.raw.technology[technology] then + if data.raw.technology[technology].unit then + data.raw.technology[technology].unit.ingredients = {} + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + end +end + +function thxbob.lib.tech.set_science_packs(technology, science_packs) + if type(technology) == "string" and data.raw.technology[technology] and type(science_packs) == "table" then + thxbob.lib.tech.clear_science_packs(technology) + thxbob.lib.tech.add_science_packs(technology, science_packs) + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + end +end + +function thxbob.lib.tech.set_science_pack_count(technology, count) + if type(technology) == "string" and data.raw.technology[technology] then + local prototype = data.raw.technology[technology] + if prototype.unit then + prototype.unit.count = count + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + end +end + +local function has_recipe_unlock(technology, recipe) + if technology.effects then + for i, effect in pairs(technology.effects) do + if effect.type == "unlock-recipe" and effect.recipe == recipe then + return true + end + end + end + return false +end + +local function add_recipe_unlock(technology, recipe) + local addit = true + if not technology.effects then + technology.effects = {} + end + for i, effect in pairs(technology.effects) do + if effect.type == "unlock-recipe" and effect.recipe == recipe then + addit = false + end + end + if addit then + table.insert(technology.effects, { type = "unlock-recipe", recipe = recipe }) + end +end + +local function remove_recipe_unlock(technology, recipe) + if technology.effects then + for i, effect in pairs(technology.effects) do + if effect.type == "unlock-recipe" and effect.recipe == recipe then + table.remove(technology.effects, i) + end + end + end +end + +function thxbob.lib.tech.has_recipe_unlock(technology, recipe) + if + type(technology) == "string" + and type(recipe) == "string" + and data.raw.technology[technology] + and data.raw.recipe[recipe] + then + local hasit = false + hasit = has_recipe_unlock(data.raw.technology[technology], recipe) + + return hasit + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.recipe(recipe) + return false + end +end + +function thxbob.lib.tech.add_recipe_unlock(technology, recipe) + if + type(technology) == "string" + and type(recipe) == "string" + and data.raw.technology[technology] + and data.raw.recipe[recipe] + then + add_recipe_unlock(data.raw.technology[technology], recipe) + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.recipe(recipe) + end +end + +function thxbob.lib.tech.remove_recipe_unlock(technology, recipe) + if + type(technology) == "string" + and type(recipe) == "string" + and data.raw.technology[technology] + -- data.raw.recipe[recipe] --don't check to see if something we're removing exists. + then + remove_recipe_unlock(data.raw.technology[technology], recipe) + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.recipe(recipe) + end +end + +local function add_prerequisite(technology, prerequisite) + local addit = true + if technology.prerequisites then + for i, check in ipairs(technology.prerequisites) do + if check == prerequisite then + addit = false + end + end + else + technology.prerequisites = {} + end + if addit then + table.insert(technology.prerequisites, prerequisite) + end +end + +local function remove_prerequisite(technology, prerequisite) + if technology.prerequisites then + for i, check in ipairs(technology.prerequisites) do + if check == prerequisite then + table.remove(technology.prerequisites, i) + end + end + end +end + +local function replace_prerequisite(technology, old, new) + if technology.prerequisites then + for i, prerequisite in ipairs(technology.prerequisites) do + if prerequisite == old then + remove_prerequisite(technology, old) + add_prerequisite(technology, new) + end + end + end +end + +function thxbob.lib.tech.replace_prerequisite(technology, old, new) + if + type(technology) == "string" + and type(old) == "string" + and type(new) == "string" + and data.raw.technology[technology] + -- data.raw.technology[old] and + and data.raw.technology[new] + then + replace_prerequisite(data.raw.technology[technology], old, new) + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.technology(old, "Old prerequisite", "Old prerequisite technology") + thxbob.lib.error.technology(new, "New prerequisite", "New prerequisite technology") + end +end + +function thxbob.lib.tech.add_prerequisite(technology, prerequisite) + if + type(technology) == "string" + and type(prerequisite) == "string" + and data.raw.technology[technology] + and data.raw.technology[prerequisite] + then + add_prerequisite(data.raw.technology[technology], prerequisite) + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.technology(prerequisite, "Prerequisite", "Prerequisite technology") + end +end + +function thxbob.lib.tech.remove_prerequisite(technology, prerequisite) + if + type(technology) == "string" + and type(prerequisite) == "string" + and data.raw.technology[technology] + -- data.raw.technology[prerequisite] + then + remove_prerequisite(data.raw.technology[technology], prerequisite) + else + log(debug.traceback()) + thxbob.lib.error.technology(technology) + thxbob.lib.error.technology(prerequisite, "Prerequisite", "Prerequisite technology") + end +end + +function thxbob.lib.tech.hide(technology_name) + if type(technology_name) == "string" and data.raw.technology[technology_name] then + local technology = data.raw.technology[technology_name] + technology.hidden = true + technology.enabled = false + else + log(debug.traceback()) + thxbob.lib.error.technology(technology_name) + end +end + +function thxbob.lib.tech.ignore_tech_cost_multiplier(technology_name, ignore) + if type(technology_name) == "string" and type(ignore) == "boolean" then + local technology = data.raw.technology[technology_name] + if technology then + technology.ignore_tech_cost_multiplier = ignore + end + else + log(debug.traceback()) + thxbob.lib.error.technology(technology_name) + end +end + +function thxbob.lib.tech.technology_icon_constant(technology_icon, constant_icon, x, y) + local scale = 0.5 + local xshift = x or 64 + local yshift = y or 64 + if type(technology_icon) == "table" and technology_icon.icon and technology_icon.icon_size then + local icons = { + technology_icon, + { + icon = constant_icon, + icon_size = 128, + scale = scale, + shift = { xshift * scale, yshift * scale }, + }, + } + return icons + else + log(debug.traceback()) + log(technology_icon .. " not given in required table format") + end +end + +function thxbob.lib.tech.technology_line_icon_constant(technology_line, first, last, technology_icon, constant_icon) + local scale = 0.5 + if type(technology_icon) == "table" and technology_icon.icon and technology_icon.icon_size then + for i = first, last do + local tech_name = technology_line .. "-" .. i + if data.raw.technology[tech_name] then + data.raw.technology[tech_name].icons = { + technology_icon, + { + icon = constant_icon, + icon_size = 128, + scale = scale, + shift = { 64 * scale, 64 * scale }, + }, + } + else + log(debug.traceback()) + thxbob.lib.error.technology(tech_name) + end + end + else + log(debug.traceback()) + log(technology_icon .. " not given in required table format") + end +end diff --git a/Bio_Industries_2/locale/de/entity-description.cfg b/Bio_Industries_2/locale/de/entity-description.cfg index 9c7f50d..b052e2c 100644 --- a/Bio_Industries_2/locale/de/entity-description.cfg +++ b/Bio_Industries_2/locale/de/entity-description.cfg @@ -2,7 +2,7 @@ ## Produktion bi-arboretum=Ein __ENTITY__bi-arboretum__ kann die Bodenfertilität im Umkreis verbessern und Bäume anpflanzen. bi-bio-farm=In der __ENTITY__bi-bio-farm__ wachsen __ENTITY__seedling__e zu Bäumen heran und werden gleich zu __ITEM__wood__ und __ITEM__bi-woodpulp__ verarbeitet. Tagsüber deckt ein integriertes Solarpanel einen Teil des Strombedarfs. -bi-bio-garden=Der __ENTITY__bi-bio-garden__ reinigt die Luft und absorbiert Schadstoffe.\n(Ein __ENTITY__bi-bio-garden__ kann pro Sekunde 45 Schadstoffeinheiten absorbieren — etwa so viel wie 1500 Bäume!) +bi-bio-garden=Der __ENTITY__bi-bio-garden__ reinigt die Luft und absorbiert Schadstoffe.\n(Ein __ENTITY__bi-bio-garden__ kann pro Sekunde 1.5 Schadstoffeinheiten absorbieren — etwa so viel wie 1500 Bäume!) bi-bio-greenhouse=Im __ENTITY__bi-bio-greenhouse__ werden __ENTITY__seedling__e gezüchtet. seedling=Ein junger Baum, der in der __ENTITY__bi-bio-farm__ zu __ITEM__wood__ und __ITEM__bi-woodpulp__ verarbeitet wird, sobald er ausgewachsen ist. Du kannst ihn auch direkt in die Erde pflanzen und dabei zusehen, wie er in der freien Natur zu einem großen Baum heranwächst. \nHinweis: Die __ENTITY__seedling__e wachsen besser, wenn du vorher den Boden düngst! diff --git a/Bio_Industries_2/locale/en/entity-description.cfg b/Bio_Industries_2/locale/en/entity-description.cfg index b364d8e..5ed3083 100644 --- a/Bio_Industries_2/locale/en/entity-description.cfg +++ b/Bio_Industries_2/locale/en/entity-description.cfg @@ -2,9 +2,9 @@ ## Production bi-arboretum=__ENTITY__bi-arboretum__s change the surrounding terrain with fertilizer or plant trees. bi-bio-farm=__ENTITY__bi-bio-farm__s are where __ENTITY__seedling__s grow into trees that are processed to __ITEM__wood__ and __ITEM__bi-woodpulp__. An integrated solar panel provides some of the energy during the day. -bi-bio-garden=The __ENTITY__bi-bio-garden__ scrubs pollution from the air. (One bio garden can absorb 45 pollution units per second — as much as 1500 trees!) -bi-bio-garden-large=The __ENTITY__bi-bio-garden__ scrubs pollution from the air. (One bio garden can absorb 300 pollution units per second — as much as 12,000 trees!) -bi-bio-garden-huge=The __ENTITY__bi-bio-garden__ scrubs pollution from the air. (One bio garden can absorb 2880 pollution units per second — as much as 96,000 trees!) +bi-bio-garden=The __ENTITY__bi-bio-garden__ scrubs pollution from the air. (One bio garden can absorb 1.5 pollution units per second — as much as 1500 trees!) +bi-bio-garden-large=The __ENTITY__bi-bio-garden__ scrubs pollution from the air. (One bio garden can absorb 12 pollution units per second — as much as 12,000 trees!) +bi-bio-garden-huge=The __ENTITY__bi-bio-garden__ scrubs pollution from the air. (One bio garden can absorb 96 pollution units per second — as much as 96,000 trees!) bi-bio-greenhouse=Just the right place to grow __ITEM__bi-seed__s and __ENTITY__seedling__s! 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! diff --git a/Bio_Industries_2/locale/en/entity-name.cfg b/Bio_Industries_2/locale/en/entity-name.cfg index 373cc46..2889bc2 100644 --- a/Bio_Industries_2/locale/en/entity-name.cfg +++ b/Bio_Industries_2/locale/en/entity-name.cfg @@ -34,6 +34,7 @@ bi-power-to-rail-pole=Powered rails connector bi-rail-power=Powered rails bi-rail-wood-bridge=Wooden rail bridge bi-rail-wood=Wooden rails +bi-straight-rail-wood=Wooden rails bi-curved-rail-a-wood=Wooden rails bi-curved-rail-b-wood=Wooden rails bi-half-diagonal-rail-wood=Wooden rails diff --git a/Bio_Industries_2/locale/en/recipe-description.cfg b/Bio_Industries_2/locale/en/recipe-description.cfg index c31a3a6..7c3747e 100644 --- a/Bio_Industries_2/locale/en/recipe-description.cfg +++ b/Bio_Industries_2/locale/en/recipe-description.cfg @@ -4,6 +4,7 @@ bi-adv-fertilizer-1=Use __ITEM__bi-adv-fertilizer__ for a super production — i bi-adv-fertilizer-2=Use __ITEM__bi-adv-fertilizer__ for a super production — it's far better than __ITEM__fertilizer__! bi-fertilizer-1=__ITEM__fertilizer__ lets your stuff grow faster, it really does! bi-fertilizer-2=__ITEM__fertilizer__ lets your stuff grow faster, it really does! (Made with Sodium hydroxide) +bob-fertiliser=__ITEM__fertilizer__ lets your stuff grow faster, it really does! # Added for 0.18.32/1.1.2 bi-adv-fertilizer-fluid=__ITEM__bi-adv-fertilizer__ dissolved in water bi-fertilizer-fluid=__ITEM__fertilizer__ dissolved in water diff --git a/Bio_Industries_2/locale/en/recipe-name.cfg b/Bio_Industries_2/locale/en/recipe-name.cfg index 1c61fb8..7563a82 100644 --- a/Bio_Industries_2/locale/en/recipe-name.cfg +++ b/Bio_Industries_2/locale/en/recipe-name.cfg @@ -8,6 +8,7 @@ bi-adv-fertilizer-2=__ITEM__bi-adv-fertilizer__ bi-adv-fertilizer-fluid=Liquid __ITEM__bi-adv-fertilizer__ bi-fertilizer-1=__ITEM__fertilizer__ bi-fertilizer-2=__ITEM__fertilizer__ (with sodium hydroxide) +bob-fertiliser=__ITEM__fertilizer__ # Added for 0.18.32/1.1.2 bi-fertilizer-fluid=Liquid __ITEM__fertilizer__ @@ -115,7 +116,7 @@ bi-sulfur-angels=Bio-__ITEM__sulfur__ ## angelsrefining, BioTech, Krastorio/Krastorio2 bi-sand=__ITEM__sand__ from __ITEM__stone-crushed__ ## bobelectronics -bi-press-wood=Pressed wood +bi-press-wood=Wooden board ## Industrial Revolution bi-crushed-stone-1_IR=__ITEM__gravel__ from __ITEM__stone__ bi-crushed-stone-2_IR=__ITEM__gravel__ from __ITEM__concrete__ diff --git a/Bio_Industries_2/locale/pt-BR/entity-description.cfg b/Bio_Industries_2/locale/pt-BR/entity-description.cfg new file mode 100644 index 0000000..226cb28 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/entity-description.cfg @@ -0,0 +1,52 @@ +[entity-description] +## Production +bi-arboretum=__ENTITY__bi-arboretum__ modifica o terreno ao redor ao fertilizar ou plantar árvores. +bi-bio-farm=__ENTITY__bi-bio-farm__ é onde __ENTITY__seedling__s crescem em árvores que são processadas em __ITEM__wood__ e __ITEM__bi-woodpulp__. Um painel solar integrado provê um pouco de energia durante o dia. +bi-bio-garden=O __ENTITY__bi-bio-garden__ remove poluição do ar. (Um jardim biológico consegue absorver 1.5 unidades de poluição por segundo — o mesmo que 1500 árvores!) +bi-bio-garden-large=O __ENTITY__bi-bio-garden__ remove poluição do ar. (Um jardim biológico consegue absorver 12 unidades de poluição por segundo — o mesmo que 12.000 árvores!) +bi-bio-garden-huge=O __ENTITY__bi-bio-garden__ remove poluição do ar. (Um jardim biológico consegue absorver 96 unidades de poluição por segundo — o mesmo que 96.000 árvores!) +bi-bio-greenhouse=O lugar certo para crescer __ITEM__bi-seed__ em __ENTITY__seedling__s! +seedling=Uma árvore jovem, perfeita para plantar. Você também pode plantá-la no solo e ela crescerá e se tornará uma árvore. Lembre-se de fertilizar o solo primeiro para aumentar as chances de crescimento! + +bi-bio-reactor=Um __ENTITY__bi-bio-reactor__ é utilizado para produzir e processar biomassa. +bi-cokery=__ITEM__wood__ e __ITEM__bi-woodpulp__ são refinados em __ITEM__wood-charcoal__ e outros combustíveis na __ENTITY__bi-cokery__. +bi-stone-crusher=Essas máquinas trituram __ITEM__stone__ e __ITEM__concrete__ em todas as formas. + + +## Power +bi-bio-accumulator=__ENTITY__bi-bio-accumulator__ pode armazenar grandes quantidades de energia. Às vezes, o tamanho realmente importa… +bi-bio-boiler=A __ENTITY__bi-bio-boiler__ é tão eficiente quanto uma normal __ENTITY__boiler__, porém produz 75% menos poluição! +bi-bio-solar-farm=A __ENTITY__bi-bio-solar-farm__ é um grande __ENTITY__solar-panel__ que gera muita energia em um espaço mínimo. +bi-large-substation=Este __ENTITY__bi-large-substation__ pode alimentar máquinas em uma grande área. +bi-solar-boiler=Este __ENTITY__bi-solar-boiler__ usa energia solar para gerar eletricidade e vapor. +bi-solar-mat=Este pavimento especial contém painéis solares. Cada peça gerará 10 kW de eletricidade e aumentará sua velocidade. (Obrigado, Elon Musk!) + + +## Weaponry +bi-bio-cannon=Pode atirar APENAS em geradores e minhocas! (Alcance: 120)\nEste protótipo é incapaz de mirar manualmente. +bi-dart-turret=Essas torres estão imediatamente disponíveis e protegem você de ataques inimigos a um custo mínimo. Os dardos causam menos dano do que munições, porém a __ENTITY__bi-dart-turret__ possui um alcance maior e pode disparar a uma velocidade maior do que a __ENTITY__gun-turret__. + + +## Rail stuff +bi-power-to-rail-pole=Conecte seu __ENTITY__bi-rail-power__ à rede elétrica!\nATENÇÃO: Ao colocar um __ENTITY__bi-power-to-rail-pole__ ao alcance de dois __ENTITY__bi-rail-power__ que estejam paralelos ou se cruzando, você conectará essas redes elétricas! +bi-rail-power=Trilhos que também conduzem eletricidade. Conecte-os a uma rede elétrica com um __ENTITY__bi-power-to-rail-pole__! +bi-rail-wood-bridge=Uma ponte ferroviária de madeira.\nNota: Você não pode andar sobre ela! +bi-rail-wood=Trilho de madeira +rail-remnants-wood-bridge=Restos de ponte de madeira +rail-remnants-wood=Restos de trilho de madeira + + +## Miscallenous wooden products +bi-wood-pipe-to-ground=Um __ENTITY__pipe-to-ground__ feito de __ITEM__wood__ e Cobre +bi-wood-pipe=Um __ENTITY__pipe__ feito de __ITEM__wood__ e Cobre +bi-wooden-chest-giga=Um baú de madeira imenso +bi-wooden-chest-huge=Um baú de madeira grande +bi-wooden-chest-large=Um baú de madeira médio +bi-wooden-fence=Uma __ENTITY__bi-wooden-fence__ é fácil de fabricar. Não ajudará muito contra inimigos fortes, mas manterá os primeiros inimigos afastados para que você possa se concentrar em iniciar sua fábrica. +bi-wooden-pole-big=__ENTITY__bi-wooden-pole-big__ será curado automaticamente se você usar o mapa estiver com a "Evolução" dos inimigos habilitada. +bi-wooden-pole-bigger=__ENTITY__bi-wooden-pole-bigger__ será curado automaticamente se você usar o mapa estiver com a "Evolução" dos inimigos habilitada. +bi-wooden-pole-huge=__ENTITY__bi-wooden-pole-huge__ abrangem grandes distâncias (64 blocos) com __ITEM__copper-cable__, __ITEM__green-wire__, ou __ITEM__red-wire__. + + +## Compatibility with other mods +bi-stone-crusher-sand=Essas máquinas produzem __ITEM__stone-crushed__ de __ITEM__stone__ e __ITEM__concrete__ em todas as formas. Também podem refinar __ITEM__stone-crushed__ para __ITEM__sand__. diff --git a/Bio_Industries_2/locale/pt-BR/entity-name.cfg b/Bio_Industries_2/locale/pt-BR/entity-name.cfg new file mode 100644 index 0000000..a079660 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/entity-name.cfg @@ -0,0 +1,57 @@ +[entity-name] +## Production +bi-arboretum=Terraformador +bi-arboretum-hidden-radar=__ENTITY__bi-arboretum__ (__ENTITY__radar__) + +bi-bio-farm=Fazenda biológica +bi-bio-garden=Jardim biológico +bi-bio-garden-large=Jardim biológico grande +bi-bio-garden-huge=Jardim biológico imenso +bi-bio-greenhouse=Viveiro biológico +seedling=Muda + +bi-bio-reactor=Biorreator +bi-cokery=Coqueria +bi-stone-crusher=Triturador de pedras + + +## Power +bi-bio-accumulator=Acumulador imenso +bi-bio-boiler=Biocaldeira +bi-bio-solar-farm=Fazenda solar +bi-large-substation=Subestação imensa +bi-solar-boiler=Usina solar e caldeira +bi-solar-mat=Chão Musk + + +## Weaponry +bi-bio-cannon=Protótipo de artilharia +bi-dart-turret=Torre de dardos + + +## Rail stuff +bi-power-to-rail-pole=Conector de trilho elétrico +bi-rail-power=Trilho elétrico +bi-rail-wood-bridge=Ponte ferroviária de madeira +bi-rail-wood=Trilho de madeira +bi-straight-rail-wood=Trilho de madeira +bi-curved-rail-a-wood=Trilho de madeira +bi-curved-rail-b-wood=Trilho de madeira +bi-half-diagonal-rail-wood=Trilho de madeira +rail-remnants-wood-bridge=Restos de ponte ferroviária de madeira +rail-remnants-wood=Restos de triho de madeira + + +## Miscallenous wooden products +bi-wood-pipe-to-ground=Cano de madeira subterrâneo +bi-wood-pipe=Cano de madeira +bi-wooden-chest-giga=Baú de madeira imenso +bi-wooden-chest-huge=Baú de madeira grande +bi-wooden-chest-large=Baú de madeira médio +bi-wooden-fence=Cerca de madeira +bi-wooden-pole-big=Poste de madeira grande +bi-wooden-pole-bigger=Poste de madeira enorme +bi-wooden-pole-huge=Poste de madeira imenso +#~ Just another name for the vanilla wood-chest +#~ (No need to overwrite the vanilla name if our bigger wooden chests aren't used!) +bi-wooden-chest=Baú de madeira pequeno diff --git a/Bio_Industries_2/locale/pt-BR/item-description.cfg b/Bio_Industries_2/locale/pt-BR/item-description.cfg new file mode 100644 index 0000000..9157ea5 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/item-description.cfg @@ -0,0 +1,59 @@ +[BI-item-description] +# __ITEM__fertilizer__ deve ser substituído por __BI-ITEM__fertilizer__, mas não podemos nos referir a ele, +# então codificamos seu conteúdo aqui. +#~ fertilizer=__ITEM__fertilizer__ permite que seus cultivos cresçam mais rápido e também é usado para produzir biomassa de algas. +fertilizer=O fertilizante comum permite que seus cultivos cresçam mais rápido e também é usado para produzir biomassa de algas. + +[item-description] +## Production +bi-adv-fertilizer=__ITEM__bi-adv-fertilizer__ — O ingrediente especial que transforma uma produção muito melhorada em uma superprodução. Disponível apenas para usuários das Bioindústrias! :-) +fertilizer=__ITEM__fertilizer__ permite que seus cultivos cresçam mais rápido e também é usado para produzir biomassa de algas. + +bi-purified-air=Ar limpo, poluição removida! + +bi-arboretum-r1=Plante árvores ao redor da construção +bi-arboretum-r2=__ITEM__fertilizer__ é utilizado para melhorar o terreno ao redor da construção. +bi-arboretum-r3=__ITEM__bi-adv-fertilizer__ é utilizado para melhorar o terreno ao redor da construção. +bi-arboretum-r4=Plante árvores e use __ITEM__fertilizer__ para melhorar o terreno ao redor da construção. +bi-arboretum-r5=Plante árvores e use __ITEM__bi-adv-fertilizer__ para melhorar o terreno ao redor da construção. + +bi-seed-bomb-advanced=A __ITEM__bi-seed-bomb-basic__ espalha __ITEM__bi-seed__ em um raio de 30 blocos ao redor do local do impacto. __ITEM__bi-adv-fertilizer__ aumenta a chance que __ITEM__bi-seed__ se tornarão árvores rapidamente! +bi-seed-bomb-basic=A __ITEM__bi-seed-bomb-basic__ espalha __ITEM__bi-seed__ em um raio de 24 blocos ao redor do local do impacto, com um pouco de sorte elas se tornarão árvores! +bi-seed-bomb-standard=A __ITEM__bi-seed-bomb-basic__ espalha __ITEM__bi-seed__ em um raio de 27 blocos ao redor do local do impacto. __ITEM__fertilizer__ aumenta a chance que __ITEM__bi-seed__ se tornarão árvores. + +bi-seed=Se tornará uma __ENTITY__seedling__. + + +## Weaponry +bi-bio-cannon-basic-ammo=Propelido por foguete, baixo dano físico (disparado por protótipo de artilharia) +bi-bio-cannon-biological-ammo=Propelido por foguete, alto dano biológico (disparado por protótipo de artilharia) +bi-bio-cannon-poison-ammo=Propelido por foguete, médio dano venenoso (disparado por protótipo de artilharia) +bi-bio-cannon-proto-ammo=Propelido por Explosivos, baixo dano físico (disparado por protótipo de artilharia) + +bi-dart-magazine-basic=__ITEM__bi-dart-magazine-basic__ machuca um pouco. +bi-dart-magazine-enhanced=__ITEM__bi-dart-magazine-enhanced__ causa dano ácido adicional! +bi-dart-magazine-poison=__ITEM__bi-dart-magazine-enhanced__ — com veneno como cobertura! +bi-dart-magazine-standard=__ITEM__bi-dart-magazine-standard__ pode perfurar através de alvos. +bi-dart-rifle=Esta arma econômica usa munição de fácil produção e é boa para afastar inimigos mais fracos. + + +## Resources +bi-ash=__ITEM__bi-ash__ é um recurso valioso! +bi-cellulose=__ITEM__battery__, __ITEM__plastic-bar__, Ácido sulfúrico — todos estes podem ser feitos com __ITEM__bi-cellulose__! +bi-woodpulp=__ITEM__bi-woodpulp__ pode ser utilizado para vários própositos. Quando queimado, irá poluir menos que __ITEM__wood__, porém dará apenas metade da energia. +coal=Você precisará disso! +pellet-coke=Mais energia que __ITEM__solid-fuel__ com apenas 60% de emissões, mais um pequeno aumento na velocidade máxima – por que você não abastece seus trens com __ITEM__pellet-coke__ já?! +resin=__ITEM__resin__ é uma substância pegajosa que pode ser processada para obter gás de petróleo! +solid-fuel=__ITEM__solid-fuel__ fornece menos energia do que __ITEM__wood-bricks__, mas também gera poluição ao queimar. Além disso, fará com que seus veículos acelerem mais rápido e tenham uma velocidade máxima maior. +stone-crushed=__ITEM__stone-crushed__ é usado principalmente para construir ferrovias e estradas. +wood-bricks=__ITEM__bi-woodpulp__ compressada provê muita energia enquanto polui menos. É um substituto inicial para __ITEM__solid-fuel__. +wood-charcoal=Fornece mais energia do que __ITEM__coal__ e gera muito menos poluição. Infelizmente, não é tão versátil, então você ainda precisará de __ITEM__coal__! +wood=Baseie sua produção de energia neste recurso renovável!\nObservação: há muito mais usos além da simples queima! + + +## Compatibility with other mods +#~ sand=__ITEM__sand__ +sand=Areia + +## Rail stuff +bi-rail-wood=Trilho de madeira \ No newline at end of file diff --git a/Bio_Industries_2/locale/pt-BR/item-name.cfg b/Bio_Industries_2/locale/pt-BR/item-name.cfg new file mode 100644 index 0000000..86d0288 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/item-name.cfg @@ -0,0 +1,58 @@ +[BI-item-name] +fertilizer=Fertilizante comum + +[item-name] +## Production +bi-adv-fertilizer=BI-Super-Fertilizante(™) +#~ fertilizer=Fertilizante "Run of ye olde mill"(™) +fertilizer=Fertilizante comum + +bi-purified-air=Ar purificado + +bi-arboretum-r1=Planta árvores +bi-arboretum-r2=Altera terreno (básico) +bi-arboretum-r3=Altera terreno (avançado) +bi-arboretum-r4=Altera terreno & planta árvores (básico) +bi-arboretum-r5=Altera terreno & planta árvores (avançado) + +bi-seed-bomb-advanced=Bomba de sementes avançada +bi-seed-bomb-basic=Bomba de sementes básica +bi-seed-bomb-standard=Bomba de sementes +bi-seed=Sementes de árvore + +# Only __ENTITY__x__ and __ITEM__x__ can be used, so let's pretend here that these fluids are items! +bi-biomass=Biomassa de algas +bi-liquid-air=Ar líquido +nitrogen=Nitrogênio + +## Weaponry +bi-bio-cannon-basic-ammo=Protótipo de artilharia - Munição de foguete +bi-bio-cannon-biological-ammo=Protótipo de artilharia - Munição biológica +bi-bio-cannon-poison-ammo=Protótipo de artilharia - Munição venenosa +bi-bio-cannon-proto-ammo=Protótipo de artilharia - Munição comum + +bi-dart-magazine-basic=Munição de dardo básica +bi-dart-magazine-enhanced=Munição de dardo aprimorada +bi-dart-magazine-poison=Munição de dardo venenosa +bi-dart-magazine-standard=Munição de dardo +bi-dart-rifle=Rifle de dardos + + +## Resources +bi-ash=Cinzas +bi-cellulose=Celulose +bi-woodpulp=Polpa de madeira +pellet-coke=Pellet de coque +resin=Resina +stone-crushed=Pedra britada +wood-bricks=Tijolos de madeira +wood-charcoal=Carvão vegetal + + +## Compatibility with other mods +sand=Areia +slag=Impuro + + +## Rail stuff +bi-rail-wood=Trilho de madeira diff --git a/Bio_Industries_2/locale/pt-BR/misc.cfg b/Bio_Industries_2/locale/pt-BR/misc.cfg new file mode 100644 index 0000000..6db44ba --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/misc.cfg @@ -0,0 +1,43 @@ +[fluid-name] +#~ bi-biomass=Biomassa de algas +bi-biomass=__ITEM__bi-biomass__ +# We don't seem to use that! +#~ bi-ground-water=Água +liquid-air=Ar líquido +nitrogen=Nitrogênio +water-saline=Água salina +bi-fertilizer-fluid=Líquido __ITEM__fertilizer__ +bi-adv-fertilizer-fluid=Líquido __ITEM__bi-adv-fertilizer__ + +[fluid-description] +bi-fertilizer-fluid=Líquido __ITEM__fertilizer__ facilita a limpeza ecológica. +bi-adv-fertilizer-fluid=Líquido __ITEM__bi-adv-fertilizer__ -- é exatamente o que você precisa se realmente quiser fazer uma limpeza ecológica na sua fábrica! + +[tile-name] +bi-solar-mat=Tapete solar +bi-wood-floor=Chão de madeira + +[item-group-name] +bio-industries=Bioindústrias + +[ammo-category-name] +Bio_Cannon_Ammo=Munição de biocanhão +Bio_Turret_Ammo=Munição de biotorre balística + +[damage-type-name] +Biological=Biológico +bob-pierce=Perfuração + +[modifier-description] +Bio_Cannon_Ammo-damage-bonus=__ENTITY__bi-bio-cannon__ dano: +__1__ +Bio_Cannon_Ammo-shooting-speed-bonus=__ENTITY__bi-bio-cannon__ velocidade de disparo: +__1__ +Bio_Turret_Ammo-damage-bonus=__ENTITY__bi-dart-turret__ bônus de dano de munição: +__1__ +Bio_Turret_Ammo-shooting-speed-bonus=__ENTITY__bi-dart-turret__ bônus de velocidade de disparo: +__1__ +bi-dart-turret-attack-bonus=__ENTITY__bi-dart-turret__ bônus de dano: +__1__ +bi-dart-turret-damage-bonus=__ENTITY__bi-dart-turret__ bônus de dano: +__1__ + +[bi-misc] +growing-tree=Árvore em crescimento +growing-tree-desc=Com o tempo, uma grande árvore crescerá a partir desta __ENTITY__seedling__. +young-tree=Árvore jovem +young-tree-desc=Esta árvore ainda está jovem e não dará muita madeira. É melhor esperar até que ela esteja totalmente crescida antes de cortá-la! diff --git a/Bio_Industries_2/locale/pt-BR/mod.cfg b/Bio_Industries_2/locale/pt-BR/mod.cfg new file mode 100644 index 0000000..000c426 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/mod.cfg @@ -0,0 +1,46 @@ +[mod-name] +Bio_Industries=Bioindústrias + +[mod-setting-name] +BI_Bio_Cannon=Habilitar: Protótipo de Artilharia +BI_Bio_Fuel=Habilitar: Produção de biocombustíveis +# Added for 0.18.32/1.1.2 +BI_Easy_Bio_Gardens=Habilitar: Jardins biológicos fáceis +# Added for 1.1.8 +BI_Bigger_Wooden_Chests=Habilitado: Baús de madeira imensos +BI_Enable_gvv_support=Compatibilidade: Adicionado suporte para GVV +BI_Game_Tweaks_Bot=Ajustes de jogabilidade: Bots +BI_Game_Tweaks_Disassemble=Ajustes de jogabilidade: Receitas de desmantelamento +BI_Game_Tweaks_Emissions_Multiplier=Ajustes de jogabilidade: Multiplicadores de emissões de combustível +BI_Game_Tweaks_Player=Ajustes de jogabilidade: Jogador +BI_Game_Tweaks_Production_Science=Ajustes de jogabilidade: Receita alternativa para __ITEM__production-science-pack__ +BI_Game_Tweaks_Recipe=Ajustes de jogabilidade: Receita +BI_Game_Tweaks_Small_Tree_Collisionbox=Ajustes de jogabilidade: Caixas de colisão menores para árvores +BI_Game_Tweaks_Stack_Size=Ajustes de jogabilidade: Tamanho da pilha de itens +BI_Game_Tweaks_Tree=Ajustes de jogabilidade: Redimento de árvores +#~ BI_Hide_musk_floor_in_mapview=Ocultar sobreposição de grade elétrica para o piso Musk na visualização do mapa +BI_Show_musk_floor_in_mapview=Habilitar: Sobreposição de rede elétrica para __ENTITY__bi-solar-mat__ na visualização de mapa +BI_Solar_Additions=Habilitar: Adições bio solares + +[mod-setting-description] +BI_Bio_Cannon=O protótipo de artilharia é muito poderoso, mas só atira em geradores.\n(Padrão: ligado) +BI_Bio_Fuel=Permite a produção de derivados de petróleo a partir de __ITEM__bi-biomass__\n(Padrão: ligado) +# Added for 0.18.32/1.1.2 +BI_Easy_Bio_Gardens=Os jardins biológicos consomem fertilizante fluido pronto, então apenas uma tubulação é suficiente para fornecer todos os ingredientes. No entanto, isso requer 50% mais fertilizante do que combinar fertilizante sólido e água no local. Os jardins biológicos transmitirão eletricidade para os jardins biológicos adjacentes. Organize-os em uma grade, com no máximo 1 quadrado entre 2 jardins biológicos e eles serão magicamente conectados. :-)\n(Padrão: desligado) +# Added for 1.1.8 +BI_Bigger_Wooden_Chests=__ENTITY__bi-wooden-chest-large__, __ENTITY__bi-wooden-chest-huge__, __ENTITY__bi-wooden-chest-giga__ +#~ BI_Enable_gvv_support=O "Visualizador de Variáveis Globais da API Lua" (gvv) permite que você inspecione a tabela global de outros mods. Se quiser ajudar na depuração de "Bioindústrias", ative-o e digite "\gvv" no console de bate-papo para abrir a interface gráfica do gvv.\n(Padrão: desligado) +BI_Enable_gvv_support=O "Visualizador de Variáveis Globais da API Lua" (gvv) permite que você inspecione a tabela global de outros mods. Se quiser ajudar na depuração de "Bioindústrias", ative-o e digite "\gvv" no console de bate-papo para abrir a interface gráfica do gvv!\n(Padrão: desligado) +BI_Game_Tweaks_Bot=Os robôs não podem ser minerados nem pegam fogo.\n(Padrão: desligado) +BI_Game_Tweaks_Disassemble=Permita que algumas receitas sejam desmanteladas. Você recebe cerca de 50% dos recursos de volta.\n(Padrão: ligado) +BI_Game_Tweaks_Emissions_Multiplier=Bob começou isso. A ideia geral é que combustíveis não processados causam mais poluição do que combustíveis mais refinados. Assim, __ITEM__coal__ produziria 200% de poluição, enquanto __ITEM__solid-fuel__ produziria apenas 85%. Consulte "Fuel Values.xlsx" na pasta mod para mais informações!\n(Padrão: ligado) +BI_Game_Tweaks_Player=Distância de construção, queda e alcance: 6 => 20\nDistância de alcance para coleta de item 1 => 4\nDistância de alcance de recurso: 2.7 => 4\nDistância de coleta de saque: 2 => 5\n(Padrão: desligado) +BI_Game_Tweaks_Production_Science=Habilita uma receita alternativa para o __ITEM__production-science-pack__.\n(Padrão: ligado) +#~ BI_Game_Tweaks_Recipe=Receitas afetadas: CONCRETO Remove: Minério de ferro Adiciona: Bastão de ferro, MURO DE PEDRA Adiciona: Bastão de ferro, TRILHOS Remove: pedra Adiciona: Pedra britada e concreto, MACHADO DE AÇO Remove: Bastão de ferro Adiciona: Machado de ferro +BI_Game_Tweaks_Recipe=Receitas afetadas:\n__ITEM__concrete__ (__ENTITY__iron-ore__ => __ITEM__iron-stick__)\n__ENTITY__stone-wall__ (adiciona __ITEM__iron-stick__)\n__ENTITY__straight-rail__ (__ITEM__stone__ => __ITEM__stone-crushed__ + __ITEM__concrete__)\n(Padrão: ligado) +BI_Game_Tweaks_Small_Tree_Collisionbox=EXPERIMENTAL: Esta configuração vem habilitada por padrão. Caso contrário, as árvores terão uma área de colisão maior, tornando as florestas mais propensas a bloquear jogadores, veículos e mordedores. Não tenho certeza se isso terá algum efeito colateral!\n(Padrão: ligado) +BI_Game_Tweaks_Stack_Size=Afeta tamanhos de pilha de __ITEM__wood__, __ITEM__stone__, __ITEM__stone-crushed__, __ITEM__concrete__, e __ITEM__slag__.\n(Padrão: ligado) +BI_Game_Tweaks_Tree=Ajustes do jogo - as árvores fornecem aleatoriamente de 1 a 6 __ITEM__wood__ quando cortadas. (Normal: 4)\n(Padrão: ligado) +#~ BI_Hide_musk_floor_in_mapview=Na visualização do mapa, a sobreposição da rede elétrica ficará oculta para o piso Musk se esta configuração estiver habilitada. Isso não deve ser alterado em um jogo em andamento, pois aplicar a configuração a cada piso de Musk pode levar algum tempo! +BI_Show_musk_floor_in_mapview=Exiba a sobreposição da rede elétrica para __ENTITY__bi-solar-mat__ na visualização do mapa. Isso não deve ser alterado em um jogo em andamento, pois aplicar a configuração a cada bloco __ENTITY__bi-solar-mat__ pode levar algum tempo!\n(Padrão: ligado) +BI_Solar_Additions=Permite itens solares como o __ENTITY__bi-bio-solar-farm__, __ENTITY__bi-solar-boiler__, __ENTITY__bi-bio-accumulator__ e __ENTITY__bi-large-substation__.\n(Padrão: ligado) diff --git a/Bio_Industries_2/locale/pt-BR/recipe-description.cfg b/Bio_Industries_2/locale/pt-BR/recipe-description.cfg new file mode 100644 index 0000000..0773331 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/recipe-description.cfg @@ -0,0 +1,136 @@ +[recipe-description] +## Production +bi-adv-fertilizer-1=Use __ITEM__bi-adv-fertilizer__ para uma superprodução — é muito melhor do que __ITEM__fertilizer__! (Feito com __ITEM__alien-artifact__) +bi-adv-fertilizer-2=Use __ITEM__bi-adv-fertilizer__ para uma superprodução — é muito melhor do que __ITEM__fertilizer__! +bi-fertilizer-1=__ITEM__fertilizer__ faça seus cultivos crescerem mais rápido, realmente faz! +bi-fertilizer-2=__ITEM__fertilizer__ faça seus cultivos crescerem mais rápido, realmente faz! (Feito com hidróxido de sódio) +bob-fertiliser=__ITEM__fertilizer__ faça seus cultivos crescerem mais rápido, realmente faz! +# Added for 0.18.32/1.1.2 +bi-adv-fertilizer-fluid=__ITEM__bi-adv-fertilizer__ dissolve em água +bi-fertilizer-fluid=__ITEM__fertilizer__ dissolve em água + +bi-arboretum-r1=Nota: A receita nunca será concluída, as árvores são plantadas na varredura do setor. +bi-arboretum-r2=Nota: A receita nunca será concluída, o solo é fertilizado na varredura do setor. +bi-arboretum-r3=Nota: A receita nunca será concluída, o solo é fertilizado na varredura do setor. +bi-arboretum-r4=Nota: A receita nunca será concluída, o solo é fertilizado e as árvores são plantadas na varredura do setor. +bi-arboretum-r5=Nota: A receita nunca será concluída, o solo é fertilizado e as árvores são plantadas na varredura do setor. + +bi-basic-gas-processing=Extração ineficiente de gás usando __ITEM__coal__ e __ITEM__resin__ + +bi-battery=Se você realmente pensar sobre isso, a __ITEM__battery__ é feita de __ITEM__wood__! +bi-rail-wood-to-concrete=__ENTITY__bi-rail-wood__ são opções econômicas de fabricar e permitem que você inicie facilmente sua rede ferroviária. Porém se você deseja utilizar __ENTITY__bi-rail-power__, você precisará de trilhos normais. + +bi-biomass-1=Melhore sua produção de biomassa de algas com __ITEM__fertilizer__! +bi-biomass-2=Retorna parte da biomassa de algas produzida para produzir mais!\nObservação: isso renderá menos (e levará mais tempo) do que usar a receita inicial, mas você economizará __ITEM__fertilizer__. +bi-biomass-3=Retorna parte da biomassa de algas produzida para produzir grandes quantidades!\nNota: O valor adicionado de __ITEM__bi-ash__ lhe dará um rendimento muito maior em uma fração do tempo. + +bi-biomass-conversion-1=Use biomassa de algas para produzir Petróleo leve e __ITEM__bi-cellulose__! +bi-biomass-conversion-2=Use biomassa de algas para produzir Gás de petróleo! +bi-biomass-conversion-3=Use biomassa de algas para produzir Lubrificante! +bi-biomass-conversion-4=Use biomassa de algas para produzir Petróleo pesado e Água! + +bi-seed-1=Use madeira e água para produzir __ITEM__bi-seed__! +bi-seed-2=Aumente sua produção de __ITEM__bi-seed__ utilizando __ITEM__bi-ash__ como um fertilizante mais barato! +bi-seed-3=Aumente sua produção de __ITEM__bi-seed__ ainda mais utilizando __ITEM__fertilizer__ ao invés de __ITEM__bi-ash__! +bi-seed-4=Aumente drásticamente sua produção de __ITEM__bi-seed__ com __ITEM__bi-adv-fertilizer__! + +bi-seedling-1=Use __ITEM__bi-seed__ e Água para crescer __ENTITY__seedling__s! +bi-seedling-2=Produza mais utilizando __ITEM__bi-ash__ como um fertilizante mais barato! +bi-seedling-3=Aumente sua produção utilizando __ITEM__fertilizer__! +bi-seedling-4=Use __ITEM__bi-adv-fertilizer__ para uma superprodução! + +bi-seed-bomb-advanced=A __ITEM__bi-seed-bomb-basic__ espalha __ITEM__bi-seed__ em um raio de 30 blocos ao redor do local do impacto. __ITEM__bi-adv-fertilizer__ aumenta a chance que __ITEM__bi-seed__ se tornarão árvores rapidamente! +bi-seed-bomb-basic=A __ITEM__bi-seed-bomb-basic__ espalha __ITEM__bi-seed__ em um raio de 24 blocos ao redor do local do impacto, com um pouco de sorte elas se tornarão árvores! +bi-seed-bomb-standard=A __ITEM__bi-seed-bomb-basic__ espalha __ITEM__bi-seed__ em um raio de 27 blocos ao redor do local do impacto. __ITEM__fertilizer__ aumenta a chance que __ITEM__bi-seed__ se tornarão árvores. + +bi-logs-1=Cresça __ITEM__wood__ a moda antiga ao regar __ITEM__bi-seed__s! +bi-logs-2=Melhore sua produção de __ITEM__wood__ ao utilizar __ITEM__bi-ash__ como um fertilizante barato! +bi-logs-3=Cresça ainda mais __ITEM__wood__ ao utilizar __ITEM__fertilizer__ ao invés de __ITEM__bi-ash__! +bi-logs-4=__ITEM__bi-adv-fertilizer__ é utilizado nesta receita. Preciso dizer mais alguma coisa? + + +## Resources +bi-ash-1=Queime __ITEM__wood__, para obter __ITEM__bi-ash__! +bi-ash-2=Queime muita __ITEM__bi-woodpulp__, para obter muita __ITEM__bi-ash__! + +bi-cellulose-1=Combine __ITEM__bi-woodpulp__ e Ácido sulfúrico e você receberá __ITEM__bi-cellulose__. +bi-cellulose-2=Aqueça um pouco as coisas para quadruplicar sua produção de __ITEM__bi-celulose__! + +bi-charcoal-1=O valor de combustível que você obterá ao processar __ITEM__bi-celulose__ em __ITEM__charcoal__ é apenas 20% do que você obteria no mesmo tempo ao fabricar __ITEM__wood-bricks__. No entanto, __ITEM__charcoal__ pode ser transformado em __ITEM__coal__. +bi-charcoal-2=Queimar __ITEM__wood__ concederá a você 60% mais __ITEM__wood-charcoal__ do que queimar __ITEM__bi-woodpulp__. +bi-coal-1=Coloque __ITEM__wood-charcoal__, retire __ITEM__coal__… +bi-coal-2=Coloque __ITEM__wood-charcoal__, retire ainda mais __ITEM__coal__… Tecnologia avançada permite uma produção consideravelmente aumentada de __ITEM__coal__! +bi-coke-coal=Refinar __ITEM__coal__ irá aumentar seu valor de combustível. Também, __ITEM__pellet-coke__ causará menos poluição e dará um bônus de velocidade máxima e aceleração quando utilizado como combustível em veículos. +bi-pellet-coke=Transforma __ITEM__solid-fuel__ em __ITEM__pellet-coke__ +bi-pellet-coke-2=Transforma carbono em __ITEM__pellet-coke__ +bi-solid-fuel=Transformar __ITEM__wood-bricks__ em __ITEM__solid-fuel__ é uma ótima maneira de se livrar do excesso de __ITEM__bi-woodpulp__! +bi-wood-fuel-brick=__ITEM__wood-bricks__ são mais fáceis de lidar que __ITEM__bi-woodpulp__ descompactada. + +bi-crushed-stone-1=Faça __ITEM__stone-crushed__ a partir de __ITEM__stone__ que você encontrou ou minerou. +#~ bi-crushed-stone-2=Tendo dominado o processamento avançado de materiais, agora você também pode obter __ITEM__stone-crushed__ de __ITEM__concrete__! +#~ bi-crushed-stone-3=Tendo dominado o processamento avançado de materiais, agora você também pode obter __ITEM__stone-crushed__ de __ITEM__hazard-concrete__! +#~ bi-crushed-stone-4=Você obterá o dobro de __ITEM__stone-crushed__ processando __ITEM__refined-concrete__ ao invés de __ITEM__concrete__, mas levará o dobro do tempo! +#~ bi-crushed-stone-5=Você obterá o dobro de __ITEM__stone-crushed__ processando __ITEM__refined-hazard-concrete__ ao invés de __ITEM__hazard-concrete__, mas levará o dobro do tempo! +bi-crushed-stone=O excesso de __ITEM__concrete__ e todas as suas variantes podem ser reciclados em __ITEM__stone-crushed__. +bi-stone-brick=__ITEM__stone-brick__ feito mais rápido e com menos __ITEM__stone__! + +bi-purified-air-1=Se você fornecer água suficiente e o bom e velho __ITEM__fertilizer__, e o __ENTITY__bi-bio-garden__ limpará o ar por um tempo. +bi-purified-air-1-fluid=Forneça __ITEM__fertilizer__ líquido ao __ENTITY__bi-bio-garden__ e ele limpará o ar por um tempo. +bi-purified-air-2=Use __ITEM__bi-adv-fertilizer__ e o __ENTITY__bi-bio-garden__ irá limpar o ar por muito mais tempo! Desta forma, você irá poupar muita água. +bi-purified-air-2-fluid=Forneça __ITEM__bi-adv-fertilizer__ líquido ao __ENTITY__bi-bio-garden__ e ele limpará o ar por um longo tempo! + +bi-resin-pulp=Claro que você pode extrair __ITEM__resin__ de __ITEM__bi-woodpulp__, porém não é muito eficiente. +bi-resin-wood=Processe __ITEM__wood__ para conseguir __ITEM__resin__ de forma mais eficiente! +bi-wood-from-pulp=Faça __ITEM__wood__ de __ITEM__bi-woodpulp__ e __ITEM__resin__! +bi-woodpulp=Você pode queimar __ITEM__bi-woodpulp__ (bruta ou refinada), ou pode utilizar para produzir __ITEM__resin__, __ITEM__bi-cellulose__ e __ITEM__bi-adv-fertilizer__. + +bi-acid=Use biomassa de algas e __ITEM__bi-cellulose__ para produzir Ácido sulfúrico! +bi-liquid-air=Ar líquido é necessário para fazer Nitrogênio e Biomassa de algas. +bi-nitrogen=Nitrogênio é necessário para fazer __ITEM__fertilizer__. +bi-sulfur=Bio-__ITEM__sulfur__ — tão natural, tão sulfúrico! +bi-plastic-1=__ITEM__plastic-bar__ feito a partir de __ITEM__wood__ +bi-plastic-2=__ITEM__plastic-bar__ feito a partir de __ITEM__bi-cellulose__ + + +## Disassemble +bi-disassemble-recipes=Parte da matéria-prima pode ser reutilizada. + + +## Compatibility with other mods +## angelsrefining +bi-mineralized-sulfuric-waste=__ITEM__stone-crushed__, __ITEM__bi-charcoal__ e água pura são processadas para produzir água mineralizada — e águas residuais sulfúricas. +bi-slag-slurry=Lama impura de __ITEM__bi-ash__, __ITEM__stone-crushed__ e água salina +## angelspetrochem +bi-biomass-conversion-2-methane=Use biomassa de algas para produzir gás metano! +bi-biomass-conversion-4-yellow-waste=Use biomassa de algas para produzir petróleo pesado e águas residuais sulfúricas! +bi-sulfur-angels=Bio-__ITEM__sulfur__ — tão natural, tão sulfúrico! +## angelsrefining, BioTech, Krastorio/Krastorio2 +bi-sand=__ENTITY__bi-stone-crusher__ pode fazer __ITEM__sand__ de __ITEM__stone-crushed__. +## Industrial Revolution +bi-crushed-stone-1_IR=Faça __ITEM__gravel__ de __ITEM__stone__ se você encontrou ou minerou. +#~ bi-crushed-stone-2=Tendo dominado o processamento avançado de materiais, agora você também pode obter __ITEM__stone-crushed__ de __ITEM__concrete__! +#~ bi-crushed-stone-3=Tendo dominado o processamento avançado de materiais, agora você também pode obter __ITEM__stone-crushed__ de __ITEM__hazard-concrete__! +#~ bi-crushed-stone-4=Você receberá o dobro de __ITEM__stone-crushed__ ao processar __ITEM__refined-concrete__ ao invés de __ITEM__concrete__, porém demora o dobro do tempo! +#~ bi-crushed-stone-5=Você receberá o dobro de __ITEM__stone-crushed__ ao processar __ITEM__refined-hazard-concrete__ ao invés de __ITEM__hazard-concrete__, porém demora o dobro do tempo! +bi-crushed-stone_IR=O excesso de __ITEM__concrete__ e todas as suas variantes podem ser reciclados em __ITEM__gravel__. + + +#~ bi-power-to-rail-pole=Conecte seu trilho elétrico à rede elétrica +#~ bi-production-science-pack=Usa mais trilhos de madeira (mais baratos), para fazer pacotes científicos de produção! +#~ bi-rail-power=Trilho que também conduz eletricidade (conecte-se à rede elétrica usando o conector "energia para trilho") +#~ bi-rail-wood-bridge=Trilho que pode atravessar a água\nObservação: Você não pode andar sobre ele! +#~ bi-rail-wood-to-concrete=Atualizar trilhos de madeira para trilhos normais +#~ bi-rail-wood=Trilhos baratos feitos com madeira +#~ bi-sand=Areia de pedra britada +#~ bi-seedling=Uma árvore jovem, perfeita para plantar. (Você também pode plantá-la no solo e ela crescerá e se tornará uma árvore. Lembre-se de fertilizar o solo primeiro para aumentar as chances de crescimento!) +#~ bi-seed-bomb-advanced=Plante árvores em uma grande área, com fertilizante avançado por meio de uma bomba de sementes! +#~ bi-seed-bomb-basic=Plante árvores em uma grande área com uma bomba de sementes! +#~ bi-seed-bomb-standard=Plante árvores em uma área grande, com fertilizante por meio de uma bomba de sementes! +#~ bi-slag-slurry=Lama impura de cinzas, pedra britada e água salgada +#~ bi-solar-boiler=Uma caldeira que utiliza energia solar ou eletricidade (também produz eletricidade). +#~ bi-solar-boiler-hidden-panel=Uma caldeira que utiliza energia solar ou eletricidade (também produz eletricidade). +#~ bi-stone-crusher=Máquina para quebrar pedra em pedra britada +#~ bi-sulfur=Bio-enxofre +#~ bi-wood-from-pulp=Recupere madeira compactando polpa de madeira e resina +#~ bi-wood-fuel-brick=Compacte a polpa de madeira para facilitar o manuseio! +#~ bi-wooden-pole-huge=Um enorme poste de madeira para cobrir grandes distâncias (64 blocos) com cabos de cobre ou fios de rede de circuitos diff --git a/Bio_Industries_2/locale/pt-BR/recipe-name.cfg b/Bio_Industries_2/locale/pt-BR/recipe-name.cfg new file mode 100644 index 0000000..0bcec5e --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/recipe-name.cfg @@ -0,0 +1,125 @@ +[recipe-name] +## Production +#~ bi-adv-fertilizer-1=Advanced fertilizer +#~ bi-adv-fertilizer-2=Advanced fertilizer +bi-adv-fertilizer-1=__ITEM__bi-adv-fertilizer__ +bi-adv-fertilizer-2=__ITEM__bi-adv-fertilizer__ +# Added for 0.18.32/1.1.2 +bi-adv-fertilizer-fluid=__ITEM__bi-adv-fertilizer__ líquido +bi-fertilizer-1=__ITEM__fertilizer__ +bi-fertilizer-2=__ITEM__fertilizer__ (com hidróxido de sódio) +bob-fertiliser=__ITEM__fertilizer__ +# Added for 0.18.32/1.1.2 +bi-fertilizer-fluid=__ITEM__fertilizer__ líquido + + +bi-arboretum-r1=Plante árvores +bi-arboretum-r2=Altera o terreno com __ITEM__fertilizer__ +bi-arboretum-r3=Altera o terreno com __ITEM__bi-adv-fertilizer__ +bi-arboretum-r4=Altera o terreno com __ITEM__fertilizer__ e planta árvores +bi-arboretum-r5=Altera o terreno com __ITEM__bi-adv-fertilizer__ e planta árvores + +bi-ash-1=__ITEM__bi-ash__ de __ITEM__wood__ +bi-ash-2=__ITEM__bi-ash__ de __ITEM__bi-woodpulp__ + +bi-basic-gas-processing=Processamento básico de gás utilizando __ITEM__coal__ e __ITEM__resin__ + +bi-battery=Bateria biológica +bi-rail-wood-to-concrete=Melhora __ENTITY__bi-rail-wood__ + +#~ bi-biomass-1=Produção de biomassa de algas com __ITEM__fertilizer__ +#~ bi-biomass-2=Produção de biomassa de algas com (básico) +#~ bi-biomass-3=Produção de biomassa de algas com (avançado) +#~ bi-biomass-1=Produz biomassa de algas utilizando __ITEM__fertilizer__ +bi-biomass-1=Produz biomassa de algas +bi-biomass-2=Replica biomassa de algas usando +bi-biomass-3=Replica biomassa de algas usando __ITEM__bi-ash__ + +bi-biomass-conversion-1=Conversão de biocombustível 1: Celulose, Petróleo leve +bi-biomass-conversion-2=Conversão de biocombustível 2: Gás de petróleo +bi-biomass-conversion-3=Conversão de biocombustível 3: Lubricante +bi-biomass-conversion-4=Conversão de biocombustível 4: Petróleo pesado, Água + +bi-seed-1=Produção básica de __ITEM__bi-seed__ +bi-seed-2=Produção melhorada de __ITEM__bi-seed__ com __ITEM__bi-ash__ +bi-seed-3=Produção avançada de __ITEM__bi-seed__ com __ITEM__fertilizer__ +bi-seed-4=Superprodução de __ITEM__bi-seed__ com __ITEM__bi-adv-fertilizer__ + +bi-seed-bomb-advanced=__ITEM__bi-seed-bomb-basic__ com __ITEM__bi-adv-fertilizer__ +bi-seed-bomb-basic=__ITEM__bi-seed-bomb-basic__ +bi-seed-bomb-standard=__ITEM__bi-seed-bomb-basic__ com __ITEM__fertilizer__ + +bi-seedling-1=Produção básica de __ENTITY__seedling__s +bi-seedling-2=Produção melhorada de __ENTITY__seedling__s com __ITEM__bi-ash__ +bi-seedling-3=Produção avançada de __ENTITY__seedling__s com __ITEM__fertilizer__ +bi-seedling-4=Superprodução de __ENTITY__seedling__s com __ITEM__bi-adv-fertilizer__ + +bi-logs-1=Produção básica de __ITEM__wood__ +bi-logs-2=Produção melhorada de __ITEM__wood__ com __ITEM__bi-ash__ +bi-logs-3=Produção avançada de __ITEM__wood__ com __ITEM__fertilizer__ +bi-logs-4=Superprodução de __ITEM__wood__ com __ITEM__bi-adv-fertilizer__ + + +## Resources +bi-cellulose-1=Produção básica de __ITEM__bi-cellulose__ +bi-cellulose-2=Produção avançada de __ITEM__bi-cellulose__ + +bi-charcoal-1=__ITEM__wood-charcoal__ de __ITEM__bi-woodpulp__ +bi-charcoal-2=__ITEM__wood-charcoal__ de __ITEM__wood__ +bi-coal-1=Produção básica de __ITEM__coal__ +bi-coal-2=Produção avançada de __ITEM__coal__ +bi-coke-coal=__ITEM__pellet-coke__ +bi-pellet-coke=__ITEM__pellet-coke__ de __ITEM__solid-fuel__ +bi-pellet-coke-2=__ITEM__pellet-coke__ de carbono +bi-solid-fuel=__ITEM__solid-fuel__ de __ITEM__wood-bricks__ +bi-wood-fuel-brick=__ITEM__wood-bricks__ + +bi-crushed-stone-1=__ITEM__stone-crushed__ de __ITEM__stone__ +bi-crushed-stone-2=__ITEM__stone-crushed__ de __ITEM__concrete__ +bi-crushed-stone-3=__ITEM__stone-crushed__ de __ITEM__hazard-concrete__ +bi-crushed-stone-4=__ITEM__stone-crushed__ de __ITEM__refined-concrete__ +bi-crushed-stone-5=__ITEM__stone-crushed__ de __ITEM__refined-hazard-concrete__ +bi-stone-brick=Bio-__ITEM__stone-brick__ + +bi-purified-air-1=__ITEM__bi-purified-air__ — utilizando __ITEM__fertilizer__ +bi-purified-air-2=__ITEM__bi-purified-air__ — utilizando __ITEM__bi-adv-fertilizer__ + +bi-resin-pulp=__ITEM__resin__ de __ITEM__bi-woodpulp__ +bi-resin-wood=__ITEM__resin__ de __ITEM__wood__ +bi-woodpulp=__ITEM__bi-woodpulp__ de __ITEM__wood__ +bi-wood-from-pulp=__ITEM__wood__ de __ITEM__bi-woodpulp__ + +bi-acid=Bioácido +bi-liquid-air=Ar líquido +bi-nitrogen=Nitrogênio +bi-sulfur=Bio-__ITEM__sulfur__ +bi-plastic-1=__ITEM__plastic-bar__ de __ITEM__wood__ +bi-plastic-2=__ITEM__plastic-bar__ de __ITEM__bi-cellulose__ + + +## Disassemble +bi-burner-inserter-disassemble=Desmantelamento de __ENTITY__burner-inserter__ +bi-burner-mining-drill-disassemble=Desmantelamento de __ENTITY__burner-mining-drill__ +bi-long-handed-inserter-disassemble=Desmantelamento de __ENTITY__long-handed-inserter__ +bi-steel-furnace-disassemble=Desmantelamento de __ENTITY__steel-furnace__ +bi-stone-furnace-disassemble=Desmantelamento de __ENTITY__stone-furnace__ + + +## Compatibility with other mods +## angelsrefining +bi-mineralized-sulfuric-waste=Água mineralizada +bi-slag-slurry=Lama impura de __ITEM__bi-ash__, __ITEM__stone-brished__ e água salina +## angelspetrochem +bi-biomass-conversion-2-methane=Conversão de biocombustível 2: Gás metano +bi-biomass-conversion-4-yellow-waste=Conversão de biocombustível 4: Petróleo pesado, Águas residuais sulfúricas +bi-sulfur-angels=Bio-__ITEM__sulfur__ +## angelsrefining, BioTech, Krastorio/Krastorio2 +bi-sand=__ITEM__sand__ de __ITEM__stone-crushed__ +## bobelectronics +bi-press-wood=Tabuleiro de madeira +## Industrial Revolution +bi-crushed-stone-1_IR=__ITEM__gravel__ de __ITEM__stone__ +bi-crushed-stone-2_IR=__ITEM__gravel__ de __ITEM__concrete__ +bi-crushed-stone-3_IR=__ITEM__gravel__ de __ITEM__hazard-concrete__ +bi-crushed-stone-4_IR=__ITEM__gravel__ de __ITEM__refined-concrete__ +bi-crushed-stone-5_IR=__ITEM__gravel__ de __ITEM__refined-hazard-concrete__ diff --git a/Bio_Industries_2/locale/pt-BR/tech.cfg b/Bio_Industries_2/locale/pt-BR/tech.cfg new file mode 100644 index 0000000..c5136c1 --- /dev/null +++ b/Bio_Industries_2/locale/pt-BR/tech.cfg @@ -0,0 +1,19 @@ +[technology-name] +bi-tech-advanced-biotechnology=Biotecnologia avançada +bi-tech-bio-cannon=Protótipo de artilharia +bi-tech-bio-farming=Fazenda biológica +bi-tech-coal-processing-1=Processamento de carvão 1 +bi-tech-coal-processing-2=Processamento de carvão 2 +bi-tech-coal-processing-3=Processamento de carvão 3 +bi-tech-fertilizer=Fertilizante +bi-tech-organic-plastic=Plástico orgânico + +[technology-description] +bi-tech-advanced-biotechnology=Desbloqueia receitas de níveis mais altos +bi-tech-bio-cannon=Tecnologia de protótipo de torre de artilharia. - Ainda não é capaz de mirar manualmente +bi-tech-bio-farming=Aprenda a cultivar árvores – o primeiro passo para descobrir outros produtos de madeira +bi-tech-coal-processing-1=Desbloqueia o processamento de madeira para obter carvão vegetal e cinzas +bi-tech-coal-processing-2=Debloqueia o processamento de carvão vegetal em carvão, e de combustível sólido em pellet de coque +bi-tech-coal-processing-3=Carvão vegetal é processado de forma mais eficiente e debloqueia a produção de pellet de coque a partir do carvão +bi-tech-fertilizer=Usando fertilizante você pode obter muito mais rendimento nas receitas +bi-tech-organic-plastic=Produzir plásticos usando materiais orgânicos diff --git a/Bio_Industries_2/locale/ru/entity-description.cfg b/Bio_Industries_2/locale/ru/entity-description.cfg index 49295cb..7fcf5af 100644 --- a/Bio_Industries_2/locale/ru/entity-description.cfg +++ b/Bio_Industries_2/locale/ru/entity-description.cfg @@ -2,7 +2,7 @@ ## Production bi-arboretum=Терраформер изменяет местность или растущие деревья в радиусе вокруг строения bi-bio-farm=Биоферма, превращает саженцы в древесину. Потребляет больше электричества ночью -bi-bio-garden=Биосад собирает воздух и убирает загрязнение. (-35 PU) +bi-bio-garden=Биосад собирает воздух и убирает загрязнение. (-1.5 PU) bi-bio-greenhouse=Используйте теплицу для роста саженцев seedling=Молодое растение, идеально для посадки. Вы также можете посадить его в землю и оно вырастет в дерево. Помните, что сначала нужно удобрить землю, чтобы увеличить шанс роста. diff --git a/Bio_Industries_2/migrations/2.0.23.json b/Bio_Industries_2/migrations/2.0.23.json new file mode 100644 index 0000000..7b948c4 --- /dev/null +++ b/Bio_Industries_2/migrations/2.0.23.json @@ -0,0 +1,5 @@ +{ + "recipe": [ + ["bi-bio-garden-lagre", "bi-bio-garden-large"] + ] +} \ No newline at end of file diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua b/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua index c02ca04..740a6b9 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua @@ -4,7 +4,7 @@ data:extend({ --- Bio Damage for new Ammo { type = "damage-type", - name = "Biological" + name = "biological" }, }) diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua b/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua index 0a53a8f..f87b9bd 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/entity.lua @@ -120,8 +120,6 @@ if BI.Settings.Bio_Cannon then { type = "ammo-turret", name = "bi-bio-cannon", - icon = ICONPATH_W .. "biocannon_icon.png", - icon_size = 64, icons = {{icon = ICONPATH_W .. "biocannon_icon.png", icon_size = 64}}, flags = {"placeable-neutral", "placeable-player", "player-creation"}, -- makes cannon blueprintable diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/item.lua b/Bio_Industries_2/prototypes/Bio_Cannon/item.lua index 8efafe6..9840e30 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/item.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/item.lua @@ -13,18 +13,11 @@ if BI.Settings.Bio_Cannon then localised_description = {"entity-description.bi-bio-cannon"}, icon = ICONPATH_W .. "biocannon_icon.png", icon_size = 64, - icon_mipmaps = 1, - icons = { - { - icon = ICONPATH_W .. "biocannon_icon.png", - icon_size = 64, - } - }, subgroup = "defensive-structure", order = "x[turret]-x[gun-turret]", place_result = "bi-bio-cannon", stack_size = 1, - weight = 750*kg, + weight = 750000, }, }) end diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-entity.lua b/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-entity.lua index 2591354..5cd3cb3 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-entity.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-entity.lua @@ -281,32 +281,24 @@ if BI.Settings.Bio_Cannon then --- Bio Cannon Explosion { - type = "smoke-with-trigger", - name = "bio-cannon-explosion", - flags = {"not-on-map"}, - show_when_smoke_off = true, - animation = { - filename = ICONPATH .. "explosion.png", - priority = "low", - width = 256, - height = 128, - frame_count = 12, - animation_speed = 0.2, - line_length = 3, - scale = 2, - }, - sound = { - { - filename = "__Bio_Industries_2__/sound/boom.ogg", - volume = 4.0 - }, - }, - slow_down_factor = 0, - affected_by_wind = false, - cyclic = false, - duration = 60 * 5, - spread_duration = 10, - }, + type = "explosion", + name = "bio-cannon-explosion", + flags = {"not-on-map"}, + animations = {{ + filename = ICONPATH .. "explosion.png", + priority = "low", + width = 256, + height = 128, + frame_count = 12, + animation_speed = 0.2, + line_length = 3, + scale = 2 + }}, + light = {intensity = 1, size = 30}, + sound = { + variations = {{filename = "__Bio_Industries_2__/sound/boom.ogg", volume = 1.0}} + } + }, --- Napalm Small { diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-item.lua b/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-item.lua index cdfd9c8..d43f04e 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-item.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-item.lua @@ -12,12 +12,6 @@ if BI.Settings.Bio_Cannon then name = "bi-bio-cannon-proto-ammo", icon = ICONPATH_W .. "bio_cannon_proto_ammo_icon.png", icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "bio_cannon_proto_ammo_icon.png", - icon_size = 64, - } - }, ammo_category = "Bio_Cannon_Ammo", ammo_type = { category = "Bio_Cannon_Ammo", diff --git a/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua b/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua index c96cefe..41961f2 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua @@ -5,6 +5,8 @@ local ICONPATH_AAI = BioInd.modRoot .. "/graphics/icons/mod_aai/" local ICONPATH_KR = BioInd.modRoot .. "/graphics/icons/mod_krastorio/" local ICONPATHMIPS = BioInd.modRoot .. "/graphics/icons/mips/" +local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen" + data:extend({ { type = "recipe", @@ -44,7 +46,7 @@ data:extend({ category = "chemistry", energy_required = 5, ingredients = { - {type = "fluid", name = "nitrogen", amount = 10}, + {type = "fluid", name = nitrogen, amount = 10}, {type = "item", name = "bi-ash", amount = 10} }, results = { @@ -84,7 +86,19 @@ if not data.raw.item["resin"] then }, subgroup = "bio-bio-farm-raw", order = "a[bi]-a-bb[bi-resin]", - stack_size = 200 + stack_size = 200, + drop_sound = { + filename = "__base__/sound/item/solid-fuel-inventory-move.ogg", + volume = 0.7, + }, + inventory_move_sound = { + filename = "__base__/sound/item/solid-fuel-inventory-move.ogg", + volume = 0.7, + }, + pick_sound = { + filename = "__base__/sound/item/solid-fuel-inventory-pickup.ogg", + volume = 0.7, + }, }, --- Resin recipe - Wood @@ -144,8 +158,8 @@ if data.raw.item["solid-carbon"] and mods["angelspetrochem"] then data.raw.recipe["bi-pellet-coke"].icon = ICONPATH_BA .. "pellet_coke_c.png" data.raw.recipe["bi-pellet-coke"].icon_size = 64 thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-pellet-coke-2") -elseif data.raw.item["carbon"] and mods["bobplates"] then - thxbob.lib.recipe.add_new_ingredient ("bi-pellet-coke-2", {type = "item", name = "carbon", amount = 10}) +elseif data.raw.item["bob-carbon"] and mods["bobplates"] then + thxbob.lib.recipe.add_new_ingredient ("bi-pellet-coke-2", {type = "item", name = "bob-carbon", amount = 10}) data.raw.recipe["bi-coke-coal"].icon = ICONPATH_BA .. "pellet_coke_1.png" data.raw.recipe["bi-coke-coal"].icon_size = 64 data.raw.recipe["bi-pellet-coke-2"].icon = ICONPATH_BA .. "pellet_coke_b.png" @@ -174,14 +188,14 @@ end --- Add fertilizer recipes if bob's or Angels if data.raw.item["solid-sodium-hydroxide"] and mods["angelspetrochem"] then thxbob.lib.recipe.add_new_ingredient("bi-fertilizer-2", {type = "item", name = "solid-sodium-hydroxide", amount = 10}) - thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "gas-nitrogen") + thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", nitrogen, "gas-nitrogen") data.raw.recipe["bi-fertilizer-2"].icon = ICONPATH_BA .. "fertilizer_solid_sodium_hydroxide.png" data.raw.recipe["bi-fertilizer-2"].icon_size = 64 thxbob.lib.tech.add_recipe_unlock("bi-tech-fertilizer", "bi-fertilizer-2") -elseif data.raw.item["sodium-hydroxide"] and mods["bobplates"] then +elseif data.raw.item["bob-sodium-hydroxide"] and mods["bobplates"] then thxbob.lib.recipe.add_new_ingredient("bi-fertilizer-2", { type = "item", - name = "sodium-hydroxide", + name = "bob-sodium-hydroxide", amount = 10 }) thxbob.lib.tech.add_recipe_unlock("bi-tech-fertilizer", "bi-fertilizer-2") @@ -190,8 +204,8 @@ end -- If Angels, replace liquid air + nitrogen and with Angel's ingredients in recipes if data.raw.fluid["gas-nitrogen"] and data.raw.fluid["gas-compressed-air"] and mods["angelspetrochem"] then - thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", "nitrogen", "gas-nitrogen") - thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", "nitrogen", "gas-nitrogen") + thxbob.lib.recipe.replace_ingredient("bi-fertilizer-1", nitrogen, "gas-nitrogen") + thxbob.lib.recipe.replace_ingredient("bi-fertilizer-2", nitrogen, "gas-nitrogen") thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "gas-compressed-air") thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "gas-compressed-air") end @@ -230,14 +244,14 @@ end -- Krastorio2 if mods["Krastorio2"] or mods["Krastorio2-spaced-out"] then -- Replace liquid air with oxygen in Algae Biomass conversion 2 and 3 - thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "oxygen") - thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "oxygen") + thxbob.lib.recipe.replace_ingredient("bi-biomass-2", "liquid-air", "kr-oxygen") + thxbob.lib.recipe.replace_ingredient("bi-biomass-3", "liquid-air", "kr-oxygen") end --- Make Bio Farm use glass if Bob's -if data.raw.item.glass then - thxbob.lib.recipe.replace_ingredient("bi-bio-farm", "copper-cable", "glass") +if data.raw.item["bob-glass"] then + thxbob.lib.recipe.replace_ingredient("bi-bio-farm", "copper-cable", "bob-glass") end @@ -311,18 +325,18 @@ end --- Alternative Wooden-Board Recipe for Bob's Electronics -if data.raw.item["wooden-board"] and mods["bobelectronics"] then +if data.raw.item["bob-wooden-board"] and mods["bobelectronics"] then data:extend({ -- Wood - Press Wood { type = "recipe", name = "bi-press-wood", localised_name = {"recipe-name.bi-press-wood"}, - icon = ICONPATH_BA .. "bi_wooden_board.png", + icon = ICONPATH_BA .. "bi_wooden_board_shiny.png", icon_size = 64, icons = { { - icon = ICONPATH_BA .. "bi_wooden_board.png", + icon = ICONPATH_BA .. "bi_wooden_board_shiny.png", icon_size = 64, } }, @@ -334,12 +348,13 @@ if data.raw.item["wooden-board"] and mods["bobelectronics"] then always_show_made_in = true, allow_decomposition = false, allow_as_intermediate = false, + allow_productivity = true, ingredients = { {type = "item", name = "bi-woodpulp", amount = 3}, {type = "item", name = "resin", amount = 1}, }, results = { - {type = "item", name = "wooden-board", amount = 6} + {type = "item", name = "bob-wooden-board", amount = 6} }, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) @@ -348,10 +363,7 @@ if data.raw.item["wooden-board"] and mods["bobelectronics"] then }) thxbob.lib.tech.add_recipe_unlock("electronics", "bi-press-wood") - if mods["ShinyBobGFX"] or mods["ShinyBobGFX_Continued"] then - data.raw["recipe"]["bi-press-wood"].icon = ICONPATH_BA .. "bi_wooden_board_shiny.png" - data.raw["recipe"]["bi-press-wood"].icon_size = 64 - end + end @@ -369,7 +381,7 @@ end -- Add recipe for sand from crushed stone if any other mod provides sand -if data.raw.item["sand"] or +if data.raw.item[data.raw.item["kr-sand"] and "kr-sand" or "sand"] or data.raw.item["biotech-sand"] or data.raw.item["solid-sand"] then @@ -391,7 +403,7 @@ if data.raw.item["sand"] or order = "a[bi]-a-z[bi-9-sand]", energy_required = 1, ingredients = {{type="item", name="stone-crushed", amount=2}}, - results = {{type="item", name="sand", amount=5}}, + results = {{type="item", name=data.raw.item["kr-sand"] and "kr-sand" or "sand", amount=5}}, main_product = "", enabled = false, allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 diff --git a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua index 069bfcf..fd8ee4e 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua @@ -4,10 +4,107 @@ local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local ENTITYPATH_BIO = BioInd.modRoot .. "/graphics/entities/" local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" -require("prototypes.Bio_Farm.pipeConnectors") + require("util") +-- Pipes +------------------------------------------------------------------------------------ +-- Bio farm -- +------------------------------------------------------------------------------------ + +function biofarmpipepictures() + return + { + north = { + filename = "__core__/graphics/empty.png", + priority = "low", + width = 1, + height = 1, + }, + east = + { + filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/bio_farm-pipe-E.png", + priority = "extra-high", + width = 42, + height = 76, + shift = util.by_pixel(-24.5, 1), + scale = 0.5 + + }, + south = + { + filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/bio_farm-pipe-S.png", + priority = "extra-high", + width = 88, + height = 61, + shift = util.by_pixel(0, -31.25), + scale = 0.5 + + }, + west = + { + filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/bio_farm-pipe-W.png", + priority = "extra-high", + width = 39, + height = 73, + shift = util.by_pixel(25.75, 1.25), + scale = 0.5 + + } + } +end + +------------------------------------------------------------------------------------ +-- Bio Greenhouse -- +------------------------------------------------------------------------------------ + +function biogreenhousepipepictures() + return + { + north = { + filename = ENTITYPATH_BIO .. "bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-N-exp.png", + priority = "extra-high", + width = 171, + height = 152, + shift = util.by_pixel(2.25, 13.5), + scale = 0.5 + }, + east = + { + filename = ENTITYPATH_BIO .. "bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-E.png", + priority = "extra-high", + width = 42, + height = 76, + shift = util.by_pixel(-24.5, 1), + scale = 0.5 + + }, + south = + { + filename = ENTITYPATH_BIO .. "bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-S.png", + priority = "extra-high", + width = 88, + height = 61, + shift = util.by_pixel(0, -31.25), + scale = 0.5 + + }, + west = + { + filename = ENTITYPATH_BIO .. "bio_greenhouse/biogreenhouse_pipes/assembling-machine-3-pipe-W.png", + priority = "extra-high", + width = 39, + height = 73, + shift = util.by_pixel(25.75, 1.25), + scale = 0.5 + + } + } +end + + + inv_extension2 = { filename = ENTITYPATH_BIO .. "bio_terraformer/arboretum.png", priority = "high", @@ -146,24 +243,17 @@ data:extend({ { type = "assembling-machine", name = "bi-bio-farm", - icon = ICONPATH_E .. "bio_Farm_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_Farm_Icon.png", - icon_size = 64, - } - }, + icons = {{ icon = ICONPATH_E .. "bio_Farm_Icon.png", icon_size = 64, }}, flags = { "placeable-neutral", "placeable-player", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-farm" }, - max_health = 250, + max_health = 350, corpse = "bi-bio-farm-remnant", dying_explosion = "medium-explosion", resistances = { { type = "fire", percent = 70 } }, fluid_boxes = { { production_type = "input", - pipe_picture = assembler3pipepictures(), + pipe_picture = biofarmpipepictures(), pipe_covers = pipecoverspictures(), volume = 1000, base_level = -1, @@ -171,7 +261,7 @@ data:extend({ }, { production_type = "input", - pipe_picture = assembler3pipepictures(), + pipe_picture = biofarmpipepictures(), pipe_covers = pipecoverspictures(), volume = 1000, base_level = -1, @@ -179,10 +269,8 @@ data:extend({ }, }, fluid_boxes_off_when_no_fluid_recipe = true, - collision_box = { { -4.2, -4.2 }, { 4.2, 4.2 } }, selection_box = { { -4.5, -4.5 }, { 4.5, 4.5 } }, - graphics_set = { animation = { layers = { @@ -209,8 +297,9 @@ data:extend({ }, working_visualisations = { { - light = { intensity = 1.2, size = 9 }, + light = { intensity = 1.4, size = 10 }, effect = "flicker", + apply_recipe_tint = "primary", constant_speed = true, fadeout = true, animation = { @@ -226,7 +315,6 @@ data:extend({ } } }, - crafting_categories = { "biofarm-mod-farm" }, crafting_speed = 1, energy_source = { @@ -290,14 +378,7 @@ data:extend({ { type = "assembling-machine", name = "bi-bio-greenhouse", - icon = ICONPATH_E .. "bio_greenhouse.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_greenhouse.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_E .. "bio_greenhouse.png", icon_size = 64, } }, flags = { "placeable-neutral", "placeable-player", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.25, result = "bi-bio-greenhouse" }, collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, @@ -324,7 +405,7 @@ data:extend({ fluid_boxes = { { production_type = "input", - pipe_picture = assembler3pipepictures(), + pipe_picture = biogreenhousepipepictures(), pipe_covers = pipecoverspictures(), volume = 1000, base_level = -1, @@ -358,6 +439,9 @@ data:extend({ working_visualisations = { { light = { intensity = 1, size = 6 }, + draw_as_light = true, + effect = "flicker", + apply_recipe_tint = "primary", animation = { filename = ENTITYPATH_BIO .. "bio_greenhouse/bio_greenhouse_light_anim.png", width = 192, @@ -366,7 +450,6 @@ data:extend({ scale = 0.5, animation_speed = 0.1, shift = { 0, -0.5 }, - draw_as_light = true } } } @@ -413,14 +496,7 @@ data:extend({ { type = "assembling-machine", name = "bi-cokery", - icon = ICONPATH_E .. "cokery.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "cokery.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_E .. "cokery.png", icon_size = 64, } }, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! se_allow_in_space = true, @@ -435,33 +511,6 @@ data:extend({ module_specification = { module_slots = 2 }, allowed_effects = { "consumption", "speed", "pollution" }, graphics_set = { - -- Idle animation (1 frame) - --[[ - idle_animation = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_cokery/cokery_idle.png", - priority = "high", - width = 256, - height = 256, - frame_count = 1, - repeat_count = 16, -- match working animation - shift = { 0.5, -0.5 }, - scale = 0.5 - }, - { - filename = ENTITYPATH_BIO .. "bio_cokery/cokery_shadow.png", - width = 334, - height = 126, - frame_count = 1, - repeat_count = 16, -- match working animation - draw_as_shadow = true, - shift = { 1.5, -0.5 }, - scale = 0.5 - } - } - }, - ]] -- Working animation (16 frames) animation = { layers = { @@ -940,14 +989,7 @@ data:extend({ name = "bi-arboretum-area", localised_name = { "entity-name.bi-arboretum" }, localised_description = { "entity-description.bi-arboretum" }, - icon = ICONPATH_E .. "arboretum_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "arboretum_Icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_E .. "arboretum_Icon.png", icon_size = 64, }}, flags = { "not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable" }, open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 }, close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, @@ -991,14 +1033,7 @@ data:extend({ { type = "assembling-machine", name = "bi-arboretum", - icon = ICONPATH_E .. "arboretum_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "arboretum_Icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_E .. "arboretum_Icon.png", icon_size = 64, }}, flags = { "placeable-neutral", "placeable-player", "player-creation" }, placeable_by = { item = "bi-arboretum-area", count = 1 }, -- Fixes that entity couldn't be blueprinted minable = { hardness = 0.2, mining_time = 0.5, result = "bi-arboretum-area" }, @@ -1009,7 +1044,7 @@ data:extend({ fluid_boxes = { { production_type = "input", - pipe_picture = assembler3pipepictures(), + --pipe_picture = assembler3pipepictures(), pipe_covers = pipecoverspictures(), volume = 1000, base_level = -1, @@ -1017,7 +1052,7 @@ data:extend({ }, { production_type = "input", - pipe_picture = assembler3pipepictures(), + --pipe_picture = assembler3pipepictures(), pipe_covers = pipecoverspictures(), volume = 1000, base_level = -1, @@ -1077,6 +1112,7 @@ data:extend({ close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 }, module_specification = {}, }, + --- Corpse { type = "corpse", diff --git a/Bio_Industries_2/prototypes/Bio_Farm/item.lua b/Bio_Industries_2/prototypes/Bio_Farm/item.lua index 596f38d..23f3026 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/item.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/item.lua @@ -11,20 +11,12 @@ data:extend( { type = "item", name = "bi-seed", - icon = ICONPATH .. "bio_seed.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_seed.png", - icon_size = 64, - } - }, - icon_mipmaps = 4, + icons = { {icon = ICONPATH .. "bio_seed.png", icon_size = 64, }}, pictures = { - { size = 64, filename = ICONPATHMIPS.."bio_seed_1.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."bio_seed_2.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."bio_seed_3.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."bio_seed_4.png", scale = 0.25 } + { size = 64, filename = ICONPATHMIPS.."bio_seed_1.png", scale = 0.25, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."bio_seed_2.png", scale = 0.25, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."bio_seed_3.png", scale = 0.25, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."bio_seed_4.png", scale = 0.25, mipmap_count = 4 } }, category = "biofarm-mod-greenhouse", subgroup = "bio-bio-farm", @@ -32,7 +24,7 @@ data:extend( fuel_value = "0.5MJ", fuel_category = "chemical", stack_size= 800, - weight = 0.1 * kg, + weight = 10 * kg, }, ---- Seedling @@ -41,25 +33,17 @@ data:extend( name = "seedling", localised_name = {"entity-name.seedling"}, localised_description = {"entity-description.seedling"}, - icon = ICONPATH .. "Seedling.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "Seedling.png", - icon_size = 64, - } - }, - icon_mipmaps = 9, + icons = { {icon = ICONPATH .. "Seedling.png", icon_size = 64, }}, pictures = { - { size = 64, filename = ICONPATHMIPS.."seedling_1.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_2.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_3.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_4.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_5.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_6.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_7.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_8.png", scale = 0.25 }, - { size = 64, filename = ICONPATHMIPS.."seedling_9.png", scale = 0.25 } + { size = 64, filename = ICONPATHMIPS.."seedling_1.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_2.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_3.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_4.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_5.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_6.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_7.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_8.png", scale = 0.25, mipmap_count = 9 }, + { size = 64, filename = ICONPATHMIPS.."seedling_9.png", scale = 0.25, mipmap_count = 9 } }, subgroup = "bio-bio-farm", order = "x[bi]-b[bi-seedling]", @@ -67,7 +51,7 @@ data:extend( fuel_value = "0.5MJ", fuel_category = "chemical", stack_size= 400, - weight = 0.2 * kg, + weight = 20 * kg, }, ----Bio Farm @@ -76,14 +60,7 @@ data:extend( name= "bi-bio-farm", localised_name = {"entity-name.bi-bio-farm"}, localised_description = {"entity-description.bi-bio-farm"}, - icon = ICONPATH_E .. "bio_Farm_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_Farm_Icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_Farm_Icon.png", icon_size = 64, }}, subgroup = "production-machine", order = "x[bi]-ab[bi-bio-farm]", place_result = "bi-bio-farm", @@ -97,14 +74,7 @@ data:extend( name= "bi-bio-greenhouse", localised_name = {"entity-name.bi-bio-greenhouse"}, localised_description = {"entity-description.bi-bio-greenhouse"}, - icon = ICONPATH_E .. "bio_greenhouse.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_greenhouse.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_greenhouse.png", icon_size = 64, }}, subgroup = "production-machine", order = "x[bi]-aa[bi-bio-greenhouse]", place_result = "bi-bio-greenhouse", @@ -116,19 +86,12 @@ data:extend( { type = "item", name = "bi-cokery", - icon = ICONPATH_E .. "cokery.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "cokery.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "cokery.png", icon_size = 64, }}, subgroup = "production-machine", order = "x[bi]-b[bi-cokery]", place_result = "bi-cokery", stack_size = 10, - weight = 1 * kg, + weight = 100 * kg, }, --- Stone Crusher @@ -137,14 +100,7 @@ data:extend( name = "bi-stone-crusher", localised_name = {"entity-name.bi-stone-crusher"}, localised_description = {"entity-description.bi-stone-crusher"}, - icon = ICONPATH_E .. "stone_crusher.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "stone_crusher.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "stone_crusher.png", icon_size = 64, }}, subgroup = "production-machine", order = "x[bi]-c[bi-stone-crusher]", place_result = "bi-stone-crusher", @@ -156,47 +112,32 @@ data:extend( { type = "item", name = "bi-woodpulp", - icon = ICONPATH .. "woodpulp_64.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "woodpulp_64.png", - icon_size = 64, - } - }, - icon_mipmaps = 4, + icons = { {icon = ICONPATH .. "woodpulp_64.png", icon_size = 64, }}, pictures = { - { size = 64, filename = ICONPATHMIPS.."woodpulp_1.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."woodpulp_2.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."woodpulp_3.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."woodpulp_4.png", scale = 0.2 } + { size = 64, filename = ICONPATHMIPS.."woodpulp_1.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."woodpulp_2.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."woodpulp_3.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."woodpulp_4.png", scale = 0.2, mipmap_count = 4 } }, fuel_value = "1MJ", fuel_category = "chemical", subgroup = "raw-material", order = "a-b[bi-woodpulp]", stack_size = 800, - weight = 0.15 * kg, + weight = 15 * kg, }, --- Wood Bricks { type = "item", name = "wood-bricks", - icon = ICONPATH .. "Fuel_Brick.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "Fuel_Brick.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "Fuel_Brick.png", icon_size = 64, }}, subgroup = "bio-bio-farm-raw", order = "a[bi]-a-bx[bi-woodbrick]", fuel_category = "chemical", - fuel_value = "20MJ", + fuel_value = "160MJ", stack_size = 200, - weight = 4 * kg, + weight = 40 * kg, }, @@ -204,66 +145,43 @@ data:extend( { type = "item", name = "bi-ash", - icon = ICONPATH .. "ash.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "ash.png", - icon_size = 64, - } - }, - icon_mipmaps = 4, + icons = { {icon = ICONPATH .. "ash.png", icon_size = 64, }}, pictures = { - { size = 64, filename = ICONPATHMIPS.."ash_1.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."ash_2.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."ash_3.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."ash_4.png", scale = 0.2 } + { size = 64, filename = ICONPATHMIPS.."ash_1.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."ash_2.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."ash_3.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."ash_4.png", scale = 0.2, mipmap_count = 4 } }, subgroup = "raw-material", order = "a[bi]-a-b[bi-ash]", stack_size = 400, - weight = 0.125 * kg, + weight = 12 * kg, }, --- Charcoal { type = "item", name = "wood-charcoal", - icon = ICONPATH .. "charcoal.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "charcoal.png", - icon_size = 64, - } - }, - icon_mipmaps = 4, + icons = { {icon = ICONPATH .. "charcoal.png", icon_size = 64, }}, pictures = { - { size = 64, filename = ICONPATHMIPS.."charcoal_1.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."charcoal_2.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."charcoal_3.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."charcoal_4.png", scale = 0.2 } + { size = 64, filename = ICONPATHMIPS.."charcoal_1.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."charcoal_2.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."charcoal_3.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."charcoal_4.png", scale = 0.2, mipmap_count = 4 } }, fuel_value = "6MJ", fuel_category = "chemical", subgroup = "raw-material", order = "a[bi]-a-c[charcoal]", stack_size = 400, - weight = 1 * kg, + weight = 10 * kg, }, --- Coke Coal / Pellet Coke for Angels { type = "item", name = "pellet-coke", - icon = ICONPATH .. "coke-coal.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "coke-coal.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "coke-coal.png", icon_size = 64, }}, fuel_value = "28MJ", fuel_category = "chemical", fuel_acceleration_multiplier = 1.2, @@ -271,7 +189,7 @@ data:extend( subgroup = "raw-material", order = "a[bi]-a-g[bi-coke-coal]", stack_size = 400, - weight = 2.5 * kg, + weight = 25 * kg, }, @@ -279,25 +197,17 @@ data:extend( { type = "item", name = "stone-crushed", - icon = ICONPATH .. "crushed-stone.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "crushed-stone.png", - icon_size = 64, - } - }, - icon_mipmaps = 4, + icons = { {icon = ICONPATH .. "crushed-stone.png", icon_size = 64, }}, pictures = { - { size = 64, filename = ICONPATHMIPS.."crush_1.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."crush_2.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."crush_3.png", scale = 0.2 }, - { size = 64, filename = ICONPATHMIPS.."crush_4.png", scale = 0.2 } + { size = 64, filename = ICONPATHMIPS.."crush_1.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."crush_2.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."crush_3.png", scale = 0.2, mipmap_count = 4 }, + { size = 64, filename = ICONPATHMIPS.."crush_4.png", scale = 0.2, mipmap_count = 4 } }, subgroup = "raw-material", order = "a[bi]-a-z[stone-crushed]", stack_size = 400, - weight = 1 * kg, + weight = 20 * kg, }, @@ -305,21 +215,14 @@ data:extend( { type = "ammo", name = "bi-seed-bomb-basic", - icon = ICONPATH_W .. "seed_bomb_icon_b.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "seed_bomb_icon_b.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_W .. "seed_bomb_icon_b.png", icon_size = 64, }}, ammo_category = "rocket", ammo_type = { - range_modifier = 3, - cooldown_modifier = 3, - target_type = "position", - category = "rocket", - action = { + range_modifier = 3, + cooldown_modifier = 3, + target_type = "position", + category = "rocket", + action = { type = "direct", action_delivery = { type = "projectile", @@ -331,7 +234,7 @@ data:extend( subgroup = "ammo", order = "a[rocket-launcher]-x[seed-bomb]-a", stack_size = 10, - weight = 5 * kg, + weight = 50 * kg, }, @@ -339,21 +242,14 @@ data:extend( { type = "ammo", name = "bi-seed-bomb-standard", - icon = ICONPATH_W .. "seed_bomb_icon_s.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "seed_bomb_icon_s.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_W .. "seed_bomb_icon_s.png", icon_size = 64, }}, ammo_category = "rocket", ammo_type = { - range_modifier = 3, - cooldown_modifier = 3, - target_type = "position", - category = "rocket", - action = { + range_modifier = 4, + cooldown_modifier = 3, + target_type = "position", + category = "rocket", + action = { type = "direct", action_delivery = { type = "projectile", @@ -365,7 +261,7 @@ data:extend( subgroup = "ammo", order = "a[rocket-launcher]-x[seed-bomb]-b", stack_size = 10, - weight = 5 * kg, + weight = 50 * kg, }, @@ -373,21 +269,14 @@ data:extend( { type = "ammo", name = "bi-seed-bomb-advanced", - icon = ICONPATH_W .. "seed_bomb_icon_a.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "seed_bomb_icon_a.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_W .. "seed_bomb_icon_a.png", icon_size = 64, }}, ammo_category = "rocket", ammo_type = { - range_modifier = 3, - cooldown_modifier = 3, - target_type = "position", - category = "rocket", - action = { + range_modifier = 5, + cooldown_modifier = 3, + target_type = "position", + category = "rocket", + action = { type = "direct", action_delivery = { type = "projectile", @@ -399,40 +288,26 @@ data:extend( subgroup = "ammo", order = "a[rocket-launcher]-x[seed-bomb]-c", stack_size = 10, - weight = 5 * kg, + weight = 50 * kg, }, --- Arboretum (Entity) { type= "item", name= "bi-arboretum-area", - icon = ICONPATH_E .. "arboretum_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "arboretum_Icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "arboretum_Icon.png", icon_size = 64, }}, subgroup = "production-machine", order = "x[bi]-a[bi-arboretum]", place_result = "bi-arboretum-area", stack_size= 10, - weight = 400 * kg, + weight = 500 * kg, }, --- Arboretum Hidden Recipe { type = "item", name = "bi-arboretum-r1", - icon = ICONPATH .. "Seedling_b.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "Seedling_b.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "Seedling_b.png", icon_size = 64, }}, hidden = true, subgroup = "terrain", order = "bi-arboretum-r1", @@ -443,14 +318,7 @@ data:extend( { type = "item", name = "bi-arboretum-r2", - icon = ICONPATH .. "bi_change_1.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_change_1.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bi_change_1.png", icon_size = 64, }}, hidden = true, subgroup = "terrain", order = "bi-arboretum-r2", @@ -461,14 +329,7 @@ data:extend( { type = "item", name = "bi-arboretum-r3", - icon = ICONPATH .. "bi_change_2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_change_2.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bi_change_2.png", icon_size = 64, }}, hidden = true, subgroup = "terrain", order = "bi-arboretum-r3", @@ -479,14 +340,7 @@ data:extend( { type = "item", name = "bi-arboretum-r4", - icon = ICONPATH .. "bi_change_plant_1.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_change_plant_1.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bi_change_plant_1.png", icon_size = 64, }}, hidden = true, subgroup = "terrain", order = "bi-arboretum-r4", @@ -497,15 +351,8 @@ data:extend( { type = "item", name = "bi-arboretum-r5", - icon = ICONPATH .. "bi_change_plant_2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_change_plant_2.png", - icon_size = 64, - } - }, - hidden = true, + icons = { {icon = ICONPATH .. "bi_change_plant_2.png", icon_size = 64, }}, + hidden = true, subgroup = "terrain", order = "bi-arboretum-r5", stack_size = 1 @@ -519,36 +366,22 @@ data:extend( { type = "item", name = "fertilizer", - icon = ICONPATH .. "fertilizer_64.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "fertilizer_64.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "fertilizer.png", icon_size = 64, }}, subgroup = "intermediate-product", order = "b[fertilizer]", stack_size = 200, - weight = 5 * kg, + weight = 40 * kg, }, --- Adv fertilizer { type = "item", name = "bi-adv-fertilizer", - icon = ICONPATH .. "advanced_fertilizer_64.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "advanced_fertilizer_64.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "fertilizer_advanced.png", icon_size = 64, }}, subgroup = "intermediate-product", order = "b[fertilizer]-b[bi-adv-fertilizer]", stack_size = 200, - weight = 5 * kg, + weight = 40 * kg, }, }) diff --git a/Bio_Industries_2/prototypes/Bio_Farm/pipeConnectors.lua b/Bio_Industries_2/prototypes/Bio_Farm/pipeConnectors.lua deleted file mode 100644 index 92a79bd..0000000 --- a/Bio_Industries_2/prototypes/Bio_Farm/pipeConnectors.lua +++ /dev/null @@ -1,342 +0,0 @@ -local BioInd = require('common')('Bio_Industries_2') - -local ICONPATH = BioInd.modRoot .. "/graphics/icons/" -local ENTITYPATH_BIO = "__Bio_Industries_2__/graphics/entities/" - - -function assembler2pipepicturesCokery() - return - { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - shift = util.by_pixel(2.25, 13.5), - scale = 0.5, - }, - east = { - filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png", - priority = "extra-high", - width = 42, - height = 76, - shift = util.by_pixel(-24.5, 1), - scale = 0.5, - }, - south = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - shift = util.by_pixel(0, -31.25), - scale = 0.5, - }, - west = { - filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png", - priority = "extra-high", - width = 39, - height = 73, - shift = util.by_pixel(25.75, 1.25), - scale = 0.5, - } - } -end - - -function assembler2pipepicturesCokery() - return - { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - shift = {0.09375, 0.4375} - }, - east = { - filename = "__base__/graphics/entity/assembling-machine-2/pipe-east.png", - priority = "extra-high", - width = 41, - height = 40, - shift = {-0.71875, 0} - }, - south = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - shift = {0.0625, -1} - }, - west = { - filename = "__base__/graphics/entity/assembling-machine-2/pipe-west.png", - priority = "extra-high", - width = 41, - height = 40, - shift = {0.78125, 0.03125} - } - } -end - - -function pipecoverspicturesCokery() - return { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - scale = 0.5 - }, - east = { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - south = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - scale = 0.5 - }, - west = { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - } - } -end - - -function assembler2pipepicturesBioreactor() - return - { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 71, - height = 38, - shift = util.by_pixel(2.25, 13.5), - scale = 0.5, - }, - east = { - filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-E.png", - priority = "extra-high", - width = 42, - height = 76, - shift = util.by_pixel(-24.5, 1), - scale = 0.5, - }, - south = { - filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-S.png", - priority = "extra-high", - width = 88, - height = 61, - shift = util.by_pixel(0, -31.25), - scale = 0.5, - }, - west = { - filename = "__base__/graphics/entity/assembling-machine-2/assembling-machine-2-pipe-W.png", - priority = "extra-high", - width = 39, - height = 73, - shift = util.by_pixel(25.75, 1.25), - scale = 0.5, - } - } -end - - - -function pipecoverspicturesBioreactor() - return { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - scale = 0.5 - }, - east = { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - south = { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - west = { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - } - } - -end - - -function BioFarm_Pipe_Connectors_Left() - return - { - north = { - filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/Bio_Farm-pipe-N_l.png", - priority = "extra-high", - width = 51, - height = 35, - shift = {0.25, 1}, - }, - east = { - filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/Bio_Farm-pipe-E_l.png", - priority = "extra-high", - width = 18, - height = 48, - shift = {-1, -0.25}, - }, - south = { - filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/Bio_Farm-pipe-S_l.png", - priority = "extra-high", - width = 49, - height = 25, - shift = {0.5, -1}, - }, - west = { - filename = ENTITYPATH_BIO .. "bio_farm/biofarm_pipes/Bio_Farm-pipe-W_l.png", - priority = "extra-high", - width = 16, - height = 51, - shift = {0.5, 0.5}, - } - } -end - - -function bio_farm_pipe_pictures() - return - { - north = { - filename = "__base__/graphics/entity/assembling-machine-3/hr-assembling-machine-3-pipe-N.png", - priority = "extra-high", - width = 71, - height = 38, - shift = util.by_pixel(2.25, 13.5), - scale = 0.5, - }, - east = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - }, - south = { - filename = "__base__/graphics/entity/assembling-machine-3/hr-assembling-machine-3-pipe-S.png", - priority = "extra-high", - width = 88, - height = 61, - shift = util.by_pixel(0, -31.25), - scale = 0.5, - }, - west = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - } - } -end - -bio_farm_pipe_covers_pictures = function() - return { - north = { - layers = { - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north-shadow.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5, - draw_as_shadow = true - }, - }, - }, - east = { - layers = { - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png", - priority = "extra-high", - width = 128, - height = 128, - shift = {-0.22, 0}, - scale = 0.5 - }, - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east-shadow.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5, - shift = {-0.22, 0}, - draw_as_shadow = true - }, - }, - }, - south = { - layers = { - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south-shadow.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5, - draw_as_shadow = true - }, - }, - }, - west = { - layers = { - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png", - priority = "extra-high", - width = 128, - height = 128, - shift = {0.2, 0}, - scale = 0.5 - }, - { - filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west-shadow.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5, - shift = {0.2, 0}, - draw_as_shadow = true - }, - }, - } - } -end \ No newline at end of file diff --git a/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua b/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua index 078d23f..a317852 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua @@ -2,12 +2,11 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_W = BioInd.modRoot .. "/graphics/icons/weapons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" -local ICONPATHMIPS = BioInd.modRoot .. "/graphics/icons/mips/" + +local nitrogen = data.raw.fluid["kr-nitrogen"] and "kr-nitrogen" or "nitrogen" data:extend({ - - --- Seeds from Water (BASIC) { type = "recipe", @@ -27,10 +26,11 @@ data:extend({ { type = "item", name = "wood", amount = 20 }, }, results = { - { type = "item", name = "bi-seed", amount = 40 }, + { type = "item", name = "bi-seed", amount_min = 30, amount_max = 50 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-1", @@ -61,10 +61,11 @@ data:extend({ { type = "item", name = "bi-ash", amount = 10 }, }, results = { - { type = "item", name = "bi-seed", amount = 50 }, + { type = "item", name = "bi-seed", amount_min = 40, amount_max = 60 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-1", @@ -95,10 +96,11 @@ data:extend({ { type = "item", name = "fertilizer", amount = 10 }, }, results = { - { type = "item", name = "bi-seed", amount = 60 }, + { type = "item", name = "bi-seed", amount_min = 50, amount_max = 70 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-1", @@ -129,10 +131,11 @@ data:extend({ { type = "fluid", name = "water", amount = 40 }, }, results = { - { type = "item", name = "bi-seed", amount = 80 }, + { type = "item", name = "bi-seed", amount_min = 60, amount_max = 100 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-1", @@ -158,14 +161,14 @@ data:extend({ category = "biofarm-mod-greenhouse", energy_required = 400, ingredients = { - { type = "item", name = "bi-seed", amount = 20 }, { type = "fluid", name = "water", amount = 100 }, }, results = { - { type = "item", name = "seedling", amount = 40 }, + { type = "item", name = "seedling", amount_min = 25, amount_max = 55 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-2", @@ -196,10 +199,11 @@ data:extend({ { type = "fluid", name = "water", amount = 100 }, }, results = { - { type = "item", name = "seedling", amount = 60 }, + { type = "item", name = "seedling", amount_min = 45, amount_max = 75 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-2", @@ -230,10 +234,11 @@ data:extend({ { type = "fluid", name = "water", amount = 100 }, }, results = { - { type = "item", name = "seedling", amount = 90 }, + { type = "item", name = "seedling", amount_min = 75, amount_max = 105 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, subgroup = "bio-bio-farm-fluid-2", order = "b[bi]-ssw-b1[bi-Seedling_Mk3]", @@ -263,10 +268,11 @@ data:extend({ { type = "item", name = "bi-adv-fertilizer", amount = 10 }, }, results = { - { type = "item", name = "seedling", amount = 160 }, + { type = "item", name = "seedling", amount_min = 140, amount_max = 180 }, }, main_product = "", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, subgroup = "bio-bio-farm-fluid-2", @@ -291,6 +297,7 @@ data:extend({ }, category = "biofarm-mod-farm", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, energy_required = 400, @@ -299,10 +306,10 @@ data:extend({ { type = "fluid", name = "water", amount = 100 }, }, results = { - { type = "item", name = "wood", amount = 40 }, - { type = "item", name = "bi-woodpulp", amount = 80 }, + { type = "item", name = "wood", amount_min = 25, amount_max = 55 }, + { type = "item", name = "bi-woodpulp", amount_min = 65, amount_max = 95 }, }, - main_product = "", + main_product = "wood", subgroup = "bio-bio-farm-fluid-3", order = "c[bi]-ssw-c1[raw-wood1]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -325,6 +332,7 @@ data:extend({ }, category = "biofarm-mod-farm", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, energy_required = 360, @@ -334,10 +342,10 @@ data:extend({ { type = "fluid", name = "water", amount = 100 }, }, results = { - { type = "item", name = "wood", amount = 75 }, - { type = "item", name = "bi-woodpulp", amount = 150 }, + { type = "item", name = "wood", amount_min = 60, amount_max = 90 }, + { type = "item", name = "bi-woodpulp", amount_min = 135, amount_max = 165 }, }, - main_product = "", + main_product = "wood", subgroup = "bio-bio-farm-fluid-3", order = "c[bi]-ssw-c1[raw-wood2]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -360,6 +368,7 @@ data:extend({ }, category = "biofarm-mod-farm", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, energy_required = 300, @@ -369,10 +378,10 @@ data:extend({ { type = "fluid", name = "water", amount = 100 }, }, results = { - { type = "item", name = "wood", amount = 135 }, - { type = "item", name = "bi-woodpulp", amount = 270 }, + { type = "item", name = "wood", amount_min = 120, amount_max = 150 }, + { type = "item", name = "bi-woodpulp", amount_min = 255, amount_max = 285 }, }, - main_product = "", + main_product = "wood", subgroup = "bio-bio-farm-fluid-3", order = "c[bi]-ssw-c1[raw-wood3]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -395,6 +404,7 @@ data:extend({ }, category = "biofarm-mod-farm", enabled = false, + allow_productivity = true, always_show_made_in = true, allow_decomposition = false, energy_required = 100, @@ -404,10 +414,10 @@ data:extend({ { type = "item", name = "bi-adv-fertilizer", amount = 5 }, }, results = { - { type = "item", name = "wood", amount = 160 }, - { type = "item", name = "bi-woodpulp", amount = 320 }, + { type = "item", name = "wood", amount_min = 140, amount_max = 180 }, + { type = "item", name = "bi-woodpulp", amount_min = 300, amount_max = 340 }, }, - main_product = "", + main_product = "wood", subgroup = "bio-bio-farm-fluid-3", order = "c[bi]-ssw-c1[raw-wood4]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -498,6 +508,7 @@ data:extend({ results = { { type = "item", name = "bi-woodpulp", amount = 4 } }, main_product = "", allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + allow_productivity = true, allow_intermediates = true, -- Added for 0.18.35/1.1.5 always_show_made_in = false, -- Added for 0.18.34/1.1.4 allow_decomposition = false, -- Added for 0.18.34/1.1.4 @@ -531,6 +542,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Added for 0.18.34/1.1.4 allow_decomposition = false, -- Added for 0.18.34/1.1.4 + allow_productivity = true, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", @@ -563,6 +575,7 @@ data:extend({ allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Added for 0.18.34/1.1.4 allow_decomposition = false, -- Added for 0.18.34/1.1.4 + allow_productivity = true, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", @@ -584,14 +597,15 @@ data:extend({ }, subgroup = "bio-bio-farm-raw", order = "a[bi]-a-bx[bi-4-woodbrick]", - energy_required = 2, - ingredients = { { type = "item", name = "bi-woodpulp", amount = 24 } }, - results = { { type = "item", name = "wood-bricks", amount = 1 } }, + energy_required = 8, + ingredients = { { type = "item", name = "bi-woodpulp", amount = 192 } }, + results = { { type = "item", name = "wood-bricks", amount = 6 } }, main_product = "", enabled = false, allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", @@ -621,7 +635,7 @@ data:extend({ allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", @@ -647,7 +661,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, energy_required = 2.5, ingredients = { { type = "item", name = "bi-woodpulp", amount = 12 } }, results = { { type = "item", name = "bi-ash", amount = 6 } }, @@ -681,6 +695,7 @@ data:extend({ always_show_made_in = true, allow_decomposition = false, allow_as_intermediate = false, + allow_productivity = true, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", @@ -710,6 +725,7 @@ data:extend({ always_show_made_in = true, allow_decomposition = false, allow_as_intermediate = false, + allow_productivity = true, -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", @@ -739,7 +755,7 @@ data:extend({ allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, }, @@ -766,7 +782,7 @@ data:extend({ allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, }, @@ -793,7 +809,7 @@ data:extend({ allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, }, @@ -820,7 +836,7 @@ data:extend({ allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, }, @@ -829,7 +845,6 @@ data:extend({ type = "recipe", name = "bi-pellet-coke", icon = ICONPATH .. "pellet_coke_solid.png", - --icon = "__Bio_Industries_2__/graphics/icons/pellet_coke_c.png", icon_size = 64, icons = { { @@ -848,6 +863,7 @@ data:extend({ allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, }, -- CRUSHED STONE from stone -- @@ -873,7 +889,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 - + allow_productivity = true, }, -- CRUSHED STONE from concrete -- @@ -900,6 +916,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, }, -- CRUSHED STONE from hazard concrete -- @@ -926,6 +943,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, }, @@ -953,6 +971,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, }, -- CRUSHED STONE from refined hazard concrete -- @@ -979,6 +998,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, }, -- STONE Brick-- @@ -1010,6 +1030,7 @@ data:extend({ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, }, -- COKERY (ENTITY)-- @@ -1068,6 +1089,7 @@ data:extend({ allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Added for 0.18.34/1.1.4 allow_decomposition = true, -- Added for 0.18.34/1.1.4 + allow_productivity = true, subgroup = "bio-bio-farm-raw-entity", order = "b[bi]", }, @@ -1118,14 +1140,17 @@ data:extend({ { type = "fluid", name = "liquid-air", amount = 20 } }, results = { - { type = "fluid", name = "nitrogen", amount = 20 }, + { type = "fluid", name = nitrogen, amount = 20 }, + }, + crafting_machine_tint = { + primary = { r = 0.0, g = 0.8, b = 0.0, a = 0.000 }, + secondary = { r = 0.5, g = 1.0, b = 0.5, a = 0.000 }, + tertiary = { r = 0.25, g = 0.5, b = 0.25, a = 0.000 }, }, - main_product = "", enabled = false, always_show_made_in = true, allow_decomposition = false, allow_as_intermediate = false, - --main_product= "nitrogen", subgroup = "bio-bio-farm-intermediate-product", order = "ab", }, @@ -1147,7 +1172,7 @@ data:extend({ energy_required = 5, ingredients = { { type = "item", name = "sulfur", amount = 1 }, - { type = "fluid", name = "nitrogen", amount = 10 }, + { type = "fluid", name = nitrogen, amount = 10 }, { type = "item", name = "bi-ash", amount = 10 } }, results = { @@ -1158,6 +1183,7 @@ data:extend({ allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, subgroup = "bio-bio-farm-intermediate-product", order = "b[bi-fertilizer]", }, @@ -1167,11 +1193,11 @@ data:extend({ { type = "recipe", name = "bi-adv-fertilizer-1", - icon = ICONPATH .. "advanced_fertilizer_64.png", + icon = ICONPATH .. "fertilizer_advanced.png", icon_size = 64, icons = { { - icon = ICONPATH .. "advanced_fertilizer_64.png", + icon = ICONPATH .. "fertilizer_advanced.png", icon_size = 64, } }, @@ -1190,6 +1216,7 @@ data:extend({ allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, subgroup = "bio-bio-farm-intermediate-product", order = "b[bi-fertilizer]-b[bi-adv-fertilizer-1]", }, @@ -1199,11 +1226,11 @@ data:extend({ { type = "recipe", name = "bi-adv-fertilizer-2", - icon = ICONPATH .. "advanced_fertilizer_64.png", + icon = ICONPATH .. "fertilizer_advanced.png", icon_size = 64, icons = { { - icon = ICONPATH .. "advanced_fertilizer_64.png", + icon = ICONPATH .. "fertilizer_advanced.png", icon_size = 64, } }, @@ -1222,6 +1249,7 @@ data:extend({ allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 + allow_productivity = true, subgroup = "bio-bio-farm-intermediate-product", order = "b[bi-fertilizer]-b[bi-adv-fertilizer-2]", -- This is a custom property for use by "Krastorio 2" (it will change diff --git a/Bio_Industries_2/prototypes/Bio_Farm/technology.lua b/Bio_Industries_2/prototypes/Bio_Farm/technology.lua index 494408b..303d06d 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/technology.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/technology.lua @@ -187,7 +187,7 @@ data:extend({ }, { type = "unlock-recipe", - recipe = "bi-bio-garden-lagre" + recipe = "bi-bio-garden-large" }, { type = "unlock-recipe", diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua b/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua index 1cb969a..b35cb7b 100644 --- a/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Fuel/entities.lua @@ -8,26 +8,63 @@ local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" require("util") -require("prototypes.Bio_Fuel.pipeConnectors") +--require("prototypes.Bio_Fuel.pipeConnectors") -bio_boiler_tint = { r = 0.5, g = 0.5, b = 0.1, a = 0.7 } -- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to -- unlock the bio-reactor and the most basic recipe for algae biomass even if -- BI.Settings.BI_Bio_Fuel has been turned off! + + +------------------------------------------------------------------------------------ +-- Bio reactor -- +------------------------------------------------------------------------------------ +-- Pipes +function assembler2pipepicturesBioreactor() + return { + north = { + filename = "__core__/graphics/empty.png", + priority = "low", + width = 1, + height = 1, + shift = util.by_pixel(2.5, 14), + }, + east = { + filename = ENTITYPATH_BIO .. "bio_reactor/pipes/bioreactor-pipe-e.png", + priority = "low", + width = 42, + height = 76, + shift = util.by_pixel(-24.5, 1), + scale = 0.5, + }, + south = { + filename = ENTITYPATH_BIO .. "bio_reactor/pipes/bioreactor-pipe-s.png", + priority = "low", + width = 88, + height = 61, + shift = util.by_pixel(0, -31.25), + scale = 0.5, + }, + west = { + filename = ENTITYPATH_BIO .. "bio_reactor/pipes/bioreactor-pipe-w.png", + priority = "low", + width = 39, + height = 73, + shift = util.by_pixel(25.75, 1.25), + scale = 0.5, + }, + } +end + + + + data:extend({ -- BIO_REACTOR { type = "assembling-machine", name = "bi-bio-reactor", - icon = ICONPATH_E .. "bioreactor.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bioreactor.png", - icon_size = 64, - } - }, + icons = {{ icon = ICONPATH_E .. "bioreactor.png", icon_size = 64 }}, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! se_allow_in_space = true, @@ -35,105 +72,121 @@ data:extend({ minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-reactor" }, max_health = 100, corpse = "bi-bio-reactor-remnant", - fluid_boxes = { - { - production_type = "input", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = -1, - pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } } - }, - { - production_type = "input", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = -1, - pipe_connections = { { flow_direction = "input", direction = defines.direction.east, position = { 1, 0 } } } - }, - { - production_type = "input", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = -1, - pipe_connections = { { flow_direction = "input", direction = defines.direction.south, position = { 0, 1 } } } - }, - { - production_type = "output", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = 1, - pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, -1 } } } - }, - { - production_type = "output", - pipe_picture = assembler2pipepicturesBioreactor(), - pipe_covers = pipecoverspicturesBioreactor(), - volume = 1000, - base_level = 1, - pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, 1 } } } - }, - }, + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_area = 10, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.north, position = { 0, -1 } } }, + -- pipe_connections = {{ type = "input", position = {0, -2} }}, + render_layer = "higher-object-under", + }, + { + production_type = "input", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_area = 10, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.east, position = { 1, 0 } } }, + -- pipe_connections = {{ type = "input", position = {2, 0} }}, + render_layer = "higher-object-under", + }, + { + production_type = "input", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_area = 10, + base_level = -1, + pipe_connections = { { flow_direction = "input", direction = defines.direction.south, position = { 0, 1 } } }, + --pipe_connections = {{ type = "input", position = {0, 2} }}, + render_layer = "higher-object-under", + }, + { + production_type = "output", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_area = 10, + base_level = 1, + pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, -1 } } }, + --pipe_connections = {{ type = "output", position = {-2, -1} }}, + render_layer = "higher-object-under", + }, + { + production_type = "output", + pipe_picture = assembler2pipepicturesBioreactor(), + pipe_covers = pipecoverspictures(), + volume = 1000, + base_area = 10, + base_level = 1, + pipe_connections = { { flow_direction = "output", direction = defines.direction.west, position = { -1, 1 } } }, + --pipe_connections = {{ type = "output", position = {-2, 1} }}, + render_layer = "higher-object-under", + }, + + }, fluid_boxes_off_when_no_fluid_recipe = true, collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } }, selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } }, - graphics_set = { - -- Idle animation (1 frame) - idle_animation = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_idle.png", - priority = "high", - width = 182, - height = 256, - frame_count = 1, - repeat_count = 18, -- match working animation - shift = { 0, -0.5 }, - scale = 0.5 - }, - { - filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_shadow.png", - width = 270, - height = 256, - frame_count = 1, - repeat_count = 18, -- match working animation - draw_as_shadow = true, - shift = { 0.5, -0.5 }, - scale = 0.5 - } - } - }, - -- Working animation (16 frames) - animation = { - layers = { - { - filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_anim.png", - priority = "high", - width = 182, - height = 256, - frame_count = 18, - line_length = 6, - animation_speed = 0.4, - shift = { 0, 0.25 }, - scale = 0.5 + graphics_set = { + -- Base animation (idle state) - Factorio 2.0 syntax + animation = { + layers = { + { + filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_idle.png", + priority = "high", + width = 182, + height = 256, + frame_count = 1, + repeat_count = 18, -- match working animation frame count + shift = { 0, -0.125 }, -- Consistent shift (converted from -0.5 to tiles) + scale = 0.5 + }, + { + filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_shadow.png", + width = 270, + height = 256, + frame_count = 1, + repeat_count = 18, -- match working animation frame count + draw_as_shadow = true, + shift = { 0.5, -0.125 }, -- Consistent shift with main sprite + scale = 0.5 + } + } }, - { - filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_anim.png", - width = 182, - height = 256, - frame_count = 1, - repeat_count = 18, -- match working animation - draw_as_shadow = true, - shift = { 0.5, 0.25 }, - scale = 0.5 + + -- Working visualizations - triggers when recipe is active + working_visualisations = { + { + -- Main working animation + animation = { + layers = { + { + filename = ENTITYPATH_BIO .. "bio_reactor/bioreactor_anim.png", + priority = "high", + width = 182, + height = 256, + frame_count = 18, + line_length = 6, + animation_speed = 0.4, + shift = { 0, -0.125 }, -- FIXED: Same shift as idle animation + scale = 0.5 + } + } + }, + -- This ensures the working animation plays over the idle animation + always_draw = false, -- Only draw when working + apply_recipe_tint = "primary", -- Optional: tint based on recipe + } } - } - } - }, + }, + energy_source = { type = "electric", usage_priority = "secondary-input" @@ -193,21 +246,16 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-bio-boiler", localised_name = { "entity-name.bi-bio-boiler" }, localised_description = { "entity-description.bi-bio-boiler" }, - icon = ICONPATH_E .. "bio_boiler.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_boiler.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_boiler.png", icon_size = 64,} }, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! se_allow_in_space = true, flags = { "placeable-neutral", "player-creation" }, minable = { hardness = 0.2, mining_time = 0.5, result = "bi-bio-boiler" }, max_health = 300, - corpse = "small-remnants", + corpse = "boiler-remnants", + dying_explosion = "boiler-explosion", + impact_category = "metal-large", mode = "output-to-separate-pipe", resistances = { { @@ -285,7 +333,6 @@ if BI.Settings.BI_Bio_Fuel then height = 221, shift = util.by_pixel(-1.25, 5.25), scale = 0.5, - --tint = bio_boiler_tint, }, { filename = ENTITYPATH .. "boiler-N-shadow.png", @@ -309,7 +356,6 @@ if BI.Settings.BI_Bio_Fuel then height = 301, shift = util.by_pixel(-3, 1.25), scale = 0.5, - --tint = bio_boiler_tint, }, { filename = ENTITYPATH .. "boiler-E-shadow.png", @@ -333,7 +379,6 @@ if BI.Settings.BI_Bio_Fuel then height = 192, shift = util.by_pixel(4, 13), scale = 0.5, - --tint = bio_boiler_tint, }, { filename = ENTITYPATH .. "boiler-S-shadow.png", @@ -357,7 +402,6 @@ if BI.Settings.BI_Bio_Fuel then height = 273, shift = util.by_pixel(1.5, 7.75), scale = 0.5, - --tint = bio_boiler_tint, }, { filename = ENTITYPATH .. "boiler-W-shadow.png", @@ -379,7 +423,6 @@ if BI.Settings.BI_Bio_Fuel then height = 36, shift = util.by_pixel(33.5, -13.5), scale = 0.5, - tint = bio_boiler_tint, }, }, fire_flicker_enabled = true, diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/pipeConnectors.lua b/Bio_Industries_2/prototypes/Bio_Fuel/pipeConnectors.lua deleted file mode 100644 index 57f06b6..0000000 --- a/Bio_Industries_2/prototypes/Bio_Fuel/pipeConnectors.lua +++ /dev/null @@ -1,76 +0,0 @@ -local BioInd = require('common')('Bio_Industries_2') - -local ICONPATH = BioInd.modRoot .. "/graphics/icons/" -local ENTITYPATH = "__base__/graphics/entity/assembling-machine-2/" -local PIPEPATH = "__base__/graphics/entity/pipe-covers/" - -function assembler2pipepicturesBioreactor() - return { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - shift = util.by_pixel(2.25, 13.5), - scale = 0.5, - }, - east = { - filename = ENTITYPATH .. "assembling-machine-2-pipe-E.png", - priority = "extra-high", - width = 42, - height = 76, - shift = util.by_pixel(-24.5, 1), - scale = 0.5, - }, - south = { - filename = ENTITYPATH .. "assembling-machine-2-pipe-S.png", - priority = "extra-high", - width = 88, - height = 61, - shift = util.by_pixel(0, -31.25), - scale = 0.5, - }, - west = { - filename = ENTITYPATH .. "assembling-machine-2-pipe-W.png", - priority = "extra-high", - width = 39, - height = 73, - shift = util.by_pixel(25.75, 1.25), - scale = 0.5, - } - } -end - - -function pipecoverspicturesBioreactor() - return { - north = { - filename = ICONPATH .. "empty.png", - priority = "extra-high", - width = 1, - height = 1, - scale = 0.5 - }, - east = { - filename = PIPEPATH .. "pipe-cover-east.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - south = { - filename = PIPEPATH .. "pipe-cover-south.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - }, - west = { - filename = PIPEPATH .. "pipe-cover-west.png", - priority = "extra-high", - width = 128, - height = 128, - scale = 0.5 - } - } -end diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua b/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua index 63f8a2a..13f368a 100644 --- a/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua @@ -6,6 +6,7 @@ local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" -- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to -- unlock the bio-reactor and the most basic recipe for algae biomass even if -- BI.Settings.BI_Bio_Fuel has been turned off! + data:extend({ -- BIO Reactor (ENTITY)-- { @@ -13,14 +14,7 @@ data:extend({ name = "bi-bio-reactor", localised_name = {"entity-name.bi-bio-reactor"}, localised_description = {"entity-description.bi-bio-reactor"}, - icon = ICONPATH_E .. "bioreactor.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bioreactor.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bioreactor.png", icon_size = 64, } }, enabled = false, energy_required = 20, ingredients = { @@ -36,20 +30,14 @@ data:extend({ subgroup = "bio-bio-fuel-fluid", order = "a", }, + -- BIOMASS 1 -- { type = "recipe", name = "bi-biomass-1", localised_name = {"recipe-name.bi-biomass-1"}, localised_description = {"recipe-description.bi-biomass-1"}, - icon = ICONPATH .. "biomass_1.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "biomass_1.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "biomass_1.png", icon_size = 64, } }, category = "biofarm-mod-bioreactor", energy_required = 10, ingredients = { @@ -63,6 +51,7 @@ data:extend({ enabled = false, always_show_made_in = true, allow_decomposition = true, + allow_productivity = true, subgroup = "bio-bio-fuel-fluid", order = "x[oil-processing]-z1[bi-biomass]" }, @@ -76,14 +65,7 @@ if BI.Settings.BI_Bio_Fuel then { type = "recipe", name = "bi-basic-gas-processing", - icon = ICONPATH .. "bi_basic_gas_processing.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bi_basic_gas_processing.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bi_basic_gas_processing.png", icon_size = 64, } }, category = "chemistry", enabled = false, energy_required = 5, @@ -102,6 +84,7 @@ if BI.Settings.BI_Bio_Fuel then allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Added for 0.18.34/1.1.4 allow_decomposition = true, -- Added for 0.18.34/1.1.4 + allow_productivity = true, }, --- Bio Boiler (ENTITY) --- @@ -110,14 +93,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-bio-boiler", localised_name = {"entity-name.bi-bio-boiler"}, localised_description = {"entity-description.bi-bio-boiler"}, - icon = ICONPATH_E .. "bio_boiler.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_boiler.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_boiler.png", icon_size = 64, } }, enabled = false, energy_required = 10, ingredients = { @@ -141,14 +117,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-cellulose-1", localised_name = {"recipe-name.bi-cellulose-1"}, localised_description = {"recipe-description.bi-cellulose-1"}, - icon = ICONPATH .. "cellulose.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "cellulose.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "cellulose.png", icon_size = 64, } }, category = "chemistry", energy_required = 20, ingredients = { @@ -162,6 +131,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, subgroup = "bio-bio-fuel-other", order = "[bi-cellulose-1]", }, @@ -172,14 +142,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-cellulose-2", localised_name = {"recipe-name.bi-cellulose-2"}, localised_description = {"recipe-description.bi-cellulose-2"}, - icon = ICONPATH .. "cellulose_2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "cellulose_2.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "cellulose_2.png", icon_size = 64, } }, category = "chemistry", energy_required = 5, ingredients = { @@ -194,6 +157,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, subgroup = "bio-bio-fuel-other", order = "[bi-cellulose-2]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -207,23 +171,12 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-plastic-1", localised_name = {"recipe-name.bi-plastic-1"}, localised_description = {"recipe-description.bi-plastic-1"}, - icon = ICONPATH .. "plastic_bar_1.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "plastic_bar_1.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "plastic_bar_1.png", icon_size = 64, } }, category = "chemistry", - --subgroup = "raw-material", energy_required = 1, ingredients = { {type = "fluid", name = "steam", amount = 10}, - -- Let's use woodpulp instead of wood for the new version! Not changing this - -- for 0.18.34/1.1.4 to avoid an additional (potentially factory-breaking) - -- change shortly before the new release will change so many things anyway! - {type = "item", name = "wood", amount = 10}, + {type = "item", name = "bi-woodpulp", amount = 20}, {type = "fluid", name = "light-oil", amount = 20}, }, results = { @@ -233,9 +186,10 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, subgroup = "bio-bio-fuel-solid", order = "g[plastic-bar-1]", - -- This is a custom property for use by "Krastorio 2" (it will change + -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) mod = "Bio_Industries_2", }, @@ -246,14 +200,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-plastic-2", localised_name = {"recipe-name.bi-plastic-2"}, localised_description = {"recipe-description.bi-plastic-2"}, - icon = ICONPATH .. "plastic_bar_2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "plastic_bar_2.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "plastic_bar_2.png", icon_size = 64, } }, category = "chemistry", energy_required = 1, ingredients = { @@ -267,6 +214,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, subgroup = "bio-bio-fuel-solid", order = "g[plastic-bar-2]", }, @@ -277,14 +225,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-biomass-2", localised_name = {"recipe-name.bi-biomass-2"}, localised_description = {"recipe-description.bi-biomass-2"}, - icon = ICONPATH .. "biomass_2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "biomass_2.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "biomass_2.png", icon_size = 64, } }, category = "biofarm-mod-bioreactor", energy_required = 60, ingredients = { @@ -299,7 +240,8 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, - subgroup = "bio-bio-fuel-fluid", + allow_productivity = true, + subgroup = "bio-bio-fuel-fluid", order = "x[oil-processing]-z2[bi-biomass]" -- This recipe is not as good as bi_biomass_2! }, @@ -309,14 +251,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-biomass-3", localised_name = {"recipe-name.bi-biomass-3"}, localised_description = {"recipe-description.bi-biomass-3"}, - icon = ICONPATH .. "biomass_3.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "biomass_3.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "biomass_3.png", icon_size = 64, } }, category = "biofarm-mod-bioreactor", energy_required = 10, ingredients = { @@ -332,7 +267,8 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, - subgroup = "bio-bio-fuel-fluid", + allow_productivity = true, + subgroup = "bio-bio-fuel-fluid", order = "x[oil-processing]-z3[bi-biomass]" -- This recipe is more powerful than bi_biomass_3! }, @@ -342,14 +278,7 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-biomass-conversion-1", localised_name = {"recipe-name.bi-biomass-conversion-1"}, localised_description = {"recipe-description.bi-biomass-conversion-1"}, - icon = ICONPATH .. "bio_conversion_1.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_conversion_1.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_conversion_1.png", icon_size = 64, } }, category = "oil-processing", enabled = false, always_show_made_in = true, @@ -374,18 +303,12 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-biomass-conversion-2", localised_name = {"recipe-name.bi-biomass-conversion-2"}, localised_description = {"recipe-description.bi-biomass-conversion-2"}, - icon = ICONPATH .. "bio_conversion_2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_conversion_2.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_conversion_2.png", icon_size = 64, } }, category = "oil-processing", enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, energy_required = 5, ingredients = { {type = "fluid", name = "bi-biomass", amount = 10}, @@ -405,18 +328,12 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-biomass-conversion-3", localised_name = {"recipe-name.bi-biomass-conversion-3"}, localised_description = {"recipe-description.bi-biomass-conversion-3"}, - icon = ICONPATH .. "bio_conversion_3.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_conversion_3.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_conversion_3.png", icon_size = 64, } }, category = "oil-processing", enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, energy_required = 2.5, ingredients = { {type = "fluid", name = "bi-biomass", amount = 10}, @@ -441,18 +358,12 @@ if BI.Settings.BI_Bio_Fuel then name = "bi-biomass-conversion-4", localised_name = {"recipe-name.bi-biomass-conversion-4"}, localised_description = {"recipe-description.bi-biomass-conversion-4"}, - icon = ICONPATH .. "bio_conversion_4.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_conversion_4.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_conversion_4.png", icon_size = 64, } }, category = "oil-processing", enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, energy_required = 10, ingredients = { {type = "item", name = "coal", amount = 20}, @@ -477,16 +388,7 @@ if BI.Settings.BI_Bio_Fuel then { type = "recipe", name = "bi-battery", - icon = ICONPATH .. "bio_battery.png", - icon_size = 64, - icon_mipmaps = 4, - icons = { - { - icon = ICONPATH .. "bio_battery.png", - icon_size = 64, - icon_mipmaps = 4, - } - }, + icons = { {icon = ICONPATH .. "bio_battery.png", icon_size = 64, } }, category = "chemistry", energy_required = 5, ingredients = { @@ -499,9 +401,10 @@ if BI.Settings.BI_Bio_Fuel then }, main_product = "", enabled = false, - allow_as_intermediate = false, -- Changed for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Added for 0.18.34/1.1.4 allow_decomposition = true, -- Added for 0.18.34/1.1.4 + allow_productivity = true, crafting_machine_tint = { primary = {r = 0.970, g = 0.611, b = 0.000, a = 0.000}, -- #f79b0000 secondary = {r = 0.000, g = 0.680, b = 0.894, a = 0.357}, -- #00ade45b @@ -515,14 +418,7 @@ if BI.Settings.BI_Bio_Fuel then { type = "recipe", name = "bi-acid", - icon = ICONPATH .. "bio_acid.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_acid.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_acid.png", icon_size = 64, } }, category = "chemistry", energy_required = 10, ingredients = { @@ -537,6 +433,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, crafting_machine_tint = { primary = {r = 0.875, g = 0.735, b = 0.000, a = 0.000}, -- #dfbb0000 secondary = {r = 0.103, g = 0.940, b = 0.000, a = 0.000}, -- #1aef0000 @@ -544,20 +441,13 @@ if BI.Settings.BI_Bio_Fuel then }, subgroup = "bio-bio-fuel-other", order = "a", - }, + }, -- Sulfuric acid to Sulfur -- { type = "recipe", name = "bi-sulfur", - icon = ICONPATH .. "bio_sulfur.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_sulfur.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_sulfur.png", icon_size = 64, } }, category = "chemistry", energy_required = 10, ingredients = { @@ -571,22 +461,16 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, subgroup = "bio-bio-fuel-solid", order = "i1", - }, + }, -- Sulfuric acid to Sulfur --IF ANGELS INSTALLED (More Expensice) { type = "recipe", name = "bi-sulfur-angels", - icon = ICONPATH .. "bio_sulfur.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "bio_sulfur.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "bio_sulfur.png", icon_size = 64, } }, category = "chemistry", energy_required = 10, ingredients = { @@ -600,6 +484,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, + allow_productivity = true, subgroup = "bio-bio-fuel-solid", order = "i2", }, diff --git a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua index 791a747..c18e8e3 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua @@ -62,6 +62,7 @@ data:extend({ sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 0.8 } }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, apparent_volume = 1.5, + max_sounds_per_type = 3, }, crafting_categories = { "clean-air" }, source_inventory_size = 1, @@ -70,7 +71,7 @@ data:extend({ energy_source = { type = "electric", usage_priority = "secondary-input", - emissions_per_minute = { pollution = -45 }, -- Negative value: pollution is absorbed! + emissions_per_minute = { pollution = -1.5 * 60 }, -- Negative value: pollution is absorbed! }, energy_usage = "200kW", ingredient_count = 1, @@ -84,6 +85,7 @@ data:extend({ -- won't be affected by beacons! allowed_effects = { "consumption", "speed" }, }, + ---- corpse { type = "corpse", @@ -201,6 +203,7 @@ data:extend({ sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 1 } }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.8 }, apparent_volume = 1.5, + max_sounds_per_type = 3, }, crafting_categories = { "clean-air" }, source_inventory_size = 1, @@ -209,7 +212,7 @@ data:extend({ energy_source = { type = "electric", usage_priority = "secondary-input", - emissions_per_minute = { pollution = -360 }, -- Negative value: pollution is absorbed! + emissions_per_minute = { pollution = -12 * 60 }, -- Negative value: pollution is absorbed! }, energy_usage = "800kW", ingredient_count = 1, @@ -224,6 +227,7 @@ data:extend({ allowed_effects = { "consumption", "speed" }, }, + --- corpse { type = "corpse", name = "bi-bio-garden-large-remnant", @@ -381,6 +385,7 @@ data:extend({ sound = { { filename = "__Bio_Industries_2__/sound/rainforest_ambience.ogg", volume = 1.8 } }, idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.9 }, apparent_volume = 2, + max_sounds_per_type = 3, }, crafting_categories = { "clean-air" }, source_inventory_size = 1, @@ -389,7 +394,7 @@ data:extend({ energy_source = { type = "electric", usage_priority = "secondary-input", - emissions_per_minute = { pollution = -2880 }, -- Negative value: pollution is absorbed! + emissions_per_minute = { pollution = -96 * 60 }, -- Negative value: pollution is absorbed! }, energy_usage = "3200kW", ingredient_count = 1, diff --git a/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua b/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua index 90ef65c..29cc817 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua @@ -36,12 +36,12 @@ data:extend({ { type = "fluid", name = "bi-fertilizer-fluid", - icon = ICONPATH .. "fluid_fertilizer_64.png", + icon = ICONPATH .. "fluid_fertilizer.png", icon_size = 64, icon_mipmaps = 1, icons = { { - icon = ICONPATH .. "fluid_fertilizer_64.png", + icon = ICONPATH .. "fluid_fertilizer.png", icon_size = 64, icon_mipmaps = 1, } @@ -61,12 +61,12 @@ data:extend({ { type = "fluid", name = "bi-adv-fertilizer-fluid", - icon = ICONPATH .. "fluid_advanced_fertilizer_64.png", + icon = ICONPATH .. "fluid_advanced_fertilizer.png", icon_size = 64, icon_mipmaps = 1, icons = { { - icon = ICONPATH .. "fluid_advanced_fertilizer_64.png", + icon = ICONPATH .. "fluid_advanced_fertilizer.png", icon_size = 64, icon_mipmaps = 1, } @@ -91,11 +91,11 @@ data:extend({ { type = "recipe", name = "bi-fertilizer-fluid", - icon = ICONPATH .. "fluid_fertilizer_recipe_64.png", + icon = ICONPATH .. "fluid_fertilizer.png", icon_size = 64, icons = { { - icon = ICONPATH .. "fluid_fertilizer_recipe_64.png", + icon = ICONPATH .. "fluid_fertilizer.png", icon_size = 64, } }, @@ -129,11 +129,11 @@ data:extend({ { type = "recipe", name = "bi-adv-fertilizer-fluid", - icon = ICONPATH .. "fluid_advanced_fertilizer_recipe_64.png", + icon = ICONPATH .. "fluid_advanced_fertilizer.png", icon_size = 64, icons = { { - icon = ICONPATH .. "fluid_advanced_fertilizer_recipe_64.png", + icon = ICONPATH .. "fluid_advanced_fertilizer.png", icon_size = 64, } }, diff --git a/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua b/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua index 678ffc5..d399041 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua @@ -12,14 +12,7 @@ data:extend({ name = "bi-bio-garden", localised_name = {"entity-name.bi-bio-garden"}, localised_description = {"entity-description.bi-bio-garden"}, - icon = ICONPATH_E .. "bio_garden_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_garden_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_garden_icon.png", icon_size = 64, } }, enabled = false, energy_required = 10, ingredients = { @@ -41,17 +34,10 @@ data:extend({ --- Garden - Large(ENTITY) { type = "recipe", - name = "bi-bio-garden-lagre", - localised_name = {"entity-name.bi-bio-garden-lagre"}, - localised_description = {"entity-description.bi-bio-garden-lagre"}, - icon = ICONPATH_E .. "bio_garden_large_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_garden_large_icon.png", - icon_size = 64, - } - }, + name = "bi-bio-garden-large", + localised_name = {"entity-name.bi-bio-garden-large"}, + localised_description = {"entity-description.bi-bio-garden-large"}, + icons = { {icon = ICONPATH_E .. "bio_garden_large_icon.png", icon_size = 64, } }, enabled = false, energy_required = 15, ingredients = { @@ -76,14 +62,7 @@ data:extend({ name = "bi-bio-garden-huge", localised_name = {"entity-name.bi-bio-garden-huge"}, localised_description = {"entity-description.bi-bio-garden-huge"}, - icon = ICONPATH_E .. "bio_garden_huge_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_garden_huge_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_garden_huge_icon.png", icon_size = 64, } }, enabled = false, energy_required = 15, ingredients = { @@ -106,14 +85,7 @@ data:extend({ { type = "recipe", name = "bi-purified-air-1", - icon = ICONPATH .. "clean-air_mk1.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "clean-air_mk1.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "clean-air_mk1.png", icon_size = 64, } }, order = "zzz-clean-air", category = "clean-air", subgroup = "bio-bio-gardens-fluid", @@ -137,14 +109,7 @@ data:extend({ { type = "recipe", name = "bi-purified-air-2", - icon = ICONPATH .. "clean-air_mk2.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "clean-air_mk2.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "clean-air_mk2.png", icon_size = 64, } }, order = "zzz-clean-air2", category = "clean-air", subgroup = "bio-bio-gardens-fluid", diff --git a/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua b/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua index 7966f88..749a4ef 100644 --- a/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua @@ -13,14 +13,7 @@ if BI.Settings.BI_Solar_Additions then name = "bi-bio-solar-farm", localised_name = {"entity-name.bi-bio-solar-farm"}, localised_description = {"entity-description.bi-bio-solar-farm"}, - icon = ICONPATH_E .. "bio_Solar_Farm_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_Solar_Farm_Icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_Solar_Farm_Icon.png", icon_size = 64, } }, enabled = false, energy_required = 60, ingredients = { @@ -41,16 +34,9 @@ if BI.Settings.BI_Solar_Additions then { type = "recipe", name = "bi-solar-boiler-hidden-panel", - localised_name = {"entity-name.bi-solar-boiler"}, + localised_name = {"entity-name.bi-solar-boiler"}, localised_description = {"entity-description.bi-solar-boiler"}, - icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bio_Solar_Boiler_Icon.png", icon_size = 64, } }, enabled = false, energy_required = 15, ingredients = { @@ -73,14 +59,7 @@ if BI.Settings.BI_Solar_Additions then name = "bi-solar-mat", localised_name = {"entity-name.bi-solar-mat"}, localised_description = {"entity-description.bi-solar-mat"}, - icon = ICONPATH_E .. "solar-mat.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "solar-mat.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "solar-mat.png", icon_size = 64, } }, enabled = false, energy_required = 5, ingredients = { @@ -103,14 +82,7 @@ if BI.Settings.BI_Solar_Additions then name = "bi-bio-accumulator", localised_name = {"entity-name.bi-bio-accumulator"}, localised_description = {"entity-description.bi-bio-accumulator"}, - icon = ICONPATH_E .. "bi_LargeAccumulator.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bi_LargeAccumulator.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bi_LargeAccumulator.png", icon_size = 64, } }, energy_required = 60, enabled = false, ingredients = { @@ -120,9 +92,9 @@ if BI.Settings.BI_Solar_Additions then }, results = {{type="item", name="bi-bio-accumulator", amount=1}}, main_product = "", - subgroup = "energy", + subgroup = "energy", order = "e[accumulator]-a[bi-accumulator]", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, @@ -130,17 +102,10 @@ if BI.Settings.BI_Solar_Additions then -- Large Substation { type = "recipe", - name = "bi-large-substation", + name = "bi-large-substation", localised_name = {"entity-name.bi-large-substation"}, localised_description = {"entity-description.bi-large-substation"}, - icon = ICONPATH_E .. "bi_LargeSubstation_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "bi_LargeSubstation_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "bi_LargeSubstation_icon.png", icon_size = 64, } }, enabled = false, ingredients = { {type="item", name="steel-plate", amount=10}, diff --git a/Bio_Industries_2/prototypes/Bio_Turret/entity.lua b/Bio_Industries_2/prototypes/Bio_Turret/entity.lua index 0255355..1a247d3 100644 --- a/Bio_Industries_2/prototypes/Bio_Turret/entity.lua +++ b/Bio_Industries_2/prototypes/Bio_Turret/entity.lua @@ -9,15 +9,8 @@ data:extend({ { type = "ammo", name = "bi-dart-magazine-basic", - icon = ICONPATH_W .. "basic_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "basic_dart_icon.png", - icon_size = 64, - } - }, - ammo_category = "Bio_Turret_Ammo", + icons = { { icon = ICONPATH_W .. "basic_dart_icon.png", icon_size = 64, } }, + ammo_category = "Bio_Turret_Ammo", ammo_type = { category = "Bio_Turret_Ammo", action = { @@ -51,14 +44,7 @@ data:extend({ { type = "ammo", name = "bi-dart-magazine-standard", - icon = ICONPATH_W .. "standard_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "standard_dart_icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_W .. "standard_dart_icon.png", icon_size = 64, } }, ammo_category = "Bio_Turret_Ammo", ammo_type = { category = "Bio_Turret_Ammo", @@ -98,14 +84,7 @@ data:extend({ { type = "ammo", name = "bi-dart-magazine-enhanced", - icon = ICONPATH_W .. "enhanced_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "enhanced_dart_icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_W .. "enhanced_dart_icon.png", icon_size = 64, } }, ammo_category = "Bio_Turret_Ammo", ammo_type = { category = "Bio_Turret_Ammo", @@ -149,14 +128,7 @@ data:extend({ { type = "ammo", name = "bi-dart-magazine-poison", - icon = ICONPATH_W .. "poison_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "poison_dart_icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_W .. "poison_dart_icon.png", icon_size = 64, } }, ammo_category = "Bio_Turret_Ammo", ammo_type = { category = "Bio_Turret_Ammo", @@ -231,14 +203,7 @@ data:extend({ { type = "ammo-turret", name = "bi-dart-turret", - icon = ICONPATH_W .. "bio_turret_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "bio_turret_icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_W .. "bio_turret_icon.png", icon_size = 64, } }, flags = {"placeable-player", "player-creation"}, minable = {mining_time = 0.25, result = "bi-dart-turret"}, max_health = 300, @@ -252,13 +217,11 @@ data:extend({ inventory_size = 1, automated_ammo_count = 14, attacking_speed = 1, -- makes nothing, it's animation's parameter - folded_animation = turret_pic{direction_count = 8, line_length = 1}, preparing_animation = turret_pic{direction_count = 8, line_length = 1}, prepared_animation = turret_pic{}, attacking_animation = turret_pic{}, folding_animation = turret_pic{direction_count = 8, line_length = 1, run_mode = "backward"}, - -- darkfrei: wood impact sound for woods! impact_category = "wood", attack_parameters = { @@ -267,7 +230,6 @@ data:extend({ cooldown = 3.6, -- cooldown = 6 -- darkfrei: means cooldown 6/60 sec or 10 shoots at second; = 60 is one shoot/sec projectile_creation_distance = 1.41, projectile_center = {-0.0625, 0.55}, - range = 20, sound = { filename = "__Bio_Industries_2__/sound/dart-turret.ogg", @@ -321,14 +283,7 @@ data:extend({ { type = "gun", name = "bi-dart-rifle", - icon = ICONPATH_W .. "bi_dart_rifle_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "bi_dart_rifle_icon.png", - icon_size = 64, - } - }, + icons = { { icon = ICONPATH_W .. "bi_dart_rifle_icon.png", icon_size = 64, } }, subgroup = "gun", order = "a[basic-clips]-ab[submachine-gun]", attack_parameters = { diff --git a/Bio_Industries_2/prototypes/Bio_Turret/item.lua b/Bio_Industries_2/prototypes/Bio_Turret/item.lua index 7c6ae68..17a2c2d 100644 --- a/Bio_Industries_2/prototypes/Bio_Turret/item.lua +++ b/Bio_Industries_2/prototypes/Bio_Turret/item.lua @@ -5,18 +5,11 @@ local ICONPATH_W = BioInd.modRoot .. "/graphics/icons/weapons/" data:extend({ - --- Conversion Turret + --- Dart Turret { type = "item", name = "bi-dart-turret", - icon = ICONPATH_W .. "bio_turret_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "bio_turret_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_W .. "bio_turret_icon.png", icon_size = 64, } }, subgroup = "defensive-structure", order = "aa[turret]-a[gun-turret]", place_result = "bi-dart-turret", diff --git a/Bio_Industries_2/prototypes/Bio_Turret/recipe.lua b/Bio_Industries_2/prototypes/Bio_Turret/recipe.lua index 8ca598f..4fa0c14 100644 --- a/Bio_Industries_2/prototypes/Bio_Turret/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Turret/recipe.lua @@ -10,24 +10,17 @@ data:extend({ name = "bi-dart-magazine-basic", localised_name = {"item-name.bi-dart-magazine-basic"}, localised_description = {"item-description.bi-dart-magazine-basic"}, - icon = ICONPATH .. "basic_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "basic_dart_icon.png", - icon_size = 64, - } - }, - enabled = true, - energy_required = 4, - ingredients = { + icons = { {icon = ICONPATH .. "basic_dart_icon.png", icon_size = 64, } }, + enabled = true, + energy_required = 4, + ingredients = { {type="item", name="wood", amount=10}, - }, - results = {{type="item", name="bi-dart-magazine-basic", amount=10}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + }, + results = {{type="item", name="bi-dart-magazine-basic", amount=10}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "bi-ammo", order = "[bio-ammo]-a-[darts]-1", -- This is a custom property for use by "Krastorio 2" (it will change @@ -41,25 +34,18 @@ data:extend({ name = "bi-dart-magazine-standard", localised_name = {"item-name.bi-dart-magazine-standard"}, localised_description = {"item-description.bi-dart-magazine-standard"}, - icon = ICONPATH .. "standard_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "standard_dart_icon.png", - icon_size = 64, - } - }, - enabled = false, - energy_required = 5, - ingredients = { + icons = { {icon = ICONPATH .. "standard_dart_icon.png", icon_size = 64, } }, + enabled = false, + energy_required = 5, + ingredients = { {type="item", name="bi-dart-magazine-basic", amount=10}, {type="item", name="copper-plate", amount=5}, }, - results = {{type="item", name="bi-dart-magazine-standard", amount=10}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-dart-magazine-standard", amount=10}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "bi-ammo", order = "[bio-ammo]-a-[darts]-2", }, @@ -70,25 +56,18 @@ data:extend({ name = "bi-dart-magazine-enhanced", localised_name = {"item-name.bi-dart-magazine-enhanced"}, localised_description = {"item-description.bi-dart-magazine-enhanced"}, - icon = ICONPATH .. "enhanced_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "enhanced_dart_icon.png", - icon_size = 64, - } - }, - enabled = false, - energy_required = 6, - ingredients = { + icons = { {icon = ICONPATH .. "enhanced_dart_icon.png", icon_size = 64, } }, + enabled = false, + energy_required = 6, + ingredients = { {type="item", name="bi-dart-magazine-standard", amount=10}, {type="item", name="plastic-bar", amount=5}, }, - results = {{type="item", name="bi-dart-magazine-enhanced", amount=10}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-dart-magazine-enhanced", amount=10}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "bi-ammo", order = "[bio-ammo]-a-[darts]-3", }, @@ -99,25 +78,18 @@ data:extend({ name = "bi-dart-magazine-poison", localised_name = {"item-name.bi-dart-magazine-poison"}, localised_description = {"item-description.bi-dart-magazine-poison"}, - icon = ICONPATH .. "poison_dart_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "poison_dart_icon.png", - icon_size = 64, - } - }, - enabled = false, - energy_required = 8, - ingredients = { + icons = { {icon = ICONPATH .. "poison_dart_icon.png", icon_size = 64, } }, + enabled = false, + energy_required = 8, + ingredients = { {type="item", name="bi-dart-magazine-enhanced", amount=10}, {type="item", name="poison-capsule", amount=5}, }, - results = {{type="item", name="bi-dart-magazine-poison", amount=10}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-dart-magazine-poison", amount=10}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "bi-ammo", order = "[bio-ammo]-a-[darts]-4", }, @@ -128,25 +100,18 @@ data:extend({ name = "bi-dart-turret", localised_name = {"entity-name.bi-dart-turret"}, localised_description = {"entity-description.bi-dart-turret"}, - icon = ICONPATH_W .. "bio_turret_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "bio_turret_icon.png", - icon_size = 64, - } - }, - enabled = true, - energy_required = 8, - ingredients = { + icons = { {icon = ICONPATH .. "bio_turret_icon.png", icon_size = 64, } }, + enabled = true, + energy_required = 8, + ingredients = { {type="item", name="iron-gear-wheel", amount=5}, {type="item", name="wood", amount=20}, }, - results = {{type="item", name="bi-dart-turret", amount=1}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-dart-turret", amount=1}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "defensive-structure", order = "b[turret]-e[bi-dart-turret]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -160,29 +125,24 @@ data:extend({ name = "bi-dart-rifle", localised_name = {"item-name.bi-dart-rifle"}, localised_description = {"item-description.bi-dart-rifle"}, - icon = ICONPATH_W .. "bi_dart_rifle_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_W .. "bi_dart_rifle_icon.png", - icon_size = 64, - } - }, - enabled = true, - energy_required = 8, - ingredients = { + icons = { {icon = ICONPATH .. "bi_dart_rifle_icon.png", icon_size = 64, } }, + enabled = true, + energy_required = 8, + ingredients = { {type="item", name="copper-plate", amount=5}, {type="item", name="wood", amount=15}, }, - results = {{type="item", name="bi-dart-rifle", amount=1}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-dart-rifle", amount=1}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "gun", - order = "a[basic-clips]-b[bi-dart-rifle]" - }, + order = "a[basic-clips]-b[bi-dart-rifle]", -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) - mod = "Bio_Industries_2", + mod = "Bio_Industries_2", + }, + + }) diff --git a/Bio_Industries_2/prototypes/Bio_Tweaks/recipe.lua b/Bio_Industries_2/prototypes/Bio_Tweaks/recipe.lua index f3b1366..bc3cef5 100644 --- a/Bio_Industries_2/prototypes/Bio_Tweaks/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Tweaks/recipe.lua @@ -21,14 +21,7 @@ log("Enabling disassemble recipes!") type = "recipe", name = "bi-burner-mining-drill-disassemble", localised_description = {"recipe-description.bi-disassemble-recipes"}, - icon = ICONPATH .. "burner-mining-drill_disassemble.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "burner-mining-drill_disassemble.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "burner-mining-drill_disassemble.png", icon_size = 64, } }, category = "advanced-crafting", subgroup = "bio-disassemble", order = "a[Disassemble]-a[bi-burner-mining-drill-disassemble]", @@ -46,19 +39,12 @@ log("Enabling disassemble recipes!") }, main_product = "", }, - +---- { type = "recipe", name = "bi-burner-inserter-disassemble", localised_description = {"recipe-description.bi-disassemble-recipes"}, - icon = ICONPATH .. "burner_inserter_disassemble.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "burner_inserter_disassemble.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "burner_inserter_disassemble.png", icon_size = 64, } }, category = "advanced-crafting", subgroup = "bio-disassemble", order = "a[Disassemble]-b[bi-burner-inserter-disassemble]", @@ -75,19 +61,12 @@ log("Enabling disassemble recipes!") }, main_product = "", }, - +---- { type = "recipe", name = "bi-long-handed-inserter-disassemble", localised_description = {"recipe-description.bi-disassemble-recipes"}, - icon = ICONPATH .. "long_handed_inserter_disassemble.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "long_handed_inserter_disassemble.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "long_handed_inserter_disassemble.png", icon_size = 64, } }, category = "advanced-crafting", subgroup = "bio-disassemble", order = "a[Disassemble]-c[bi-long-handed-inserter-disassemble]", @@ -106,19 +85,12 @@ log("Enabling disassemble recipes!") }, main_product = "", }, - +--- { type = "recipe", name = "bi-stone-furnace-disassemble", localised_description = {"recipe-description.bi-disassemble-recipes"}, - icon = ICONPATH .. "stone_furnace_disassemble.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "stone_furnace_disassemble.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "stone_furnace_disassemble.png", icon_size = 64, } }, category = "advanced-crafting", subgroup = "bio-disassemble", order = "a[Disassemble]-d[bi-stone-furnace-disassemble]", @@ -135,19 +107,12 @@ log("Enabling disassemble recipes!") }, main_product = "", }, - +--- { type = "recipe", name = "bi-steel-furnace-disassemble", localised_description = {"recipe-description.bi-disassemble-recipes"}, - icon = ICONPATH .. "steel-furnace_disassemble.png", - icon_size = 64, - icons = { - { - icon = ICONPATH .. "steel-furnace_disassemble.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH .. "steel-furnace_disassemble.png", icon_size = 64, } }, category = "advanced-crafting", subgroup = "bio-disassemble", order = "a[Disassemble]-e[bi-steel-furnace-disassemble]", @@ -165,5 +130,6 @@ log("Enabling disassemble recipes!") }, main_product = "", }, + }) end \ No newline at end of file diff --git a/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua b/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua index 0074fa8..ee3d137 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua @@ -10,7 +10,6 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/" local WOODPATH = BioInd.modRoot .. "/graphics/entities/wood_products/" local REMNANTSPATH = BioInd.modRoot .. "/graphics/entities/remnants/" - local SNDPATH = "__base__/sound/" local sounds = {} sounds.open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" } @@ -39,14 +38,7 @@ data:extend({ { type = "container", name = "bi-wooden-chest-large", - icon = ICONPATH_E .. "large_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "large_wooden_chest_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "large_wooden_chest_icon.png", icon_size = 64, } }, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! se_allow_in_space = true, @@ -128,14 +120,7 @@ data:extend({ { type = "container", name = "bi-wooden-chest-huge", - icon = ICONPATH_E .. "huge_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "huge_wooden_chest_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "huge_wooden_chest_icon.png", icon_size = 64, } }, scale_info_icons = true, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! @@ -150,7 +135,7 @@ data:extend({ inventory_size = 432, --144 open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" }, close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" }, - impact_category = "wood", + impact_category = "wood", picture = { layers = { { @@ -218,14 +203,7 @@ data:extend({ { type = "container", name = "bi-wooden-chest-giga", - icon = ICONPATH_E .. "giga_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "giga_wooden_chest_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "giga_wooden_chest_icon.png", icon_size = 64, } }, scale_info_icons = true, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! @@ -240,7 +218,7 @@ data:extend({ inventory_size = 1728, --576 open_sound = { filename = "__base__/sound/wooden-chest-open.ogg" }, close_sound = { filename = "__base__/sound/wooden-chest-close.ogg" }, - impact_category = "wood", + impact_category = "wood", picture = { layers = { { diff --git a/Bio_Industries_2/prototypes/Wood_Products/containers-item.lua b/Bio_Industries_2/prototypes/Wood_Products/containers-item.lua index e5dac25..ae5f8df 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/containers-item.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/containers-item.lua @@ -16,14 +16,7 @@ data:extend({ name = "bi-wooden-chest-large", localised_name = {"entity-name.bi-wooden-chest-large"}, localised_description = {"entity-description.bi-wooden-chest-large"}, - icon = ICONPATH_E .. "large_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "large_wooden_chest_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "large_wooden_chest_icon.png", icon_size = 64, } }, fuel_category = "chemical", fuel_value = "32MJ", subgroup = "storage", @@ -38,14 +31,7 @@ data:extend({ name = "bi-wooden-chest-huge", localised_name = {"entity-name.bi-wooden-chest-huge"}, localised_description = {"entity-description.bi-wooden-chest-huge"}, - icon = ICONPATH_E .. "huge_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "huge_wooden_chest_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "huge_wooden_chest_icon.png", icon_size = 64, } }, fuel_category = "chemical", fuel_value = "200MJ", subgroup = "storage", @@ -60,14 +46,7 @@ data:extend({ name = "bi-wooden-chest-giga", localised_name = {"entity-name.bi-wooden-chest-giga"}, localised_description = {"entity-description.bi-wooden-chest-giga"}, - icon = ICONPATH_E .. "giga_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "giga_wooden_chest_icon.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "giga_wooden_chest_icon.png", icon_size = 64, } }, fuel_category = "chemical", fuel_value = "400MJ", subgroup = "storage", diff --git a/Bio_Industries_2/prototypes/Wood_Products/containers-recipe.lua b/Bio_Industries_2/prototypes/Wood_Products/containers-recipe.lua index 04e9bde..fc88fc7 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/containers-recipe.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/containers-recipe.lua @@ -15,27 +15,20 @@ data:extend({ name = "bi-wooden-chest-large", localised_name = {"entity-name.bi-wooden-chest-large"}, localised_description = {"entity-description.bi-wooden-chest-large"}, - icon = ICONPATH_E .. "large_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "large_wooden_chest_icon.png", - icon_size = 64, - } - }, - energy_required = 2, - enabled = false, - ingredients = { + icons = { {icon = ICONPATH_E .. "large_wooden_chest_icon.png", icon_size = 64, } }, + energy_required = 2, + enabled = false, + ingredients = { {type="item", name="copper-plate", amount=16}, {type="item", name="resin", amount=24}, {type="item", name="wooden-chest", amount=8} }, - results = {{type="item", name="bi-wooden-chest-large", amount=1}}, - main_product = "", - requester_paste_multiplier = 4, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wooden-chest-large", amount=1}}, + main_product = "", + requester_paste_multiplier = 4, + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "storage", order = "a[items]-aa[wooden-chest]", }, @@ -46,27 +39,20 @@ data:extend({ name = "bi-wooden-chest-huge", localised_name = {"entity-name.bi-wooden-chest-huge"}, localised_description = {"entity-description.bi-wooden-chest-huge"}, - icon = ICONPATH_E .. "huge_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "huge_wooden_chest_icon.png", - icon_size = 64, - } - }, - energy_required = 2, - enabled = false, - ingredients = { + icons = { {icon = ICONPATH_E .. "huge_wooden_chest_icon.png", icon_size = 64, } }, + energy_required = 2, + enabled = false, + ingredients = { {type="item", name="iron-stick", amount=32}, {type="item", name="stone-brick", amount=32}, {type="item", name="bi-wooden-chest-large", amount=16} }, - results = {{type="item", name="bi-wooden-chest-huge", amount=1}}, - main_product = "", - requester_paste_multiplier = 4, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wooden-chest-huge", amount=1}}, + main_product = "", + requester_paste_multiplier = 4, + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "storage", order = "a[items]-ab[wooden-chest]", }, @@ -77,27 +63,20 @@ data:extend({ name = "bi-wooden-chest-giga", localised_name = {"entity-name.bi-wooden-chest-giga"}, localised_description = {"entity-description.bi-wooden-chest-giga"}, - icon = ICONPATH_E .. "giga_wooden_chest_icon.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "giga_wooden_chest_icon.png", - icon_size = 64, - } - }, - energy_required = 4, - enabled = false, - ingredients = { + icons = { {icon = ICONPATH_E .. "giga_wooden_chest_icon.png", icon_size = 64, } }, + energy_required = 4, + enabled = false, + ingredients = { {type="item", name="steel-plate", amount=32}, {type="item", name="concrete", amount=32}, {type="item", name="bi-wooden-chest-huge", amount=16} }, - results = {{type="item", name="bi-wooden-chest-giga", amount=1}}, - main_product = "", - requester_paste_multiplier = 4, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wooden-chest-giga", amount=1}}, + main_product = "", + requester_paste_multiplier = 4, + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "storage", order = "a[items]-ac[wooden-chest]", }, diff --git a/Bio_Industries_2/prototypes/Wood_Products/entities.lua b/Bio_Industries_2/prototypes/Wood_Products/entities.lua index 10d23af..a76a204 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/entities.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/entities.lua @@ -185,15 +185,15 @@ data:extend({ type = "tile", name = "bi-wood-floor", needs_correction = false, - minable = {hardness = 0.2, mining_time = 0.25, result = "wood"}, + minable = {hardness = 0.2, mining_time = 0.25, result = "wood"}, mined_sound = { filename = "__base__/sound/deconstruct-bricks.ogg" }, collision_mask = { layers = { ground_tile = true } }, walking_speed_modifier = 1.2, layer = 13, decorative_removal_probability = 1, variants = { - transition = tile_graphics.generic_masked_tile_transitions1, - main = { + transition = tile_graphics.generic_masked_tile_transitions1, + main = { { picture = WOODPATH .. "wood_floor/woodfloor.png", count = 4, @@ -201,26 +201,26 @@ data:extend({ scale = 0.5 }, }, - inner_corner = { + inner_corner = { picture = WOODPATH .. "wood_floor/woodfloor_inner-corner.png", count = 4 }, - outer_corner = { + outer_corner = { picture = WOODPATH .. "wood_floor/woodfloor_outer-corner.png", count = 4, scale = 0.5 }, - side = { + side = { picture = WOODPATH .. "wood_floor/woodfloor_side.png", count = 4, scale = 0.5 }, - u_transition = { + u_transition = { picture = WOODPATH .. "wood_floor/woodfloor_u.png", count = 4, scale = 0.5 }, - o_transition = { + o_transition = { picture = WOODPATH .. "wood_floor/hr_woodfloor_o.png", count = 1, scale = 0.5 @@ -237,14 +237,7 @@ data:extend({ { type = "electric-pole", name = "bi-wooden-pole-big", - icon = ICONPATH_E .. "big-wooden-pole.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "big-wooden-pole.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "big-wooden-pole.png", icon_size = 64, } }, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! se_allow_in_space = true, @@ -328,7 +321,6 @@ data:extend({ localised_name = {"entity-name.bi-wooden-pole-big-remnant"}, icon = "__base__/graphics/icons/remnants.png", icon_size = 64, - icon_mipmaps = 4, BI_add_icon = true, flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, subgroup = "remnants", @@ -362,14 +354,7 @@ data:extend({ { type = "electric-pole", name = "bi-wooden-pole-huge", - icon = ICONPATH_E .. "huge-wooden-pole.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "huge-wooden-pole.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "huge-wooden-pole.png", icon_size = 64, } }, -- This is necessary for "Space Exploration" (if not true, the entity can only be -- placed on Nauvis)! se_allow_in_space = true, @@ -466,7 +451,6 @@ data:extend({ localised_name = {"entity-name.bi-wooden-pole-huge-remnant"}, icon = "__base__/graphics/icons/remnants.png", icon_size = 64, - icon_mipmaps = 4, BI_add_icon = true, flags = {"placeable-neutral", "building-direction-8-way", "not-on-map"}, subgroup = "remnants", @@ -500,14 +484,7 @@ data:extend({ { type = "wall", name = "bi-wooden-fence", - icon = ICONPATH_E .. "wooden-fence.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "wooden-fence.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "wooden-fence.png", icon_size = 64, } }, flags = {"placeable-neutral", "player-creation"}, collision_box = {{-0.29, -0.09}, {0.29, 0.49}}, selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, @@ -517,7 +494,7 @@ data:extend({ repair_speed_modifier = 2, corpse = "wall-remnants", repair_sound = { filename = "__base__/sound/manual-repair-simple.ogg" }, - impact_category = "wood", + impact_category = "wood", resistances = { { type = "physical", @@ -810,14 +787,7 @@ data:extend({ { type = "pipe", name = "bi-wood-pipe", - icon = ICONPATH_E .. "wood_pipe.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "wood_pipe.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "wood_pipe.png", icon_size = 64, } }, flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 0.075, result = "bi-wood-pipe"}, max_health = 100, @@ -836,8 +806,8 @@ data:extend({ collision_box = {{-0.29, -0.29}, {0.29, 0.29}}, selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, fluid_box = { - volume = 100, - pipe_connections = { + volume = 100, + pipe_connections = { { direction = defines.direction.north, position = {0, 0} }, { direction = defines.direction.east, position = {0, 0} }, { direction = defines.direction.south, position = {0, 0} }, @@ -858,6 +828,7 @@ data:extend({ horizontal_window_bounding_box = {{-0.25, -0.28125}, {0.25, 0.15625}}, vertical_window_bounding_box = {{-0.28125, -0.5}, {0.03125, 0.125}} }, + ---- corpse { type = "corpse", diff --git a/Bio_Industries_2/prototypes/Wood_Products/item.lua b/Bio_Industries_2/prototypes/Wood_Products/item.lua index e7e3ffa..c858d96 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/item.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/item.lua @@ -11,19 +11,10 @@ data:extend({ name = "bi-wooden-pole-big", localised_name = {"entity-name.bi-wooden-pole-big"}, localised_description = {"entity-description.bi-wooden-pole-big"}, - icon = ICONPATH_E .. "big-wooden-pole.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "big-wooden-pole.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "big-wooden-pole.png", icon_size = 64, } }, subgroup = "energy-pipe-distribution", order = "a[energy]-b[small-electric-pole]", place_result = "bi-wooden-pole-big", - --fuel_value = "14MJ", - --fuel_category = "chemical", stack_size = 50 }, @@ -33,19 +24,10 @@ data:extend({ name = "bi-wooden-pole-huge", localised_name = {"entity-name.bi-wooden-pole-huge"}, localised_description = {"entity-description.bi-wooden-pole-huge"}, - icon = ICONPATH_E .. "huge-wooden-pole.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "huge-wooden-pole.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "huge-wooden-pole.png", icon_size = 64, } }, subgroup = "energy-pipe-distribution", order = "a[energy]-d[big-electric-pole]", place_result = "bi-wooden-pole-huge", - --fuel_value = "90MJ", - --fuel_category = "chemical", stack_size = 50 }, @@ -55,14 +37,7 @@ data:extend({ name = "bi-wooden-fence", localised_name = {"entity-name.bi-wooden-fence"}, localised_description = {"entity-description.bi-wooden-fence"}, - icon = ICONPATH_E .. "wooden-fence.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "wooden-fence.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "wooden-fence.png", icon_size = 64, } }, subgroup = "defensive-structure", order = "a-a[stone-wall]-a[wooden-fence]", place_result = "bi-wooden-fence", @@ -77,14 +52,7 @@ data:extend({ name = "bi-wood-pipe", localised_name = {"entity-name.bi-wood-pipe"}, localised_description = {"entity-description.bi-wood-pipe"}, - icon = ICONPATH_E .. "wood_pipe.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "wood_pipe.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "wood_pipe.png", icon_size = 64, } }, subgroup = "energy-pipe-distribution", order = "a[pipe]-1a[pipe]", place_result = "bi-wood-pipe", @@ -99,14 +67,7 @@ data:extend({ name = "bi-wood-pipe-to-ground", localised_name = {"entity-name.bi-wood-pipe-to-ground"}, localised_description = {"entity-description.bi-wood-pipe-to-ground"}, - icon = ICONPATH_E .. "pipe-to-ground-wood.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "pipe-to-ground-wood.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "pipe-to-ground-wood.png", icon_size = 64, } }, subgroup = "energy-pipe-distribution", order = "a[pipe]-1b[pipe-to-ground]", place_result = "bi-wood-pipe-to-ground", diff --git a/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-vanilla.lua b/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-vanilla.lua new file mode 100644 index 0000000..bb2ea8a --- /dev/null +++ b/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-vanilla.lua @@ -0,0 +1,267 @@ +local util = require("util") + +local ground_rail_render_layers = +{ + stone_path_lower = "rail-stone-path-lower", + stone_path = "rail-stone-path", + tie = "rail-tie", + screw = "rail-screw", + metal = "rail-metal" +} + +local rail_segment_visualisation_endings = +{ + filename = "__base__/graphics/entity/rails/rail/rail-segment-visualisations-endings.png", + priority = "extra-high", + flags = { "low-object" }, + width = 64, + height = 64, + scale = 0.5, + direction_count = 16, + frame_count = 6, + usage = "rail" +} + + +local function make_new_rail_pictures(keys, elems, max_variations) + local function make_sprite_definition(filename, elem, key, variation_count) + return + { + filename = filename, + priority = elem.priority or "extra-high", + flags = elem.mipmap and { "trilinear-filtering" } or { "low-object" }, + draw_as_shadow = elem.draw_as_shadow, + allow_forced_downscale = elem.allow_forced_downscale, + width = key[3][1], + height = key[3][2], + x = key[2][1], + y = key[2][2], + scale = 0.5; + shift = util.by_pixel(key[4][1], key[4][2]), + variation_count = variation_count, + usage = "rail" + } + end + + local res = {} + for _ , key in ipairs(keys) do + local part = {} + local variation_count = key[5] or 1 + if max_variations then + variation_count = math.min(variation_count, max_variations) + end + if (variation_count > 0) then + for _ , elem in ipairs(elems) do + local layers = nil + local variations = variation_count; + if (elem[1] == "segment_visualisation_middle") then + variations = nil + end + if (type(elem[2]) == "table") then + layers = { layers = {} } + for _, subelem in ipairs(elem[2]) do + table.insert(layers.layers, make_sprite_definition(subelem[1], subelem, key, variations)) + end + else + layers = make_sprite_definition(elem[2], elem, key, variations) + end + + if (elem[1] ~= nil) then + part[elem[1]] = layers + else + part = layers + end + end + end + + res[key[1]] = part + end + return res +end + +function new_rail_pictures_vanilla(rail_type) + local keys + local NOT_USED_POSITION = {0, 0} + local NOT_USED_SIZE = {1, 1} + local NOT_USED_SHIFT = {0, 0} + if rail_type == "straight" then + keys = + { + {"north", { 0, 256 }, {256, 256}, {0,0}, 8}, + {"northeast", { 0, 2048 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 0 }, {256, 256}, {0,0}, 8}, + {"southeast", { 0, 896 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "half-diagonal" then + keys = + { + {"north", { 0, 1280 }, {384, 384}, {0,0}, 3}, + {"northeast", { 0, 1664 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 2432 }, {384, 384}, {0,0}, 3}, + {"southeast", { 0, 512 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "curved-a" then + keys = + { + {"north", { 2048, 3 * 512 }, {512, 512}, {0,0}, 4},-- piece 04 + {"northeast", { 2048, 12 * 512 }, {512, 512}, {0,0}, 4},-- piece 13 + {"east", { 2048, 7 * 512 }, {512, 512}, {0,0}, 4},-- piece 08 + {"southeast", { 2048, 0 * 512 }, {512, 512}, {0,0}, 4},-- piece 01 + {"south", { 2048, 11 * 512 }, {512, 512}, {0,0}, 4},-- piece 12 + {"southwest", { 2048, 4 * 512 }, {512, 512}, {0,0}, 4},-- piece 05 + {"west", { 2048, 15 * 512 }, {512, 512}, {0,0}, 4},-- piece 16 + {"northwest", { 2048, 8 * 512 }, {512, 512}, {0,0}, 4},-- piece 09 + } + elseif rail_type == "curved-b" then + keys = + { + {"north", { 2048, 2 * 512 }, {512, 512}, {0,0}, 4},-- piece 03 + {"northeast", { 2048, 13 * 512 }, {512, 512}, {0,0}, 4},-- piece 14 + {"east", { 2048, 6 * 512 }, {512, 512}, {0,0}, 4},-- piece 07 + {"southeast", { 2048, 1 * 512 }, {512, 512}, {0,0}, 4},-- piece 02 + {"south", { 2048, 10 * 512 }, {512, 512}, {0,0}, 4},-- piece 11 + {"southwest", { 2048, 5 * 512 }, {512, 512}, {0,0}, 4},-- piece 06 + {"west", { 2048, 14 * 512 }, {512, 512}, {0,0}, 4},-- piece 15 + {"northwest", { 2048, 9 * 512 }, {512, 512}, {0,0}, 4},-- piece 10 + } + end + local elems = + { + { "metals", "__base__/graphics/entity/rails/rail/rail-metals.png", mipmap = true }, + { "backplates", "__base__/graphics/entity/rails/rail/rail-backplates.png", mipmap = true }, + { "ties", "__Bio_Industries_2__/graphics/entities/wood_products/rails/new_rail/rail-ties-concrete.png" }, + { "stone_path", "__base__/graphics/entity/rails/rail/rail-stone-path-inside.png" }, + { "stone_path_background", "__base__/graphics/entity/rails/rail/rail-stone-path.png" }, + { "segment_visualisation_middle", "__base__/graphics/entity/rails/rail/rail-segment-visualisations-middle.png" }, + } + + local res = make_new_rail_pictures(keys, elems) + res["rail_endings"] = + { + sheets = + { + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-background.png", + priority = "high", + flags = { "low-object" }, + width = 256, + height = 256, + scale = 0.5, + usage = "rail" + }, + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-foreground.png", + priority = "high", + flags = { "trilinear-filtering" }, + width = 256, + height = 256, + scale = 0.5, + usage = "rail" + } + } + } + res["render_layers"] = ground_rail_render_layers + res["segment_visualisation_endings"] = rail_segment_visualisation_endings + return res +end + +function new_rail_remnants_pictures_vanilla(rail_type) + local keys + local NOT_USED_POSITION = {0, 0} + local NOT_USED_SIZE = {1, 1} + local NOT_USED_SHIFT = {0, 0} + if rail_type == "straight" then + keys = + { + {"north", { 0, 256 }, {256, 256}, {0,0}, 8}, + {"northeast", { 0, 2048 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 0 }, {256, 256}, {0,0}, 8}, + {"southeast", { 0, 896 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "half-diagonal" then + keys = + { + {"north", { 0, 1280 }, {384, 384}, {0,0}, 3}, + {"northeast", { 0, 1664 }, {384, 384}, {0,0}, 3}, + {"east", { 0, 2432 }, {384, 384}, {0,0}, 3}, + {"southeast", { 0, 512 }, {384, 384}, {0,0}, 3}, + {"south", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"southwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"west", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0}, + {"northwest", NOT_USED_POSITION, NOT_USED_SIZE, NOT_USED_SHIFT, 0} + } + elseif rail_type == "curved-a" then + keys = + { + {"north", { 2048, 3 * 512 }, {512, 512}, {0,0}, 4},-- piece 04 + {"northeast", { 2048, 12 * 512 }, {512, 512}, {0,0}, 4},-- piece 13 + {"east", { 2048, 7 * 512 }, {512, 512}, {0,0}, 4},-- piece 08 + {"southeast", { 2048, 0 * 512 }, {512, 512}, {0,0}, 4},-- piece 01 + {"south", { 2048, 11 * 512 }, {512, 512}, {0,0}, 4},-- piece 12 + {"southwest", { 2048, 4 * 512 }, {512, 512}, {0,0}, 4},-- piece 05 + {"west", { 2048, 15 * 512 }, {512, 512}, {0,0}, 4},-- piece 16 + {"northwest", { 2048, 8 * 512 }, {512, 512}, {0,0}, 4},-- piece 09 + } + elseif rail_type == "curved-b" then + keys = + { + {"north", { 2048, 2 * 512 }, {512, 512}, {0,0}, 4},-- piece 03 + {"northeast", { 2048, 13 * 512 }, {512, 512}, {0,0}, 4},-- piece 14 + {"east", { 2048, 6 * 512 }, {512, 512}, {0,0}, 4},-- piece 07 + {"southeast", { 2048, 1 * 512 }, {512, 512}, {0,0}, 4},-- piece 02 + {"south", { 2048, 10 * 512 }, {512, 512}, {0,0}, 4},-- piece 11 + {"southwest", { 2048, 5 * 512 }, {512, 512}, {0,0}, 4},-- piece 06 + {"west", { 2048, 14 * 512 }, {512, 512}, {0,0}, 4},-- piece 15 + {"northwest", { 2048, 9 * 512 }, {512, 512}, {0,0}, 4},-- piece 10 + } + end + local elems = + { + { "metals", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-metals.png", mipmap = true, allow_forced_downscale = true }, + { "backplates", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-backplates.png", mipmap = true, allow_forced_downscale = true }, + { "ties", "__Bio_Industries_2__/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-concrete.png" , allow_forced_downscale = true }, + { "stone_path", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-stone-path-inside.png" , allow_forced_downscale = true }, + { "stone_path_background", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-stone-path.png" , allow_forced_downscale = true } + } + + local res = make_new_rail_pictures(keys, elems) + res["rail_endings"] = + { + sheets = + { + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-background.png", + priority = "high", + flags = { "low-object" }, + width = 256, + height = 256, + scale = 0.5, + usage = "rail" + }, + { + filename = "__base__/graphics/entity/rails/rail/rail-endings-foreground.png", + priority = "high", + flags = { "trilinear-filtering" }, + width = 256, + height = 256, + scale = 0.5, + usage = "rail" + } + } + } + res["render_layers"] = ground_rail_render_layers + return res +end + diff --git a/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua b/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua index d9ca8e0..c2b151b 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/rail-pictures-wood.lua @@ -21,7 +21,7 @@ local rail_segment_visualisation_endings = scale = 0.5, direction_count = 16, frame_count = 6, - tint = wood_tint, + -- tint = wood_tint, usage = "rail" } @@ -41,7 +41,7 @@ local function make_new_rail_pictures_wood(keys, elems, max_variations) scale = 0.5; shift = util.by_pixel(key[4][1], key[4][2]), variation_count = variation_count, - tint = wood_tint, + -- tint = wood_tint, usage = "rail" } end @@ -140,7 +140,7 @@ function new_rail_pictures_wood(rail_type) { { "metals", "__base__/graphics/entity/rails/rail/rail-metals.png", mipmap = true }, { "backplates", "__base__/graphics/entity/rails/rail/rail-backplates.png", mipmap = true }, - { "ties", "__base__/graphics/entity/rails/rail/rail-ties.png" }, + { "ties", "__Bio_Industries_2__/graphics/entities/wood_products/rails/new_rail/rail-ties-wood.png" }, { "stone_path", "__base__/graphics/entity/rails/rail/rail-stone-path-inside.png" }, { "stone_path_background", "__base__/graphics/entity/rails/rail/rail-stone-path.png" }, { "segment_visualisation_middle", "__base__/graphics/entity/rails/rail/rail-segment-visualisations-middle.png" }, @@ -158,7 +158,7 @@ function new_rail_pictures_wood(rail_type) width = 256, height = 256, scale = 0.5, - tint = wood_tint, + -- tint = wood_tint, usage = "rail" }, { @@ -168,7 +168,7 @@ function new_rail_pictures_wood(rail_type) width = 256, height = 256, scale = 0.5, - tint = wood_tint, + -- tint = wood_tint, usage = "rail" } } @@ -236,7 +236,7 @@ function new_rail_remnants_pictures(rail_type) { { "metals", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-metals.png", mipmap = true, allow_forced_downscale = true }, { "backplates", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-backplates.png", mipmap = true, allow_forced_downscale = true }, - { "ties", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-ties.png" , allow_forced_downscale = true }, + { "ties", "__Bio_Industries_2__/graphics/entities/wood_products/rails/new_rail/rail-remnants-ties-wood.png" , allow_forced_downscale = true }, { "stone_path", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-stone-path-inside.png" , allow_forced_downscale = true }, { "stone_path_background", "__base__/graphics/entity/rails/rail/remnants/rail-remnants-stone-path.png" , allow_forced_downscale = true } } @@ -253,7 +253,7 @@ function new_rail_remnants_pictures(rail_type) width = 256, height = 256, scale = 0.5, - tint = wood_tint, + -- tint = wood_tint, usage = "rail" }, { @@ -263,7 +263,7 @@ function new_rail_remnants_pictures(rail_type) width = 256, height = 256, scale = 0.5, - tint = wood_tint, + -- tint = wood_tint, usage = "rail" } } diff --git a/Bio_Industries_2/prototypes/Wood_Products/rail.lua b/Bio_Industries_2/prototypes/Wood_Products/rail.lua index 4f78eb2..97c7da1 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/rail.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/rail.lua @@ -20,14 +20,7 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") { type = "rail-planner", name = "bi-rail-wood", - icon = ICONPATH_E .. "rail-wood.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "rail-wood.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "rail-wood.png", icon_size = 64, } }, localised_name = {"item-name.bi-rail-wood"}, subgroup = "train-transport", order = "a[rail]-0[rail]", @@ -50,14 +43,7 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") { type = "recipe", name = "bi-rail-wood-to-concrete", - icon = ICONPATH_E .. "rail-wood-to-concrete.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "rail-wood-to-concrete.png", - icon_size = 64, - } - }, + icons = { {icon = ICONPATH_E .. "rail-wood-to-concrete.png", icon_size = 64, } }, enabled = false, ingredients = { @@ -76,6 +62,7 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") name = "bi-straight-rail-wood", order = "a[ground-rail]-a[bi-straight-rail-wood]", icon = ICONPATH_E .. "straight-rail-wood.png", + localised_name = {"entity-name.bi-straight-rail-wood"}, collision_box = {{-1, -1}, {1, 1}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 1}, @@ -112,6 +99,7 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") order = "a[ground-rail]-b[bi-half-diagonal-rail-wood]", deconstruction_alternative = "bi-straight-rail-wood", icon = ICONPATH_E .. "curved-rail-wood.png", + localised_name = {"entity-name.bi-half-diagonal-rail-wood"}, collision_box = {{-0.75, -2.236}, {0.75, 2.236}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes tile_height = 2, extra_planner_goal_penalty = -4, @@ -159,6 +147,7 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") order = "a[ground-rail]-c[bi-curved-rail-a-wood]", deconstruction_alternative = "bi-straight-rail-wood", icon = ICONPATH_E .. "curved-rail-wood.png", + localised_name = {"entity-name.bi-curved-rail-a-wood"}, collision_box = {{-0.75, -2.516}, {0.75, 2.516}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 3}, @@ -205,6 +194,7 @@ local simulations = require("__base__.prototypes.factoriopedia-simulations") order = "a[ground-rail]-d[bi-curved-rail-b-wood]", deconstruction_alternative = "bi-straight-rail-wood", icon = ICONPATH_E .. "curved-rail-wood.png", + localised_name = {"entity-name.bi-curved-rail-b-wood"}, collision_box = {{-0.75, -2.441}, {0.75, 2.441}}, -- has custommly generated box, but the prototype needs something that is used to generate building smokes flags = {"placeable-neutral", "player-creation", "building-direction-8-way"}, minable = {mining_time = 0.2, result = "bi-rail-wood", count = 3}, diff --git a/Bio_Industries_2/prototypes/Wood_Products/recipe.lua b/Bio_Industries_2/prototypes/Wood_Products/recipe.lua index 4111e31..84f7cf3 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/recipe.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/recipe.lua @@ -11,24 +11,17 @@ data:extend({ name = "bi-wooden-pole-big", localised_name = {"entity-name.bi-wooden-pole-big"}, localised_description = {"entity-description.bi-wooden-pole-big"}, - icon = ICONPATH_E .. "big-wooden-pole.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "big-wooden-pole.png", - icon_size = 64, - } - }, - enabled = false, - ingredients = { + icons = { {icon = ICONPATH_E .. "big-wooden-pole.png", icon_size = 64, } }, + enabled = false, + ingredients = { {type="item", name="wood", amount=5}, {type="item", name="small-electric-pole", amount=2}, }, - results = {{type="item", name="bi-wooden-pole-big", amount=1}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wooden-pole-big", amount=1}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "energy-pipe-distribution", order = "a[energy]-b[small-electric-pole]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -42,25 +35,18 @@ data:extend({ name = "bi-wooden-pole-huge", localised_name = {"entity-name.bi-wooden-pole-huge"}, localised_description = {"entity-description.bi-wooden-pole-huge"}, - icon = ICONPATH_E .. "huge-wooden-pole.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "huge-wooden-pole.png", - icon_size = 64, - } - }, - enabled = false, - ingredients = { + icons = { {icon = ICONPATH_E .. "huge-wooden-pole.png", icon_size = 64, } }, + enabled = false, + ingredients = { {type="item", name="wood", amount=5}, {type="item", name="concrete", amount=100}, {type="item", name="bi-wooden-pole-big", amount=6}, }, - results = {{type="item", name="bi-wooden-pole-huge", amount=1}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wooden-pole-huge", amount=1}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "energy-pipe-distribution", order = "a[energy]-d[big-electric-pole]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -74,23 +60,16 @@ data:extend({ name = "bi-wooden-fence", localised_name = {"entity-name.bi-wooden-fence"}, localised_description = {"entity-description.bi-wooden-fence"}, - icon = ICONPATH_E .. "wooden-fence.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "wooden-fence.png", - icon_size = 64, - } - }, - enabled = true, - ingredients = { + icons = { {icon = ICONPATH_E .. "wooden-fence.png", icon_size = 64, } }, + enabled = true, + ingredients = { {type="item", name="wood", amount=2}, }, - results = {{type="item", name="bi-wooden-fence", amount=1}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wooden-fence", amount=1}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "defensive-structure", -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) @@ -103,26 +82,19 @@ data:extend({ name = "bi-wood-pipe", localised_name = {"entity-name.bi-wood-pipe"}, localised_description = {"entity-description.bi-wood-pipe"}, - icon = ICONPATH_E .. "wood_pipe.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "wood_pipe.png", - icon_size = 64, - } - }, - energy_required = 1, - enabled = true, + icons = { {icon = ICONPATH_E .. "wood_pipe.png", icon_size = 64, } }, + energy_required = 1, + enabled = true, ingredients = { {type="item", name="copper-plate", amount=1}, {type="item", name="wood", amount=8} }, - results = {{type="item", name="bi-wood-pipe", amount=4}}, - main_product = "", - requester_paste_multiplier = 15, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wood-pipe", amount=4}}, + main_product = "", + requester_paste_multiplier = 15, + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "energy-pipe-distribution", order = "a[pipe]-1a[pipe]", -- This is a custom property for use by "Krastorio 2" (it will change @@ -136,27 +108,20 @@ data:extend({ name = "bi-wood-pipe-to-ground", localised_name = {"entity-name.bi-wood-pipe-to-ground"}, localised_description = {"entity-description.bi-wood-pipe-to-ground"}, - icon = ICONPATH_E .. "pipe-to-ground-wood.png", - icon_size = 64, - icons = { - { - icon = ICONPATH_E .. "pipe-to-ground-wood.png", - icon_size = 64, - } - }, - energy_required = 2, - enabled = true, - ingredients = { + icons = { {icon = ICONPATH_E .. "pipe-to-ground-wood.png", icon_size = 64, } }, + energy_required = 2, + enabled = true, + ingredients = { {type="item", name="copper-plate", amount=4}, {type="item", name="bi-wood-pipe", amount=5} }, - results = {{type="item", name="bi-wood-pipe-to-ground", amount=2}}, - main_product = "", - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 - always_show_made_in = false, -- Added for 0.18.34/1.1.4 - allow_decomposition = true, -- Added for 0.18.34/1.1.4 + results = {{type="item", name="bi-wood-pipe-to-ground", amount=2}}, + main_product = "", + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + always_show_made_in = false, -- Added for 0.18.34/1.1.4 + allow_decomposition = true, -- Added for 0.18.34/1.1.4 subgroup = "energy-pipe-distribution", order = "a[pipe]-1b[pipe-to-ground]", }, - }) +}) diff --git a/Bio_Industries_2/remote.lua b/Bio_Industries_2/remote.lua new file mode 100644 index 0000000..6df4b5c --- /dev/null +++ b/Bio_Industries_2/remote.lua @@ -0,0 +1,73 @@ +BioInd = require("__" .. script.mod_name .. "__.common")(script.mod_name) +-- Presets for Milestones mod +local function milestones_preset_addons() +local grouped_milestones = {} + + + grouped_milestones["resorces"] = { + { type = "group", name = "Resources" }, + { type = "item", name = "bi-woodpulp", quantity = 1 }, + { type = "item", name = "bi-woodpulp", quantity = 1000, next = "x10", hidden = true }, + { type = "item", name = "bi-ash", quantity = 1, next = "x10" }, + { type = "item", name = "bi-ash", quantity = 1000, next = "x10", hidden = true }, + { type = "item", name = "stone-crushed", quantity = 1 }, + { type = "item", name = "stone-crushed", quantity = 1000, next = "x10", hidden = true }, + { type = "item", name = "fertilizer", quantity = 1 }, + { type = "item", name = "fertilizer", quantity = 1000, next = "x10", hidden = true }, + { type = "item", name = "bi-adv-fertilizer", quantity = 1 }, + { type = "item", name = "bi-adv-fertilizer", quantity = 1000, next = "x10", hidden = true }, + } + +grouped_milestones["progress"] = { + {type = "group", name = "Progress" }, + {type="item", name="bi-bio-farm", quantity=1}, + {type="item", name="bi-bio-greenhouse", quantity=1}, + {type="item", name="bi-bio-garden", quantity=1}, + {type="item", name="bi-bio-garden-large", quantity=1}, + {type="item", name="bi-bio-garden-huge", quantity=1}, + + + } + + --script.active_mods["Bio_Industries_2"] and { type = "item", name = "bob-beacon-2", quantity = 1 } or nil, + + +if BioInd.get_startup_setting("BI_Bio_Cannon") then +grouped_milestones["Bio_Cannon"] = { + {type = "group", name = "Bio Cannon" }, + {type="item", name="bi-bio-cannon", quantity=1}, + -- {type="ammo", name="bi-bio-cannon-proto-ammo", quantity=1}, +-- {type = "ammo", name = "bi-bio-cannon-proto-ammo", quantity = 1000, next = "x10", hidden = true }, + } +end + +if BioInd.get_startup_setting("BI_Bio_Fuel") then +grouped_milestones["Bio_Fuel"] = { + {type = "group", name = "Bio Fuel" }, + {type="item", name="bi-bio-reactor", quantity=1}, + {type="item", name="bi-bio-boiler", quantity=1}, + } +end + + + + local milestones = {} + for group_name, group_milestones in pairs(grouped_milestones) do + for _, milestone in pairs(group_milestones) do + table.insert(milestones, milestone) + end + end + + + return { + ["Bio Industries"] = { + required_mods = { "Bio_Industries_2" }, + forbidden_mods = {}, + milestones = milestones, + }, + } +end + +remote.add_interface("Bio_Industries_2", { + milestones_preset_addons = milestones_preset_addons, +})