rename util

This commit is contained in:
Brevven 2021-05-20 02:53:34 -07:00
parent 1786d56ca1
commit 26aa272e56
9 changed files with 9 additions and 10 deletions

View file

@ -5,7 +5,7 @@ require("tungsten-recipe-final-rrr")
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
-- Only burners can make tungsten carbide in vanilla
for i, entity in pairs(data.raw.furnace) do

View file

@ -1,5 +1,5 @@
-- Enriched Titanium for Krastorio2
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
if mods["Krastorio2"] then
data:extend({

View file

@ -1,6 +1,7 @@
local resource_autoplace = require('resource-autoplace');
local noise = require('noise');
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
if mods["FactorioExtended-Plus-Core"] then
util.remove_raw("item", "tungsten-ore")

View file

@ -1,4 +1,4 @@
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
if mods["Rich-Rocks-Requiem"] then
if data.raw.recipe["rrr-stone-processing"] then

View file

@ -1,6 +1,6 @@
-- Deadlock stacking recipes
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
if deadlock then
deadlock.add_stack("tungsten-ore", "__bztungsten__/graphics/icons/stacked/tungsten-ore-stacked.png", "deadlock-stacking-2", 64)

View file

@ -1,5 +1,5 @@
-- Additional recipes if Space Exploration mod is enabled
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
if mods["space-exploration"] then
se_delivery_cannon_recipes["tungsten-ore"] = {name= "tungsten-ore"}

View file

@ -1,4 +1,4 @@
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
-- Lamps
util.add_prerequisite("optics", "tungsten-processing")

View file

@ -1,6 +1,6 @@
-- Lead smelting
local util = require("__bztungsten__.util");
local util = require("__bztungsten__.tungsten-util");
data:extend({
{ type = "recipe-category", name = "smelting-carbon"},

View file

@ -116,9 +116,7 @@ end
function replace_ingredient(recipe, old, new)
if recipe ~= nil and recipe.ingredients ~= nil then
for i, ingredient in pairs(recipe.ingredients) do
-- For final fixes
if ingredient.name == old then ingredient.name = new end
-- For updates
if ingredient[1] == old then ingredient[1] = new end
end
end