More Long Inserters

by Kryzeth

Adds long inserter variants of nearly all detected inserters. Optionally also adds burner versions of the filter, stack, and stack filter inserters. Fully compatible with Bobs Logistics, Artisanal Reskins, AAI Industry, Industrial Revolution 2 and 3, Factorio Extended Plus (FXP), Krastorio 2, Random Factorio Things, and Plutonium Energy. Incompatible with the inserter overhaul setting in Bobs Logistics. Not recommended to use with Bobs Adjustable Inserters (try Side Inserters instead!)

Content
14 days ago
0.16 - 1.1
11.2K
Logistics

b [Fixed] 'inserter.next_upgrade = nil' to prevent inter-mod conflict

3 years ago

Got an error because another mod (Super Logistics) set a next_upgrade on inserter, and long-stack-filter-inserter does not have upgradeNext called on it. In func.lua around line 75, just above data:extend and the end of createInserter, I added inserter.next_upgrade = nil . I believe it would nil-out any next_upgrades already set, and it makes my game start.

This was the error:
Mods to disable:Failed to load mods: Error while running setup for entity prototype "long-stack-filter-inserter" (inserter): next_upgrade target (super-stack-filter-inserter) must have the same fast_replaceable_group (inserter != long-handed-inserter).

3 years ago
(updated 3 years ago)

Hm.. is this for Factorio version 1.0? Because it doesn't look like Super Logistics has updated to Factorio version 1.1.x yet... hm, how to handle updates for separate versions... I guess I would have to upload the fix twice? One for Factorio 1.0 and one for Factorio 1.1? Seems pretty annoying...

EDIT: Actually.. I can't even test compatibility in Factorio 1.1 by setting Super Logistics version to 1.1, as it appears to be missing some technology or icon or something. And downgrading to Factorio 1.0 would erase my configs.. including those I'm using in an existing game... not sure I'm willing to blindly upload a fix for a very niche mod that hasn't even updated to the latest version of Factorio...

Although I'm glad you were able to make it work for yourself, and I'm glad you brought this up I might be able to use this to improve compatibility for 1.1 mods. I hope my code wasn't too difficult to read through (I'm not exactly the cleanest coder)

3 years ago
(updated 3 years ago)

It's okay for whatever version you plan to update the mod to or are running. I've been bitten by this kinda thing multiple times when mod X deepcopy's a vanilla prototype, but mod Y already set the fast_replaceable_group or next_upgrade to something incompatible with mod Y's next_upgrade (different fast_replaceable_group, different collision box size from the vanilla prototype, etc)

As for the code style, I didn't get any headaches or want to hit someone, so it must've been fine :)

3 years ago

Tested with a few 1.1 mods, and it didn't seem to break anything obvious, so I've included it in both of the latest updates for this mod (v4.0.2 for Factorio 1.1, and v3.0.4 for Factorio 0.18 and 1.0). Thanks again for the idea!

New response