optional ammo recipes
This commit is contained in:
parent
c105870781
commit
fcfc3e7b15
7 changed files with 79 additions and 1 deletions
|
|
@ -1,4 +1,9 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.6.2
|
||||
Date: 2022-01-03
|
||||
Changes:
|
||||
- Add an option for more ammunition recipes.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.6.1
|
||||
Date: 2022-01-01
|
||||
Changes:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bzlead",
|
||||
"version": "0.6.1",
|
||||
"version": "0.6.2",
|
||||
"factorio_version": "1.1",
|
||||
"title": "Lead",
|
||||
"author": "Brevven",
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting
|
|||
util.replace_ingredient("shotgun-shell", "iron-plate", "lead-plate")
|
||||
end
|
||||
|
||||
if util.me.more_ammo() then
|
||||
util.add_effect("military", {type = "unlock-recipe", recipe = "firearm-magazine-iron-lead"})
|
||||
util.add_effect("military", {type = "unlock-recipe", recipe = "firearm-magazine-iron-only"})
|
||||
util.add_effect("military", {type = "unlock-recipe", recipe = "firearm-magazine-copper-lead"})
|
||||
end
|
||||
|
||||
-- Krastorio 2 changes
|
||||
util.add_ingredient("kr-laser-artillery-turret", "lead-plate", 10)
|
||||
util.add_ingredient("kr-railgun-turret", "lead-plate", 10)
|
||||
|
|
|
|||
|
|
@ -135,3 +135,58 @@ data:extend({
|
|||
},
|
||||
})
|
||||
end
|
||||
|
||||
if util.me.more_ammo() then
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "firearm-magazine-iron-lead",
|
||||
category = "crafting",
|
||||
order = "a[basic-clips]-a[firearm-magazine]-i",
|
||||
energy_required = data.raw.recipe["firearm-magazine"].energy_required * 2,
|
||||
ingredients = {{"lead-plate", 4}, {"iron-plate", 5}},
|
||||
result = "firearm-magazine",
|
||||
result_count = 2,
|
||||
enabled = false,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/firearm-magazine.png", icon_size = 64},
|
||||
{ icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64,
|
||||
scale=0.25, shift= {8, -8}},
|
||||
{ icon = "__bzlead__/graphics/icons/lead-plate.png",
|
||||
icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}},
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "firearm-magazine-iron-only",
|
||||
category = "crafting",
|
||||
order = "a[basic-clips]-a[firearm-magazine]-io",
|
||||
energy_required = data.raw.recipe["firearm-magazine"].energy_required,
|
||||
ingredients = {{"iron-plate", 5}},
|
||||
result = "firearm-magazine",
|
||||
enabled = false,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/firearm-magazine.png", icon_size = 64},
|
||||
{ icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64,
|
||||
scale=0.25, shift= {8, -8}},
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "firearm-magazine-copper-lead",
|
||||
category = "crafting",
|
||||
order = "a[basic-clips]-a[firearm-magazine]-c",
|
||||
energy_required = data.raw.recipe["firearm-magazine"].energy_required,
|
||||
ingredients = {{"lead-plate", 3}, {"copper-plate", 1}},
|
||||
result = "firearm-magazine",
|
||||
enabled = false,
|
||||
icons = {
|
||||
{ icon = "__base__/graphics/icons/firearm-magazine.png", icon_size = 64},
|
||||
{ icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64,
|
||||
scale=0.25, shift= {8, -8}},
|
||||
{ icon = "__bzlead__/graphics/icons/lead-plate.png",
|
||||
icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@ dirty-water-filtration-lead=Filter dirty water, giving lead ore [item=lead-ore],
|
|||
[mod-setting-name]
|
||||
bzlead-recipe-bypass=Bypass recipes
|
||||
bzlead-more-entities=Lead entities
|
||||
bzlead-more-ammo=More recipes for ammunition.
|
||||
|
||||
[mod-setting-description]
|
||||
bzlead-recipe-bypass=Skip modifying these recipes (comma-separated list).
|
||||
bzlead-more-entities=Adds lead entities (currently just a lead chest).
|
||||
bzlead-more-ammo=Default is lead-only. This adds other options.
|
||||
|
|
|
|||
3
me.lua
3
me.lua
|
|
@ -9,6 +9,9 @@ function me.more_entities()
|
|||
return me.get_setting("bzlead-more-entities") == "yes"
|
||||
end
|
||||
|
||||
function me.more_ammo()
|
||||
return me.get_setting("bzlead-more-ammo") == "yes"
|
||||
end
|
||||
|
||||
function me.get_setting(name)
|
||||
if settings.startup[name] == nil then
|
||||
|
|
|
|||
|
|
@ -13,4 +13,11 @@ data:extend({
|
|||
default_value = "no",
|
||||
allowed_values = {"yes", "no"},
|
||||
},
|
||||
{
|
||||
type = "string-setting",
|
||||
name = "bzlead-more-ammo",
|
||||
setting_type = "startup",
|
||||
default_value = "no",
|
||||
allowed_values = {"yes", "no"},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue