Skip to content

Commit

Permalink
Remove underused items/fluids #334
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHawk committed Sep 4, 2024
1 parent ed581b6 commit 9a66ad9
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 1 deletion.
2 changes: 2 additions & 0 deletions SeaBlock/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Date: ??.??.??
- Changed recipes for making metal catalysts (removed red and added purple)
- Spread catalyst recipes more evenly out in the tech tree
- Changed catalyst recipes to use the appropriate catalyst for their tech tier
- Remove underused items/fluids #334
- Hid crushed stone. Use stone instead. Ratios will all stay the same
Bugfixes:
- Fixed tech steam-power missing a locale in some mod configurations #332
---------------------------------------------------------------------------------------------------
Expand Down
59 changes: 59 additions & 0 deletions SeaBlock/data-final-fixes/recipe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,62 @@ bobmods.lib.recipe.set_energy_required("insulated-cable", 2)
seablock.lib.substingredient("insulated-cable", "tinned-copper-cable", nil, 8)
seablock.lib.substingredient("insulated-cable", "rubber", nil, 8)
bobmods.lib.recipe.set_result("insulated-cable", { "insulated-cable", 8 })

-- Combine Stone and Crushed Stone
local function replace_stone(recipe)
if recipe.ingredients then
for _, ingredient in pairs(recipe.ingredients) do
if ingredient.name == "stone" then
ingredient.amount = ingredient.amount * 2
elseif ingredient.name == "stone-crushed" then
ingredient.name = "stone"
elseif ingredient[1] == "stone" then
ingredient[2] = ingredient[2] * 2
elseif ingredient[1] == "stone-crushed" then
ingredient[1] = "stone"
end
end
end
if recipe.results then
for _, result in pairs(recipe.results) do
if result.name == "stone" then
result.amount = result.amount * 2
elseif result.name == "stone-crushed" then
result.name = "stone"
elseif result[1] == "stone" then
result[2] = result[2] * 2
elseif result[1] == "stone-crushed" then
result[1] = "stone"
end
end
end
if recipe.result == "stone" then
recipe.result_count = recipe.result_count or 1 * 2
elseif recipe.result == "stone-crushed" then
recipe.result = "stone"
end
if recipe.main_product == "stone-crushed" then
recipe.main_product = "stone"
end
end
for _, recipe in pairs(data.raw.recipe) do
if recipe.normal then
replace_stone(recipe.normal)
end
if recipe.expensive then
replace_stone(recipe.expensive)
end
if not recipe.normal and not recipe.expensive then
replace_stone(recipe)
end
end
bobmods.lib.recipe.hide("stone-crushed")
seablock.lib.hide("item", "stone-crushed")

if data.raw.recipe["stone-crushed-dissolution"] then
data.raw.recipe["stone-crushed-dissolution"].icons = angelsmods.functions.create_liquid_recipe_icon(
nil,
{ { 142, 079, 028 }, { 107, 062, 021 }, { 075, 040, 015 } },
{ "stone" }
)
end
2 changes: 1 addition & 1 deletion SeaBlock/starting-items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ seablock = seablock or {}

function seablock.populate_starting_items(items)
local starting_items = {
["stone"] = 65,
["stone"] = 130,
["small-electric-pole"] = 50,
["small-lamp"] = 12,
["iron-plate"] = 1200,
Expand Down

0 comments on commit 9a66ad9

Please sign in to comment.