sound and CE2
This commit is contained in:
parent
e927602dad
commit
f4cd610162
7 changed files with 37 additions and 45 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 2.0.22
|
||||||
|
Date: 2025-03-22
|
||||||
|
Changes:
|
||||||
|
- Set custom inventory sounds for some items
|
||||||
|
Fixes:
|
||||||
|
- Loads with Crafting Efficiency
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 2.0.21
|
Version: 2.0.21
|
||||||
Date: 2025-03-10
|
Date: 2025-03-10
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -6,7 +6,6 @@ require("map-gen-preset-updates")
|
||||||
require("strange-matter")
|
require("strange-matter")
|
||||||
require("compatibility/248k")
|
require("compatibility/248k")
|
||||||
require("compatibility/sciencecosttweakerm")
|
require("compatibility/sciencecosttweakerm")
|
||||||
require("compatibility/crafting-efficiency")
|
|
||||||
|
|
||||||
local util = require("data-util")
|
local util = require("data-util")
|
||||||
util.redo_recycling()
|
util.redo_recycling()
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,22 @@ util.get_setting = util.me.get_setting
|
||||||
util.titanium_plate = ""
|
util.titanium_plate = ""
|
||||||
util.titanium_processing = ""
|
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.A = {{"automation-science-pack", 1}}
|
||||||
util.AL = {{"automation-science-pack", 1}, {"logistic-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}}
|
util.ALC = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}, {"chemical-science-pack", 1}}
|
||||||
|
|
@ -1695,11 +1711,6 @@ function util.remove_prior_unlocks(tech, recipe)
|
||||||
end
|
end
|
||||||
|
|
||||||
function remove_prior_unlocks(tech, recipe, processed)
|
function remove_prior_unlocks(tech, recipe, processed)
|
||||||
-- log("depth "..depth)
|
|
||||||
-- if depth > 10000 then
|
|
||||||
-- log("Infinite recursion detected, backing out.")
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
if processed[tech] then
|
if processed[tech] then
|
||||||
print("Already processed ".. tech .. " returning")
|
print("Already processed ".. tech .. " returning")
|
||||||
return
|
return
|
||||||
|
|
@ -1712,7 +1723,7 @@ function remove_prior_unlocks(tech, recipe, processed)
|
||||||
if technology.prerequisites then
|
if technology.prerequisites then
|
||||||
for i, prerequisite in pairs(technology.prerequisites) do
|
for i, prerequisite in pairs(technology.prerequisites) do
|
||||||
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
|
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
|
||||||
log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
|
-- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
|
||||||
remove_prior_unlocks(prerequisite, recipe, processed)
|
remove_prior_unlocks(prerequisite, recipe, processed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzlead",
|
"name": "bzlead",
|
||||||
"version": "2.0.21",
|
"version": "2.0.22",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
"title": "Lead",
|
"title": "Lead",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
local resource_autoplace = require('resource-autoplace');
|
local resource_autoplace = require('resource-autoplace')
|
||||||
|
|
||||||
local util = require("__bzlead__.data-util");
|
local util = require("__bzlead__.data-util");
|
||||||
|
local item_sounds = require('__base__.prototypes.item_sounds')
|
||||||
|
|
||||||
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["lead-ore"] = {}
|
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["lead-ore"] = {}
|
||||||
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["lead-ore"] = {}
|
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["lead-ore"] = {}
|
||||||
|
|
@ -81,6 +81,9 @@ data:extend({
|
||||||
order = "t-c-a",
|
order = "t-c-a",
|
||||||
stack_size = util.get_stack_size(50),
|
stack_size = util.get_stack_size(50),
|
||||||
weight = 4.5*kg,
|
weight = 4.5*kg,
|
||||||
|
inventory_move_sound = item_sounds.wire_inventory_move,
|
||||||
|
pick_sound = item_sounds.wire_inventory_pickup,
|
||||||
|
drop_sound = item_sounds.wire_inventory_move,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
-- Lead smelting
|
-- Lead smelting
|
||||||
|
|
||||||
local util = require("__bzlead__.data-util");
|
local util = require("__bzlead__.data-util");
|
||||||
|
local item_sounds = require('__base__.prototypes.item_sounds')
|
||||||
|
|
||||||
if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting"] and not mods["IndustrialRevolution"]) then
|
if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting"] and not mods["IndustrialRevolution"]) then
|
||||||
data:extend({
|
data:extend({
|
||||||
|
|
@ -64,6 +65,9 @@ data:extend({
|
||||||
order = "b[lead-plate]",
|
order = "b[lead-plate]",
|
||||||
stack_size = util.get_stack_size(100),
|
stack_size = util.get_stack_size(100),
|
||||||
weight = 2*kg,
|
weight = 2*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,
|
||||||
},
|
},
|
||||||
-- mods["TheBigFurnace"] and {
|
-- mods["TheBigFurnace"] and {
|
||||||
-- type = "recipe",
|
-- type = "recipe",
|
||||||
|
|
@ -108,6 +112,9 @@ data:extend({
|
||||||
icon_size = 128,
|
icon_size = 128,
|
||||||
order = "a[basic-intermediates]-e[expansion-bolt]",
|
order = "a[basic-intermediates]-e[expansion-bolt]",
|
||||||
weight = 2*kg,
|
weight = 2*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",
|
type = "recipe",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue