fix bob issue
This commit is contained in:
parent
ca40c0f1f8
commit
6cb3e341fa
5 changed files with 10 additions and 9 deletions
|
|
@ -1,6 +1,11 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.24
|
||||
Date: 2025-05-03
|
||||
Fixes:
|
||||
- Fix load issue with Bob's
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.23
|
||||
Date: 2025-04-07
|
||||
Date: 2025-04-08
|
||||
Changes:
|
||||
- Space Age: Asteroid crushing recipe now affected by productivity research
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -749,16 +749,13 @@ end
|
|||
function util.add_effect(technology_name, effect)
|
||||
local technology = data.raw.technology[technology_name]
|
||||
if technology then
|
||||
log("2")
|
||||
if not technology.effects then technology.effects = {} end
|
||||
if effect and effect.type == "unlock-recipe" then
|
||||
if not data.raw.recipe[effect.recipe] then
|
||||
return
|
||||
end
|
||||
end
|
||||
log("3")
|
||||
table.insert(technology.effects, effect)
|
||||
log(serpent.block(technology.effects))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -767,7 +764,6 @@ function util.add_to_productivity_research(technology_name, recipe_name, amount)
|
|||
if not amount then amount = 0.1 end
|
||||
local recipe = data.raw.recipe[recipe_name]
|
||||
if recipe then
|
||||
log("1")
|
||||
util.add_effect(technology_name, { type = "change-recipe-productivity", recipe = recipe_name, change = amount})
|
||||
end
|
||||
end
|
||||
|
|
@ -1334,7 +1330,7 @@ end
|
|||
-- Replace one product with another in a recipe
|
||||
function util.replace_product(recipe_name, old, new, options)
|
||||
if not should_force(options) and bypass(recipe_name) then return end
|
||||
if data.raw.recipe[recipe_name] then
|
||||
if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then
|
||||
replace_product(data.raw.recipe[recipe_name], old, new, options)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bzlead",
|
||||
"version": "2.0.23",
|
||||
"version": "2.0.24",
|
||||
"factorio_version": "2.0",
|
||||
"title": "Lead",
|
||||
"author": "Brevven",
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ data:extend({
|
|||
-- }
|
||||
-- } or nil,
|
||||
})
|
||||
end
|
||||
if util.me.more_entities() then
|
||||
data:extend({
|
||||
{
|
||||
|
|
@ -566,3 +565,4 @@ data:extend({
|
|||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
local leadutil = require("__bzlead__.data-util");
|
||||
require("data-util")
|
||||
|
||||
if leadutil.me.more_entities() then
|
||||
if leadutil.me.more_entities() and data.raw.item["lead-plate"] then
|
||||
data:extend({
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue