Subsurface - build beneath your base!

by Natha

While everyone is looking up to space, other planets and the rest of the universe, there is a whole world buried directly underneath us. Use this opportunity to declutter your factory logistics by routing it under your base and explore the underground!

Content
10 days ago
1.1 - 2.0
5.35K
Environment Mining

b [Fixed] Compatibility with Bob's

2 months ago

I am getting the following error when trying to load with Bob's Logistics Mod

Failed to load mods: The given sprite rectangle (left_top=0x0, right_bottom=64x64) is outside the actual sprite size (left_top=0x0, right_bottom=32x32).
If this is being used as an icon you may need to define the icon_size property.
See the log file for more information.: boblogistics/graphics/icons/green-transport-belt-to-ground.png

Is there plans to have compatibility with Bob's?

2 months ago

Seems to be a bug in Bob's mod

2 months ago
(updated 2 months ago)

sorry, not a bug with bobs.

if you are getting any images from bobs mod, ultimate belts, or so on you have to call the icon size to get it in the correct format. factorios default size is 64x so when calling items from another mod you have to get it with a 32x flag if it is 32x. basically if bobs has a underground belt that you use as an icon you need the size of it pulled in as well on new item creations where you deep copy as the icon size is reset to 64x by factorios core.

so that said there are 2 points in your data_update.lua that arent getting the icon size. first on line 27

item_elevator.icons = {
    {
        icon = data.raw["underground-belt"][b].icon,
    }
}

should be this

item_elevator.icons = {
    {
        icon = data.raw["underground-belt"][b].icon,
        icon_size = data.raw["underground-belt"][b].icon_size
    }
}

and on line 45

{
    type = "item",
    name = "item-elevator-" .. i,
    localised_name = {"entity-name.item-elevator", {"entity-name."..t}},
    localised_description  = {"item-description.item-elevator"},
    icons = table.deepcopy(item_elevator.icons),
    subgroup = "inter-surface-transport",
    order = "c-a" .. i,
    place_result = "item-elevator-" .. i,
    stack_size = 10
},

should be this

{
    type = "item",
    name = "item-elevator-" .. i,
    localised_name = {"entity-name.item-elevator", {"entity-name."..t}},
    localised_description  = {"item-description.item-elevator"},
    icons = table.deepcopy(item_elevator.icons),
    icon_size = table.deepcopy(item_elevator.icon_size),
    subgroup = "inter-surface-transport",
    order = "c-a" .. i,
    place_result = "item-elevator-" .. i,
    stack_size = 10
},

in both instances the icon size has to be copied from the mod it is importing from otherwise factorio assumes its 64 bit

changing both of those lines fully fixes compatibility for icon data with all mods.

2 months ago
(updated 2 months ago)

I implemented only the first fix in the next release, the line 45 fix is worthless: https://lua-api.factorio.com/latest/prototypes/ItemPrototype.html#icon_size

2 months ago

Was just me being cautious and making sure the icon size got where it belonged. If you only needed the one then that's awesome.

New response