Belt Legacy

by hanes

Tired of accidentally replacing underground-belts and splitters with transport-belts? Then this small mod is for you. When activated they can't fast-replace each other anymore. For a safer bus building. For Vanilla and for Bob's basic, green and purple belt stuff.

Utilities
10 months ago
0.16 - 2.0
2.99K
Logistics

b Space-Age incompatability: Error while running setup .... next_upgrade target (turbo-underground-belt) must have the same fast_replaceable_g

11 months ago

Thank you for updating this to 2.0!
The mod works fine by itself, but with Space-Age active, the prototype step aborts on:
Error while running setup for entity prototype "express-underground-belt" (underground-belt): next_upgrade target (turbo-underground-belt) must have the same fast_replaceable_group (transport-belt != underground-belt)

SA adds a 'turbo' tier, and fiddles with the express tier's next_upgrade which is probably the source of the issue.

11 months ago

YMMV, but I threw together a tiny fix in a test mod that seemed to work for me:
data-final-fixes.lua

if mods["space-age"] and mods["belt-legacy"] then
    data.raw["underground-belt"]["turbo-underground-belt"].fast_replaceable_group = "underground-belt"
    data.raw["splitter"]["turbo-splitter"].fast_replaceable_group = "splitter"
end
10 months ago

Hi, thanks for posting! Sorry for late response but the factory must grow... Currently I do a vanilla playthrough before I play Space Age, so i can't test things.
Does it also work when you put your code in the data-updates.lua file? Or does it have to be in final-fixes?

10 months ago
(updated 10 months ago)

It does work in data-updates.lua. (I tend to default to data-final-fixes.lua when I wanna test random things.)
I also have the mod setup with "? space-age" as a dependency, which may or may not be helping due to load order.

10 months ago

Update is released, pls let me know if something is borked.

10 months ago
(updated 10 months ago)
Failed to load mods: __belt-legacy__/data-updates.lua:38: attempt to perform arithmetic on field 'space' (a nil value)
stack traceback:
    __belt-legacy__/data-updates.lua:38: in main chunk

LUA doesn't like - in field names. You kinda have to do mods["space-age"] for space-age and not mods.space-age.
PS: I have tested the update but with that change to mods["space-age"] and it is working for me.

10 months ago

oops, should work now :D

New response