Deadlock's Stacking for Pyanodon


Adds belt compression for intermediate products introduced in Pyanodons Coal Processing, Pyanodons Fusion Energy, Pyanodons HighTech, Pyanodons Petroleum Handling, Pyanodons Raw Ores, Pyanodons Alien Life and Pyanodons Alternative Energy.

Content
3 months ago
0.16 - 2.0
10.6K
Logistics

g 2.0 update

3 months ago
(updated 3 months ago)
3 months ago

Unfortunately, I am receiving the following:
https://imgur.com/a/7MTPlRc

3 months ago

please give me time i havent played factorio for a while, also i need to buy the space age dlc

3 months ago
(updated 3 months ago)

Sorry - I should have been more clear that my response was directed at goakiller900's fork mention.
Also, this is a 2.0 issue, not necessarily Space Age

3 months ago

please give me time i havent played factorio for a while, also i need to buy the space age dlc

I will wait like everybody else, take the time!
and for that part. thanks for even considering it :)

3 months ago

Ok at here ,, i fixed by just changing the info.json regarding the version checks..

3 months ago

please give me time i havent played factorio for a while, also i need to buy the space age dlc

I will wait like everybody else, take the time!
and for that part. thanks for even considering it :)

no problem

3 months ago

Ok at here ,, i fixed by just changing the info.json regarding the version checks..

okay thanks for testing ill change it probably today

3 months ago

im sorry i have not updated this mod yet, i have lots off mods installed that needs to be updated and mods that are no longer being maintained

also im on a much needed vacation, back friday evening

3 months ago

@ here, i have updated this mod so it should work with 2.0

3 months ago
(updated 3 months ago)

@ here, i have updated this mod so it should work with 2.0

Sadly

Error while applying migration: Deadlock's Stacking for Pyanodon: deadlock-stacking-for-pyanodon-0.6.6.lua

LuaGameScript doesn't contain key active_mods.
stack traceback:
[C]: in function 'index'
...on
/migrations/deadlock-stacking-for-pyanodon-0.6.6.lua:17: in main chunk

itrs a migrations error i think propably game.active.mods error

it has been changed in 2.0.7
Removed LuaGameScript::active_mods. Use LuaBootstrap::active_mods instead.

3 months ago

@ here, i have updated this mod so it should work with 2.0

Sadly

Error while applying migration: Deadlock's Stacking for Pyanodon: deadlock-stacking-for-pyanodon-0.6.6.lua

LuaGameScript doesn't contain key active_mods.
stack traceback:
[C]: in function 'index'
...on
/migrations/deadlock-stacking-for-pyanodon-0.6.6.lua:17: in main chunk

itrs a migrations error i think propably game.active.mods error

it has been changed in 2.0.7
Removed LuaGameScript::active_mods. Use LuaBootstrap::active_mods instead.

and Removed LuaTechnology::effects, use LuaTechnologyPrototype::effects instead.

3 months ago

@ here, i have updated this mod so it should work with 2.0

Sadly

Error while applying migration: Deadlock's Stacking for Pyanodon: deadlock-stacking-for-pyanodon-0.6.6.lua

LuaGameScript doesn't contain key active_mods.
stack traceback:
[C]: in function 'index'
...on
/migrations/deadlock-stacking-for-pyanodon-0.6.6.lua:17: in main chunk

itrs a migrations error i think propably game.active.mods error

it has been changed in 2.0.7
Removed LuaGameScript::active_mods. Use LuaBootstrap::active_mods instead.

and Removed LuaTechnology::effects, use LuaTechnologyPrototype::effects instead.

hmmm, i dont know what you mean by this i need to take a look

3 months ago
(updated 3 months ago)

given the new details, LuaTechnologyPrototype still has the effects attribute as a read-only field. However, in the migration script context, you need to use LuaTechnology and access its prototype to get this effects field, since the LuaTechnology itself no longer has effects.

With this in mind, the script should access technology.prototype.effects instead of technology.effects

atleast thats what iam trying my self right now

Edit: Fixed it will put it on your github if wanted

local shared = require("shared")

function reapply_research(force, research)
    -- Ensure the technology exists and is researched
    local technology = force.technologies[research]
    if technology and technology.researched then
        -- Access the prototype to get the effects
        local effects = technology.prototype.effects
        for _, effect in pairs(effects) do
            if effect.type == "unlock-recipe" then
                force.recipes[effect.recipe].enabled = true
            end
        end
        force.print({"info-message.dsfp-tech-migration", technology.localised_name}, {r = 1, g = 0.75, b = 0, a = 1})
    else
        log("Warning: Technology '" .. research .. "' does not have any associated recipes or effects.")
    end
end

local techs = {}

-- Use script.active_mods to check for active mods and set up stackable techs
if script.active_mods then
    for mod, items in pairs(shared.STACKABLES) do
        if script.active_mods[mod] then
            for _, item in pairs(items) do
                if item.tech then
                    techs[item.tech] = true
                else
                    if script.active_mods["deadlock-beltboxes-loaders"] then
                        techs[shared.STACKING_PREFIX .. item.stage] = true
                    end
                    if script.active_mods["DeadlockCrating"] then
                        techs[shared.CRATING_PREFIX .. item.stage] = true
                    end
                end
            end
        end
    end
end

for _, force in pairs(game.forces) do
    force.reset_technologies()
    force.reset_recipes()
    for tech, _ in pairs(techs) do
        reapply_research(force, tech)
    end
end
3 months ago

thanks ill update it asap

New response