renoth / factorio-alien-module

A mod for factorio
MIT License
14 stars 16 forks source link

Incorrect change to force based Alien modules #90

Closed vfinn closed 2 months ago

vfinn commented 5 months ago

You changed the if statement incorrectly: changing

            if ((force.name ~= "enemy") and
                (force.name ~= "neutral") and
                (force.name ~= "_ABANDONED_") and
                (force.name ~= "_DESTROYED_") and

to

global.ignoredalienmodulefactions = { "enemy", "neutral", "_ABANDONED_", "_DESTROYED_" } and you did: global.ignoredalienmodulefactions[force.name]

but global.ignoredalienmodulefactions["enemy"] is nil global.ignoredalienmodulefactions[1] would equal "enemy"

If you want to use your way the table needs to be initialize: global.ignoredalienmodulefactions = { enemy=true, neutral=true, _ABANDONED_=true, _DESTROYED_=true} then change: if global.ignoredalienmodulefactions[force.name] == nil then

to if not global.ignoredalienmodulefactions[force.name] then

The change you made will make for slower processing of modules in Oarc.

renoth commented 5 months ago

pls test 1.4.5