From da8b9385039bc3e3199b0c91aefbf69b651a14b8 Mon Sep 17 00:00:00 2001 From: Brevven Date: Thu, 20 Jan 2022 01:07:30 -0800 Subject: [PATCH] k2 ammo --- changelog.txt | 5 ++ info.json | 2 +- lead-recipe-updates.lua | 5 ++ lead-recipe.lua | 106 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 4f6cecf..0a8f077 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.6.5 +Date: 2022-01-10 + Fixes: + - Fix ammuntion options for K2 +--------------------------------------------------------------------------------------------------- Version: 0.6.4 Date: 2022-01-06 Changes: diff --git a/info.json b/info.json index 2670ea7..e481430 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzlead", - "version": "0.6.4", + "version": "0.6.5", "factorio_version": "1.1", "title": "Lead", "author": "Brevven", diff --git a/lead-recipe-updates.lua b/lead-recipe-updates.lua index 34ab166..134b999 100644 --- a/lead-recipe-updates.lua +++ b/lead-recipe-updates.lua @@ -32,6 +32,11 @@ 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"}) + if mods.Krastorio2 and util.me.get_setting("kr-more-realistic-weapon") then + util.add_effect("military", {type = "unlock-recipe", recipe = "rifle-magazine-iron-lead"}) + util.add_effect("military", {type = "unlock-recipe", recipe = "rifle-magazine-iron"}) + util.add_effect("military", {type = "unlock-recipe", recipe = "rifle-magazine-copper-lead"}) + end end -- Krastorio 2 changes diff --git a/lead-recipe.lua b/lead-recipe.lua index d7feb82..34fed13 100644 --- a/lead-recipe.lua +++ b/lead-recipe.lua @@ -137,6 +137,111 @@ data:extend({ end if util.me.more_ammo() then +if mods.Krastorio2 and util.me.get_setting("kr-more-realistic-weapon") then +data:extend({ +{ + type = "recipe", + name = "firearm-magazine-iron-lead", + category = "crafting", + order = "a[basic-clips]-a01[pistol-magazine]-i", + energy_required = 1, + ingredients = {{"lead-plate", 2}, {"iron-plate", 3}}, + result = "firearm-magazine", + result_count = 2, + enabled = false, + icons = { + { icon = util.k2assets().."/icons/items-with-variations/ammo/pistol-ammo-1.png", icon_size = 64}, + { icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64, + scale=0.25, shift= {8, -6}}, + { icon = "__bzlead__/graphics/icons/lead-plate.png", + icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -6}}, + }, +}, +{ + type = "recipe", + name = "firearm-magazine-iron-only", + category = "crafting", + order = "a[basic-clips]-a01[pistol-magazine]-io", + energy_required = 0.5, + ingredients = {{"iron-plate", 3}}, + result = "firearm-magazine", + enabled = false, + icons = { + { icon = util.k2assets().."/icons/items-with-variations/ammo/pistol-ammo-1.png", icon_size = 64}, + { icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64, + scale=0.25, shift= {8, -6}}, + }, +}, +{ + type = "recipe", + name = "firearm-magazine-copper-lead", + category = "crafting", + order = "a[basic-clips]-a01[pistol-magazine]-lc", + energy_required = 0.5, + ingredients = {{"lead-plate", 1}, {"copper-plate", 1}}, + result = "firearm-magazine", + enabled = false, + icons = { + { icon = util.k2assets().."/icons/items-with-variations/ammo/pistol-ammo-1.png", icon_size = 64}, + { icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, + scale=0.25, shift= {8, -6}}, + { icon = "__bzlead__/graphics/icons/lead-plate.png", + icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -6}}, + }, +}, +{ + type = "recipe", + name = "rifle-magazine-iron-lead", + category = "crafting", + order = "a[basic-clips]-a03[rifle-magazine]-i", + energy_required = 2, + ingredients = {{"lead-plate", 2}, {"iron-plate", 3}, {"copper-plate", 2}}, + result = "rifle-magazine", + result_count = 2, + enabled = false, + icons = { + { icon = util.k2assets().."/icons/items-with-variations/ammo/rifle-ammo-1.png", icon_size = 64}, + { icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64, + scale=0.25, shift= {8, -6}}, + { icon = "__bzlead__/graphics/icons/lead-plate.png", + icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -6}}, + }, +}, +{ + type = "recipe", + name = "rifle-magazine-iron", + category = "crafting", + order = "a[basic-clips]-a03[rifle-magazine]-io", + energy_required = 1, + ingredients = {{"iron-plate", 4}, {"copper-plate", 1}}, + result = "rifle-magazine", + enabled = false, + icons = { + { icon = util.k2assets().."/icons/items-with-variations/ammo/rifle-ammo-1.png", icon_size = 64}, + { icon = "__base__/graphics/icons/iron-plate.png", icon_size = 64, + scale=0.25, shift= {8, -6}}, + }, +}, +{ + type = "recipe", + name = "rifle-magazine-copper-lead", + category = "crafting", + order = "a[basic-clips]-a03[rifle-magazine]-lc", + energy_required = 1, + ingredients = {{"lead-plate", 3}, {"copper-plate", 1}}, + result = "rifle-magazine", + enabled = false, + icons = { + { icon = util.k2assets().."/icons/items-with-variations/ammo/rifle-ammo-1.png", icon_size = 64}, + { icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, + scale=0.25, shift= {8, -6}}, + { icon = "__bzlead__/graphics/icons/lead-plate.png", + icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -6}}, + }, +}, +}) + +else data:extend({ { type = "recipe", @@ -190,3 +295,4 @@ data:extend({ }, }) end +end