diff --git a/Bio_Industries_2/common.lua b/Bio_Industries_2/common.lua index 209d09d..c7214f3 100644 --- a/Bio_Industries_2/common.lua +++ b/Bio_Industries_2/common.lua @@ -48,7 +48,6 @@ return function(mod_name) ['<' ] = function(A, B) return V.gtr(B, A) end, } - --~ common.Version.compare = function(mod_name, operator, need_version) common.check_version = function(mod_name, operator, need_version) local mod_version = (mods and mods[mod_name]) or (script and script.active_mods[mod_name]) return map[operator](mod_version, need_version) @@ -58,7 +57,6 @@ return function(mod_name) ------------------------------------------------------------------------------------ -- Sane values for collision masks -- Default: {"item-layer", "object-layer", "rail-layer", "floor-layer", "water-tile"} - --~ common.RAIL_BRIDGE_MASK = {"floor-layer", "object-layer", "consider-tile-transitions"} common.RAIL_BRIDGE_MASK = {"object-layer", "consider-tile-transitions"} -- "Transport Drones" removes "object-layer" from rails, so if bridges have only @@ -75,8 +73,6 @@ return function(mod_name) -- ... we just need to add some layers so our rails have the same mask as vanilla rails. table.insert(common.RAIL_MASK, "item-layer") table.insert(common.RAIL_MASK, "water-tile") ---~ log("common.RAIL_BRIDGE_MASK: " .. serpent.block(common.RAIL_BRIDGE_MASK)) ---~ log("common.RAIL_MASK: " .. serpent.block(common.RAIL_MASK)) @@ -116,29 +112,22 @@ return function(mod_name) -- Get list of tree prototypes that we want to ignore common.get_tree_ignore_list = function() - --~ log("Entered function get_tree_ignore_list!") local ignore = {} local trees = game and prototypes.get_entity_filtered({{filter = "type", type = "tree"}}) or data.raw.tree for tree_name, tree in pairs(trees) do ---~ log("tree_name: " .. tree_name) for p, pattern in ipairs(common.ignore_name_patterns) do ---~ log("Check for match against pattern " .. pattern) if tree_name:match(pattern) then ---~ log("Pattern matches!") ignore[tree_name] = true break end end end - --~ log("Tree ignore list (" .. table_size(ignore) .. "): " .. serpent.block(ignore)) - return ignore + return ignore end - - -- 0.17.42/0.18.09 fixed a bug where musk floor was created for the force "enemy". -- Because it didn't belong to any player, in map view the electric grid overlay wasn't -- shown for musk floor. Somebody complained about seeing it now, so starting with version @@ -149,11 +138,6 @@ return function(mod_name) common.MuskForceName = "BI-Musk_floor_general_owner" common.UseMuskForce = not settings.startup["BI_Show_musk_floor_in_mapview"].value - --~ ------------------------------------------------------------------------------------ - --~ -- Set some values for Musk floor tiles (bi-solar-mat), so we can use these with - --~ -- confidence when filtering for the prototype - --~ common.MUSK_FLOOR_walking_speed_modifier = 1.45 - --~ common.MUSK_FLOOR_decorative_removal_probability = 1 ------------------------------------------------------------------------------------ -- Enable writing to log file until startup options are set, so debugging output @@ -239,8 +223,7 @@ return function(mod_name) name = entity.name end - --~ return name .. " (" .. tostring(id) .. ")" - return string.format("%s (%s)", name, id or "nil") + return string.format("%s (%s)", name, id or "nil") end ------------------------------------------------------------------------------------ @@ -298,7 +281,6 @@ return function(mod_name) -- Function for removing individual entities common.remove_entity = function(entity) if entity and entity.valid then - --~ entity.destroy() entity.destroy{raise_destroy = true} end end @@ -310,7 +292,6 @@ return function(mod_name) common.writeDebug("Entered function %s()", {f_name}) local ret = {} - local h_type for c_name, c_data in pairs(common.compound_entities) do common.show("base_name", c_name) @@ -323,7 +304,6 @@ common.show("data", c_data) -- Check hidden entities for h_key, h_data in pairs(ret[c_name].hidden) do - --~ h_type = common.HE_map[h_key] common.writeDebug("h_key: %s\th_data: %s", {h_key, h_data}) -- Remove hidden entity if it doesn't exist if not prototypes.entity[h_data.name] then @@ -401,9 +381,7 @@ common.show("storage[tab]", storage[tab] or "nil") common.writeDebug("Entered function %s(%s)", {f_name, entity_name or "nil"}) common.writeDebug("Entries in common.compound_entities[%s]: %s", {entity_name, table_size(storage.compound_entities[entity_name])}) - --~ local entity_table = storage[common.compound_entities[entity_name].tab] - --~ local hidden_entities = common.compound_entities[entity_name].hidden - local entity_table = storage.compound_entities[entity_name] + local entity_table = storage.compound_entities[entity_name] common.show("entity_table", entity_table and entity_table.tab) entity_table = entity_table and entity_table.tab and storage[entity_table.tab] common.writeDebug("entity_table: %s", {entity_table}, "line") @@ -428,7 +406,6 @@ common.writeDebug("Removed %s %s", {entity_name, c}) end common.show("Removed entities", removed) common.show("Pruned list size", table_size(entity_table)) ---~ common.show("Pruned list", entity_table) return removed end @@ -438,7 +415,6 @@ common.show("Pruned list size", table_size(entity_table)) common.restore_missing_entities = function(entity_name) local f_name = "restore_missing_entities" common.writeDebug("Entered function %s(%s)", {f_name, entity_name or "nil"}) ---~ common.writeDebug("storage.compound_entities[%s]: %s", {entity_name, storage.compound_entities[entity_name]}) common.writeDebug("storage.compound_entities[%s]: %s entries", {entity_name, table_size(storage.compound_entities[entity_name])}) local check = storage.compound_entities[entity_name] @@ -449,12 +425,10 @@ common.writeDebug("storage.compound_entities[%s]: %s entries", {entity_name, tab local restored = 0 -- Scan the whole table for c, compound in pairs(entity_table) do ---~ common.writeDebug("c: %s\tcompound: %s", {c, compound}) -- Base entity is valid! if (compound.base and compound.base.valid) then common.writeDebug("%s is valid -- checking hidden entities!", {common.print_name_id(compound.base)}) for h_name, h_entity in pairs(hidden_entities) do ---~ common.writeDebug("h_name: %s\th_entity: %s", {h_name, h_entity}) -- Hidden entity is missing if compound[h_name] and compound[h_name].valid then common.writeDebug("%s: OK", {h_name}) @@ -467,12 +441,10 @@ common.writeDebug("%s is valid -- checking hidden entities!", {common.print_name end end checked = checked + 1 ---~ common.writeDebug("Restored %s %s", {entity_name, c}) end end common.writeDebug("Checked %s compound entities", {checked}) common.writeDebug("Restored %s entities", {restored}) ---~ common.show("Fixed list", entity_table) return {checked = checked, restored = restored} end @@ -556,8 +528,7 @@ common.writeDebug("Restored %s entities", {restored}) for compound_entity, c in pairs(storage.compound_entities) do cnt = cnt + common.register_in_compound_entity_tab(compound_entity) end - --~ common.writeDebug("Registered %s compound entities", {cnt}) - common.writeDebug("Registered %s compound entities.", {cnt}) + common.writeDebug("Registered %s compound entities.", {cnt}) return cnt end @@ -614,13 +585,11 @@ common.show("new", {x = base_pos.x + offset.x, y = base_pos.y + offset.y}) -------------------------------------------------------------------- -- Create and register hidden entities - --~ common.create_entities = function(g_table, base_entity, hidden_entity_names, position, ...) - common.create_entities = function(g_table, base_entity, hidden_entities) + common.create_entities = function(g_table, base_entity, hidden_entities) local f_name = "create_entities" common.writeDebug("Entered function %s(%s, %s, %s)", {f_name, "g_table", base_entity, hidden_entities}) common.show("#g_table", g_table and table_size(g_table)) - --~ common.show("hidden_entities", hidden_entities) common.check_args(g_table, "table") common.check_args(base_entity, "table") @@ -646,11 +615,8 @@ common.show("new", {x = base_pos.x + offset.x, y = base_pos.y + offset.y}) local data for key, tab in pairs(hidden_entities) do common.writeDebug("key: %s\tname: %s", {key, tab}) ---~ data = common.compound_entities[base_entity.name].hidden[key] data = storage.compound_entities[base_entity.name].hidden[key] ---~ common.show("common.compound_entities[base_entity.name].hidden", - --~ common.compound_entities[base_entity.name].hidden) -common.show("data", data) + common.show("data", data) entity = base_entity.surface.create_entity({ name = data.name, type = data.type, @@ -671,11 +637,7 @@ common.show("data", data) end -- Add optional values to global table - --~ local optional = storage.compound_entities[base_entity.name].optional - --~ for k, v in pairs(optional or {}) do - --~ g_table[base_entity.unit_number][k] = v - --~ end - common.add_optional_data(base_entity) + common.add_optional_data(base_entity) common.writeDebug("g_table[%s]: %s", {base_entity.unit_number, g_table[base_entity.unit_number]}) end @@ -683,8 +645,7 @@ common.show("data", data) -------------------------------------------------------------------- -- Make a list of the pole types that Bio gardens may connect to common.get_garden_pole_connectors = function() - --~ local ret = {} - local ret + local ret if common.get_startup_setting("BI_Easy_Bio_Gardens") then common.writeDebug("\"Easy gardens\": Compiling list of poles they can connect to!" ) ret = {} @@ -714,18 +675,11 @@ common.writeDebug("\"Easy gardens\": Not active -- nothing to do!" ) -- case, we pass on the new pole explicitly!) common.connect_garden_pole = function(base, new_pole) local compound_entity = storage.compound_entities["bi-bio-garden"] - --~ local pole_type = "electric-pole" - --~ local pole = storage[compound_entity.tab][base.unit_number] and - --~ storage[compound_entity.tab][base.unit_number][pole_type] or - --~ new_pole - local pole = storage[compound_entity.tab][base.unit_number] and + local pole = storage[compound_entity.tab][base.unit_number] and storage[compound_entity.tab][base.unit_number].pole or new_pole - --~ if pole and pole.valid then - --~ local wire_reach = prototypes.entity[compound_entity.hidden[pole_type]] and - --~ prototypes.entity[compound_entity.hidden[pole_type]].max_wire_distance - if pole and pole.valid and compound_entity.hidden and + if pole and pole.valid and compound_entity.hidden and compound_entity.hidden.pole and compound_entity.hidden.pole.name then local wire_reach = prototypes.entity[compound_entity.hidden.pole.name] and @@ -755,10 +709,6 @@ common.writeDebug("Connected pole %g to %s %g: %s", end end - --~ -- Connect hidden poles to other poles that may be in reach. - --~ common.garden_pole_connectors = common.garden_pole_connectors and next() or - --~ common.get_garden_pole_connectors() ---~ common.show("Poles hidden bio-garden poles may connect to", storage.mod_settings.garden_pole_connectors) -- Look for other poles around this one neighbours = pole.surface.find_entities_filtered({ @@ -783,7 +733,6 @@ common.writeDebug("Connected pole %g to neighbour %s (%g): %s", -- added to the table yet if the pole has just been built. In this -- case, we pass on the new pole explicitly!) common.connect_power_rail = function(base, new_pole) - --~ local pole_type = "electric-pole" local pole = storage.bi_power_rail_table[base.unit_number].pole or new_pole if pole and pole.valid then @@ -844,9 +793,7 @@ common.writeDebug("Rail %s of %s (%s): %s (%s)", {direction, base.name, base.uni ------------------------------------------------------------------------------------ common.BI_add_icons = function() for tab_name, tab in pairs(data.raw) do - --~ common.writeDebug("Checking data.raw[%s]", {tab_name}) - for proto_type_name, proto_type in pairs(data.raw[tab_name] or {}) do ---~ common.show("proto_type.BI_add_icon", proto_type.BI_add_icon or "nil" ) + for proto_type_name, proto_type in pairs(data.raw[tab_name] or {}) do if proto_type.BI_add_icon then proto_type.icons = { diff --git a/Bio_Industries_2/control.lua b/Bio_Industries_2/control.lua index 523c8f5..ca5ca88 100644 --- a/Bio_Industries_2/control.lua +++ b/Bio_Industries_2/control.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require("__" .. script.mod_name .. "__.common")(script.mod_name) BioInd = require("__" .. script.mod_name .. "__.common")(script.mod_name) local settings_changed = require("settings_changed") @@ -14,7 +13,6 @@ end -- let's just declare the variable here and fill it later. local AlienBiomes ---~ local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(true) local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(false) require ("util") require ("libs/util_ext") @@ -135,8 +133,7 @@ BioInd.writeDebug("Entered init!") -- Global table for storing the data of compound entities. They may change between -- saves (e.g. Bio gardens only need hidden poles when the "Easy gardens" setting -- is active). - --~ storage.compound_entities = storage.compound_entities or BioInd.compound_entities - storage.compound_entities = BioInd.rebuild_compound_entity_list() + storage.compound_entities = BioInd.rebuild_compound_entity_list() -------------------------------------------------------------------- @@ -159,8 +156,7 @@ BioInd.writeDebug("Entered init!") -------------------------------------------------------------------- -- Check what global tables we need for compound entities local compound_entity_tables = {} - --~ for compound, compound_data in pairs(BioInd.compound_entities) do - for compound, compound_data in pairs(storage.compound_entities) do + for compound, compound_data in pairs(storage.compound_entities) do -- BioInd.compound_entities contains entries that point to the same table -- (e.g. straight/curved rails, or overlay entities), so we just overwrite -- them to remove duplicates @@ -246,8 +242,7 @@ BioInd.show("Need to check these tables in global", compound_entity_tables) -- Create dummy force for musk floor if electric grid overlay should NOT be shown in map view if BioInd.UseMuskForce and not game.forces[BioInd.MuskForceName] then - --~ BioInd.writeDebug("Force for musk floor is required but doesn't exist.") - Create_dummy_force() + Create_dummy_force() end end @@ -272,8 +267,7 @@ BioInd.writeDebug("On Configuration changed: %s", {ConfigurationChangedData}) if ConfigurationChangedData.mod_startup_settings_changed then settings_changed.musk_floor() -- Has this been obsoleted by the new init process? Turn it off for now! - --~ settings_changed.bio_garden() - end + end -- We've made a list of the tree prototypes that are currently available. Now we -- need to make sure that the lists of growing trees don't contain removed tree @@ -285,13 +279,7 @@ BioInd.writeDebug("On Configuration changed: %s", {ConfigurationChangedData}) for i = 1, 4 do tab = storage.bi["tree_growing_stage_" .. i] BioInd.writeDebug("Number of trees in growing stage %s: %s", {i, table_size(tab)}) - --~ for t, tree in pairs(tab) do - --~ if not trees[tree.tree_name] then ---~ BioInd.writeDebug("Removing invalid tree %s (%s)", {t, tree.tree_name}) - --~ table.remove(tab, t) - --~ end - --~ end - for t = #tab, 1, -1 do + for t = #tab, 1, -1 do if not trees[tab[t].tree_name] then BioInd.writeDebug("Removing invalid tree %s (%s)", {t, tab[t].tree_name}) table.remove(tab, t) @@ -303,7 +291,6 @@ BioInd.writeDebug("Number of trees in growing stage %s: %s", {i, table_size(tab) -- tree with index 1 when checking if a tree has completed the growing stage, so -- lets sort the table after all invalid trees have been removed!) table.sort(tab, function(a, b) return a.time < b.time end) ---~ BioInd.show("Final tree list", tab) BioInd.show("Number of trees in final list", #tab) end end @@ -316,9 +303,7 @@ Event.register(defines.events.on_player_joined_game, function(event) local force = player.force local techs = force.technologies - --~ if settings.startup["angels-use-angels-barreling"] and - --~ settings.startup["angels-use-angels-barreling"].value then - if BioInd.get_startup_setting("angels-use-angels-barreling") then + if BioInd.get_startup_setting("angels-use-angels-barreling") then techs['fluid-handling'].researched = false techs['bi-tech-fertilizer'].reload() local _t = techs['angels-fluid-barreling'].researched @@ -346,11 +331,7 @@ Event.register(defines.events.on_trigger_created_entity, function(event) -- Standard elseif ent.name == "seedling-2" then - --~ BioInd.writeDebug("Seed Bomb Activated - Standard") - --~ local terrain_name_s = AlienBiomes and "vegetation-green-grass-3" or "grass-3" - --~ surface.set_tiles{{name = terrain_name_s, position = position}} - --~ seed_planted_trigger(event) - BioInd.writeDebug("Seed Bomb Activated - Standard") + BioInd.writeDebug("Seed Bomb Activated - Standard") local currTile = surface.get_tile(position).name if storage.bi.barren_tiles[currTile] then BioInd.writeDebug("Can't fertilize %s!", {currTile}) @@ -363,11 +344,7 @@ Event.register(defines.events.on_trigger_created_entity, function(event) -- Advanced elseif ent.name == "seedling-3" then - --~ BioInd.writeDebug("Seed Bomb Activated - Advanced") - --~ local terrain_name_a = AlienBiomes and "vegetation-green-grass-1" or "grass-1" - --~ surface.set_tiles{{name = terrain_name_a, position = position}} - --~ seed_planted_trigger(event) - BioInd.writeDebug("Seed Bomb Activated - Advanced") + BioInd.writeDebug("Seed Bomb Activated - Advanced") local currTile = surface.get_tile(position).name if storage.bi.barren_tiles[currTile] then BioInd.writeDebug("Can't fertilize %s!", {currTile}) @@ -394,8 +371,6 @@ local function On_Built(event) BioInd.arg_err(entity.position or "nil", "position") local force = entity.force ---~ BioInd.writeDebug("Entered function On_Built with these data: " .. serpent.block(event)) ---~ BioInd.writeDebug("Entity name: %s", {BioInd.print_name_id(entity)}) -- We can ignore ghosts -- if ghosts are revived, there will be -- another event that triggers where actual entities are placed! @@ -417,8 +392,7 @@ local function On_Built(event) BioInd.writeDebug("%s (%s) is a compound entity. Need to create %s", {base.name, base.unit_number, hidden_entities}) BioInd.show("hidden_entities", hidden_entities) - --~ local new_base, new_base_name, optional - local new_base + local new_base local new_base_name = base_entry.new_base_name -- If the base entity is only an overlay, we'll replace it with the real base -- entity and raise an event. The hidden entities will be created in the second @@ -426,8 +400,7 @@ BioInd.show("hidden_entities", hidden_entities) BioInd.show("base_entry.new_base_name", base_entry.new_base_name) BioInd.show("base_entry.new_base_name == base.name", base_entry.new_base_name == base.name) BioInd.show("base_entry.optional", base_entry.optional) - --~ if new_base_name then - if new_base_name and new_base_name ~= base.name then + if new_base_name and new_base_name ~= base.name then new_base = surface.create_entity({ name = new_base_name, position = base.position, @@ -561,8 +534,7 @@ BioInd.writeDebug("Entered function On_Pre_Remove(%s)", {event}) return end - --~ local compound_entity = BioInd.compound_entities[entity.name] - local compound_entity = storage.compound_entities[entity.name] + local compound_entity = storage.compound_entities[entity.name] local base_entry = compound_entity and storage[compound_entity.tab][entity.unit_number] BioInd.show("entity.name", entity.name) BioInd.show("entity.unit_number", entity.unit_number) @@ -586,8 +558,7 @@ BioInd.show("Removed arboretum radar! Table", storage.bi_arboretum_radar_table) -- Power rails: Connections must be explicitely removed, otherwise the poles -- from the remaining rails will automatically connect and bridge the gap in -- the power supply! - --~ if entity.name:match("bi%-%a+%-rail%-power") then - if entity.name:match("bi%-%a+%-rail%-power") and base_entry.pole and base_entry.pole.valid then + if entity.name:match("bi%-%a+%-rail%-power") and base_entry.pole and base_entry.pole.valid then BioInd.writeDebug("Before") BioInd.writeDebug("Disconnecting %s!", {BioInd.print_name_id(base_entry.pole)}) base_entry.pole.disconnect_neighbour() @@ -598,7 +569,6 @@ BioInd.writeDebug("After") for hidden, h_name in pairs(compound_entity.hidden or {}) do BioInd.show("hidden", hidden) ---~ BioInd.writeDebug("Removing hidden entity %s %s", {base_entry[hidden] and base_entry[hidden].valid and base_entry[hidden].name or "nil", base_entry[hidden] and base_entry[hidden].valid and base_entry[hidden].unit_number or "nil"}) BioInd.writeDebug("Removing hidden entity %s", {BioInd.print_name_id(base_entry[hidden])}) BioInd.remove_entity(base_entry[hidden]) base_entry[hidden] = nil @@ -821,8 +791,7 @@ BioInd.show("Force.name", force) BioInd.writeDebug("Solar Mat has been built -- must create hidden entities!") BioInd.show("Tile data", tile ) - --~ for index, old_tile in pairs(old_tiles or {}) do - for index, t in pairs(old_tiles or {tile}) do + for index, t in pairs(old_tiles or {tile}) do BioInd.show("Read old_tile inside loop", t) -- event.tiles will also contain landscape tiles like "grass-1", and it will always -- contain at least one tile @@ -856,16 +825,7 @@ BioInd.writeDebug("%s was used on forbidden ground (%s)!", {item.name, t.old_til -- Is that tile minable? products = storage.bi.barren_tiles[t.old_tile.name] if type(products) == "table" then - --~ for p, product in ipairs(products) do - --~ if player then ---~ BioInd.writeDebug("Removing %s (%s) from player %s", {product.name, product.amount, player.name}) - --~ player.remove_item({name = product.name, count = product.amount}) - --~ elseif robot then ---~ BioInd.writeDebug("Removing %s (%s) from robot %s", {product.name, product.amount, robot.unit_number}) - --~ robot.remove_item({name = product.name, count = product.amount}) - --~ end - --~ end - for p, product in ipairs(products) do + for p, product in ipairs(products) do remove_this = {name = product.name, count = product.amount} if player then BioInd.writeDebug("Removing %s (%s) from player %s", @@ -909,8 +869,7 @@ BioInd.show("restore_tiles", restore_tiles) end end if next(removed_tiles) then - --~ solar_mat_removed(surface, removed_tiles) - solar_mat_removed({surface_index = event.surface_index, tiles = removed_tiles}) + solar_mat_removed({surface_index = event.surface_index, tiles = removed_tiles}) else BioInd.writeDebug("%s has been built -- nothing to do!", {tile.name}) end @@ -939,11 +898,7 @@ BioInd.show("t", t) pos = BioInd.normalize_position(tile.position) tile_force = storage.bi_musk_floor_table.tiles[pos.x] and storage.bi_musk_floor_table.tiles[pos.x][pos.y] - --~ -- Fall back to MuskForceName if it is available - --~ UseMuskForce and MuskForceName or - --~ -- Fall back to "neutral" - --~ "neutral" -BioInd.show("Placed tile", tile.name) + BioInd.show("Placed tile", tile.name) -- Musk floor was placed if tile.name == "bi-solar-mat" then @@ -1023,11 +978,7 @@ Event.pre_remove_events = { defines.events.on_player_mined_entity, defines.events.on_robot_mined_entity, } ---~ Event.remove_events = { - --~ defines.events.on_player_mined_entity, - --~ defines.events.on_robot_mined_entity, ---~ } -Event.death_events = { + Event.death_events = { defines.events.on_entity_died, defines.events.script_raised_destroy } @@ -1045,8 +996,6 @@ Event.tile_script_action = { Event.register(Event.build_events, On_Built) Event.register(Event.pre_remove_events, On_Pre_Remove) ---~ Event.register(Event.remove_events, On_Remove) ---~ Event.register(Event.remove_events, On_Remove) Event.register(Event.death_events, On_Death) Event.register(Event.tile_build_events, solar_mat_built) Event.register(Event.tile_remove_events, solar_mat_removed) diff --git a/Bio_Industries_2/control_arboretum.lua b/Bio_Industries_2/control_arboretum.lua index 490f851..eeab587 100644 --- a/Bio_Industries_2/control_arboretum.lua +++ b/Bio_Industries_2/control_arboretum.lua @@ -1,18 +1,15 @@ ---~ local BioInd = require("__" .. script.mod_name .. "__.common")(script.mod_name) BioInd.writeDebug("Entered control_arboretum.lua") ---Arboretum Stuff ---~ local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(true) local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(false) -- If a recipe with NORMAL FERTILIZER is used, don't fertilize tiles set have "true" -- set! (Fertile tiles set to true in this table can't be made more fertile with -- normal fertilizer, and nothing should grow on the other tiles.) local Terrain_Check_1 = { - --~ ["landfill"] = true, - ["grass-1"] = true, -- Fertility: 100% + ["grass-1"] = true, -- Fertility: 100% ["grass-3"] = true, -- Fertility: 85% ["vegetation-green-grass-1"] = true, -- Fertility: 100% ["vegetation-green-grass-3"] = true, -- Fertility: 85% @@ -22,19 +19,16 @@ local Terrain_Check_1 = { -- (Fertile tiles in this table can't be made more fertile, and nothing should grow on the -- the others tiles!) local Terrain_Check_2 = { - --~ ["landfill"] = true, - ["grass-1"] = true, -- Fertility: 100% + ["grass-1"] = true, -- Fertility: 100% ["vegetation-green-grass-1"] = true, -- Fertility: 100% } local plant_radius = 75 ---~ local plant_radius = 25 -- Different tiles are used if AlienBiomes is active local AB, terrain_name_g1, terrain_name_g3 -- OmniFluid replaces all fluids with items, so the arboretum won't have a fluidbox! ---~ local OmniFluid local function get_new_position(pos) @@ -105,16 +99,13 @@ function Get_Arboretum_Recipe(ArboretumTable, event) end local arboretum = ArboretumTable.base - --~ local new_position, currentTilename, can_be_placed - local new_position, currentTilename + local new_position, currentTilename local pos, surface, Inventory, stack -- 'AlienBiomes' is a bool value -- we don't want to read it again if it's false, -- but only if it hasn't been set yet! AB = storage.compatible.AlienBiomes - --~ terrain_name_g1 = terrain_name_g1 or (AB and "vegetation-green-grass-1" or "grass-1") - --~ terrain_name_g3 = terrain_name_g3 or (AB and "vegetation-green-grass-3" or "grass-3") - terrain_name_g1 = terrain_name_g1 or (AB and "vegetation-green-grass-1" or "grass-1") + terrain_name_g1 = terrain_name_g1 or (AB and "vegetation-green-grass-1" or "grass-1") terrain_name_g3 = terrain_name_g3 or (AB and "vegetation-green-grass-3" or "grass-3") diff --git a/Bio_Industries_2/control_tree.lua b/Bio_Industries_2/control_tree.lua index 31660ff..6ead187 100644 --- a/Bio_Industries_2/control_tree.lua +++ b/Bio_Industries_2/control_tree.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require("__"..script.mod_name.."__.common")(script.mod_name) -- All tree Growing stuff local Event = require('__kry_stdlib__/stdlib/event/event').set_protected_mode(true) @@ -222,15 +221,8 @@ Bi_Industries.fertility = { ["landfill"] = 1, } ---~ local function get_tile_fertility(surface, position) - --~ surface = BioInd.is_surface(surface) or BioInd.arg_err(surface or "nil", "surface") - --~ position = BioInd.normalize_position(position) or BioInd.arg_err(position or "nil", "position") - --~ local fertility = Bi_Industries.fertility[surface.get_tile(position.x, position.y).name] - --~ return fertility and {fertility = fertility, key = "fertilizer"} or - --~ {fertility = 1, key = "default"} ---~ end -- If we get passed on a tile_name, we can skip getting the tile at position! local function get_tile_fertility(surface, position, tile_name) @@ -267,10 +259,7 @@ BioInd.show("grow_until_tick", grow_until_tick) tabl[grow_until_tick] = tabl[grow_until_tick] or {} -- Update table - --~ table.insert(tabl, tree) - --~ table.sort(tabl, function(a, b) return a.time < b.time end) - --~ table.sort(tabl, function(a, b) return a.time > b.time end) - table.insert(tabl[grow_until_tick], tree) + table.insert(tabl[grow_until_tick], tree) BioInd.writeDebug("Added tree to table!") -- Plant the new tree @@ -417,8 +406,7 @@ BioInd.show("key", key) local tree_name, can_be_placed if tree or tree2 or tree3 then BioInd.writeDebug("Found a seedling!") - --~ tree_name = random_tree(surface, position) - tree_name = random_tree(tile_name) + tree_name = random_tree(tile_name) end BioInd.show("tree_name", tree_name) diff --git a/Bio_Industries_2/data-final-fixes.lua b/Bio_Industries_2/data-final-fixes.lua index 81fe6dd..afb654b 100644 --- a/Bio_Industries_2/data-final-fixes.lua +++ b/Bio_Industries_2/data-final-fixes.lua @@ -47,15 +47,7 @@ BioInd.writeDebug("Tree name: %s\tminable.results: %s", {tree.name, (tree.minabl BioInd.writeDebug("Changing wood yield of %s to random value.", {tree.name}) tree.minable.mining_particle = "wooden-particle" tree.minable.mining_time = 1.5 - --~ tree.minable.results = { - --~ { - --~ type = "item", - --~ name = "wood", - --~ amount_min = 1, - --~ amount_max = 6 - --~ } - --~ } - tree.minable.results = new_results + tree.minable.results = new_results -- CONVERT RESULT TO RESULTS else BioInd.writeDebug("Converting tree.minable.result to tree.minable.results!") @@ -92,7 +84,6 @@ BioInd.writeDebug("Tree name: %s\tminable.results: %s", {tree.name, (tree.minabl else BioInd.writeDebug("Won't change results of %s!", {tree.name}) end ---~ BioInd.show("tree.minable", tree.minable) end end @@ -143,12 +134,10 @@ BioInd.show("Checking character", char_name) found = false for w, w_pattern in ipairs(whitelist) do ---~ BioInd.show("w_pattern", w_pattern) if char_name == w_pattern or char_name:match(w_pattern) then ignore = false BioInd.show("Found whitelisted character name", char_name) for b, b_pattern in ipairs(blacklist) do ---~ BioInd.show("b_pattern", b_pattern) if char_name == b_pattern or char_name:match(b_pattern) then BioInd.writeDebug("%s is on the ignore list!", char_name) @@ -181,20 +170,7 @@ end -- Moved to data-updates.lua for 0.18.34/1.1.4! ---~ ---- Game Tweaks ---- Disassemble Recipes ---~ require("prototypes.Bio_Tweaks.recipe") ---~ if BI.Settings.BI_Game_Tweaks_Disassemble then - --~ for recipe, tech in pairs({ - --~ ["bi-burner-mining-drill-disassemble"] = "automation-2", - --~ ["bi-burner-inserter-disassemble"] = "automation-2", - --~ ["bi-long-handed-inserter-disassemble"] = "automation-2", - --~ ["bi-stone-furnace-disassemble"] = "automation-2", - --~ ["bi-steel-furnace-disassemble"] = "advanced-material-processing", - --~ }) do - --~ thxbob.lib.tech.add_recipe_unlock(tech, recipe) - --~ end ---~ end ---- Game Tweaks ---- Production science pack recipe if data.raw.recipe["bi-production-science-pack"] then @@ -208,13 +184,7 @@ if BI.Settings.BI_Game_Tweaks_Bot then -- Logistic & Construction bots can't catch fire or be mined local function immunify(bot) -- Changed for 0.18.34/1.1.4! - --~ if not bot.flags then - --~ bot.flags = {} - --~ end - --~ if not bot.resistances then - --~ bot.resistances = {} - --~ end - local can_insert = true + local can_insert = true bot.flags = bot.flags or {} bot.resistances = bot.resistances or {} for f, flag in pairs(bot.flags) do @@ -319,8 +289,7 @@ if BI.Settings.BI_Game_Tweaks_Emissions_Multiplier then ["wood"] = 1.60, ["coal"] = 2.00, -- Removed in 0.17.48/0.18.16 - --~ ["thorium-fuel-cell"] = 5.00, - }) do + }) do BI_Functions.lib.fuel_emissions_multiplier_update(item, factor) end end @@ -409,15 +378,6 @@ end -- Moved to data-updates.lua for 0.18.34/1.1.4! ---~ -- "Transport drones" ruins rails by removing object-layer from the collision mask. That ---~ -- causes problems for our "Wooden rail bridges" as they will also pass through cliffs. ---~ -- Fix the collision masks for rail bridges if "Transport drones" is active! ---~ if mods["Transport_Drones"] then - --~ for _, type in pairs({"straight-rail", "curved-rail"}) do - --~ data.raw[type]["bi-" .. type .. "-wood-bridge"].collision_mask = BioInd.RAIL_BRIDGE_MASK - --~ end ---~ end ---~ require("prototypes.Wood_Products.rail_updates") --- If Space Exploration Mod is installed. @@ -477,30 +437,7 @@ BioInd.BI_add_icons() ---TESTING! ---~ for k,v in pairs(data.raw["curved-rail"]) do ---~ log(v.name) ---~ end ---~ for k,v in pairs(data.raw["straight-rail"]) do ---~ log(v.name) ---~ end ---~ for k,v in pairs(data.raw["rail-planner"]) do ---~ log(v.name) ---~ end ---~ BioInd.writeDebug("Testing at end of data-final-fixes.lua!") ---~ for rail_name, rail in pairs(data.raw["straight-rail"]) do - --~ BioInd.show("rail_name", rail_name) - --~ BioInd.show("flags", rail.flags) - --~ BioInd.show("fast_replaceable_group", rail.fast_replaceable_group) - --~ BioInd.show("next_upgrade", rail.next_upgrade) - --~ BioInd.show("bounding_box", rail.bounding_box) - --~ BioInd.show("collision_mask", rail.collision_mask) ---~ end ---~ for r, recipe in pairs(data.raw.recipe) do - --~ if r:match("^.*boiler.*$") then - --~ BioInd.writeDebug("recipe: %s\torder: %s\tsubgroup: %s", {r, recipe.order or "", recipe.subgroup or "" }) - --~ end ---~ end for k, v in pairs(data.raw) do for t, p in pairs(v) do diff --git a/Bio_Industries_2/data-updates.lua b/Bio_Industries_2/data-updates.lua index 4198a74..4fc6804 100644 --- a/Bio_Industries_2/data-updates.lua +++ b/Bio_Industries_2/data-updates.lua @@ -48,7 +48,6 @@ thxbob.lib.tech.add_recipe_unlock("advanced-material-processing-2", "bi-crushed- thxbob.lib.tech.add_recipe_unlock("advanced-material-processing-2", "bi-crushed-stone-3") thxbob.lib.tech.add_recipe_unlock("advanced-material-processing-2", "bi-crushed-stone-4") thxbob.lib.tech.add_recipe_unlock("advanced-material-processing-2", "bi-crushed-stone-5") ---~ thxbob.lib.tech.add_prerequisite("advanced-material-processing-2", "concrete") -- Add Wooden Chests thxbob.lib.tech.add_recipe_unlock("logistics", "bi-wooden-chest-large") @@ -56,25 +55,9 @@ thxbob.lib.tech.add_recipe_unlock("logistics-2", "bi-wooden-chest-huge") thxbob.lib.tech.add_recipe_unlock("logistics-3", "bi-wooden-chest-giga") -- Add Big and Huge electric poles to tech tree ---~ if mods["IndustrialRevolution"] then - --~ -- Our large wooden poles are unlocked by the "Logistics" research and require small - --~ -- electric poles, which are unlocked by IR2 after the Iron Age has been reached. So, - --~ -- if IR2 is active, we won't unlock our poles and use IR2's large wooden poles for - --~ -- our huge poles instead. - --~ local big_pole = "bi-wooden-pole-big" - --~ thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-1", big_pole) - --~ thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-2", "bi-wooden-pole-huge") - --~ -- Adjust localizations - --~ for k, v in ipairs({"electric-pole", "item", "recipe"}) do ---~ BioInd.show("Changing localization for", v) - --~ data.raw[v][big_pole].localised_name = {"entity-name.bi-wooden-pole-bigger"} - --~ data.raw[v][big_pole].localised_description = {"entity-description.bi-wooden-pole-bigger"} - --~ end ---~ else - thxbob.lib.tech.add_recipe_unlock ("logistics", "bi-wooden-pole-big") + thxbob.lib.tech.add_recipe_unlock ("logistics", "bi-wooden-pole-big") thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-2", "bi-wooden-pole-huge") ---~ end --- Wood Floors -- Make wood placeable only if Dectorio isn't installed. Should leave existing flooring intact. @@ -153,14 +136,12 @@ if BI.Settings.BI_Solar_Additions then 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") - --~ thxbob.lib.tech.add_recipe_unlock("bob-solar-energy-2", "bi-solar-boiler") - else + else thxbob.lib.tech.add_recipe_unlock("electric-energy-accumulators", "bi-bio-accumulator") thxbob.lib.tech.add_recipe_unlock("electric-energy-distribution-2", "bi-large-substation") thxbob.lib.tech.add_recipe_unlock("solar-energy", "bi-bio-solar-farm") thxbob.lib.tech.add_recipe_unlock("solar-energy", "bi-solar-boiler-hidden-panel") - --~ thxbob.lib.tech.add_recipe_unlock("solar-energy", "bi-solar-boiler") - end + end if data.raw.technology["bob-solar-energy-3"] then thxbob.lib.tech.add_recipe_unlock("bob-solar-energy-3", "bi-solar-mat") @@ -254,9 +235,7 @@ if BI.Settings.BI_Solar_Additions then name = "angels-electric-boiler", amount = 1} ) - --~ thxbob.lib.recipe.remove_ingredient ("bi-solar-boiler", "boiler") - --~ thxbob.lib.recipe.add_new_ingredient ("bi-solar-boiler", {type = "item", name = "angels-electric-boiler", amount = 1}) - end + end end require("prototypes.Bio_Farm.compatible_recipes") -- Bob and Angels mesh @@ -277,8 +256,7 @@ end -- Adds Bio recipes if BI.Settings.BI_Bio_Fuel then - --~ thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-bio-reactor") - thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-cellulose-1") + thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-cellulose-1") thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-cellulose-2") -- Remove unlock for biomass-1 and add it again so all biomass recipes are next to each @@ -294,22 +272,15 @@ if BI.Settings.BI_Bio_Fuel then end -- Added for 0.17.49/0.18.17 (changed for 0.18.29) - --~ thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-1", "bi-basic-gas-processing") - thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-basic-gas-processing") + thxbob.lib.tech.add_recipe_unlock("bi-tech-coal-processing-2", "bi-basic-gas-processing") - --~ -- Blacklist bioreactor in Assembler Pipe Passthrough - --~ if mods["assembler-pipe-passthrough"] then - --~ appmod.blacklist['bi-bio-reactor'] = true - --~ end if mods["angelspetrochem"] then thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-sulfur-angels") else thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-sulfur") end - --~ thxbob.lib.recipe.add_new_ingredient("bi-adv-fertilizer-1", {type = "fluid", name = "bi-biomass", amount = 10}) - --~ thxbob.lib.recipe.add_new_ingredient("bi-adv-fertilizer-2", {type = "fluid", name = "bi-biomass", amount = 10}) -else + else thxbob.lib.recipe.add_new_ingredient("bi-adv-fertilizer-1", {type = "item", name = "fertilizer", amount = 50}) thxbob.lib.recipe.remove_ingredient ("bi-adv-fertilizer-2", "fertilizer") thxbob.lib.recipe.add_new_ingredient("bi-adv-fertilizer-2", {type = "item", name = "fertilizer", amount = 30}) @@ -427,9 +398,7 @@ if data.raw.item["ash"] and mods["pycoalprocessing"] then data.raw.recipe["bi-ash-2"].icon_size = 64 data.raw.recipe["bi-stone-brick"].icon = ICONPATH .. "py_bi_stone_brick.png" data.raw.recipe["bi-stone-brick"].icon_size = 64 - --~ data.raw.recipe["bi-sulfur"].icon = ICONPATH .. "py_bio_sulfur.png" - --~ data.raw.recipe["bi-sulfur"].icon_size = 64 -end + end ----- If Bob's bobrevamp, then ---- if mods["bobrevamp"] then @@ -448,20 +417,7 @@ end -- We may need liquid air and nitrogen -- but not if any of the following mods is active! ---~ local mod_list = {"angelspetrochem", "Krastorio", "Krastorio2", "pyrawores"} ---~ local check = true ---~ for for m, mod_name in ipairs(mod_list) do - --~ if mod[mod_name] then - --~ check = false - --~ break - --~ else - --~ BioInd.writeDebug("Check passed: %s is not active", mod_name) - --~ end ---~ end ---~ if not (mods["angelspetrochem"] or mods["Krastorio"] or mods["Krastorio2"] or mods["pyrawores"]) then ---~ if check then - --~ BioInd.writeDebug("We can create the fluids now, if we need to!") local ICONPATH = BioInd.modRoot .. "/graphics/icons/" @@ -492,8 +448,7 @@ end order = "a[fluid]-b[nitrogen]" }, }) - --~ BI_Functions.lib.allow_productivity("bi-nitrogen") - BioInd.writeDebug("Made recipe for \"nitrogen\".") + BioInd.writeDebug("Made recipe for \"nitrogen\".") if not data.raw.fluid["liquid-air"] then data:extend({ @@ -520,8 +475,7 @@ end order = "a[fluid]-b[liquid-air]" }, }) - --~ BI_Functions.lib.allow_productivity("bi-liquid-air") - BioInd.writeDebug("Made recipe for \"liquid-air\".") + BioInd.writeDebug("Made recipe for \"liquid-air\".") end -- Recipes for "bi-liquid-air" and "bi-nitrogen" aren't needed! @@ -642,7 +596,6 @@ local h_type for h_key, h_names in pairs(BI.hidden_entities.types) do h_type = BioInd.HE_map[h_key] for h_name, h in pairs(h_names) do ---~ BioInd.writeDebug("h_type: %s\th_name: %s\th:%s", {h_type, h_name, h}) data.raw[h_type][h_name].resistances = resistances BioInd.writeDebug("Added resistances to %s (%s): %s", {h_name, h_type, data.raw[h_type][h_name].resistances}) diff --git a/Bio_Industries_2/data.lua b/Bio_Industries_2/data.lua index be763f4..1bfc6b9 100644 --- a/Bio_Industries_2/data.lua +++ b/Bio_Industries_2/data.lua @@ -3,8 +3,6 @@ local BioInd = require('common')('Bio_Industries_2') if not BI then BI = {} end if not BI.Settings then BI.Settings = {} end ---~ if not BI_Config then BI_Config = {} end ---~ if not BI_Config.mod then BI_Config.mod = {} end if not BI_Functions then BI_Functions = {} end if not BI_Functions.lib then BI_Functions.lib = {} end @@ -28,8 +26,6 @@ for var, name in pairs({ BI.Settings[var] = BioInd.get_startup_setting(name) end ---~ BioInd.show("BI.Settings.BI_Easy_Bio_Gardens", BI.Settings.BI_Easy_Bio_Gardens) ---~ BioInd.show("BI.Settings.BI_Game_Tweaks_Disassemble", BI.Settings.BI_Game_Tweaks_Disassemble) --- Help Files require ("libs.item-functions") -- From Bob's Libary require ("libs.recipe-functions") -- From Bob's Libary @@ -40,11 +36,7 @@ require ("libs.bi_functions") -- Functions require ("prototypes.category") ---~ -- Create the hidden entities ---~ require("prototypes.compound_entities.hidden_entities") ---~ BioInd.show("BioInd.compound_entities", BioInd.compound_entities) ---~ error("Break!") --- Bio Farm @@ -127,9 +119,6 @@ require("prototypes.compound_entities.hidden_entities") alien_biomes_priority_tiles = alien_biomes_priority_tiles or {} table.insert(alien_biomes_priority_tiles, "bi-solar-mat") ---~ for i, item in pairs(data.raw.item) do ---~ BioInd.show("Item", i) ---~ end ------------------------------------------------------------------------------------ diff --git a/Bio_Industries_2/libs/functions.lua b/Bio_Industries_2/libs/functions.lua index 6c77806..f192d31 100644 --- a/Bio_Industries_2/libs/functions.lua +++ b/Bio_Industries_2/libs/functions.lua @@ -43,8 +43,7 @@ BioInd.writeDebug("data.raw[%s][%s]: %s", {item.type, object.result, data.raw[it 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 - --~ end - -- Make sure objects also have an icons definition + -- 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, diff --git a/Bio_Industries_2/libs/recipe-functions.lua b/Bio_Industries_2/libs/recipe-functions.lua index 1b3402f..60fc1c0 100644 --- a/Bio_Industries_2/libs/recipe-functions.lua +++ b/Bio_Industries_2/libs/recipe-functions.lua @@ -36,8 +36,7 @@ function thxbob.lib.recipe.replace_ingredient(recipe, old, new) if not thxbob.lib.item.get_type(new) then BioInd.writeDebug("Ingredient %s does not exist.", {new}) end - --~ return false - end + end return retval end diff --git a/Bio_Industries_2/libs/trees-and-terrains.lua b/Bio_Industries_2/libs/trees-and-terrains.lua index 71b87c2..547dc89 100644 --- a/Bio_Industries_2/libs/trees-and-terrains.lua +++ b/Bio_Industries_2/libs/trees-and-terrains.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require('common')('Bio_Industries_2') local terrains = {} diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua b/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua index 72294c2..a12e178 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/damage-type.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require('common')('Bio_Industries_2') data:extend({ diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/item-group.lua b/Bio_Industries_2/prototypes/Bio_Cannon/item-group.lua index 9ea7b9a..47aa002 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/item-group.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/item-group.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require('common')('Bio_Industries_2') if BI.Settings.Bio_Cannon then data:extend({ diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-recipe.lua b/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-recipe.lua index fc3af29..078a3e4 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/projectiles-recipe.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require('common')('Bio_Industries_2') if BI.Settings.Bio_Cannon then diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/recipe.lua b/Bio_Industries_2/prototypes/Bio_Cannon/recipe.lua index ea73fb5..13342ff 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/recipe.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require('common')('Bio_Industries_2') if BI.Settings.Bio_Cannon then diff --git a/Bio_Industries_2/prototypes/Bio_Cannon/technology-updates.lua b/Bio_Industries_2/prototypes/Bio_Cannon/technology-updates.lua index 189d483..e003a7d 100644 --- a/Bio_Industries_2/prototypes/Bio_Cannon/technology-updates.lua +++ b/Bio_Industries_2/prototypes/Bio_Cannon/technology-updates.lua @@ -1,11 +1,8 @@ ---~ local BioInd = require('common')('Bio_Industries_2') ---~ if not mods["Natural_Evolution_Buildings"] and BI.Settings.Bio_Cannon then -- Don't duplicate what NE does if BI.Settings.Bio_Cannon and not mods["Natural_Evolution_Buildings"] then - --~ if not mods["Natural_Evolution_Buildings"] then table.insert(data.raw.technology["physical-projectile-damage-5"].effects, { type = "ammo-damage", @@ -37,5 +34,4 @@ if BI.Settings.Bio_Cannon and not mods["Natural_Evolution_Buildings"] then ammo_category = "Bio_Cannon_Ammo", modifier = 1.5 }) - --~ end -end + end diff --git a/Bio_Industries_2/prototypes/Bio_Farm/coal_processing.lua b/Bio_Industries_2/prototypes/Bio_Farm/coal_processing.lua index 8441949..1a47503 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/coal_processing.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/coal_processing.lua @@ -25,11 +25,7 @@ return { type = "unlock-recipe", recipe = "bi-wood-fuel-brick" }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-solid-fuel" - --~ }, - { + { type = "unlock-recipe", recipe = "bi-seed-2" }, @@ -41,11 +37,7 @@ return { type = "unlock-recipe", recipe = "bi-logs-2" }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-stone-brick" - --~ }, - { + { type = "unlock-recipe", recipe = "bi-cokery" }, diff --git a/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua b/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua index 27ab934..6e16ffb 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/compatible_recipes.lua @@ -49,10 +49,7 @@ data:extend({ {type = "item", name = "fertilizer", amount = 5} }, enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 subgroup = "bio-bio-farm-intermediate-product", @@ -78,18 +75,13 @@ if not data.raw.item["resin"] then }, icon_mipmaps = 4, pictures = { - --~ { size = 64, filename = ICONPATHMIPS.."Resin_1.png", scale = 0.2, mipmap_count = 1 }, - --~ { size = 64, filename = ICONPATHMIPS.."Resin_2.png", scale = 0.2, mipmap_count = 1 }, - --~ { size = 64, filename = ICONPATHMIPS.."Resin_3.png", scale = 0.2, mipmap_count = 1 }, - --~ { size = 64, filename = ICONPATHMIPS.."Resin_4.png", scale = 0.2, mipmap_count = 1 } - { size = 64, filename = ICONPATHMIPS.."Resin_1.png", scale = 0.2 }, + { size = 64, filename = ICONPATHMIPS.."Resin_1.png", scale = 0.2 }, { size = 64, filename = ICONPATHMIPS.."Resin_2.png", scale = 0.2 }, { size = 64, filename = ICONPATHMIPS.."Resin_3.png", scale = 0.2 }, { size = 64, filename = ICONPATHMIPS.."Resin_4.png", scale = 0.2 } }, subgroup = "bio-bio-farm-raw", - --~ order = "a[bi]-a-b[bi-resin]", - order = "a[bi]-a-bb[bi-resin]", + order = "a[bi]-a-bb[bi-resin]", stack_size = 200 }, @@ -107,16 +99,10 @@ if not data.raw.item["resin"] then icon_size = 64, } }, - --~ subgroup = "bio-bio-farm-raw", - --~ order = "a[bi]-a-ab[bi-resin2]", - subgroup = "bio-bio-farm-raw", - --~ order = "a[bi]-a-aa[bi-2-resin-1-wood]", - order = "a[bi]-a-bb[bi-2-resin-2-wood]", + subgroup = "bio-bio-farm-raw", + order = "a[bi]-a-bb[bi-2-resin-2-wood]", enabled = false, - --~ allow_as_intermediate = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + 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 @@ -146,9 +132,6 @@ elseif data.raw.recipe["bob-resin-wood"] then end ---~ --update crushed stone icon ---~ data.raw.item["stone-crushed"].icon = ICONPATH .. "crushed-stone.png" ---~ data.raw.item["stone-crushed"].icon_size = 64 -- Pellet-Coke from Carbon - Bobs & Angels if data.raw.item["solid-carbon"] and mods["angelspetrochem"] then @@ -420,10 +403,7 @@ BioInd.writeDebug("Generating recipe for sand from crushed stone!") results = {{type="item", name="sand", amount=5}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + 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 }, diff --git a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua index 2b45286..e5fce01 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/entities.lua @@ -1,10 +1,8 @@ local BioInd = require('common')('Bio_Industries_2') ---~ local ICONPATH = BioInd.modRoot .. "/graphics/entities/biofarm/" local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ENTITYPATH = BioInd.modRoot .. "/graphics/entities/biofarm/" ---~ local BIGICONS = BioInd.check_base_version() require ("prototypes.Bio_Farm.pipeConnectors") require ("util") @@ -58,8 +56,7 @@ data:extend({ priority = "extra-high", width = 64, height = 64, - --~ scale = 0.75 - scale = 0.3 + scale = 0.3 }, }, @@ -100,8 +97,7 @@ data:extend({ priority = "extra-high", width = 64, height = 64, - --~ scale = 0.75 - scale = 0.3 + scale = 0.3 }, }, @@ -141,8 +137,7 @@ data:extend({ priority = "extra-high", width = 64, height = 64, - --~ scale = 0.75 - scale = 0.3 + scale = 0.3 }, }, @@ -225,193 +220,12 @@ data:extend({ allowed_effects = {"consumption", "speed", "productivity", "pollution"}, }, ---~ ------- Bio Farm Lamp - --~ { - --~ type = "lamp", - --~ name = "bi-bio-farm-light", - --~ icon = ICONPATH .. "Bio_Farm_Lamp.png", - --~ icon_size = 64, - --~ icons = { - --~ { - --~ icon = ICONPATH .. "Bio_Farm_Lamp.png", - --~ icon_size = 64, - --~ } - --~ }, - --~ flags = {"not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable", "not-blueprintable"}, - --~ selectable_in_game = false, - --~ max_health = 1, - --~ collision_box = {{-0.0, -0.0}, {0.0, 0.0}}, - --~ collision_mask = {}, - --~ energy_source = { - --~ type = "void", - --~ render_no_network_icon = false, - --~ render_no_power_icon = false, - --~ usage_priority = "lamp" - --~ }, - --~ energy_usage_per_tick = "100kW", - --~ light = {intensity = 1, size = 45}, - --~ picture_off = { - --~ filename = ENTITYPATH .. "Bio_Farm_Idle.png", - --~ priority = "low", - --~ width = 1, - --~ height = 1, - --~ frame_count = 1, - --~ axially_symmetrical = false, - --~ direction_count = 1, - --~ shift = {0.75, 0}, - --~ }, - --~ picture_on = { - --~ filename = ENTITYPATH .. "Bio_Farm_Working.png", - --~ priority = "low", - --~ width = 1, - --~ height = 1, - --~ frame_count = 1, - --~ axially_symmetrical = false, - --~ direction_count = 1, - --~ shift = {0.75, 0}, - --~ }, - --~ }, -}) + }) ------- Bio Farm Hidden Electric Pole - --~ { - --~ type = "electric-pole", - --~ name = "bi-bio-farm-hidden-pole", - --~ icon = ICONPATH .. "Bio_Farm_Cabeling.png", - --~ icon_size = 64, - --~ icons = { - --~ { - --~ icon = ICONPATH .. "Bio_Farm_Cabeling.png", - --~ icon_size = 64, - --~ } - --~ }, - --~ flags = {"not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable", "not-blueprintable"}, - --~ selectable_in_game = false, - --~ max_health = 1, - --~ resistances = {{type = "fire", percent = 100}}, - --~ collision_box = {{-0, -0}, {0, 0}}, - --~ collision_mask = {}, - --~ maximum_wire_distance = 10, - --~ supply_area_distance = 5, - --~ pictures = { - --~ filename = ICONPATH .. "empty.png", - --~ priority = "low", - --~ width = 1, - --~ height = 1, - --~ frame_count = 1, - --~ axially_symmetrical = false, - --~ direction_count = 4, - --~ direction_count = 1, - --~ shift = {0.75, 0}, - --~ }, - --~ connection_points = { - --~ { - --~ shadow = {}, - --~ wire = {} - --~ }, - --~ { - --~ shadow = {}, - --~ wire = {} - --~ }, - --~ { - --~ shadow = {}, - --~ wire = {} - --~ }, - --~ { - --~ shadow = {}, - --~ wire = {} - --~ } - --~ }, - --~ radius_visualisation_picture = { - --~ filename = ICONPATH .. "empty.png", - --~ width = 1, - --~ height = 1, - --~ priority = "low" - --~ }, - --~ }, ---~ local hidden_pole = table.deepcopy(data.raw["electric-pole"]["small-electric-pole"]) ---~ BioInd.show("data.raw[\"electric-pole\"][\"small-electric-pole\"]", data.raw["electric-pole"]["small-electric-pole"]) ---~ hidden_pole.name = "bi-bio-farm-hidden-pole" ---~ hidden_pole.icon = BioInd.is_debug and hidden_pole.icon or ICONPATH .. "Bio_Farm_Cabeling.png" ---~ hidden_pole.icon_size = BioInd.is_debug and hidden_pole.icon_size or 64 ---~ hidden_pole.icons = BioInd.is_debug and hidden_pole.icons or { - --~ { - --~ icon = ICONPATH .. "Bio_Farm_Cabeling.png", - --~ icon_size = 64, - --~ } ---~ } ---~ hidden_pole.flags = {"not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable", "not-blueprintable"} ---~ hidden_pole.selectable_in_game = false ---~ hidden_pole.draw_copper_wires = BioInd.is_debug ---~ hidden_pole.max_health = 1 ---~ hidden_pole.resistances = {{type = "fire", percent = 100}} ---~ hidden_pole.collision_box = {{-0, -0}, {0, 0}} ---~ hidden_pole.collision_mask = {} ---~ hidden_pole.maximum_wire_distance = 10 ---~ hidden_pole.supply_area_distance = 5 ---~ hidden_pole.pictures = BioInd.is_debug and hidden_pole.pictures or { - --~ filename = ICONPATH .. "empty.png", - --~ priority = "low", - --~ width = 1, - --~ height = 1, - --~ frame_count = 1, - --~ axially_symmetrical = false, - --~ direction_count = 1, - --~ shift = {0.75, 0}, ---~ } ---~ hidden_pole.connection_points = BioInd.is_debug and hidden_pole.connection_points or { - --~ { - --~ shadow = {}, - --~ wire = {} - --~ }, ---~ } ---~ hidden_pole.radius_visualisation_picture = BioInd.is_debug and - --~ hidden_pole.radius_visualisation_picture or { - --~ filename = ICONPATH .. "empty.png", - --~ width = 1, - --~ height = 1, - --~ priority = "low" - --~ } ---~ hidden_pole.dying_explosion = nil ---~ hidden_pole.fast_replaceable_group = nil ---~ hidden_pole.minable = nil ---~ hidden_pole.open_sound = nil ---~ hidden_pole.vehicle_impact_sound = nil ---~ hidden_pole.water_reflection = nil ---~ data:extend({hidden_pole}) data:extend({ - --~ ------- Bio Farm Solar Panel - --~ { - --~ type = "solar-panel", - --~ name = "bi-bio-farm-hidden-panel", - --~ icon = ICONPATH .. "Bio_Farm_Solar.png", - --~ icon_size = 64, - --~ icons = { - --~ { - --~ icon = ICONPATH .. "Bio_Farm_Solar.png", - --~ icon_size = 64, - --~ } - --~ }, - --~ flags = {"not-deconstructable", "not-on-map", "placeable-off-grid", "not-repairable", "not-blueprintable"}, - --~ selectable_in_game = false, - --~ max_health = 1, - --~ resistances = {{type = "fire", percent = 100}}, - --~ collision_box = {{-0, -0}, {0, 0}}, - --~ collision_mask = {}, - --~ energy_source = { - --~ type = "electric", - --~ usage_priority = "solar" - --~ }, - --~ picture = { - --~ filename = ICONPATH .. "empty.png", - --~ priority = "low", - --~ width = 1, - --~ height = 1, - --~ }, - --~ production = "100kW" - --~ }, ------ Greenhouse { @@ -1019,15 +833,10 @@ data:extend({ }, }) ---~ local my_pole_1 = util.table.deepcopy(data.raw["electric-pole"]["bi-bio-farm-hidden-pole"]) ---~ my_pole_1.name = "bi-hidden-power-pole" ---~ my_pole_1.pictures = BioInd.is_debug and data.raw["electric-pole"]["small-electric-pole"].pictures or my_pole_1.pictures ---~ data:extend({my_pole_1}) --[[ local my_seedling = util.table.deepcopy(data.raw.tree["tree-01"]) my_seedling.name = "seedling" ---~ my_seedling.vehicle_impact_sound = { filename = "__base__/sound/car-wood-impact.ogg", volume = 0.8 } my_seedling.vehicle_impact_sound = impact_category = "wood" my_seedling.flags = {"placeable-neutral", "placeable-player", "playeminabler-creation", "breaths-air"} my_seedling.minable = {mining_particle = "wooden-particle", mining_time = 0.25, result = "seedling", count = 1} diff --git a/Bio_Industries_2/prototypes/Bio_Farm/item.lua b/Bio_Industries_2/prototypes/Bio_Farm/item.lua index 897b233..f5b6ad2 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/item.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/item.lua @@ -496,7 +496,6 @@ data:extend( }) --- Fertilizer can change terrain to better terrain ---~ if BioInd.AB_tiles() then data:extend({ --- fertilizer { diff --git a/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua b/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua index 601cb20..c7a0874 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/recipe.lua @@ -429,8 +429,7 @@ data:extend({ } }, enabled = false, - --~ energy_required = 5, - energy_required = 2.5, + energy_required = 2.5, ingredients = { {type="item", name="iron-stick", amount=10}, {type="item", name="stone-brick", amount=10}, @@ -461,8 +460,7 @@ data:extend({ } }, enabled = false, - --~ energy_required = 10, - energy_required = 5, + energy_required = 5, ingredients = { {type="item", name="bi-bio-greenhouse", amount=4}, {type="item", name="stone-crushed", amount=10}, @@ -493,10 +491,7 @@ data:extend({ subgroup = "bio-bio-farm-raw", order = "a[bi]-a-a[bi-1-woodpulp]", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - energy_required = 2, + energy_required = 2, ingredients = {{type="item", name="wood", amount=2}}, results = {{type="item", name="bi-woodpulp", amount=4}}, main_product = "", @@ -525,10 +520,7 @@ data:extend({ subgroup = "bio-bio-farm-raw", order = "a[bi]-a-ba[bi-2-resin-2-pulp]", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - energy_required = 1, + energy_required = 1, ingredients = { {type = "item", name = "bi-woodpulp", amount = 3}, }, @@ -559,18 +551,14 @@ data:extend({ subgroup = "bio-bio-farm-raw", order = "a[bi]-a-c[bi-3-wood_from_pulp]", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - energy_required = 2.5, + energy_required = 2.5, ingredients = { {type = "item", name = "bi-woodpulp", amount = 8}, {type = "item", name = "resin", amount = 2}, }, results = {{type="item", name="wood", amount=4}}, main_product = "", - --~ allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 - 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, -- Added for 0.18.34/1.1.4 allow_decomposition = false, -- Added for 0.18.34/1.1.4 -- This is a custom property for use by "Krastorio 2" (it will change @@ -584,9 +572,7 @@ data:extend({ { type = "recipe", name = "bi-wood-fuel-brick", - --~ localised_name = {"item-name.wood-bricks"}, - --~ localised_description = {"item-description.wood-bricks"}, - icon = ICONPATH .. "Fuel_Brick.png", + icon = ICONPATH .. "Fuel_Brick.png", icon_size = 64, icons = { { @@ -601,10 +587,7 @@ data:extend({ results = {{type="item", name="wood-bricks", amount=1}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + 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 -- This is a custom property for use by "Krastorio 2" (it will change @@ -629,10 +612,7 @@ data:extend({ subgroup = "bio-bio-farm-raw", order = "a[bi]-a-cb[bi-5-ash-1]", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - energy_required = 3, + energy_required = 3, ingredients = {{type="item", name="wood", amount=5}}, results = {{type="item", name="bi-ash", amount=5}}, main_product = "", @@ -662,10 +642,7 @@ data:extend({ subgroup = "bio-bio-farm-raw", order = "a[bi]-a-ca[bi-5-ash-2]", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 @@ -757,10 +734,7 @@ data:extend({ results = {{type="item", name="coal", amount=12}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 @@ -787,10 +761,7 @@ data:extend({ results = {{type="item", name="coal", amount=16}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 @@ -817,10 +788,7 @@ data:extend({ results = {{type="item", name="solid-fuel", amount=2}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + 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 @@ -831,9 +799,7 @@ data:extend({ { type = "recipe", name = "bi-coke-coal", - --~ localised_name = {"item-name.pellet-coke"}, - --~ localised_description = {"item-description.pellet-coke"}, - icon = ICONPATH .. "pellet_coke_coal.png", + icon = ICONPATH .. "pellet_coke_coal.png", icon_size = 64, icons = { { @@ -849,9 +815,7 @@ data:extend({ results = {{type="item", name="pellet-coke", amount=2}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_as_intermediate = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 @@ -862,9 +826,7 @@ data:extend({ { type = "recipe", name = "bi-pellet-coke", - --~ localised_name = {"item-name.pellet-coke"}, - --~ localised_description = {"item-description.pellet-coke"}, - icon = ICONPATH .. "pellet_coke_solid.png", + icon = ICONPATH .. "pellet_coke_solid.png", --icon = "__Bio_Industries_2__/graphics/icons/pellet_coke_c.png", icon_size = 64, icons = { @@ -881,9 +843,7 @@ data:extend({ results = {{type="item", name="pellet-coke", amount=3}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_as_intermediate = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, @@ -908,10 +868,7 @@ data:extend({ results = {{type="item", name="stone-crushed", amount=2}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 @@ -938,10 +895,7 @@ data:extend({ results = {{type="item", name="stone-crushed", amount=2}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 }, @@ -967,10 +921,7 @@ data:extend({ results = {{type="item", name="stone-crushed", amount=2}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 @@ -997,10 +948,7 @@ data:extend({ results = {{type="item", name="stone-crushed", amount=4}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 }, @@ -1026,10 +974,7 @@ data:extend({ results = {{type="item", name="stone-crushed", amount=4}}, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 }, @@ -1060,10 +1005,7 @@ data:extend({ }, enabled = false, main_product = "", - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Added for 0.18.34/1.1.4 + 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 }, @@ -1211,10 +1153,7 @@ data:extend({ }, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 subgroup = "bio-bio-farm-intermediate-product", @@ -1246,10 +1185,7 @@ data:extend({ }, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 subgroup = "bio-bio-farm-intermediate-product", @@ -1281,10 +1217,7 @@ data:extend({ }, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = false, - --~ allow_as_intermediate = false, - allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 + allow_as_intermediate = true, -- Changed for 0.18.34/1.1.4 always_show_made_in = true, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 subgroup = "bio-bio-farm-intermediate-product", @@ -1299,9 +1232,7 @@ data:extend({ { type = "recipe", name = "bi-seed-bomb-basic", - --~ localised_name = {"item-name.bi-seed-bomb-basic"}, - --~ localised_description = {"item-description.bi-seed-bomb-basic"}, - icon = ICONPATH .. "Seed_bomb_icon_b.png", + icon = ICONPATH .. "Seed_bomb_icon_b.png", icon_size = 64, icons = { { @@ -1358,9 +1289,7 @@ data:extend({ { type = "recipe", name = "bi-seed-bomb-advanced", - --~ localised_name = {"item-name.bi-seed-bomb-advanced"}, - --~ localised_description = {"item-description.bi-seed-bomb-advanced"}, - icon = ICONPATH .. "Seed_bomb_icon_a.png", + icon = ICONPATH .. "Seed_bomb_icon_a.png", icon_size = 64, icons = { { diff --git a/Bio_Industries_2/prototypes/Bio_Farm/technology.lua b/Bio_Industries_2/prototypes/Bio_Farm/technology.lua index dec4835..40d3241 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/technology.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/technology.lua @@ -58,7 +58,7 @@ data:extend({ recipe = "bi-wood-from-pulp" }, }, - --prerequisites = {"optics"}, -- TODO: Find correct prerequisite + prerequisites = {"lamp"}, unit = { count = 25, ingredients = { @@ -81,44 +81,6 @@ data:extend({ icon_size = 128, } }, - --~ effects = { - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-charcoal-1" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-charcoal-2" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-ash-2" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-ash-1" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-wood-fuel-brick" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-seed-2" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-seedling-2" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-logs-2" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-cokery" - --~ }, - --~ }, effects = coal_processing[1], prerequisites = {"advanced-material-processing"}, unit = { @@ -144,27 +106,7 @@ data:extend({ icon_size = 128, } }, - --~ effects = { - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-coal-1" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-pellet-coke" - --~ }, - --~ -- Moved here from "bi-tech-coal-processing-1" (0.18.29): - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-solid-fuel" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-stone-brick" - --~ }, - --~ }, effects = coal_processing[2], - --~ prerequisites = {"bi-tech-coal-processing-1"}, prerequisites = {"bi-tech-coal-processing-1", "chemical-science-pack"}, unit = { count = 150, @@ -175,8 +117,6 @@ data:extend({ }, time = 35 }, - -- Changed for 0.18.34/1.1.4 (Fixes that tech is not listed among researched techs.) - --~ upgrade = true, }, { @@ -192,18 +132,7 @@ data:extend({ icon_size = 128, } }, - --~ effects = { - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-coal-2" - --~ }, - --~ { - --~ type = "unlock-recipe", - --~ recipe = "bi-coke-coal" - --~ }, - --~ }, effects = coal_processing[3], - --~ prerequisites = {"bi-tech-coal-processing-2"}, prerequisites = {"bi-tech-coal-processing-2", "production-science-pack"}, unit = { count = 250, @@ -215,8 +144,6 @@ data:extend({ }, time = 40 }, - -- Changed for 0.18.34/1.1.4 (Fixes that tech is not listed among researched techs.) - --~ upgrade = true, }, { diff --git a/Bio_Industries_2/prototypes/Bio_Farm/technology2.lua b/Bio_Industries_2/prototypes/Bio_Farm/technology2.lua index 5128dcc..1a734d2 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/technology2.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/technology2.lua @@ -2,7 +2,6 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/technology/" ---~ if BI.Settings.BI_Bio_Fuel or mods["Natural_Evolution_Buildings"] then data:extend( { @@ -57,8 +56,6 @@ local ICONPATH = BioInd.modRoot .. "/graphics/technology/" type = "unlock-recipe", recipe = "bi-biomass-1" }, - --~ thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-bio-reactor") - --~ thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-biomass-1") -- Added for 0.18.29: Now that we always make advanced fertilizer, we can also add -- the advanced recipe for purified air even if BI.Settings.BI_Bio_Fuel has been @@ -68,7 +65,6 @@ local ICONPATH = BioInd.modRoot .. "/graphics/technology/" recipe = "bi-purified-air-2" }, - --~ thxbob.lib.tech.add_recipe_unlock("bi-tech-advanced-biotechnology", "bi-purified-air-2") }, prerequisites = { @@ -85,4 +81,3 @@ local ICONPATH = BioInd.modRoot .. "/graphics/technology/" } }, }) ---~ end diff --git a/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua b/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua index fa94688..951c66a 100644 --- a/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Farm/tree_entities.lua @@ -52,7 +52,6 @@ end local tree, stump for id, prototype in pairs(data.raw.tree) do ---~ BioInd.show("id", id) if prototype.variations and not ignore_trees[id] then for i = 1, TREE_LEVELS do tree = table.deepcopy(prototype) @@ -77,28 +76,12 @@ for id, prototype in pairs(data.raw.tree) do end tree.minable.mining_particle = "bio-wooden-particle-" .. i -- The longer a tree has grown, the harder it is to mine - --~ tree.minable.mining_time = 0.25 - tree.minable.mining_time = 0.25 * i - --~ tree.minable.count = nil + tree.minable.mining_time = 0.25 * i -- Now the tree-level thingie starts to make sense: higher growing stages correspond -- to a higher probability of getting something when the tree is mined! - --~ tree.minable.results = {} - --~ if i < (TREE_LEVELS) then - --~ table.insert(tree.minable.results, { - --~ name = "seedling", - --~ probability = i/4, - --~ amount = 1, - --~ }) - --~ else - --~ table.insert(tree.minable.results, { - --~ name = "wood", - --~ amount = 1, - --~ probability = 1 - --~ }) - --~ end - tree.minable.results = { + tree.minable.results = { { type = "item", name = (i < TREE_LEVELS) and "seedling" or "wood", @@ -124,8 +107,7 @@ for id, prototype in pairs(data.raw.tree) do -- TREE_LEVELS, not TREE_LEVELS/10 (i.e. typo) -- EDIT: OwnlyMe's Robot Tree Farm has 20 grow stages per default (min 3, max 200), -- so we should use a limit of i<=2.) - --~ local max = TREE_LEVELS /10 - local max = 2 + local max = 2 if i <= max then variation.trunk.layers = {{ filename = "__Bio_Industries_2__/graphics/icons/Seedling_a.png", @@ -135,11 +117,7 @@ for id, prototype in pairs(data.raw.tree) do scale = 0.5, frame_count = 1, tint= { - --~ r = 0.7-0.5*i/(TREE_LEVELS/10), - --~ g = 0.7-0.5*i/(TREE_LEVELS/10), - --~ b = 0.7-0.5*i/(TREE_LEVELS/10), - --~ a = 0.7-0.5*i/(TREE_LEVELS/10) - r = 0.7-0.5*i/max, + r = 0.7-0.5*i/max, g = 0.7-0.5*i/max, b = 0.7-0.5*i/max, a = 0.7-0.5*i/max @@ -201,9 +179,4 @@ for id, prototype in pairs(data.raw.tree) do end data:extend(extend) ---~ BioInd.writeDebug("Trees known to the game:") ---~ for t, tree in pairs(data.raw.tree) do ---~ BioInd.show("Treename", t) ---~ BioInd.writeDebug("Treename: %s\tAutoplace: %s", {t, t.autoplace or "nil"}) ---~ end diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/item.lua b/Bio_Industries_2/prototypes/Bio_Fuel/item.lua index cbd66ab..062218a 100644 --- a/Bio_Industries_2/prototypes/Bio_Fuel/item.lua +++ b/Bio_Industries_2/prototypes/Bio_Fuel/item.lua @@ -46,25 +46,7 @@ if BI.Settings.BI_Bio_Fuel then stack_size = 200 }, - --~ --- BioReactor - --~ { - --~ type = "item", - --~ name = "bi-bio-reactor", - --~ icon = ICONPATH .. "bioreactor.png", - --~ icon_size = 64, - --~ icons = { - --~ { - --~ icon = ICONPATH .. "bioreactor.png", - --~ icon_size = 64, - --~ } - --~ }, - --~ --flags = {"goes-to-quickbar"}, - --~ subgroup = "production-machine", - --~ order = "z[bi]-a[bi-bio-reactor]", - --~ place_result = "bi-bio-reactor", - --~ stack_size = 10 - --~ }, - --- Bio Boiler + --- Bio Boiler { type = "item", name = "bi-bio-boiler", diff --git a/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua b/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua index 9ffbc1e..d7802ec 100644 --- a/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Fuel/recipe.lua @@ -1,7 +1,6 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/icons/" ---~ local new_battery_icon = BioInd.check_base_version("0.18.47") -- 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 @@ -93,8 +92,7 @@ if BI.Settings.BI_Bio_Fuel then {type = "fluid", name ="steam", amount = 50} }, results = { - --~ {type = "fluid", name = "petroleum-gas", amount = 15, fluidbox_index = 3}, - {type = "fluid", name = "petroleum-gas", amount = 15}, + {type = "fluid", name = "petroleum-gas", amount = 15}, {type = "item", name = "bi-ash", amount = 15} }, subgroup = "bio-bio-fuel-other", @@ -165,9 +163,7 @@ if BI.Settings.BI_Bio_Fuel then allow_decomposition = false, subgroup = "bio-bio-fuel-other", order = "[bi-cellulose-1]", - --~ subgroup = "intermediate-product", - --~ order = "b[cellulose-1]", - }, + }, -- CELLULOSE 2 -- { @@ -199,9 +195,7 @@ if BI.Settings.BI_Bio_Fuel then allow_decomposition = false, subgroup = "bio-bio-fuel-other", order = "[bi-cellulose-2]", - --~ subgroup = "intermediate-product", - --~ order = "b[cellulose-2]", - -- 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", }, @@ -229,8 +223,7 @@ if BI.Settings.BI_Bio_Fuel then -- 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}, + {type = "fluid", name = "light-oil", amount = 20}, }, results = { {type = "item", name = "plastic-bar", amount = 2} @@ -241,9 +234,7 @@ if BI.Settings.BI_Bio_Fuel then allow_decomposition = false, subgroup = "bio-bio-fuel-solid", order = "g[plastic-bar-1]", - --~ subgroup = "intermediate-product", - --~ order = "b[bi-plastic-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", }, @@ -277,9 +268,7 @@ if BI.Settings.BI_Bio_Fuel then allow_decomposition = false, subgroup = "bio-bio-fuel-solid", order = "g[plastic-bar-2]", - --~ subgroup = "intermediate-product", - --~ order = "b[bi-plastic-2]", - }, + }, -- BIOMASS 2 -- { @@ -309,9 +298,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, - --~ subgroup = "bio-bio-fuel-fluid", - --~ order = "x[oil-processing]-z3[bi-biomass]" - subgroup = "bio-bio-fuel-fluid", + subgroup = "bio-bio-fuel-fluid", order = "x[oil-processing]-z2[bi-biomass]" -- This recipe is not as good as bi_biomass_2! }, @@ -344,9 +331,7 @@ if BI.Settings.BI_Bio_Fuel then enabled = false, always_show_made_in = true, allow_decomposition = false, - --~ subgroup = "bio-bio-fuel-fluid", - --~ order = "x[oil-processing]-z2[bi-biomass]" - subgroup = "bio-bio-fuel-fluid", + subgroup = "bio-bio-fuel-fluid", order = "x[oil-processing]-z3[bi-biomass]" -- This recipe is more powerful than bi_biomass_3! }, @@ -513,9 +498,7 @@ if BI.Settings.BI_Bio_Fuel then }, main_product = "", enabled = false, - --~ always_show_made_in = true, - --~ allow_decomposition = 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 crafting_machine_tint = { @@ -525,9 +508,7 @@ if BI.Settings.BI_Bio_Fuel then }, subgroup = "bio-bio-fuel-solid", order = "h", - --~ subgroup = "raw-material", - --~ order = "h[bi-battery]", - }, + }, --- Bio Acid { @@ -562,9 +543,7 @@ if BI.Settings.BI_Bio_Fuel then }, subgroup = "bio-bio-fuel-other", order = "a", - --~ subgroup = "fluid-recipes", - --~ order = "a", - }, + }, -- Sulfuric acid to Sulfur -- { @@ -593,9 +572,7 @@ if BI.Settings.BI_Bio_Fuel then allow_decomposition = false, subgroup = "bio-bio-fuel-solid", order = "i1", - --~ subgroup = "raw-material", - --~ order = "g[sulfur]-[bi-sulfur]", - }, + }, -- Sulfuric acid to Sulfur --IF ANGELS INSTALLED (More Expensice) { @@ -629,4 +606,3 @@ if BI.Settings.BI_Bio_Fuel then }) end ---~ log("recipe.lua: data.raw.recipe[\"bi-sulfur\"]: " .. serpent.block(data.raw.recipe["bi-sulfur"])) diff --git a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua index 8253d48..6b761b8 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/entities.lua @@ -69,67 +69,11 @@ data:extend({ module_specification = { module_slots = 1 }, - --~ module_specification = { - --~ module_slots = 0 - --~ }, - -- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens + -- Changed for 0.18.34/1.1.4 -- We need to use an empty table here, so the gardens -- won't be affected by beacons! allowed_effects = {"consumption", "speed"}, - --~ allowed_effects = {}, - }, + }, }) ---~ -- We only need the hidden pole if the "Easy Gardens" setting is active! ---~ if BI.Settings.BI_Easy_Bio_Gardens then - --~ local hidden_pole = table.deepcopy(data.raw["electric-pole"]["small-electric-pole"]) - --~ hidden_pole.name = "bi-bio-garden-hidden-pole" - --~ hidden_pole.icon = "__base__/graphics/icons/small-electric-pole.png" - --~ hidden_pole.icon_size = 64 - --~ hidden_pole.icons = { - --~ { - --~ icon = "__base__/graphics/icons/small-electric-pole.png", - --~ icon_size = 64, - --~ } - --~ } - --~ hidden_pole.flags = { - --~ "not-deconstructable", - --~ "not-on-map", - --~ "placeable-off-grid", - --~ "not-repairable", - --~ "not-blueprintable", - --~ } - --~ hidden_pole.selectable_in_game = false - --~ hidden_pole.draw_copper_wires = BioInd.is_debug - --~ hidden_pole.max_health = 1 - --~ hidden_pole.minable = nil - --~ hidden_pole.collision_mask = {} - --~ hidden_pole.collision_box = {{-0, -0}, {0, 0}} - --~ hidden_pole.selection_box = {{0, 0}, {0, 0}} - --~ hidden_pole.maximum_wire_distance = 4 - --~ hidden_pole.supply_area_distance = 1 - --~ hidden_pole.pictures = BioInd.is_debug and hidden_pole.pictures or { - --~ filename = ICONPATH .. "empty.png", - --~ priority = "low", - --~ width = 1, - --~ height = 1, - --~ frame_count = 1, - --~ axially_symmetrical = false, - --~ direction_count = 1, - --~ } - --~ hidden_pole.connection_points = BioInd.is_debug and hidden_pole.connection_points or { - --~ { - --~ shadow = {}, - --~ wire = { copper_wire_tweak = {-0, -0} } - --~ } - --~ } - --~ hidden_pole.radius_visualisation_picture = BioInd.is_debug and - --~ hidden_pole.radius_visualisation_picture or { - --~ filename = ICONPATH .. "empty.png", - --~ width = 1, - --~ height = 1, - --~ priority = "low" - --~ } - --~ data:extend({hidden_pole}) ---~ end diff --git a/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua b/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua index dc9a8b8..f41fb27 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/fluid_fertilizer.lua @@ -4,8 +4,6 @@ local BioInd = require('common')('Bio_Industries_2') local ICONPATH = BioInd.modRoot .. "/graphics/icons/" ---~ BioInd.show("fluid_fertilizer.lua -- BI.Settings.BI_Easy_Bio_Gardens", BI.Settings.BI_Easy_Bio_Gardens) ---~ if BI.Settings.BI_Easy_Bio_Gardens then local function make_colors(color) local r, g, b = color.r, color.g, color.b @@ -51,12 +49,9 @@ data:extend({ default_temperature = 25, max_temperature = 100, heat_capacity = "1kJ", - --~ base_color = {r = 0.478, g = 0.341, b = 0.118}, - -- 19cf44 - --~ base_color = {r = 0.098, g = 0.811, b = 0.269}, - base_color = fertilizer_fluid_colors.base, - --~ flow_color = {r = 0, g = 0, b = 0}, - flow_color = fertilizer_fluid_colors.flow, + -- 19cf44 + base_color = fertilizer_fluid_colors.base, + flow_color = fertilizer_fluid_colors.flow, pressure_to_speed_ratio = 0.4, flow_to_energy_ratio = 0.59, order = "a[fluid]-b[fertilizer]" @@ -80,11 +75,8 @@ data:extend({ max_temperature = 100, heat_capacity = "1kJ", --00ff12 - --~ base_color = {r = 0.465, g = 0.306, b = 0.272}, - --~ base_color = {r = 0, g = 1, b = 0.071}, - base_color = adv_fertilizer_fluid_colors.base, - --~ flow_color = {r = 0, g = 0, b = 0}, - flow_color = adv_fertilizer_fluid_colors.flow, + base_color = adv_fertilizer_fluid_colors.base, + flow_color = adv_fertilizer_fluid_colors.flow, pressure_to_speed_ratio = 0.4, flow_to_energy_ratio = 0.59, order = "a[fluid]-b[fertilizer-advanced]" diff --git a/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua b/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua index 38be3e9..2ad48a7 100644 --- a/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Garden/recipe.lua @@ -30,11 +30,7 @@ data:extend({ main_product = "", subgroup = "bio-bio-gardens-fluid", order = "a[bi]", - --~ subgroup = "production-machine", - --~ order = "x[bi]-b[bi_bio_garden]", - --~ always_show_made_in = true, - --~ allow_decomposition = 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 = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 -- This is a custom property for use by "Krastorio 2" (it will change -- ingredients/results; used for wood/wood pulp) @@ -46,9 +42,7 @@ data:extend({ { type = "recipe", name = "bi-purified-air-1", - --~ localised_name = {"recipe-name.bi-purified-air-1"}, - --~ localised_description = {"recipe-description.bi-purified-air-1"}, - icon = ICONPATH .. "clean-air_mk1.png", + icon = ICONPATH .. "clean-air_mk1.png", icon_size = 64, icons = { { @@ -79,9 +73,7 @@ data:extend({ { type = "recipe", name = "bi-purified-air-2", - --~ localised_name = {"recipe-name.bi-purified-air-2"}, - --~ localised_description = {"recipe-description.bi-purified-air-2"}, - icon = ICONPATH .. "clean-air_mk2.png", + icon = ICONPATH .. "clean-air_mk2.png", icon_size = 64, icons = { { diff --git a/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua b/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua index 5dbf5d6..f2784f4 100644 --- a/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua +++ b/Bio_Industries_2/prototypes/Bio_Solar_Farm/entities.lua @@ -5,7 +5,6 @@ require ("util") local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local ENTITYPATH = "__Bio_Industries_2__/graphics/entities/bio_solar_farm/" ---~ local BIGICONS = BioInd.check_base_version("0.18.0") if BI.Settings.BI_Solar_Additions then @@ -185,8 +184,7 @@ data:extend({ drawing_box = {{-2.5, -5}, {2.5, 2.5}}, maximum_wire_distance = 25, -- Changed for 0.18.34/1.1.4 - --~ supply_area_distance = 50, - supply_area_distance = 50.5, + supply_area_distance = 50.5, pictures = { filename = ENTITYPATH .. "bi_LargeSubstation.png", priority = "high", diff --git a/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua b/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua index a181a88..b7b6a3d 100644 --- a/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua +++ b/Bio_Industries_2/prototypes/Bio_Solar_Farm/recipe.lua @@ -29,13 +29,9 @@ if BI.Settings.BI_Solar_Additions then }, results = {{type="item", name="bi-bio-solar-farm", amount=1}}, main_product = "", - --~ subgroup = "bio-bio-solar-entity", - --~ order = "a[bi]", - subgroup = "energy", + subgroup = "energy", order = "d[solar-panel]-a[solar-panel]-a[bi-bio-solar-farm]", - --~ always_show_made_in = true, - --~ allow_decomposition = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, @@ -44,8 +40,7 @@ if BI.Settings.BI_Solar_Additions then { type = "recipe", name = "bi-solar-boiler-hidden-panel", - --~ name = "bi-solar-boiler", - localised_name = {"entity-name.bi-solar-boiler"}, + localised_name = {"entity-name.bi-solar-boiler"}, localised_description = {"entity-description.bi-solar-boiler"}, icon = ICONPATH .. "Bio_Solar_Boiler_Icon.png", icon_size = 64, @@ -66,9 +61,7 @@ if BI.Settings.BI_Solar_Additions then main_product = "", subgroup = "energy", order = "b[steam-power]-c[steam-engine]", - --~ always_show_made_in = true, - --~ allow_decomposition = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, @@ -96,13 +89,9 @@ if BI.Settings.BI_Solar_Additions then }, results = {{type="item", name="bi-solar-mat", amount=1}}, main_product = "", - --~ subgroup = "bio-bio-solar-entity", - --~ order = "c[bi]", - subgroup = "energy", + subgroup = "energy", order = "d[solar-panel]-aa[solar-panel-1-a]", - --~ always_show_made_in = true, - --~ allow_decomposition = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, @@ -130,13 +119,9 @@ if BI.Settings.BI_Solar_Additions then }, results = {{type="item", name="bi-bio-accumulator", amount=1}}, main_product = "", - --~ subgroup = "bio-bio-solar-entity", - --~ order = "d[bi]", - subgroup = "energy", + subgroup = "energy", order = "e[accumulator]-a[bi-accumulator]", - --~ always_show_made_in = true, - --~ allow_decomposition = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, @@ -144,8 +129,7 @@ if BI.Settings.BI_Solar_Additions then -- Large Substation { type = "recipe", - --~ name = "bi-huge-substation", - name = "bi-large-substation", + name = "bi-large-substation", localised_name = {"entity-name.bi-large-substation"}, localised_description = {"entity-description.bi-large-substation"}, icon = ICONPATH .. "bi_LargeSubstation_icon.png", @@ -164,13 +148,9 @@ if BI.Settings.BI_Solar_Additions then }, results = {{type="item", name="bi-large-substation", amount=1}}, main_product = "", - --~ subgroup = "bio-bio-solar-entity", - --~ order = "e[bi]", - subgroup = "energy-pipe-distribution", + subgroup = "energy-pipe-distribution", order = "a[energy]-d[substation]-b[large-substation]", - --~ always_show_made_in = true, - --~ allow_decomposition = false, - allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 + allow_as_intermediate = false, -- Added for 0.18.34/1.1.4 always_show_made_in = false, -- Changed for 0.18.34/1.1.4 allow_decomposition = true, -- Changed for 0.18.34/1.1.4 }, diff --git a/Bio_Industries_2/prototypes/Bio_Turret/item-group.lua b/Bio_Industries_2/prototypes/Bio_Turret/item-group.lua index a85145d..3f7cd31 100644 --- a/Bio_Industries_2/prototypes/Bio_Turret/item-group.lua +++ b/Bio_Industries_2/prototypes/Bio_Turret/item-group.lua @@ -1,6 +1,4 @@ ---~ local BioInd = require('common')('Bio_Industries_2') ---~ local ICONPATH = BioInd.modRoot .. "/graphics/icons/" data:extend({ { diff --git a/Bio_Industries_2/prototypes/Industrial_Revolution.lua b/Bio_Industries_2/prototypes/Industrial_Revolution.lua index d7d03b3..c1eb1c0 100644 --- a/Bio_Industries_2/prototypes/Industrial_Revolution.lua +++ b/Bio_Industries_2/prototypes/Industrial_Revolution.lua @@ -10,7 +10,6 @@ if mods["IndustrialRevolution"] then local big_pole = "bi-wooden-pole-big" thxbob.lib.tech.remove_recipe_unlock ("logistics", big_pole) thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-1", big_pole) - --~ thxbob.lib.tech.add_recipe_unlock ("electric-energy-distribution-2", "bi-wooden-pole-huge") -- Adjust localizations for k, v in ipairs({"electric-pole", "item", "recipe"}) do diff --git a/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua b/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua index 3f036e0..f19dcb8 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/containers-entities.lua @@ -104,8 +104,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" }, - --~ vehicle_impact_sound = { filename = "__base__/sound/car-wood-impact.ogg", volume = 1.0 }, - impact_category = "wood", + impact_category = "wood", picture = { filename = WOODPATH .. "huge_wooden_chest.png", priority = "extra-high", @@ -147,8 +146,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" }, - --~ vehicle_impact_sound = { filename = "__base__/sound/car-wood-impact.ogg", volume = 1.0 }, - impact_category = "wood", + impact_category = "wood", picture = { filename = WOODPATH .. "giga_wooden_chest.png", priority = "extra-high", diff --git a/Bio_Industries_2/prototypes/Wood_Products/entities.lua b/Bio_Industries_2/prototypes/Wood_Products/entities.lua index 26bf1d9..c980af5 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/entities.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/entities.lua @@ -187,8 +187,7 @@ data:extend({ type = "tile", name = "bi-wood-floor", needs_correction = false, - --~ minable = {hardness = 0.2, mining_time = 0.5, result = "wood"}, - 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, @@ -270,8 +269,7 @@ data:extend({ selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, drawing_box = {{-1, -6}, {1, 0.5}}, maximum_wire_distance = 24, - --~ supply_area_distance = 2, - supply_area_distance = 1.5, -- This is the radius, so the supply area is 3x3. + supply_area_distance = 1.5, -- This is the radius, so the supply area is 3x3. pictures = { filename = WOODPATH .. "big-wooden-pole-01.png", priority = "high", @@ -361,8 +359,7 @@ data:extend({ selection_box = {{-0.5, -0.5}, {0.5, 0.5}}, drawing_box = {{-1, -7}, {1, 0.5}}, maximum_wire_distance = 64, -- Factorio Max - --~ supply_area_distance = 2, - supply_area_distance = 1, -- This is the radius, so the supply area is 2x2. + supply_area_distance = 1, -- This is the radius, so the supply area is 2x2. pictures = { filename = WOODPATH .. "huge-wooden-pole.png", priority = "high", @@ -453,8 +450,7 @@ data:extend({ repair_speed_modifier = 2, corpse = "wall-remnants", repair_sound = { filename = "__base__/sound/manual-repair-simple.ogg" }, - --~ vehicle_impact_sound = { filename = "__base__/sound/car-wood-impact.ogg", volume = 1.0 }, - impact_category = "wood", + impact_category = "wood", resistances = { { type = "physical", @@ -812,8 +808,7 @@ data:extend({ size = 64, scale = 0.5 }, - --~ vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 }, - pictures = { + pictures = { north = { filename = ENTITYPATH .. "/pipe-to-ground/pipe-to-ground-up.png", priority = "extra-high", diff --git a/Bio_Industries_2/prototypes/Wood_Products/pipes.lua b/Bio_Industries_2/prototypes/Wood_Products/pipes.lua index 7917aa1..e786335 100644 --- a/Bio_Industries_2/prototypes/Wood_Products/pipes.lua +++ b/Bio_Industries_2/prototypes/Wood_Products/pipes.lua @@ -1,6 +1,4 @@ ---~ local BioInd = require('common')('Bio_Industries_2') ---~ local ICONPATH = BioInd.modRoot .. "/graphics/icons/" local pipes_sheet = { straight_vertical_single = { @@ -160,9 +158,7 @@ function change_graphics (was_picture, sheet_element, quality) end picture.filename = sheet_path .. quality .. "_" .. sheet_name - --~ picture.width = 8 * k * size.x - --~ picture.height = 8 * k * size.y - picture.size = {8 * k * size.x, 8 * k * size.y} + picture.size = {8 * k * size.x, 8 * k * size.y} picture.scale = 1/k picture.x = 8 * k * (sheet_element.position.x or sheet_element.position[1]) picture.y = 8 * k * (sheet_element.position.y or sheet_element.position[2]) diff --git a/Bio_Industries_2/prototypes/category.lua b/Bio_Industries_2/prototypes/category.lua index 0fc5b24..886cb20 100644 --- a/Bio_Industries_2/prototypes/category.lua +++ b/Bio_Industries_2/prototypes/category.lua @@ -1,4 +1,3 @@ ---~ local BioInd = require('common')('Bio_Industries_2') data:extend( { diff --git a/Bio_Industries_2/prototypes/compound_entities/hidden_lamps.lua b/Bio_Industries_2/prototypes/compound_entities/hidden_lamps.lua index 1b3c821..ffbddc2 100644 --- a/Bio_Industries_2/prototypes/compound_entities/hidden_lamps.lua +++ b/Bio_Industries_2/prototypes/compound_entities/hidden_lamps.lua @@ -7,8 +7,6 @@ local ICONPATH = BioInd.modRoot .. "/graphics/icons/" ------------------------------------------------------------------------------------ -- Create the main prototype for hidden lamps. All others will be based on this! -- ------------------------------------------------------------------------------------ ---~ local h_type = "lamp" ---~ local h_entity = table.deepcopy(data.raw[h_type]["small-lamp"]) -- The short name of the hidden entity (e.g. "lamp" or "pole") local h_key = "lamp" -- The actual prototype type, identified by h_key @@ -34,10 +32,8 @@ for l, led in ipairs({"red", "green", "blue", "light"}) do end h_entity.picture_off = BI.hidden_entities.picture ---~ h_entity.picture_off.shift = {0.75, 0} h_entity.picture_on = BI.hidden_entities.picture ---~ h_entity.picture_on.shift = {0.75, 0} ------------------------------------------------------------------------------------ @@ -76,6 +72,3 @@ end ------------------------------------------------------------------------------------ -- Testing ---~ for k, v in pairs(data.raw[h_entity.type]) do - --~ BioInd.writeDebug("%s: %s", {k, v}) ---~ end diff --git a/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua b/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua index ca70e20..574a79e 100644 --- a/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua +++ b/Bio_Industries_2/prototypes/compound_entities/hidden_panels.lua @@ -100,7 +100,3 @@ end ------------------------------------------------------------------------------------ ---~ -- Testing ---~ for k, v in pairs(data.raw[h_entity.type]) do - --~ BioInd.writeDebug("%s: %s", {k, v}) ---~ end diff --git a/Bio_Industries_2/prototypes/compound_entities/hidden_radars.lua b/Bio_Industries_2/prototypes/compound_entities/hidden_radars.lua index 869809c..294b56b 100644 --- a/Bio_Industries_2/prototypes/compound_entities/hidden_radars.lua +++ b/Bio_Industries_2/prototypes/compound_entities/hidden_radars.lua @@ -10,8 +10,6 @@ require ("util") ------------------------------------------------------------------------------------ -- Create the main prototype for hidden radars. All others will be based on this! -- ------------------------------------------------------------------------------------ ---~ local h_type = "radar" ---~ local h_entity = table.deepcopy(data.raw[h_type]["radar"]) -- The short name of the hidden entity (e.g. "lamp" or "pole") local h_key = "radar" -- The actual prototype type, identified by h_key @@ -134,7 +132,3 @@ end ------------------------------------------------------------------------------------ ---~ -- Testing ---~ for k, v in pairs(data.raw[h_entity.type]) do - --~ BioInd.writeDebug("%s: %s", {k, v}) ---~ end diff --git a/Bio_Industries_2/prototypes/compound_entities/main_list.lua b/Bio_Industries_2/prototypes/compound_entities/main_list.lua index 9328dbb..c8d8be4 100644 --- a/Bio_Industries_2/prototypes/compound_entities/main_list.lua +++ b/Bio_Industries_2/prototypes/compound_entities/main_list.lua @@ -1,4 +1,3 @@ ---~ log("Entered file prototypes/compound_entities.lua") ------------------------------------------------------------------------------------ -- This file contains the data of all compound entities. It will be used in the -- -- data stage to create the prototypes for the hidden enitities, and during the -- @@ -36,7 +35,6 @@ ret.HE_map_reverse = {} for k, v in pairs(ret.HE_map) do ret.HE_map_reverse[v] = k end ---~ log("ret.HE_map_reverse: " .. serpent.block(ret.HE_map_reverse)) ------------------------------------------------------------------------------------ -- List of compound entities -- Key: name of the base entity @@ -80,17 +78,8 @@ ret.compound_entities = { type = ret.HE_map.pole, -- base_offset = {x = 1.0, y = 1.0}, -- base_offset = (script and script.active_mods["_debug"] or mods and mods["_debug"]) and - --~ {x = 1.0, y = 1.0} or {x = 0, y = 0}, - }, - --~ pole = { - --~ -- name = "bi-bio-farm-hidden-pole", - --~ -- type = ret.HE_map.pole, - --~ -- base_offset = {x = 1.0, y = 1.0}, - --~ base_offset = (script and script.active_mods["_debug"] or - --~ mods and mods["_debug"]) and - --~ {x = 1.0, y = 1.0} or {x = 0, y = 0}, - --~ }, - panel = { + }, + panel = { -- name = "bi-bio-farm-hidden-panel", -- type = ret.HE_map.panel, }, @@ -191,24 +180,19 @@ ret.compound_entities = { -- Fill in the missing names and types of the hidden entities' prototypes! -- ------------------------------------------------------------------------------------ for c_name, c_data in pairs(ret.compound_entities) do ---~ log("c_name: " .. serpent.block(c_name)) for h_key, h_data in pairs(c_data.hidden) do ---~ log(string.format("h_key: %s\th_data: %s", h_key, serpent.block(h_data))) h_data.name = h_data.name or c_name .. "-hidden-" .. h_key h_data.type = h_data.type or ret.HE_map[h_key] end end ---~ log("ret.compound_entities: " .. serpent.block(ret.compound_entities)) ------------------------------------------------------------------------------------ -- Remove entries for disabled compound entities. Do this before making copies! -- ------------------------------------------------------------------------------------ ret.get_HE_list = function(get_complete_list) if get_complete_list or script then - --~ log("Preserving complete list!") else - --~ log("Removing obsolete entities from the list!") local settings = settings.startup local function get_settings(name) @@ -216,31 +200,22 @@ ret.get_HE_list = function(get_complete_list) end -- Bio Cannon - --~ if not BI.Settings.Bio_Cannon then - if not get_settings("BI_Bio_Cannon") then - --~ log("Bio cannon has been disabled!") - ret.compound_entities["bi-bio-cannon"] = nil - --~ log("Removed \"bi-bio-cannon\" from compound_entity list!") - end + if not get_settings("BI_Bio_Cannon") then + ret.compound_entities["bi-bio-cannon"] = nil + end -- Solar additions - --~ if not BI.Settings.BI_Solar_Additions then - if not get_settings("BI_Solar_Additions") then - --~ log("Solar additions have been disabled!") - for e, entry in ipairs({"bi-bio-solar-farm", "bi-solar-boiler"}) do + if not get_settings("BI_Solar_Additions") then + for e, entry in ipairs({"bi-bio-solar-farm", "bi-solar-boiler"}) do ret.compound_entities[entry] = nil - --~ log("Removed " .. entry .. " from compound_entity list!") - end + end end -- Easy Bio gardens: We only need the hidden pole if the setting is enabled. (But we -- want to keep the rest of the table even if the setting is disabled.) - --~ if not BI.Settings.BI_Easy_Bio_Gardens then - if not get_settings("BI_Easy_Bio_Gardens") then - --~ log("\"Easy Bio gardens\" are disabled!") - ret.compound_entities["bi-bio-garden"].hidden.pole = nil - --~ log("Removed hidden pole from list of hidden entities!") - end + if not get_settings("BI_Easy_Bio_Gardens") then + ret.compound_entities["bi-bio-garden"].hidden.pole = nil + end end @@ -255,8 +230,7 @@ ret.get_HE_list = function(get_complete_list) ret.compound_entities[new.name] = util.table.deepcopy(ret.compound_entities[old]) ret.compound_entities[new.name].base.type = new.type ret.compound_entities[new.name].base.name = new.name - --~ log("Added " .. new.name .. " to list of compound entities!") - end + end end return ret.compound_entities diff --git a/Bio_Industries_2/settings.lua b/Bio_Industries_2/settings.lua index 2d442bb..383a2cd 100644 --- a/Bio_Industries_2/settings.lua +++ b/Bio_Industries_2/settings.lua @@ -1,5 +1,3 @@ ---~ data:extend( ---~ { local setting_list = {} -- Add/enable stuff setting_list.BI_Solar_Additions = { @@ -73,16 +71,7 @@ setting_list.BI_Game_Tweaks_Recipe = { default_value = true, order = "b[tweaks]-c1[Recipe]", } ---~ if not mods["IndustrialRevolution"] then - --~ setting_list.BI_Game_Tweaks_Disassemble = { - --~ type = "bool-setting", - --~ name = "BI_Game_Tweaks_Disassemble", - --~ setting_type = "startup", - --~ default_value = true, - --~ order = "b[tweaks]-c2[Disassemble]", - --~ } ---~ end -setting_list.BI_Game_Tweaks_Production_Science = { + setting_list.BI_Game_Tweaks_Production_Science = { type = "bool-setting", name = "BI_Game_Tweaks_Production_Science", setting_type = "startup", @@ -131,23 +120,6 @@ if not (mods["IndustrialRevolution"] or mods["aai-industry"]) then } end ---~ if not ( - --~ -- mods["ArchdruidsChests"] or -- "Archdruid's Chest Mod" - --~ mods["Juicy_mods"] or -- "Advanced storage +" - --~ mods["Warehousing"] or -- "Warehousing Mod" - --~ mods["aai-containers"] or -- "AAI Containers & Warehouses" - --~ mods["angelsaddons-storage"] or -- "Angel's Addons - Storage Options" - --~ mods["boblogistics"] or -- "Bob's Logistics mod" - --~ mods["cruxchests"] -- "Crux Chests" - --~ ) then - --~ setting_list.BI_Bigger_Wooden_Chests = { - --~ type = "bool-setting", - --~ name = "BI_Bigger_Wooden_Chests", - --~ setting_type = "startup", - --~ default_value = true, - --~ order = "a[modifier]-b[Bigger_Wooden_Chests]", - --~ } ---~ end -- Lua API global Variable Viewer (gvv) if mods["gvv"] then @@ -162,11 +134,8 @@ end local list = {} for name, setting in pairs(setting_list) do - --~ list[#list + 1] = setting - data:extend({setting}) + data:extend({setting}) end ---~ log("Setting list: " .. serpent.block(list)) ---~ data:extend({list}) --[[ Types of settings: � startup - game must be restarted if changed (such a setting may affect prototypes' changes) diff --git a/Bio_Industries_2/settings_changed.lua b/Bio_Industries_2/settings_changed.lua index 342948a..9ae442a 100644 --- a/Bio_Industries_2/settings_changed.lua +++ b/Bio_Industries_2/settings_changed.lua @@ -4,7 +4,6 @@ -- read! -------------------------------------------------------------------- ---~ local BioInd = require('common')('Bio_Industries_2') local settings_changed = {} @@ -24,8 +23,7 @@ log("Entered function settings_changed.musk_floor!") -- which force built a certain musk floor tile, so "enemy" will still be used. -- (Only fix in this case: Players must remove and rebuild all existing musk floor tiles!) - --~ local single_player_force = game.is_multiplayer() and nil or game.players[1].force.name - local force = nil + local force = nil -- Always use dummy force if option is set if BioInd.UseMuskForce then @@ -36,8 +34,7 @@ log("Entered function settings_changed.musk_floor!") -- Could it be that a game that was originally a multiplayer game has been saved and reused -- as singleplayer game, but there was no player 1? Let's go over all players and break after -- the first hit, so we make sure we'll get the single player whatever its index! - --~ force = game.players[1].force.name - for p, player in pairs(game.players) do + for p, player in pairs(game.players) do force = player.force.name break end @@ -171,8 +168,7 @@ BioInd.show("pole", pole) storage[compound_entity.tab], base, {pole = hidden_entities[pole_type].name} - --~ base.position - ) + ) -- Add the new pole to the table if pole then