hot metals support
This commit is contained in:
parent
acca1a627a
commit
c3bc95e3c5
6 changed files with 38 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
Version: 2.0.9
|
Version: 2.0.9
|
||||||
Date: 2025-01-01
|
Date: 2025-01-01
|
||||||
Features:
|
Features:
|
||||||
|
- Hot metals mod support
|
||||||
- Casting for lead expansion bolts
|
- Casting for lead expansion bolts
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 2.0.8
|
Version: 2.0.8
|
||||||
|
|
|
||||||
13
compatibility/data/hot-metals.lua
Normal file
13
compatibility/data/hot-metals.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
local util = require("data-util");
|
||||||
|
|
||||||
|
util.add_hot_metals({
|
||||||
|
{name="lead-plate", spoilTicks=20*60, icons={
|
||||||
|
{ icon = "__bzlead__/graphics/icons/lead-plate.png", icon_size = 64},
|
||||||
|
{ icon = "__bzlead__/graphics/icons/lead-plate.png", icon_size = 64, tint={.9,.3,0, .5}},
|
||||||
|
}},
|
||||||
|
{name="lead-expansion-bolt", spoilTicks=20*60, icons={
|
||||||
|
{ icon = "__bzlead__/graphics/icons/lead-expansion-bolt.png", icon_size = 128},
|
||||||
|
{ icon = "__bzlead__/graphics/icons/lead-expansion-bolt.png", icon_size = 128, tint={.9,.3,0, .5}},
|
||||||
|
}},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
@ -1144,6 +1144,28 @@ function util.add_crafting_category(entity_type, entity, category)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Add crafting category to all entities that have another category
|
||||||
|
function util.add_crafting_category_if(entity_type, category, other_category)
|
||||||
|
if data.raw[entity_type] and data.raw["recipe-category"][category] and data.raw["recipe-category"][other_category] then
|
||||||
|
for _, entity in pairs(data.raw[entity_type]) do
|
||||||
|
local found_good = false
|
||||||
|
local found_bad = false
|
||||||
|
for _, existing in pairs(entity.crafting_categories) do
|
||||||
|
if existing == other_category then
|
||||||
|
found_good = true
|
||||||
|
end
|
||||||
|
if existing == category then
|
||||||
|
found_bad = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if found_good and not found_bad then
|
||||||
|
table.insert(entity.crafting_categories, category)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function util.add_to_ingredient(recipe, ingredient, amount, options)
|
function util.add_to_ingredient(recipe, ingredient, amount, options)
|
||||||
if not should_force(options) and bypass(recipe_name) then return end
|
if not should_force(options) and bypass(recipe_name) then return end
|
||||||
if data.raw.recipe[recipe] then
|
if data.raw.recipe[recipe] then
|
||||||
|
|
|
||||||
1
data.lua
1
data.lua
|
|
@ -5,5 +5,6 @@ require("other-entities")
|
||||||
require("lead-enriched") -- Enriched Ti for Krastorio 2
|
require("lead-enriched") -- Enriched Ti for Krastorio 2
|
||||||
require("lead-recipe-se") -- Space Exploration special recipes (depends on K2 if present)
|
require("lead-recipe-se") -- Space Exploration special recipes (depends on K2 if present)
|
||||||
require("lead-compressed")
|
require("lead-compressed")
|
||||||
|
require("compatibility.data.hot-metals")
|
||||||
-- require("lead-sim")
|
-- require("lead-sim")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
"base >= 1.1.0",
|
"base >= 1.1.0",
|
||||||
"? space-age",
|
"? space-age",
|
||||||
"? bzsilicon",
|
"? bzsilicon",
|
||||||
|
"? hot-metals",
|
||||||
"? space-exploration",
|
"? space-exploration",
|
||||||
"? Krastorio2",
|
"? Krastorio2",
|
||||||
"? Rich-Rocks-Requiem",
|
"? Rich-Rocks-Requiem",
|
||||||
|
|
|
||||||
|
|
@ -104,9 +104,6 @@ data:extend({
|
||||||
stack_size=100,
|
stack_size=100,
|
||||||
icon = "__bzlead__/graphics/icons/lead-expansion-bolt.png",
|
icon = "__bzlead__/graphics/icons/lead-expansion-bolt.png",
|
||||||
icon_size = 128,
|
icon_size = 128,
|
||||||
pictures = {
|
|
||||||
{filename="__bzlead__/graphics/icons/lead-expansion-bolt.png", size=128, scale=0.25},
|
|
||||||
},
|
|
||||||
order = "a[basic-intermediates]-e[expansion-bolt]",
|
order = "a[basic-intermediates]-e[expansion-bolt]",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue