diff --git a/changelog.txt b/changelog.txt index 911217e..c91c8d1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,11 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.10 +Date: 2025-03-22 + Changes: + - Set inventory sounds for some items + Fixes: + - Loads with crafting efficiency +--------------------------------------------------------------------------------------------------- Version: 2.1.9 Date: 2025-03-04 Changes: diff --git a/compatibility/crafting-efficiency.lua b/compatibility/crafting-efficiency.lua deleted file mode 100644 index db49c7d..0000000 --- a/compatibility/crafting-efficiency.lua +++ /dev/null @@ -1,35 +0,0 @@ -local util = require("data-util"); - -if mods["crafting-efficiency-2"] then - - local eff_data = { - } - - for i, recipe in pairs(util.me.recipes) do - -- add remaining recipes with direct items to find the icons - if data.raw.recipe[recipe] and (data.raw.item[recipe] or data.raw.fluid[recipe]) - and not eff_data[recipe] then - local research_level = 1 - if not data.raw.recipe[recipe].enabled then - for tech, tbl in pairs(data.raw.technology) do - for _, effect in pairs(tbl.effects or {}) do - if effect.type == "unlock-recipe" and effect.recipe == recipe then - research_level = math.min(#tbl.unit.ingredients, 6) - end - end - end - end - eff_data[recipe] = { - max = 15, - icon = util.get_item_or_fluid_icon(recipe), - crafting = { efficiency = 10 }, - research = { level = research_level }, - } - end - end - for recipe, d in pairs(eff_data) do - log("Adding "..recipe.." crafting efficiency") - d.name = recipe:gsub("^%l", string.upper).." efficiency" - CE_Add_Recipe(d, recipe) - end -end diff --git a/data-updates.lua b/data-updates.lua index 8e1f541..0eab13a 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -5,7 +5,6 @@ require("map-gen-preset-updates") require("strange-matter") require("compatibility/248k") require("compatibility/sciencecosttweakerm") -require("compatibility/crafting-efficiency") local util = require("data-util"); diff --git a/data-util.lua b/data-util.lua index 59b6bcb..1cff5c3 100644 --- a/data-util.lua +++ b/data-util.lua @@ -12,6 +12,22 @@ util.get_setting = util.me.get_setting util.titanium_plate = "" util.titanium_processing = "" +local foo = [[ +local item_sounds = require('__base__.prototypes.item_sounds') + + inventory_move_sound = item_sounds.wire_inventory_move, + pick_sound = item_sounds.wire_inventory_pickup, + drop_sound = item_sounds.wire_inventory_move, + + inventory_move_sound = item_sounds.metal_small_inventory_move, + pick_sound = item_sounds.metal_small_inventory_pickup, + drop_sound = item_sounds.metal_small_inventory_move, + + inventory_move_sound = item_sounds.resource_inventory_move, + pick_sound = item_sounds.resource_inventory_pickup, + drop_sound = item_sounds.resource_inventory_move, +]] + util.A = {{"automation-science-pack", 1}} util.AL = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}} util.ALC = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}, {"chemical-science-pack", 1}} diff --git a/info.json b/info.json index 1cfa0b1..3e0789a 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztin", - "version": "2.1.9", + "version": "2.1.10", "factorio_version": "2.0", "title": "Tin", "author": "Brevven", diff --git a/tin-ore.lua b/tin-ore.lua index afff781..e6e5ccd 100644 --- a/tin-ore.lua +++ b/tin-ore.lua @@ -1,5 +1,5 @@ local resource_autoplace = require('resource-autoplace'); - +local item_sounds = require('__base__.prototypes.item_sounds') local util = require("data-util"); resource_autoplace.initialize_patch_set("tin-ore", true) @@ -73,6 +73,9 @@ data:extend({ {filename="__bztin__/graphics/icons/tin-ore-2.png", size=64, scale=0.5}, {filename="__bztin__/graphics/icons/tin-ore-3.png", size=64, scale=0.5}, }, + inventory_move_sound = item_sounds.resource_inventory_move, + pick_sound = item_sounds.resource_inventory_pickup, + drop_sound = item_sounds.resource_inventory_move, subgroup = "raw-resource", order = "t-c-a", stack_size = util.get_stack_size(50) diff --git a/tin-recipe.lua b/tin-recipe.lua index ae9f20b..51722cb 100644 --- a/tin-recipe.lua +++ b/tin-recipe.lua @@ -1,5 +1,6 @@ -- Aluminum smelting +local item_sounds = require('__base__.prototypes.item_sounds') local util = require("data-util"); local futil = require("util"); @@ -56,6 +57,9 @@ data:extend({ order = "b[tin-plate]", stack_size = util.get_stack_size(100), weight = 1*kg, + inventory_move_sound = item_sounds.metal_small_inventory_move, + pick_sound = item_sounds.metal_small_inventory_pickup, + drop_sound = item_sounds.metal_small_inventory_move, }, }) @@ -75,6 +79,9 @@ data:extend({ order = "b[solder]", stack_size = util.get_stack_size(100), weight = 1*kg, + inventory_move_sound = item_sounds.wire_inventory_move, + pick_sound = item_sounds.wire_inventory_pickup, + drop_sound = item_sounds.wire_inventory_move, }, { type = "recipe", @@ -227,6 +234,9 @@ data:extend({ order = "b[tinned-cable]", stack_size = util.get_stack_size(100), weight = 1*kg, + inventory_move_sound = item_sounds.wire_inventory_move, + pick_sound = item_sounds.wire_inventory_pickup, + drop_sound = item_sounds.wire_inventory_move, }, { type = "recipe", @@ -273,6 +283,9 @@ data:extend({ order = "b[bronze-plate]", stack_size = util.get_stack_size(100), weight = 1*kg, + inventory_move_sound = item_sounds.metal_small_inventory_move, + pick_sound = item_sounds.metal_small_inventory_pickup, + drop_sound = item_sounds.metal_small_inventory_move, }, { type = "recipe",