Wormmus Config deprecated

by wormmus

Adds some extended customization options.

6 years ago
0.16.0
10

g proper table modification

6 years ago
(updated 6 years ago)

some people reported compatibility issues SCTM with your mod.
main cause of this problem is, that your mod doesn't properly do item removal from table.
you should not set it to nil, you should remove it (table.remove), while setting it to nil works it's not correct way to handle things.

this is effects table for construction robotics, when your mod is loaded
effects = {
nil,
nil,
nil,
{
recipe = "construction-robot",
type = "unlock-recipe"
},
{
modifier = 216000,
type = "ghost-time-to-live"
},
{
recipe = "robot-brain-construction",
type = "unlock-recipe"
},
{
recipe = "robot-tool-construction",
type = "unlock-recipe"
}
},

if you want to do proper removal, just iterate table backwards, when removing multiple items from it. pairs will not work (due removal), but backward iteration works.

eg.
for i=table_size(table),i=1,-1 do
remove(table,i)
end

6 years ago

Since I have last updated the mod, I have fallen out of enjoyment of the game, thus ending my updates for the mod. You are more than welcome to create your own version of the mod and use anything that is in it.

The original use of the mod was as a standalone, since that's the only way I played. My knowledge of LUA is very limited, and the resources I looked through did not provide me the best examples or explanations, thus resulting in the crude coding of the mod.

I won't be releasing a version for 0.17, so you are more than welcome to continue it under whatever name you like. I will most likely be updating this to a deprecated mod.

Sorry for any inconvenience this may cause; my time has become limited and life has become much more important to me.