bronze
This commit is contained in:
parent
21eacb9184
commit
253d6d9430
11 changed files with 72 additions and 4 deletions
|
|
@ -1,4 +1,9 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.3
|
||||
Date: 2022-07-06
|
||||
Features:
|
||||
- Optional bronze plate item added, defaults to not enabled.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.2
|
||||
Date: 2022-07-06
|
||||
Features:
|
||||
|
|
|
|||
BIN
graphics/icons/bronze-plate.png
Normal file
BIN
graphics/icons/bronze-plate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
graphics/icons/bronze-plate.xcf
Normal file
BIN
graphics/icons/bronze-plate.xcf
Normal file
Binary file not shown.
BIN
graphics/icons/stacked/bronze-plate-stacked.png
Normal file
BIN
graphics/icons/stacked/bronze-plate-stacked.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
graphics/icons/stacked/bronze-plate-stacked.xcf
Normal file
BIN
graphics/icons/stacked/bronze-plate-stacked.xcf
Normal file
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bztin",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"factorio_version": "1.1",
|
||||
"title": "Tin",
|
||||
"author": "Brevven",
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ solder=Solder
|
|||
tinned-cable=Tinned cable
|
||||
enriched-tin=Enriched tin
|
||||
compressed-tin-ore=Compressed tin ore
|
||||
bronze-plate=Bronze plate
|
||||
|
||||
[item-description]
|
||||
tin-ore=Can be smelted into tin plates
|
||||
|
|
@ -59,4 +60,5 @@ bztin-list=If enabled, the text command [color=orange]BZList[/color] will dump a
|
|||
|
||||
[string-mod-setting]
|
||||
bztin-more-intermediates-no=No
|
||||
bztin-more-intermediates-cable=Yes: Tinned cable
|
||||
bztin-more-intermediates-cable=Yes: Only tinned cable
|
||||
bztin-more-intermediates-bronze=Yes: Tinned cable & Bronze
|
||||
|
|
|
|||
6
me.lua
6
me.lua
|
|
@ -4,7 +4,11 @@ me.name = "bztin"
|
|||
me.list = {}
|
||||
|
||||
function me.use_cable()
|
||||
return me.get_setting("bztin-more-intermediates") == "cable"
|
||||
return me.get_setting("bztin-more-intermediates") == "cable" or me.use_bronze()
|
||||
end
|
||||
|
||||
function me.use_bronze()
|
||||
return me.get_setting("bztin-more-intermediates") == "bronze"
|
||||
end
|
||||
|
||||
function me.get_setting(name)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ data:extend({
|
|||
name = "bztin-more-intermediates",
|
||||
setting_type = "startup",
|
||||
default_value = (mods.Krastorio2 or mods["space-exploration"]) and "cable" or "no",
|
||||
allowed_values = {"cable", "no"},
|
||||
allowed_values = {"bronze", "cable", "no"},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -143,3 +143,19 @@ if util.me.use_cable() then
|
|||
util.replace_ingredient("buisart-lab", "copper-cable", "tinned-cable")
|
||||
util.replace_ingredient("energy-absorber", "copper-cable", "tinned-cable")
|
||||
end
|
||||
|
||||
if util.me.use_bronze() then
|
||||
local fast_i = mods.bzaluminum and "aluminum-plate" or "iron-plate"
|
||||
util.replace_some_ingredient("fast-inserter", fast_i, 1, "bronze-plate", 1)
|
||||
if mods.Krastorio2 then
|
||||
util.replace_some_ingredient("filter-inserter", fast_i, 1, "bronze-plate", 1)
|
||||
util.replace_ingredient("kr-steel-pump", "steel-beam", "bronze-plate", 4)
|
||||
end
|
||||
|
||||
util.replace_ingredient("pump", "steel-plate", "bronze-plate", 2)
|
||||
util.replace_ingredient("storage-tank", "steel-plate", "bronze-plate", 10)
|
||||
|
||||
util.add_ingredient("electric-engine-unit", "bronze-plate", 1)
|
||||
|
||||
util.replace_some_ingredient("se-heavy-bearing", "se-iridium-plate", 1, "bronze-plate", 1)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -167,4 +167,45 @@ data:extend({
|
|||
util.add_prerequisite("tinned-cable", "copper-processing")
|
||||
end
|
||||
|
||||
if util.me.use_bronze() then
|
||||
local bronze_i = {}
|
||||
bronze_i["copper-plate"] = 17
|
||||
bronze_i["tin-plate"] = 3
|
||||
if mods.bzaluminum then
|
||||
bronze_i["copper-plate"] = bronze_i["copper-plate"] - 1
|
||||
bronze_i["aluminum-plate"] = 1
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "bronze-plate",
|
||||
icon = "__bztin__/graphics/icons/bronze-plate.png",
|
||||
icon_size = 128,
|
||||
subgroup = "intermediate-product",
|
||||
order = "b[bronze-plate]",
|
||||
stack_size = util.get_stack_size(100),
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "bronze-plate",
|
||||
category = "advanced-crafting",
|
||||
order = "d[bronze-plate]",
|
||||
enabled = false,
|
||||
energy_required = 60,
|
||||
ingredients = {},
|
||||
results = {{"bronze-plate", 20}},
|
||||
},
|
||||
})
|
||||
for item, count in pairs(bronze_i) do
|
||||
util.add_ingredient("bronze-plate", item, count)
|
||||
end
|
||||
if mods.bzfoundry then
|
||||
util.add_effect("foundry", { type = "unlock-recipe", recipe = "bronze-plate" })
|
||||
util.add_prerequisite("fast-inserter", "foundry")
|
||||
util.set_to_founding("bronze-plate")
|
||||
else
|
||||
util.add_effect("automation", { type = "unlock-recipe", recipe = "bronze-plate" })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue