Voidcraft: Planetary Compatibility

by Mouseas

Adds recipies and technology unlocks to Voidcraft so it can work with various planet mods.

Content
4 months ago
2.0
799
Factorio: Space Age Icon Space Age Mod
Mining Fluids Manufacturing

b [Fixed]Crash on startup

5 months ago
(updated 5 months ago)

If voidlore is enabled and Metal And Stars is on, this error pops up:
Nie udało się załadować modyfikacji: ...aft-planetary-compatibility__/compat/metal-and-stars.lua:124: attempt to call global 'compatibility_recipe' (a nil value)
stack traceback:
...aft-planetary-compatibility__/compat/metal-and-stars.lua:124: in main chunk
[C]: in function 'require'
voidcraft-planetary-compatibility/data.lua:11: in main chunk

This thing says that a function doesn't exist. The voidlore section is written with a weird function, and it should be replaced. From this:

table.insert(added_recipes, compatibility_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-shipyard", exalted = true}, {"nanite-science-pack", "nanites", "iron-ore"}, "vpmas-a", 300, nil, {1, 1, 1}))
table.insert(added_recipes, compatibility_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-nix", exalted = true}, {"anomaly-science-pack", "ice", "coal"}, "vpmas-b", 750, nil, {1, 1, 1}))
table.insert(added_recipes, compatibility_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-ringworld", exalted = true}, {"ring-science-pack", "gold-ore", "silica-sand"}, "vpmas-c", 750, nil, {1, 1, 0.5}))
table.insert(added_recipes, compatibility_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-mirandus", exalted = true}, {"quantum-science-pack", "neodymium-ore", "thorium"}, "vpmas-d", 750, nil, {1, 1, 0.5}))

To this (the same function as used in eg. Maraxis compat)

table.insert(added_recipes, VOIDCRAFT.voidcraft_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-shipyard", exalted = true}, {"nanite-science-pack", "nanites", "iron-ore"}, "vpmas-a", 300, nil, {1, 1, 1}))
table.insert(added_recipes, VOIDCRAFT.voidcraft_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-nix", exalted = true}, {"anomaly-science-pack", "ice", "coal"}, "vpmas-b", 750, nil, {1, 1, 1}))
table.insert(added_recipes, VOIDCRAFT.voidcraft_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-ringworld", exalted = true}, {"ring-science-pack", "gold-ore", "silica-sand"}, "vpmas-c", 750, nil, {1, 1, 0.5}))
table.insert(added_recipes, VOIDCRAFT.voidcraft_recipe({prefix = m_gfx_prefix, subgroup = "voidcraft-mas-mirandus", exalted = true}, {"quantum-science-pack", "neodymium-ore", "thorium"}, "vpmas-d", 750, nil, {1, 1, 0.5}))

And then it works.

5 months ago

Fixed in v0.1.5

New response