Smart Inserters


A more modern and configurable approach at adjustable inserters to change pickup/drop position/offsets, and many more options like custom inserter length, a custom setting for ranges and diagonal, support for slim and big inserters... Enjoy!

Utilities
10 days ago
1.1 - 2.0
7.66K
Logistics

b [DONE] Clicking on an inserter causes crash now

1 year, 1 month ago

The mod Smart Inserters (1.2.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Smart_Inserters::on_gui_opened (ID 88)
Smart_Inserters/scripts/util.lua:23: attempt to call field 'inseter_default_range' (a nil value)
stack traceback:
Smart_Inserters/scripts/util.lua:23: in function 'should_cell_be_enabled'
Smart_Inserters/scripts/selector_gui.lua:315: in function 'update'
Smart_Inserters/control.lua:198: in function <Smart_Inserters/control.lua:194>

1 year, 1 month ago

Updated to 1.2.4 and same error

The mod Smart Inserters (1.2.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Smart_Inserters::on_gui_opened (ID 88)
Smart_Inserters/scripts/util.lua:23: attempt to call field 'inseter_default_range' (a nil value)
stack traceback:
Smart_Inserters/scripts/util.lua:23: in function 'should_cell_be_enabled'
Smart_Inserters/scripts/selector_gui.lua:315: in function 'update'
Smart_Inserters/control.lua:198: in function <Smart_Inserters/control.lua:194>

1 year, 1 month ago

Ill fix this right away with the 1.2.5, sorry for all the trouble of today😔

1 year, 1 month ago

Hey, you don't have to apologize.
You're creating something free for the community, and actually taking the time to fix the issues fast.

I only wish there was a easy way to do a rollback of the mods in the modbrowser, so that people could still play the game while a fix was under way.
And I mean that as for all the mods, not only this one.

Anyway, thank you for a fast reply and we're sorry for making this Sunday so busy for you 😅

1 year, 1 month ago

tell me if this fixed it, else Ill dig on it as soon as you reply, you can also contact me on discord an telegram

discord:https://discord.gg/cVkXQMA3
telegram:t.me/smastermega

1 year, 1 month ago

Hmm, still getting the same crash.

I'll do some testing towards other mods that's been updated the past few days

1 year, 1 month ago

If you send me the save file and the steps ti riproduce ill check it myself

1 year, 1 month ago

I think I found the issue.

Mod setting: Max range of each inserter - incremental
Using this causes the crash if opening the inserter menu, while reverting to the default "equal" or "inserter" it works fine.

Tried disabling all other mods, and I still get the same crash only with a few different lines


The mod Smart Inserters (1.2.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Smart_Inserters::on_gui_opened (ID 88)
Smart_Inserters/scripts/util.lua:23: attempt to call field 'inseter_default_range' (a nil value)
stack traceback:
Smart_Inserters/scripts/util.lua:23: in function 'should_cell_be_enabled'
Smart_Inserters/scripts/selector_gui.lua:315: in function 'update'
Smart_Inserters/control.lua:209: in function <Smart_Inserters/control.lua:205>


1 year, 1 month ago

Steps to recreate

  1. Only this mod activated
  2. Change the mod setting "Max range of each inserter" to "incremental"
  3. Start a brand new game in sandbox
  4. Choose all tech researched
  5. Place inserter
  6. Click on inserter
1 year, 1 month ago

Fixed
basically I renamed
inserter_default_range from inseter_default_range
but forgot to refactor it in the should_cell_be_enabled function

Ill push the update right after some testing

1 year, 1 month ago

Sweet, might not have to roll back to 1.1.2 then if that was the only issue, but that's up to you ofc.

1 year, 1 month ago

This is the update, If it work as intended it's going to be the same file I publish on the portal.
If you can confirm that it work ill be grateful https://mega.nz/file/PhlQTKzS#o14dNLdbiq0SQPu_YFscSzIgzBOSP9ZXKTTY8MdF9Io

I already tried it to an extend but since I wrote the code I may have skipped some bugs

1 year, 1 month ago

Seems to be working now without crashing.

However I realized that incremental doesn't seem to make any difference?
If I have understood that setting correctly, it will add +1 to the reach for each upgrade you research.
In that case, shouldn't long inserters always have +1 more reach than all the others?

Now it seems like incremental and equal are the same. (Might have been like this always and I just didn't really test it.)

1 year, 1 month ago

they have +1 reach but due to some limitation in the actual code each inserter will cap at the same range.

I'm still thinking of a way to change this without making opening an inserter take a second (this is an exageration but you get the problem)

1 year, 1 month ago

I understand.
But if the drawback of taking longer to open is only there while having "incremental" selected, then just place a warning in the description about that until you find a different solution?
I mean, you get to the cap so fast that it's basically no reason to chose incremental over equal anyway.

If it will cause issues for all the modes, I understand you don't want to implement it though.

1 year, 1 month ago

I can add a small implementation only for incremenal but that will need some testing, ill keep you update there

1 year, 1 month ago

https://imgur.com/a/YDKzl68
This is teh actual state, if you want to test the mod before the release you can go on the discord, Il test it there before releasing it
https://discord.gg/cVkXQMA3

New response