Fixing K2 matter stuff #1
4 changed files with 41 additions and 35 deletions
|
|
@ -115,12 +115,12 @@ end
|
||||||
function util.k2matter(params)
|
function util.k2matter(params)
|
||||||
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
local matter = require("__Krastorio2__/prototypes/libraries/matter")
|
||||||
if mods["space-exploration"] then
|
if mods["space-exploration"] then
|
||||||
params.k2matter.need_stabilizer = true
|
params.k2matter.needs_stabilizer = true
|
||||||
end
|
end
|
||||||
if not params.k2matter.minimum_conversion_quantity then
|
if not params.k2matter.minimum_conversion_quantity then
|
||||||
params.k2matter.minimum_conversion_quantity = 10
|
params.k2matter.minimum_conversion_quantity = 10
|
||||||
end
|
end
|
||||||
if not data.raw.technology[params.k2matter.unlocked_by_technology] then
|
if not data.raw.technology[params.k2matter.unlocked_by] then
|
||||||
local icon = ""
|
local icon = ""
|
||||||
if params.k2baseicon then
|
if params.k2baseicon then
|
||||||
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png"
|
icon = util.k2assets().."/technologies/matter-"..params.k2baseicon..".png"
|
||||||
|
|
@ -132,7 +132,7 @@ function util.k2matter(params)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
type = "technology",
|
type = "technology",
|
||||||
name = params.k2matter.unlocked_by_technology,
|
name = params.k2matter.unlocked_by,
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
@ -163,12 +163,17 @@ function util.k2matter(params)
|
||||||
},
|
},
|
||||||
time = 45,
|
time = 45,
|
||||||
},
|
},
|
||||||
localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
effects = {},
|
||||||
|
-- localised_name = {"technology-name.k2-conversion", {"item-name."..params.k2matter.item_name}},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
if params.k2matter.only_deconversion then
|
||||||
|
matter.make_deconversion_recipe(params.k2matter)
|
||||||
|
else
|
||||||
matter.make_recipes(params.k2matter)
|
matter.make_recipes(params.k2matter)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- se matter
|
-- se matter
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,31 @@
|
||||||
-- Matter recipes for Krastorio2
|
-- Matter recipes for Krastorio2
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
local util = require("data-util");
|
local util = require("data-util")
|
||||||
|
|
||||||
|
if not data.raw.recipe["kr-gold-ore-to-matter"] then
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
material = { type = "item", name = "gold-ore", amount = 30 },
|
material = { type = "item", name = "gold-ore", amount = 30 },
|
||||||
item_name = "gold-ore",
|
item_name = "gold-ore",
|
||||||
matter_count = 30,
|
matter_count = 30,
|
||||||
energy_required = 10,
|
energy_required = 10,
|
||||||
need_stabilizer = false,
|
needs_stabilizer = false,
|
||||||
unlocked_by_technology = "gold-matter-processing",
|
unlocked_by = "gold-matter-processing",
|
||||||
},
|
},
|
||||||
k2baseicon = "stone",
|
icon = { icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 0.5 },
|
||||||
icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1}
|
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
if settings.startup["bzgold-silver"].value then
|
||||||
util.k2matter({
|
util.k2matter({
|
||||||
k2matter = {
|
k2matter = {
|
||||||
material = { type = "item", name = "silver-ore", amount = 8 },
|
material = { type = "item", name = "silver-ore", amount = 8 },
|
||||||
item_name = "silver-ore",
|
item_name = "silver-ore",
|
||||||
matter_count = 8,
|
matter_count = 8,
|
||||||
energy_required = 5,
|
energy_required = 5,
|
||||||
need_stabilizer = false,
|
needs_stabilizer = false,
|
||||||
unlocked_by_technology = "silver-matter-processing",
|
unlocked_by = "silver-matter-processing",
|
||||||
},
|
},
|
||||||
k2baseicon = "stone",
|
icon = { icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 0.5 },
|
||||||
icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1}
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("data-util");
|
local util = require("data-util")
|
||||||
|
|
||||||
if mods.Krastorio2 then
|
if mods.Krastorio2 then
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ data:extend({
|
||||||
{
|
{
|
||||||
icon = data.raw.item["gold-ore"].icon,
|
icon = data.raw.item["gold-ore"].icon,
|
||||||
icon_size = data.raw.item["gold-ore"].icon_size,
|
icon_size = data.raw.item["gold-ore"].icon_size,
|
||||||
scale = 0.2,
|
scale = 0.2 * 64 / (data.raw.item["gold-ore"].icon_size or 64),
|
||||||
shift = {0, 4}
|
shift = {0, 4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local util = require("data-util");
|
local util = require("data-util")
|
||||||
|
|
||||||
if mods.Krastorio2 and util.me.silver() then
|
if mods.Krastorio2 and util.me.silver() then
|
||||||
data:extend({
|
data:extend({
|
||||||
|
|
@ -111,7 +111,7 @@ data:extend({
|
||||||
{
|
{
|
||||||
icon = data.raw.item["silver-ore"].icon,
|
icon = data.raw.item["silver-ore"].icon,
|
||||||
icon_size = data.raw.item["silver-ore"].icon_size,
|
icon_size = data.raw.item["silver-ore"].icon_size,
|
||||||
scale = 0.2,
|
scale = 0.2 * 64 / (data.raw.item["silver-ore"].icon_size or 64),
|
||||||
shift = {0, 4}
|
shift = {0, 4}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue