Made a patch to remove the custom icons for vanilla ores and use generated ones instead so it uses the new graphics. It also adds variations for item entities on belts for stacked items with variations. This way stacked ores on belts have the same varied look as normal ores.
--- prototypes/vanilla_stacks.lua
+++ prototypes/vanilla_stacks.lua
@@ -4,6 +4,6 @@
for tier,items in ipairs(DBL.VANILLA_ITEMS) do
for _,item in pairs(items) do
- deadlock.add_stack(item, string.format("__deadlock-beltboxes-loaders__/graphics/icons/square/stacked-%s.png", item), string.format("deadlock-stacking-%d", tier), DBL.VANILLA_ICON_SIZE)
+ deadlock.add_stack(item, nil, string.format("deadlock-stacking-%d", tier), DBL.VANILLA_ICON_SIZE)
end
end
--- prototypes/create_stack.lua
+++ prototypes/create_stack.lua
@@ -19,7 +19,7 @@
local items_to_update = {}
function DBL.create_stacked_item(item_name, item_type, graphic_path, icon_size, stack_size, mipmap_levels)
DBL.debug(string.format("Creating stacked item: %s", item_name))
- local temp_icons, stacked_icons --, this_fuel_category, this_fuel_acceleration_multiplier, this_fuel_top_speed_multiplier, this_fuel_value, this_fuel_emissions_multiplier
+ local temp_icons, stacked_icons, stacked_pictures --, this_fuel_category, this_fuel_acceleration_multiplier, this_fuel_top_speed_multiplier, this_fuel_value, this_fuel_emissions_multiplier
if graphic_path then
stacked_icons = { { icon = graphic_path, icon_size = icon_size, icon_mipmaps = mipmap_levels } }
else
@@ -52,6 +52,26 @@
table.insert(stacked_icons, table.deepcopy(layer))
end
end
+
+ if base_item.pictures and #base_item.pictures then
+ stacked_pictures = {}
+ local pictures = base_item.pictures
+ for i = 1, #pictures do
+ local stacked_layers = { { filename = "__deadlock-beltboxes-loaders__/graphics/icons/square/blank.png", scale = 1, size = 32 } }
+ for j = 1, -1, -1 do
+ local p = (i + j + 1 - 1) % #pictures + 1
+ local picture = table.deepcopy(pictures[p])
+ if not picture.layers then
+ picture.scale = 0.85 * (picture.scale or 1)
+ picture.shift = util.add_shift(picture.shift, {0, j*3/picture.size})
+ table.insert(stacked_layers, picture)
+ else
+ DBL.log_warning(string.format("Item %s picture %d uses layers", item_name, p))
+ end
+ end
+ stacked_pictures[i] = { layers = stacked_layers }
+ end
+ end
end
data:extend({
{
@@ -59,6 +79,7 @@
name = string.format("deadlock-stack-%s", item_name),
localised_name = {"item-name.deadlock-stacking-stack", get_localised_name(item_name), stack_size},
icons = stacked_icons,
+ pictures = stacked_pictures,
stack_size = math.floor(data.raw[item_type][item_name].stack_size/stack_size),
flags = {},
subgroup = string.format("stacks-%s", get_group(item_name, item_type)),