SHARE
TWEET

Untitled

a guest Oct 13th, 2019 120 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local is_advanced_foundry_recipe = function(v)
  2.   -- return v.category == "advanced-foundry" and v.energy_required == 3
  3.   return v.category == "advanced-foundry" and string.find(v.name, "advanced%-foundry%-")
  4. end
  5.  
  6. local is_py_void_fluid_recipe = function(v)
  7.   return v.category == "py-runoff" and string.find(v.name, "%-pyvoid%-fluid")
  8. end
  9.  
  10. local is_py_void_gas_recipe = function(v)
  11.   return v.category == "py-venting" and string.find(v.name, "%-pyvoid%-gas")
  12. end
  13.  
  14. do
  15.   if settings.startup["bobmods-logistics-disableroboports"].value == true then
  16.     -- use robochests because roboports are not craftable with this modpack settings
  17.     bobmods.lib.recipe.replace_ingredient ("drydock-assembly", "roboport", "bob-robochest-4")
  18.     bobmods.lib.recipe.replace_ingredient ("roboport-interface", "roboport", "bob-robochest")
  19.   end
  20.  
  21.   -- for some reason not all recipes get this replacement (done by py high tech)
  22.   bobmods.lib.recipe.replace_ingredient("heat-shield-tile", "silicon-nitride", "cermet")
  23.   bobmods.lib.recipe.replace_ingredient("ceramic-bearing-ball", "silicon-nitride", "cermet")
  24.   bobmods.lib.recipe.replace_ingredient("ceramic-bearing", "silicon-nitride", "cermet")
  25.  
  26.   -- remove advanced foundry recipes
  27.   for name, recipe in pairs(table.filter(data.raw.recipe, is_advanced_foundry_recipe)) do
  28.     data.raw.recipe[name].enabled = false
  29.   end
  30.  
  31.   -- make py voids not shit
  32.   for name, recipe in pairs(table.filter(data.raw.recipe, is_py_void_fluid_recipe)) do
  33.     data.raw.recipe[name].ingredients[1].amount = 100
  34.   end
  35.  
  36.   for name, recipe in pairs(table.filter(data.raw.recipe, is_py_void_gas_recipe)) do
  37.     data.raw.recipe[name].ingredients[1].amount = 100
  38.   end
  39.  
  40.   -- make niobium pipe be as titanium one for now
  41.   bobmods.logistics.set_pipe_distance("niobium-pipe-to-ground", 4)
  42.  
  43.   -- nerf beacons
  44.   data.raw.beacon["beacon-2"].supply_area_distance = 3
  45.   data.raw.beacon["beacon-2"].module_specification.module_slots = 3
  46.   data.raw.beacon["beacon-2"].energy_usage = "720kW"
  47.   data.raw.beacon["beacon-3"].supply_area_distance = 3
  48.   data.raw.beacon["beacon-3"].module_specification.module_slots = 4
  49.   data.raw.beacon["beacon-3"].energy_usage = "960kW"
  50.  
  51.   -- remove a recipe for fibreboard because it's much easier than the alternative from py
  52.   data.raw.recipe["angels-glass-fiber-board"].hidden = true
  53.  
  54.   -- make rubber not available the easy way
  55.   data.raw.recipe["bob-rubber"].enabled = false
  56.  
  57.   if settings.startup["momo-enable-bob-extend"].value and settings.startup["momo-enable-bob-extend-frame"].value then
  58.     -- tune down those last structure components because the orignal recipe is retarded
  59.     data.raw.recipe["anotherworld-structure-components"].ingredients =
  60.     {
  61.       {"advanced-structure-components", 2},
  62.       {"plastic-bar", 80},
  63.       {"tungsten-carbide", 30},
  64.       {"titanium-bearing", 20},
  65.       {"ceramic-bearing", 30},
  66.       {"brass-alloy", 10},
  67.       {"nitinol-gear-wheel", 10},
  68.       {"silver-zinc-battery", 30}
  69.     }
  70.   end
  71.  
  72.   -- make myoglobin not so painful to get
  73.   data.raw.recipe["myoglobin"].results[1].amount = 10
  74.  
  75.   bobmods.lib.recipe.remove_ingredient("advanced-structure-components", "advanced-plastics")
  76.   bobmods.lib.recipe.add_ingredient("advanced-structure-components", {"advanced-plastics", 8})
  77.  
  78.   if settings.startup["smelting-solder"].value == true then
  79.     -- change solder plate to solder for some recipes when solder plates are not enabled
  80.     bobmods.lib.recipe.remove_ingredient("more-science-pack-6", "solder-alloy")
  81.     bobmods.lib.recipe.add_ingredient("more-science-pack-6", {"solder", 8})
  82.   end
  83.  
  84.   -- revert the breaking change for vial recipe that happened in momo's v. 0.17.11
  85.   bobmods.lib.recipe.remove_ingredient("momo-momo-vial-N2", "glass")
  86.   bobmods.lib.recipe.add_ingredient("momo-momo-vial-N2", {"glass", 4})
  87.   data.raw.recipe["momo-momo-vial-N2"].results[1].amount = 3
  88.   bobmods.lib.recipe.remove_ingredient("momo-cokemomo-vial-N2", "glass")
  89.   bobmods.lib.recipe.add_ingredient("momo-cokemomo-vial-N2", {"glass", 4})
  90.   data.raw.recipe["momo-cokemomo-vial-N2"].results[1].amount = 3
  91.  
  92.   -- make basic-structure-components unlocked by metalurgy to fix a cyclic dependency
  93.   bobmods.lib.tech.remove_recipe_unlock("automation-2", "basic-structure-components")
  94.   bobmods.lib.tech.add_recipe_unlock("angels-metallurgy-1", "basic-structure-components")
  95.  
  96.   -- engine blocks rubber production because the technology chain goes up to methanol processing 1
  97.   bobmods.lib.tech.remove_prerequisite("fluid-handling", "engine")
  98.  
  99.   -- fix duplicated ingredients
  100.   bobmods.lib.recipe.remove_ingredient("assembling-machine-1", "pcb1")
  101.   bobmods.lib.recipe.add_ingredient("assembling-machine-1", {"pcb1", 3})
  102.  
  103.   -- disable some smelting recipes from py that don't align well with angel
  104.   data.raw.recipe["crushed-iron"].hidden = true
  105.   data.raw.recipe["crushed-copper"].hidden = true
  106.   data.raw.recipe["tungsten-powder"].hidden = true
  107.   data.raw.recipe["crushed-tin"].hidden = true
  108.   data.raw.recipe["crushed-lead"].hidden = true
  109.   data.raw.recipe["crushed-silver"].hidden = true
  110.   data.raw.recipe["crushed-gold"].hidden = true
  111.   data.raw.recipe["crushed-zinc"].hidden = true
  112.   data.raw.recipe["crushed-nickel"].hidden = true
  113.  
  114.   -- pycoaltbaa added some recipes that make the following ones imbalanced too
  115.   data.raw.recipe["crushing-iron"].hidden = true
  116.   data.raw.recipe["crushing-copper"].hidden = true
  117.   data.raw.recipe["crushing-bauxite"].hidden = true
  118.   data.raw.recipe["crushing-rutile"].hidden = true
  119.   data.raw.recipe["crushing-tin"].hidden = true
  120.   data.raw.recipe["crushing-lead"].hidden = true
  121.   data.raw.recipe["crushing-silver"].hidden = true
  122.   data.raw.recipe["crushing-gold"].hidden = true
  123.   data.raw.recipe["crushing-tungsten"].hidden = true
  124.   data.raw.recipe["crushing-zinc"].hidden = true
  125.   data.raw.recipe["crushing-nickel"].hidden = true
  126.  
  127.   -- make some tweaks to sniper turrets and military science
  128.   bobmods.lib.recipe.add_ingredient("bob-gun-turret-2", {"gunmetal-alloy", 10})
  129.   bobmods.lib.recipe.add_ingredient("bob-sniper-turret-1", {"bob-gun-turret-2", 1})
  130.   bobmods.lib.recipe.replace_ingredient("military-science-pack", "gun-turret", "bob-gun-turret-2")
  131.   data.raw.recipe["military-science-pack"].result_count = 3
  132.  
  133.   -- bring back the default railway stuff
  134.   data.raw.recipe["bi_recipe_rail_wood_to_concrete"].hidden = true
  135.   bobmods.lib.tech.remove_recipe_unlock("bob-railway-2", "rail")
  136.   bobmods.lib.tech.add_recipe_unlock ("railway", "rail")
  137.  
  138.   -- add info about productivity limitations
  139.   local function has_value(tab, val)
  140.     for index, value in ipairs(tab) do
  141.         if value == val then
  142.             return true
  143.         end
  144.     end
  145.  
  146.     return false
  147.   end
  148.  
  149.   for _, module in pairs(data.raw.module) do
  150.     if module.limitation and module.effect.productivity then
  151.       for _, recipe in pairs(data.raw.recipe) do
  152.         if has_value(module.limitation, recipe.name) then
  153.             if recipe.localised_description == nil then
  154.                 recipe.localised_description = {""}
  155.             end
  156.             table.insert(recipe.localised_description, "\nBenefits from productivity.")
  157.         end
  158.       end
  159.       break
  160.     end
  161.   end
  162. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top