diff --git a/changelog.txt b/changelog.txt index 346032f..92c8c2b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,14 @@ --------------------------------------------------------------------------------------------------- +Version: 2.5.0 +Date: 23. 10. 2024 + Changes: + - Updated for Factorio 2.0. + - Added compatibility with Space Age, a 4th tier of loaders/beltboxes will be added if Space Age is active. + - Turbo loaders/beltboxes are NOT localized in other langs, only Eng. + - Removed the 'low' graphics as `hr_version` as the low/high split has been removed from the game. + - Not everything tested, but made sure loaders/beltboxes work. + - Migrations untested. I wouldn't recommend using an old save in 2.0 in the first place. +--------------------------------------------------------------------------------------------------- Version: 2.4.2 Date: 09. 05. 2021 Changes: diff --git a/control.lua b/control.lua index a773104..3046253 100644 --- a/control.lua +++ b/control.lua @@ -56,9 +56,9 @@ end -- else if there's an inventory ahead but not behind, turn around and switch mode -- else if no inventories and a belt ahead, turn around; also switch mode if belt is facing towards local function on_built_entity(event) - local built = event.created_entity + local built = event.entity -- invalid build? don't bother with faked "revived" property from pre-1.0 Nanobots/Bluebuild, those shenanigans can only be passed in script_raised_* events now - -- also no need to check entity type since we can filter for it on the event handler + -- also no need to check entity type since we can filter for it on the event handler if not built or not built.valid then return end local snap2inv = settings.get_player_settings(game.players[event.player_index])["deadlock-loaders-snap-to-inventories"].value local snap2belt = settings.get_player_settings(game.players[event.player_index])["deadlock-loaders-snap-to-belts"].value @@ -114,7 +114,7 @@ local function auto_unstack(item_name, item_count, sending_inventory, receiving_ local add_count = STACK_SIZE -- if the base item's stack size is lower than the configured STACK_SIZE then -- this should reward the lower of the two - local prototype = game.item_prototypes[string.sub(item_name, 16)] + local prototype = prototypes.item[string.sub(item_name, 16)] if STACK_SIZE > prototype.stack_size then add_count = prototype.stack_size end @@ -197,8 +197,8 @@ local function on_configuration_changed(config) for tech_name, tech_table in pairs(force.technologies) do if tech_table.researched then -- find any beltboxes or loaders or stacks in effects and unlock - for _, effect_table in ipairs(tech_table.effects) do - if effect_table.type == "unlock-recipe" and (string.find(game.recipe_prototypes[effect_table.recipe].order, "%-deadlock%-") or string.find(game.recipe_prototypes[effect_table.recipe].name, "deadlock%-")) then + for _, effect_table in ipairs(tech_table.prototype.effects) do + if effect_table.type == "unlock-recipe" and (string.find(prototypes.recipe[effect_table.recipe].order, "%-deadlock%-") or string.find(prototypes.recipe[effect_table.recipe].name, "deadlock%-")) then force.recipes[effect_table.recipe].enabled = true end end diff --git a/graphics/entities/low/beltbox-base.png b/graphics/entities/low/beltbox-base.png deleted file mode 100644 index 94c8e37..0000000 Binary files a/graphics/entities/low/beltbox-base.png and /dev/null differ diff --git a/graphics/entities/low/beltbox-mask.png b/graphics/entities/low/beltbox-mask.png deleted file mode 100644 index 42fc36b..0000000 Binary files a/graphics/entities/low/beltbox-mask.png and /dev/null differ diff --git a/graphics/entities/low/beltbox-shadow.png b/graphics/entities/low/beltbox-shadow.png deleted file mode 100644 index c2406bb..0000000 Binary files a/graphics/entities/low/beltbox-shadow.png and /dev/null differ diff --git a/graphics/entities/low/beltbox-working.png b/graphics/entities/low/beltbox-working.png deleted file mode 100644 index 1061525..0000000 Binary files a/graphics/entities/low/beltbox-working.png and /dev/null differ diff --git a/graphics/entities/low/loader-back.png b/graphics/entities/low/loader-back.png deleted file mode 100644 index 7c6e949..0000000 Binary files a/graphics/entities/low/loader-back.png and /dev/null differ diff --git a/graphics/entities/low/loader-base.png b/graphics/entities/low/loader-base.png deleted file mode 100644 index b8058c3..0000000 Binary files a/graphics/entities/low/loader-base.png and /dev/null differ diff --git a/graphics/entities/low/loader-mask.png b/graphics/entities/low/loader-mask.png deleted file mode 100644 index d9dfb76..0000000 Binary files a/graphics/entities/low/loader-mask.png and /dev/null differ diff --git a/graphics/entities/low/loader-shadow.png b/graphics/entities/low/loader-shadow.png deleted file mode 100644 index c58303d..0000000 Binary files a/graphics/entities/low/loader-shadow.png and /dev/null differ diff --git a/graphics/icons/square/stacked-tungsten-ore.png b/graphics/icons/square/stacked-tungsten-ore.png new file mode 100644 index 0000000..bcbc538 Binary files /dev/null and b/graphics/icons/square/stacked-tungsten-ore.png differ diff --git a/info.json b/info.json index ee78a6e..47cbae6 100644 --- a/info.json +++ b/info.json @@ -1,13 +1,14 @@ { "name": "deadlock-beltboxes-loaders", - "version": "2.4.2", + "version": "2.5.0", "title": "Deadlock's Stacking Beltboxes & Compact Loaders", - "author": "Deadlock989, Shane Madden", + "author": "Deadlock989, Shane Madden, MasterBuilder", "homepage": "https://forums.factorio.com/viewtopic.php?f=94&t=57264", "dependencies": [ - "base >= 1.1", - "? ReStack" + "base >= 2.0", + "? ReStack", + "? space-age" ], "description": "Adds minimalist 1x1 loaders and stacking beltboxes for 5x belt compression for ores, plates and some intermediate products", - "factorio_version": "1.1" + "factorio_version": "2.0" } diff --git a/locale/en/deadlock-beltboxes-loaders.cfg b/locale/en/deadlock-beltboxes-loaders.cfg index 0a096e5..a6bf8b5 100644 --- a/locale/en/deadlock-beltboxes-loaders.cfg +++ b/locale/en/deadlock-beltboxes-loaders.cfg @@ -2,9 +2,11 @@ transport-belt-loader=Compact loader fast-transport-belt-loader=Fast compact loader express-transport-belt-loader=Express compact loader +turbo-transport-belt-loader=Turbo compact loader transport-belt-beltbox=Stacking beltbox fast-transport-belt-beltbox=Fast stacking beltbox express-transport-belt-beltbox=Express stacking beltbox +turbo-transport-belt-beltbox=Turbo stacking beltbox [entity-description] deadlock-loader=Quickly transfers resources between belts and inventories. Rotate after placement to change input/output mode. diff --git a/migrations/deadlock-beltboxes-loaders_2.0.2.lua b/migrations/deadlock-beltboxes-loaders_2.0.2.lua index bd42e12..3b17a1e 100644 --- a/migrations/deadlock-beltboxes-loaders_2.0.2.lua +++ b/migrations/deadlock-beltboxes-loaders_2.0.2.lua @@ -2,7 +2,7 @@ for _, force in pairs(game.forces) do force.reset_technologies() for tech_name, technology in pairs(force.technologies) do if technology.researched then - for _, effect in pairs(technology.effects) do + for _, effect in pairs(technology.prototype.effects) do if effect.type == "unlock-recipe" then force.recipes[effect.recipe].enabled = true end diff --git a/migrations/logistics-recipes.lua b/migrations/logistics-recipes.lua index bd42e12..3b17a1e 100644 --- a/migrations/logistics-recipes.lua +++ b/migrations/logistics-recipes.lua @@ -2,7 +2,7 @@ for _, force in pairs(game.forces) do force.reset_technologies() for tech_name, technology in pairs(force.technologies) do if technology.researched then - for _, effect in pairs(technology.effects) do + for _, effect in pairs(technology.prototype.effects) do if effect.type == "unlock-recipe" then force.recipes[effect.recipe].enabled = true end diff --git a/prototypes/create_beltbox.lua b/prototypes/create_beltbox.lua index ee58811..3f23e35 100644 --- a/prototypes/create_beltbox.lua +++ b/prototypes/create_beltbox.lua @@ -19,10 +19,10 @@ local function create_beltbox_entity(tier_table) icon_size = 64, icon_mipmaps = 4, flags = { "placeable-neutral", "placeable-player", "player-creation" }, - animation = { - layers = { - { - hr_version = { + graphics_set = { + animation = { + layers = { + { filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/beltbox-base.png", animation_speed = 1 / crafting_speed, priority = "high", @@ -33,18 +33,7 @@ local function create_beltbox_entity(tier_table) shift = {0, 0}, width = 96 }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/beltbox-base.png", - animation_speed = 1 / crafting_speed, - priority = "high", - frame_count = 60, - line_length = 10, - height = 48, - scale = 1, - shift = {0, 0}, - width = 48 - }, - { - hr_version = { + { filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/beltbox-mask.png", animation_speed = 1 / crafting_speed, priority = "high", @@ -55,18 +44,7 @@ local function create_beltbox_entity(tier_table) width = 96, tint = tier_table.colour, }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/beltbox-mask.png", - animation_speed = 1 / crafting_speed, - priority = "high", - repeat_count = 60, - height = 48, - scale = 1, - shift = {0, 0}, - width = 48, - tint = tier_table.colour, - }, - { - hr_version = { + { draw_as_shadow = true, filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/beltbox-shadow.png", animation_speed = 1 / crafting_speed, @@ -77,22 +55,11 @@ local function create_beltbox_entity(tier_table) shift = {0.5, 0}, width = 144 }, - draw_as_shadow = true, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/beltbox-shadow.png", - animation_speed = 1 / crafting_speed, - frame_count = 60, - line_length = 10, - height = 48, - scale = 1, - shift = {0.5, 0}, - width = 72 }, }, - }, - working_visualisations = { - { - animation = { - hr_version = { + working_visualisations = { + { + animation = { animation_speed = 1 / crafting_speed, blend_mode = "additive", filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/beltbox-working.png", @@ -104,23 +71,14 @@ local function create_beltbox_entity(tier_table) tint = brighter_colour(tier_table.colour), width = 96 }, - animation_speed = 1 / crafting_speed, - blend_mode = "additive", - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/beltbox-working.png", - frame_count = 30, - line_length = 10, - height = 48, - priority = "high", - tint = tier_table.colour, - width = 48 - }, - light = { - color = brighter_colour(tier_table.colour), - intensity = 0.4, - size = 3, - shift = {0, 0.25}, + light = { + color = brighter_colour(tier_table.colour), + intensity = 0.4, + size = 3, + shift = {0, 0.25}, + }, }, - }, + } }, dying_explosion = "explosion", corpse = "small-remnants", @@ -138,7 +96,7 @@ local function create_beltbox_entity(tier_table) crafting_speed = crafting_speed, energy_source = { type = "electric", - emissions_per_minute = 3 * 0.03125 / data.raw["transport-belt"][tier_table.transport_belt].speed, + emissions_per_minute = {pollution = 3 * 0.03125 / data.raw["transport-belt"][tier_table.transport_belt].speed}, usage_priority = "secondary-input", drain = "15kW", }, @@ -150,7 +108,7 @@ local function create_beltbox_entity(tier_table) percent = 50 }, }, - vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 1.0 }, + vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 1.0 }, working_sound = { match_speed_to_activity = true, idle_sound = { @@ -205,7 +163,7 @@ local function create_beltbox_recipe(tier_table) order = string.format("b%s%s", (tier_table.order or tier_table.loader), "-deadlock-beltbox"), enabled = false, ingredients = tier_table.beltbox_ingredients, - result = tier_table.beltbox_item or tier_table.beltbox, + results = {{type = "item", name = tier_table.beltbox_item or tier_table.beltbox, amount = 1}}, energy_required = 3.0, } if not tier_table.beltbox_technology then diff --git a/prototypes/create_loader.lua b/prototypes/create_loader.lua index bd1c5a5..c2a793b 100644 --- a/prototypes/create_loader.lua +++ b/prototypes/create_loader.lua @@ -12,19 +12,6 @@ local function create_loader_belt_component(source) priority = "extra-high", flags = { "no-crop", "low-object" }, } - if source.hr_version then - component.hr_version = { - filename = source.hr_version.filename, - width = source.hr_version.width, - height = source.hr_version.height, - line_length = source.hr_version.line_length, - frame_count = source.hr_version.frame_count, - y = source.hr_version.y, - scale = source.hr_version.scale, - priority = "extra-high", - flags = { "no-crop", "low-object" }, - } - end return component end @@ -39,13 +26,13 @@ local function create_loader_entity(tier_table) } entity.icon_size = 64 entity.icon_mipmaps = 4 - entity.flags = {"placeable-neutral", "player-creation", "fast-replaceable-no-build-while-moving"} + entity.flags = {"placeable-neutral", "player-creation"} entity.vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 1.0 } entity.open_sound = { filename = "__base__/sound/wooden-chest-open.ogg", volume = 1.0 } entity.close_sound = { filename = "__base__/sound/wooden-chest-close.ogg", volume = 1.0 } entity.corpse = "small-remnants" entity.collision_box = { {-0.26, -0.26}, {0.26, 0.26} } -- 1.1 requires min of 0.5 width - entity.collision_mask = {"item-layer", "object-layer", "player-layer", "water-tile", "transport-belt-layer" } -- 1.1 requires "transport-belt-layer" + entity.collision_mask = {layers = {item = true, object = true, player = true, water_tile = true, transport_belt = true, meltable = true}} entity.selection_box = { {-0.5, -0.5}, {0.5, 0.5} } entity.minable = { hardness = 0.2, mining_time = 0.5, result = tier_table.loader_item or tier_table.loader} entity.max_health = 170 @@ -64,135 +51,73 @@ local function create_loader_entity(tier_table) entity.structure = { back_patch = { sheet = { - hr_version = { - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-back.png", - height = 96, - priority = "extra-high", - width = 96, - scale = 0.5, - shift = { 0, 0 }, - }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-back.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-back.png", + height = 96, priority = "extra-high", - width = 48, - scale = 1, + width = 96, + scale = 0.5, shift = { 0, 0 }, }, }, direction_in = { sheets = { { - hr_version = { - draw_as_shadow = true, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-shadow.png", - height = 96, - priority = "medium", - width = 144, - scale = 0.5, - shift = { 0.5, 0 }, - }, draw_as_shadow = true, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-shadow.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-shadow.png", + height = 96, priority = "medium", - width = 72, - scale = 1, + width = 144, + scale = 0.5, shift = { 0.5, 0 }, }, { - hr_version = { - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-base.png", - height = 96, - priority = "extra-high", - width = 96, - scale = 0.5, - shift = { 0, 0 }, - }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-base.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-base.png", + height = 96, priority = "extra-high", - width = 48, - scale = 1, + width = 96, + scale = 0.5, shift = { 0, 0 }, }, { - hr_version = { - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-mask.png", - height = 96, - priority = "extra-high", - width = 96, - scale = 0.5, - tint = tier_table.colour, - shift = { 0, 0 }, - }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-mask.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-mask.png", + height = 96, priority = "extra-high", - width = 48, - scale = 1, - shift = { 0, 0 }, + width = 96, + scale = 0.5, tint = tier_table.colour, + shift = { 0, 0 }, }, }, }, direction_out = { sheets = { { - hr_version = { - draw_as_shadow = true, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-shadow.png", - height = 96, - priority = "medium", - width = 144, - scale = 0.5, - shift = { 0.5, 0 }, - }, draw_as_shadow = true, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-shadow.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-shadow.png", + height = 96, priority = "medium", - width = 72, - scale = 1, + width = 144, + scale = 0.5, shift = { 0.5, 0 }, }, { - hr_version = { - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-base.png", - height = 96, - priority = "extra-high", - width = 96, - scale = 0.5, - shift = { 0, 0 }, - y = 96, - }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-base.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-base.png", + height = 96, priority = "extra-high", - width = 48, - scale = 1, + width = 96, + scale = 0.5, shift = { 0, 0 }, - y = 48 + y = 96, }, { - hr_version = { - filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-mask.png", - height = 96, - priority = "extra-high", - width = 96, - scale = 0.5, - shift = { 0, 0 }, - tint = tier_table.colour, - y = 96 - }, - filename = "__deadlock-beltboxes-loaders__/graphics/entities/low/loader-mask.png", - height = 48, + filename = "__deadlock-beltboxes-loaders__/graphics/entities/high/loader-mask.png", + height = 96, priority = "extra-high", - width = 48, - scale = 1, + width = 96, + scale = 0.5, shift = { 0, 0 }, tint = tier_table.colour, - y = 48 + y = 96 }, }, } @@ -245,7 +170,7 @@ local function create_loader_recipe(tier_table) order = string.format("a%s%s", (tier_table.order or tier_table.loader), "-deadlock-loader"), enabled = false, ingredients = tier_table.loader_ingredients, - result = tier_table.loader_item or tier_table.loader, + results = {{type = "item", name = tier_table.loader_item or tier_table.loader, amount = 1}}, energy_required = 2.0, } if not tier_table.technology then diff --git a/prototypes/create_stack.lua b/prototypes/create_stack.lua index 80d9905..ec532f9 100644 --- a/prototypes/create_stack.lua +++ b/prototypes/create_stack.lua @@ -2,17 +2,17 @@ local DBL = require("prototypes.shared") -- multiply a number with a unit (kJ, kW etc) at the end local function multiply_number_unit(property, mult) - local value, unit - value = string.match(property, "%d+") - if string.match(property, "%d+%.%d+") then -- catch floats - value = string.match(property, "%d+%.%d+") - end - unit = string.match(property, "%a+") - if unit == nil then - return value * mult - else - return ((value * mult) .. unit) - end + local value, unit + value = string.match(property, "%d+") + if string.match(property, "%d+%.%d+") then -- catch floats + value = string.match(property, "%d+%.%d+") + end + unit = string.match(property, "%a+") + if unit == nil then + return value * mult + else + return ((value * mult) .. unit) + end end local function get_group(item, item_type) @@ -40,7 +40,7 @@ function DBL.create_stacked_item(item_name, item_type, graphic_path, icon_size, else local base_item = data.raw[item_type][item_name] -- Icons has priority over icon, check for icons definition first - if base_item.icons then + if base_item.icons then temp_icons = table.deepcopy(base_item.icons) -- We've fetched the icons, check icon_size is present in each layer, and if not, assign it -- No need to check if base_item.icon_size exists, because if it's not defined there and not defined here, Factorio itself will not start @@ -72,7 +72,7 @@ function DBL.create_stacked_item(item_name, item_type, graphic_path, icon_size, { type = "item", name = string.format("deadlock-stack-%s", item_name), - localised_name = {"item-name.deadlock-stacking-stack", get_localised_name(item_name), stack_size}, + localised_name = {"item-name.deadlock-stacking-stack", get_localised_name(item_name), tostring(stack_size)}, icons = stacked_icons, stack_size = math.floor(data.raw[item_type][item_name].stack_size/stack_size), flags = {}, @@ -96,7 +96,7 @@ function DBL.deferred_stacked_item_updates() local stack_size = deadlock.get_item_stack_density(item_name, item_type) data.raw.item[stacked_item_name].subgroup = string.format("stacks-%s", get_group(item_name, item_type)) data.raw.item[stacked_item_name].stack_size = math.floor(data.raw[item_type][item_name].stack_size/stack_size) - data.raw.item[stacked_item_name].localised_name = {"item-name.deadlock-stacking-stack", get_localised_name(item_name), stack_size} + data.raw.item[stacked_item_name].localised_name = {"item-name.deadlock-stacking-stack", get_localised_name(item_name), tostring(stack_size)} -- warn when the current stack size causes a loss in inventory density for this item if data.raw[item_type][item_name].stack_size % stack_size > 0 then DBL.log_warning(string.format("Full stack density for %s is reduced to %d from source stack size %d, doesn't divide cleanly by %d", stacked_item_name, (data.raw.item[stacked_item_name].stack_size * stack_size), data.raw[item_type][item_name].stack_size, stack_size)) @@ -128,7 +128,7 @@ function DBL.create_stacking_recipes(item_name, item_type, stack_size) local stack_speed_modifier = stack_size / DBL.STACK_SIZE -- stacking local stack_icons = table.deepcopy(base_icons) - table.insert(stack_icons, + table.insert(stack_icons, { icon = "__deadlock-beltboxes-loaders__/graphics/icons/square/arrow-d-64.png", scale = 0.25, @@ -146,9 +146,8 @@ function DBL.create_stacking_recipes(item_name, item_type, stack_size) order = DBL.recipe_order[item_name].."[a]", enabled = false, allow_decomposition = false, - ingredients = { {item_name, stack_size * DBL.RECIPE_MULTIPLIER} }, - result = string.format("deadlock-stack-%s", item_name), - result_count = DBL.RECIPE_MULTIPLIER, + ingredients = {{type = "item", name = item_name, amount = stack_size * DBL.RECIPE_MULTIPLIER}}, + results = {{type = "item", name = string.format("deadlock-stack-%s", item_name), amount = DBL.RECIPE_MULTIPLIER}}, energy_required = DBL.CRAFT_TIME * DBL.RECIPE_MULTIPLIER * stack_speed_modifier, icons = stack_icons, hidden = true, @@ -158,7 +157,7 @@ function DBL.create_stacking_recipes(item_name, item_type, stack_size) }) -- unstacking local unstack_icons = table.deepcopy(base_icons) - table.insert(unstack_icons, + table.insert(unstack_icons, { icon = "__deadlock-beltboxes-loaders__/graphics/icons/square/arrow-u-64.png", scale = 0.25, @@ -176,9 +175,8 @@ function DBL.create_stacking_recipes(item_name, item_type, stack_size) order = DBL.recipe_order[item_name].."[b]", enabled = false, allow_decomposition = false, - ingredients = { {string.format("deadlock-stack-%s", item_name), DBL.RECIPE_MULTIPLIER} }, - result = item_name, - result_count = stack_size * DBL.RECIPE_MULTIPLIER, + ingredients = {{type = "item", name = string.format("deadlock-stack-%s", item_name), amount = DBL.RECIPE_MULTIPLIER}}, + results = {{type = "item", name = item_name, amount = stack_size * DBL.RECIPE_MULTIPLIER}}, energy_required = DBL.CRAFT_TIME * DBL.RECIPE_MULTIPLIER * stack_speed_modifier, icons = unstack_icons, hidden = settings.startup["deadlock-stacking-hide-unstacking"].value, diff --git a/prototypes/public.lua b/prototypes/public.lua index 0e34c35..d5b9216 100644 --- a/prototypes/public.lua +++ b/prototypes/public.lua @@ -364,6 +364,3 @@ function deadlock_stacking.remove(target_tech) end end end - ------------------------------------------------------------------------------------------------------------------------------------------------------- - diff --git a/prototypes/shared.lua b/prototypes/shared.lua index d756441..965d9cd 100644 --- a/prototypes/shared.lua +++ b/prototypes/shared.lua @@ -21,7 +21,7 @@ DBL.STACK_SIZE = settings.startup["deadlock-stack-size"].value DBL.CRAFT_TIME = DBL.STACK_SIZE / 15 DBL.VANILLA_ITEMS = { - [1] = { "wood", "iron-ore", "copper-ore", "stone", "coal", "iron-plate", "copper-plate", "steel-plate", "stone-brick" }, + [1] = { "wood", "iron-ore", "copper-ore", "stone", "coal", "iron-plate", "copper-plate", "steel-plate", "stone-brick", "tungsten-ore" }, [2] = { "copper-cable", "iron-gear-wheel", "iron-stick", "sulfur", "plastic-bar", "solid-fuel", "electronic-circuit", "advanced-circuit" }, [3] = { "processing-unit", "battery", "uranium-ore", "uranium-235", "uranium-238" }, } diff --git a/prototypes/vanilla_tiers.lua b/prototypes/vanilla_tiers.lua index 26c8e42..44054b4 100644 --- a/prototypes/vanilla_tiers.lua +++ b/prototypes/vanilla_tiers.lua @@ -7,14 +7,14 @@ deadlock.add_tier({ technology = "logistics", order = "a", loader_ingredients = { - {"transport-belt", 1}, - {"iron-plate", 5}, + {name = "transport-belt", type = "item", amount = 1}, + {name = "iron-plate", type = "item", amount = 5}, }, beltbox_ingredients = { - {"transport-belt", 4}, - {"iron-plate", 10}, - {"iron-gear-wheel", 10}, - {"electronic-circuit", 4}, + {name = "transport-belt", type = "item", amount = 4}, + {name = "iron-plate", type = "item", amount = 10}, + {name = "iron-gear-wheel", type = "item", amount = 10}, + {name = "electronic-circuit", type = "item", amount = 4}, }, beltbox_technology = "deadlock-stacking-1", }) @@ -34,14 +34,14 @@ deadlock.add_tier({ technology = "logistics-2", order = "b", loader_ingredients = { - {"transport-belt-loader", 1}, - {"iron-gear-wheel", 20}, + {name = "transport-belt-loader", type = "item", amount = 1}, + {name = "iron-gear-wheel", type = "item", amount = 20}, }, beltbox_ingredients = { - {"transport-belt-beltbox", 1}, - {"iron-plate", 20}, - {"iron-gear-wheel", 20}, - {"advanced-circuit", 2}, + {name = "transport-belt-beltbox", type = "item", amount = 1}, + {name = "iron-plate", type = "item", amount = 20}, + {name = "iron-gear-wheel", type = "item", amount = 20}, + {name = "advanced-circuit", type = "item", amount = 2}, }, beltbox_technology = "deadlock-stacking-2", }) @@ -64,15 +64,15 @@ deadlock.add_tier({ technology = "logistics-3", order = "c", loader_ingredients = { - {"fast-transport-belt-loader", 1}, - {"iron-gear-wheel", 40}, + {name = "fast-transport-belt-loader", type = "item", amount = 1}, + {name = "iron-gear-wheel", type = "item", amount = 40}, {name = "lubricant", type = "fluid", amount = 20}, }, loader_category = "crafting-with-fluid", beltbox_ingredients = { - {"fast-transport-belt-beltbox", 1}, - {"iron-plate", 30}, - {"iron-gear-wheel", 30}, + {name = "fast-transport-belt-beltbox", type = "item", amount = 1}, + {name = "iron-plate", type = "item", amount = 30}, + {name = "iron-gear-wheel", type = "item", amount = 30}, {name = "lubricant", type = "fluid", amount = 100}, }, beltbox_category = "crafting-with-fluid", @@ -81,3 +81,32 @@ deadlock.add_tier({ if data.raw.technology["deadlock-stacking-3"] then table.insert(data.raw.technology["deadlock-stacking-3"].prerequisites, "deadlock-stacking-2") end + +if mods["space-age"] then + -- tier 4 + deadlock.add_tier({ + transport_belt = "turbo-transport-belt", + colour = {r=160, g=190, b=80}, + underground_belt = "turbo-underground-belt", + splitter = "turbo-splitter", + technology = "turbo-transport-belt", + order = "d", + loader_ingredients = { + {name = "fast-transport-belt-loader", type = "item", amount = 1}, + {name = "tungsten-plate", type = "item", amount = 20}, + {name = "lubricant", type = "fluid", amount = 20}, + }, + loader_category = "crafting-with-fluid", + beltbox_ingredients = { + {name = "fast-transport-belt-beltbox", type = "item", amount = 1}, + {name = "tungsten-plate", type = "item", amount = 15}, + {name = "iron-gear-wheel", type = "item", amount = 15}, + {name = "lubricant", type = "fluid", amount = 100}, + }, + beltbox_category = "crafting-with-fluid", + beltbox_technology = "deadlock-stacking-4", + }) + if data.raw.technology["deadlock-stacking-4"] then + table.insert(data.raw.technology["deadlock-stacking-4"].prerequisites, "deadlock-stacking-3") + end +end \ No newline at end of file