Delivery Cannon Everything


Allows all non-fluid items to be sent via Space Exploration's Delivery Cannon

Content
4 months ago
2.0
177
Logistics

b Break on Load

13 days ago

When the mod is loaded enabled, it breaks SE, preventing load. Gives following error:
Failed to load mods: ...ace-exploration__/prototypes/phase-3/delivery-cannon.lua:34: attempt to concatenate field 'subgroup' (a nil value)
stack traceback:
...ace-exploration__/prototypes/phase-3/delivery-cannon.lua:34: in function 'create_delivery_cannon_recipe'
...ace-exploration__/prototypes/phase-3/delivery-cannon.lua:127: in main chunk
[C]: in function 'require'
space-exploration/data-final-fixes.lua:31: in main chunk

SE loads fine when this mod is disabled.

9 days ago
(updated 9 days ago)

Added this code after line 184 in data-updates.lua:

    -- adjust items with no subgroup into the "other" subgroup
    if not skip then
      item_proto.subgroup = item_proto.subgroup or "other"
    end

    -- Normalize icon fields so SE's icon-stacking helpers see an explicit icon_size
    -- instead of guessing wrong. IMPORTANT: Factorio's own default icon_size is 64 —
    -- only fill in 64 when nothing is declared, so we don't change how any
    -- correctly-64px item actually renders.
    if not skip then
      if not item_proto.icon_size then
        item_proto.icon_size = 64
      end

      if item_proto.icon and not item_proto.icons then
        item_proto.icons = {
          {
           icon = item_proto.icon,
           icon_size = item_proto.icon_size,
          }
        }
      end
    end

The mod now loads all recipes correctly.
This fixes 2 bugs, The break on load, and an icon bug where some icon sizes were incorrectly defined.

Patch made with claude, for a claude made mod.

6 days ago

Worked like a charm, thank you @Storae!

6 days ago

Worked like a charm, thank you @Storae!

New response