Planet Castra

by Bartz24

Adds a new militaristic planet to the game. Claim the defended post-apocalyptic planet and use its resources to build a new base. The enemy awakens and starts improving their technologies once they sense your presence.

Content
6 months ago
2.0
25.3K
Factorio: Space Age Icon Space Age Mod
Combat Enemies Environment Manufacturing

b wrong recycling output of t4 speed module

3 months ago

you changed the t4 speed module (from Porkchop13's mod) to use millerite instead of tungsten carbide but did not change the recycling recipe,
in prototypes\recipe-updates changing :

if mods["modules-t4"] then
-- Replace tungsten-carbide with millerite in the tier 4 speed module recipe if it exists
local recipe = data.raw["recipe"]["speed-module-4"]
if recipe then
for _, ingredient in pairs(recipe.ingredients) do
if ingredient.name == "tungsten-carbide" then
ingredient.name = "millerite"
end
end
end
end

to this:

if mods["modules-t4"] then
-- Replace tungsten-carbide with millerite in the tier 4 speed module recipe if it exists
local recipe = data.raw["recipe"]["speed-module-4"]
if recipe then
for , ingredient in pairs(recipe.ingredients) do
if ingredient.name == "tungsten-carbide" then
ingredient.name = "millerite"
end
end
local recycle = data.raw["recipe"]["speed-module-4-recycling"]
if recycle then
for
, results in pairs(recycle.results) do
if results.name == "tungsten-carbide" then
results.name = "millerite"
end
end
end
end
end

fixes the issue but I don't know if there's a better way to do it

3 months ago
(updated 3 months ago)

you changed the t4 speed module (from Porkchop13's mod) to use millerite instead of tungsten carbide but did not change the recycling recipe,
in prototypes\recipe-updates changing :

[code]if mods["modules-t4"] then[/code]
[code] -- Replace tungsten-carbide with millerite in the tier 4 speed module recipe if it exists[/code]
[code] local recipe = data.raw["recipe"]["speed-module-4"][/code]
[code] if recipe then[/code]
[code] for _, ingredient in pairs(recipe.ingredients) do[/code]
[code] if ingredient.name == "tungsten-carbide" then[/code]
[code] ingredient.name = "millerite"[/code]
[code] end[/code]
[code] end[/code]
[code] end[/code]
[code]end[/code]

to this:

[code]if mods["modules-t4"] then[/code]
[code] -- Replace tungsten-carbide with millerite in the tier 4 speed module recipe if it exists[/code]
[code] local recipe = data.raw["recipe"]["speed-module-4"][/code]
[code] if recipe then[/code]
[code] for , ingredient in pairs(recipe.ingredients) do[/code]
[code] if ingredient.name == "tungsten-carbide" then[/code]
[code] ingredient.name = "millerite"[/code]
[code] end[/code]
[code] end[/code]
[code] local recycle = data.raw["recipe"]["speed-module-4-recycling"][/code]
[code] if recycle then[/code]
[code] for
, results in pairs(recycle.results) do[/code]
[code] if results.name == "tungsten-carbide" then[/code]
[code] results.name = "millerite"[/code]
[code] end[/code]
[code] end[/code]
[code] end[/code]
[code] end[/code]
[code]end[/code]

fixes the issue but I don't know if there's a better way to do it

tried to use BBCode, that's not how you do it apparently, the "," after every "for" is supposed to be a "_,"

New response