From 417e44eccb1e36a19a02bed5904343bc5ecf5da1 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 18 Mar 2023 14:44:14 -0700 Subject: [PATCH] matter use new func --- matter.lua | 95 +++++++++++------------------------------------------- 1 file changed, 18 insertions(+), 77 deletions(-) diff --git a/matter.lua b/matter.lua index 1e0d180..d4c8d84 100644 --- a/matter.lua +++ b/matter.lua @@ -1,87 +1,28 @@ -- Matter recipes for Krastorio2 if mods["Krastorio2"] then local util = require("data-util"); - local matter = require("__Krastorio2__/lib/public/data-stages/matter-util") - data:extend( - { - { - type = "technology", - name = "gold-matter-processing", - icons = - { - { - icon = util.k2assets().."/technologies/matter-stone.png", - icon_size = 256, - }, - { - icon = "__bzgold__/graphics/icons/gold-ore.png", - icon_size = 128, - scale = 1, - } - }, - prerequisites = {"kr-matter-processing"}, - unit = - { - count = 350, - ingredients = - { - {"production-science-pack", 1}, - {"utility-science-pack", 1}, - {"matter-tech-card", 1} - }, - time = 45 - } - }, - }) - matter.createMatterRecipe({ - item_name = "gold-ore", - minimum_conversion_quantity = 10, - matter_value = 30, - energy_required = 1, - need_stabilizer = false, - unlocked_by_technology = "gold-matter-processing" + util.k2matter({ + k2matter = { + item_name = "gold-ore", + matter_value = 30, + energy_required = 10, + need_stabilizer = false, + unlocked_by_technology = "gold-matter-processing", + }, + k2baseicon = "stone", + icon = {icon = "__bzgold__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1} }) - if util.me.silver() then - data:extend( - { - { - type = "technology", - name = "silver-matter-processing", - icons = - { - { - icon = util.k2assets().."/technologies/matter-stone.png", - icon_size = 256, - }, - { - icon = "__bzgold__/graphics/icons/silver-ore.png", - icon_size = 128, - scale = 1, - } - }, - prerequisites = {"kr-matter-processing"}, - unit = - { - count = 350, - ingredients = - { - {"production-science-pack", 1}, - {"utility-science-pack", 1}, - {"matter-tech-card", 1} - }, - time = 45 - } - }, - }) - matter.createMatterRecipe( { + util.k2matter({ + k2matter = { item_name = "silver-ore", - minimum_conversion_quantity = 10, matter_value = 8, - energy_required = 1, + energy_required = 5, need_stabilizer = false, - unlocked_by_technology = "silver-matter-processing" - }) - end + unlocked_by_technology = "silver-matter-processing", + }, + k2baseicon = "stone", + icon = {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1} + }) end