AngelBob Space Age Rebalance


Complete Angel's and Bob's Space Age integration with extra planets: Planetaris-arig, Planetaris-hyarion, Paracelsin, Maraxsis and Moon of Nauvis Muluna.

Overhaul
8 hours ago
2.0 - 2.1
3.46K
Planets Transportation Logistics Trains Combat Armor Character Enemies Environment Mining Fluids Logistic network Circuit network Manufacturing Power Storage

g Factorissimo 3 Compatibility

13 days ago

Hi Troublesim,

Thanks for the great mod! Would it be possible to add compatibility support for Factorissimo 3?

13 days ago

The following error appears when I install the mod:

Failed to load mods: core/lualib/dataloader.lua:23: Invalid array of prototypes:

{}
stack traceback:
[C]: in function 'error'
core/lualib/dataloader.lua:23: in function 'extend'
...ctorissimo-2-notnotmelon__/prototypes/space-location.lua:134: in function 'add_music'
...ctorissimo-2-notnotmelon__/prototypes/space-location.lua:172: in main chunk
[C]: in function 'require'
factorissimo-2-notnotmelon/data-updates.lua:1: in main chunk

12 days ago

Fixed by Gemini

11 days ago

What was the Gemini fix?

11 days ago

Complete File Replacement
Replace the entire contents of ⁠scripts/compat/maraxsis-limestone.lua⁠ with the clean, complete code below:

-- Canonicalise only Maraxsis limestone-producing/consuming paths when Angel's
-- limestone exists. The Maraxsis resource prototypes stay intact.

AB = AB or {}

local canonical = data.raw.item and data.raw.item["angels-solid-limestone"]
and "angels-solid-limestone" or nil
local aliases = {
["limestone"] = true,
["solid-limestone"] = true,
["maraxsis-limestone"] = true
}
local source_names = {
["maraxsis-corals"] = true,
["maraxsis-coral"] = true,
["maraxsis-mollusk-husk"] = true,
["maraxsis-mollusc-husk"] = true
}
local redirected = 0

local function entry_name(entry)
return entry and (entry.name or entry[1]) or nil
end

local function redirect_entry(entry)
local name = entry_name(entry)
if canonical and aliases[name] and name ~= canonical then
if entry.name then entry.name = canonical else entry[1] = canonical end
redirected = redirected + 1
end
end

local function redirect_minable(minable)
if not (canonical and minable) then return end
if aliases[minable.result] and minable.result ~= canonical then
minable.result = canonical
redirected = redirected + 1
end
for _, result in ipairs(minable.results or {}) do redirect_entry(result) end
end

if canonical then
for prototype_type, prototypes in pairs(data.raw) do
for name, prototype in pairs(prototypes or {}) do
if source_names[name] then
if aliases[prototype.spoil_result] and prototype.spoil_result ~= canonical then
prototype.spoil_result = canonical
redirected = redirected + 1
end
redirect_minable(prototype.minable)
for _, loot in ipairs(prototype.loot or {}) do redirect_entry(loot) end
end
end
end

for name, recipe in pairs(data.raw.recipe or {}) do
if string.find(name, "maraxsis", 1, true) or name == "request-limestone" then
for , variant in ipairs({ recipe, recipe.normal, recipe.expensive }) do
if variant then
for
, ingredient in ipairs(variant.ingredients or {}) do
redirect_entry(ingredient)
end
for _, result in ipairs(variant.results or {}) do
redirect_entry(result)
end
if aliases[variant.result] and variant.result ~= canonical then
variant.result = canonical
redirected = redirected + 1
end
if variant.main_product and aliases[variant.main_product] then
variant.main_product = canonical
end
end
end
end
end

if data.raw.recipe["request-limestone"] then
local req = data.raw.recipe["request-limestone"]
if req.main_product and aliases[req.main_product] then
req.main_product = canonical
end
end
end

AB.maraxsis_limestone_compat = {
canonical = canonical,
redirected = redirected
}

log("[AB MARAXSIS LIMESTONE] canonical=" .. tostring(canonical or "none")
.. " redirected_outputs=" .. tostring(redirected))

11 days ago

I will look at adding a Compatibility patch for you.

New response