From 26aa272e560d8396a4b9357c55bc3b8bc44d5d81 Mon Sep 17 00:00:00 2001 From: Brevven Date: Thu, 20 May 2021 02:53:34 -0700 Subject: [PATCH] rename util --- data-final-fixes.lua | 2 +- tungsten-enriched.lua | 2 +- tungsten-ore.lua | 3 ++- tungsten-recipe-final-rrr.lua | 2 +- tungsten-recipe-final-stacking.lua | 2 +- tungsten-recipe-se.lua | 2 +- tungsten-recipe-updates.lua | 2 +- tungsten-recipe.lua | 2 +- util.lua => tungsten-util.lua | 2 -- 9 files changed, 9 insertions(+), 10 deletions(-) rename util.lua => tungsten-util.lua (99%) diff --git a/data-final-fixes.lua b/data-final-fixes.lua index d465df9..f451339 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -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 diff --git a/tungsten-enriched.lua b/tungsten-enriched.lua index aeb4ab4..fddc205 100644 --- a/tungsten-enriched.lua +++ b/tungsten-enriched.lua @@ -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({ diff --git a/tungsten-ore.lua b/tungsten-ore.lua index e8fa46b..b81461b 100644 --- a/tungsten-ore.lua +++ b/tungsten-ore.lua @@ -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") diff --git a/tungsten-recipe-final-rrr.lua b/tungsten-recipe-final-rrr.lua index fff4492..6478e3b 100644 --- a/tungsten-recipe-final-rrr.lua +++ b/tungsten-recipe-final-rrr.lua @@ -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 diff --git a/tungsten-recipe-final-stacking.lua b/tungsten-recipe-final-stacking.lua index 992d31d..ce1cee1 100644 --- a/tungsten-recipe-final-stacking.lua +++ b/tungsten-recipe-final-stacking.lua @@ -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) diff --git a/tungsten-recipe-se.lua b/tungsten-recipe-se.lua index b6ad1ad..ae5dc58 100644 --- a/tungsten-recipe-se.lua +++ b/tungsten-recipe-se.lua @@ -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"} diff --git a/tungsten-recipe-updates.lua b/tungsten-recipe-updates.lua index 724fba9..0b67c6a 100644 --- a/tungsten-recipe-updates.lua +++ b/tungsten-recipe-updates.lua @@ -1,4 +1,4 @@ -local util = require("__bztungsten__.util"); +local util = require("__bztungsten__.tungsten-util"); -- Lamps util.add_prerequisite("optics", "tungsten-processing") diff --git a/tungsten-recipe.lua b/tungsten-recipe.lua index 9a4d131..b846cc1 100644 --- a/tungsten-recipe.lua +++ b/tungsten-recipe.lua @@ -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"}, diff --git a/util.lua b/tungsten-util.lua similarity index 99% rename from util.lua rename to tungsten-util.lua index 00fa9bb..c6924f0 100644 --- a/util.lua +++ b/tungsten-util.lua @@ -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