Smart Inserters


Change pickup/drop position for each inserter, change drop/pickup offet, copy-paste settings, custom inserter lenght and more... Enjoy!

Utilities
a month ago
1.1
2.25K
Logistics

b [DONE] Clicking on an inserter causes crash now

6 months 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>

6 months 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>

6 months ago

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

6 months 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 😅

6 months 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

6 months ago

Hmm, still getting the same crash.

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

6 months ago

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

6 months 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>


6 months 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
6 months 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

6 months 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.

6 months 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

6 months 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.)

6 months 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)

6 months 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.

6 months ago

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

6 months 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