Skip to content

Commit

Permalink
Reduce number of Personal Battery tiers #181
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHawk committed May 27, 2024
1 parent 44f8f27 commit 49d9195
Show file tree
Hide file tree
Showing 20 changed files with 43 additions and 193 deletions.
1 change: 1 addition & 0 deletions bobequipment/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 1.3.0
Date: ???
Changes:
- Reduced the tier of electronics required for Personal roboport robot control #180
- Changed personal batteries to have four tiers rather than six #181
---------------------------------------------------------------------------------------------------
Version: 1.2.1
Date: 21. 02. 2024
Expand Down
Binary file modified bobequipment/graphics/equipment/battery-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bobequipment/graphics/equipment/battery-mk2-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bobequipment/graphics/equipment/battery-mk3-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bobequipment/graphics/equipment/battery-mk4-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified bobequipment/graphics/icons/technology/battery-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bobequipment/graphics/icons/technology/battery-mk2-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bobequipment/graphics/icons/technology/battery-mk3-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bobequipment/graphics/icons/technology/battery-mk4-equipment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions bobequipment/migrations/bobequipment_1.3.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"item":
[
["battery-mk5-equipment", "battery-mk4-equipment"],
["battery-mk6-equipment", "battery-mk4-equipment"]
],
"equipment":
[
["battery-mk5-equipment", "battery-mk4-equipment"],
["battery-mk6-equipment", "battery-mk4-equipment"]
]
}
56 changes: 5 additions & 51 deletions bobequipment/prototypes/equipment/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ data.raw["battery-equipment"]["battery-equipment"].sprite.filename =

data.raw["battery-equipment"]["battery-mk2-equipment"].sprite.filename =
"__bobequipment__/graphics/equipment/battery-mk2-equipment.png"
data.raw["battery-equipment"]["battery-mk2-equipment"].energy_source.buffer_capacity = "50MJ"
data.raw["battery-equipment"]["battery-mk2-equipment"].energy_source.input_flow_limit = "500MW"
data.raw["battery-equipment"]["battery-mk2-equipment"].energy_source.output_flow_limit = "500MW"
data.raw["battery-equipment"]["battery-mk2-equipment"].energy_source.buffer_capacity = "120MJ"
data.raw["battery-equipment"]["battery-mk2-equipment"].energy_source.input_flow_limit = "1200MW"
data.raw["battery-equipment"]["battery-mk2-equipment"].energy_source.output_flow_limit = "1200MW"

data:extend({
{
Expand All @@ -198,52 +198,6 @@ data:extend({
height = 2,
type = "full",
},
energy_source = {
type = "electric",
buffer_capacity = "120MJ",
input_flow_limit = "1200MW",
output_flow_limit = "1200MW",
usage_priority = "tertiary",
},
categories = { "armor" },
},
{
type = "battery-equipment",
name = "battery-mk4-equipment",
sprite = {
filename = "__bobequipment__/graphics/equipment/battery-mk4-equipment.png",
width = 32,
height = 64,
priority = "medium",
},
shape = {
width = 1,
height = 2,
type = "full",
},
energy_source = {
type = "electric",
buffer_capacity = "300MJ",
input_flow_limit = "3000MW",
output_flow_limit = "3000MW",
usage_priority = "tertiary",
},
categories = { "armor" },
},
{
type = "battery-equipment",
name = "battery-mk5-equipment",
sprite = {
filename = "__bobequipment__/graphics/equipment/battery-mk5-equipment.png",
width = 32,
height = 64,
priority = "medium",
},
shape = {
width = 1,
height = 2,
type = "full",
},
energy_source = {
type = "electric",
buffer_capacity = "750MJ",
Expand All @@ -255,9 +209,9 @@ data:extend({
},
{
type = "battery-equipment",
name = "battery-mk6-equipment",
name = "battery-mk4-equipment",
sprite = {
filename = "__bobequipment__/graphics/equipment/battery-mk6-equipment.png",
filename = "__bobequipment__/graphics/equipment/battery-mk4-equipment.png",
width = 32,
height = 64,
priority = "medium",
Expand Down
22 changes: 0 additions & 22 deletions bobequipment/prototypes/item/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,6 @@ data:extend({
stack_size = 50,
default_request_amount = 10,
},
{
type = "item",
name = "battery-mk5-equipment",
icon = "__bobequipment__/graphics/icons/technology/battery-mk5-equipment.png",
icon_size = 64,
placed_as_equipment_result = "battery-mk5-equipment",
subgroup = "equipment",
order = "c[battery]-e[battery-mk5-equipment]",
stack_size = 50,
default_request_amount = 10,
},
{
type = "item",
name = "battery-mk6-equipment",
icon = "__bobequipment__/graphics/icons/technology/battery-mk6-equipment.png",
icon_size = 64,
placed_as_equipment_result = "battery-mk6-equipment",
subgroup = "equipment",
order = "c[battery]-f[battery-mk6-equipment]",
stack_size = 50,
default_request_amount = 10,
},
})

data.raw.item["fusion-reactor-equipment"].icon =
Expand Down
32 changes: 9 additions & 23 deletions bobequipment/prototypes/recipe/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ data:extend({
},
})

data.raw.recipe["battery-mk2-equipment"].ingredients = { { "battery-equipment", 2 }, { "processing-unit", 5 } }
bobmods.lib.recipe.add_ingredient("battery-equipment", { "electronic-circuit", 5 } )

data.raw.recipe["battery-mk2-equipment"].ingredients = {
{ "battery-equipment", 2 },
{ "battery", 5 },
{ "advanced-circuit", 5 },
}

data:extend({
{
Expand All @@ -66,6 +72,7 @@ data:extend({
ingredients = {
{ "battery-mk2-equipment", 2 },
{ "battery", 5 },
{ "processing-unit", 5 },
},
result = "battery-mk3-equipment",
},
Expand All @@ -76,31 +83,10 @@ data:extend({
energy_required = 10,
ingredients = {
{ "battery-mk3-equipment", 2 },
{ "processing-unit", 5 },
},
result = "battery-mk4-equipment",
},
{
type = "recipe",
name = "battery-mk5-equipment",
enabled = false,
energy_required = 10,
ingredients = {
{ "battery-mk4-equipment", 2 },
{ "battery", 5 },
},
result = "battery-mk5-equipment",
},
{
type = "recipe",
name = "battery-mk6-equipment",
enabled = false,
energy_required = 10,
ingredients = {
{ "battery-mk5-equipment", 2 },
{ "processing-unit", 5 },
},
result = "battery-mk6-equipment",
result = "battery-mk4-equipment",
},
})

Expand Down
20 changes: 8 additions & 12 deletions bobequipment/prototypes/recipe/updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("energy-shield-mk6-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.recipe.replace_ingredient("battery-mk4-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("bob-battery-equipment-4", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient("battery-mk6-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.recipe.replace_ingredient("fusion-reactor-equipment-2", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("fusion-reactor-equipment-2", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient("fusion-reactor-equipment-3", "processing-unit", "advanced-processing-unit")
Expand Down Expand Up @@ -394,8 +393,8 @@ if data.raw.item["titanium-bearing"] then
end

if data.raw.item["silver-zinc-battery"] then
bobmods.lib.recipe.replace_ingredient("battery-mk5-equipment", "battery", "silver-zinc-battery")
bobmods.lib.tech.add_prerequisite("bob-battery-equipment-5", "battery-3")
bobmods.lib.recipe.replace_ingredient("battery-mk4-equipment", "battery", "silver-zinc-battery")
bobmods.lib.tech.add_prerequisite("bob-battery-equipment-4", "battery-3")
bobmods.lib.recipe.replace_ingredient("personal-laser-defense-equipment-5", "battery", "silver-zinc-battery")
bobmods.lib.tech.add_prerequisite("personal-laser-defense-equipment-5", "battery-3")
bobmods.lib.recipe.replace_ingredient("personal-laser-defense-equipment-6", "battery", "silver-zinc-battery")
Expand Down Expand Up @@ -491,49 +490,46 @@ end

if data.raw.item["alien-artifact-orange"] and data.raw.item["alien-artifact-blue"] then
bobmods.lib.recipe.add_new_ingredient("energy-shield-mk4-equipment", { "alien-artifact-orange", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk4-equipment", { "alien-artifact-orange", 5 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-2", { "alien-artifact-orange", 15 })

bobmods.lib.recipe.add_new_ingredient("energy-shield-mk4-equipment", { "alien-artifact-blue", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk4-equipment", { "alien-artifact-blue", 5 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-2", { "alien-artifact-blue", 15 })
elseif data.raw.item["alien-artifact"] then
bobmods.lib.recipe.add_new_ingredient("energy-shield-mk4-equipment", { "alien-artifact", 15 })
bobmods.lib.recipe.add_new_ingredient("battery-mk4-equipment", { "alien-artifact", 15 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-2", { "alien-artifact", 40 })
else
bobmods.lib.recipe.add_ingredient("fusion-reactor-equipment-2", { "processing-unit", 40 })
end

if data.raw.item["alien-artifact-yellow"] and data.raw.item["alien-artifact-purple"] then
bobmods.lib.recipe.add_new_ingredient("energy-shield-mk5-equipment", { "alien-artifact-yellow", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk5-equipment", { "alien-artifact-yellow", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk3-equipment", { "alien-artifact-yellow", 5 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-3", { "alien-artifact-yellow", 15 })

bobmods.lib.recipe.add_new_ingredient("energy-shield-mk5-equipment", { "alien-artifact-purple", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk5-equipment", { "alien-artifact-purple", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk3-equipment", { "alien-artifact-purple", 5 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-3", { "alien-artifact-purple", 15 })
elseif data.raw.item["alien-artifact"] then
bobmods.lib.recipe.add_new_ingredient("energy-shield-mk5-equipment", { "alien-artifact", 20 })
bobmods.lib.recipe.add_new_ingredient("battery-mk5-equipment", { "alien-artifact", 20 })
bobmods.lib.recipe.add_new_ingredient("battery-mk3-equipment", { "alien-artifact", 20 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-3", { "alien-artifact", 60 })
else
bobmods.lib.recipe.add_ingredient("fusion-reactor-equipment-3", { "processing-unit", 60 })
end

if data.raw.item["alien-artifact-red"] and data.raw.item["alien-artifact-green"] then
bobmods.lib.recipe.add_new_ingredient("energy-shield-mk6-equipment", { "alien-artifact-red", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk6-equipment", { "alien-artifact-red", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk4-equipment", { "alien-artifact-red", 5 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-4", { "alien-artifact-red", 15 })
bobmods.lib.recipe.add_new_ingredient("personal-laser-defense-equipment-6", { "alien-artifact-red", 5 })

bobmods.lib.recipe.add_new_ingredient("energy-shield-mk6-equipment", { "alien-artifact-green", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk6-equipment", { "alien-artifact-green", 5 })
bobmods.lib.recipe.add_new_ingredient("battery-mk4-equipment", { "alien-artifact-green", 5 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-4", { "alien-artifact-green", 15 })
bobmods.lib.recipe.add_new_ingredient("personal-laser-defense-equipment-6", { "alien-artifact-green", 5 })
elseif data.raw.item["alien-artifact"] then
bobmods.lib.recipe.add_new_ingredient("energy-shield-mk6-equipment", { "alien-artifact", 30 })
bobmods.lib.recipe.add_new_ingredient("battery-mk6-equipment", { "alien-artifact", 30 })
bobmods.lib.recipe.add_new_ingredient("battery-mk4-equipment", { "alien-artifact", 30 })
bobmods.lib.recipe.add_new_ingredient("fusion-reactor-equipment-4", { "alien-artifact", 80 })
bobmods.lib.recipe.add_new_ingredient("personal-laser-defense-equipment-6", { "alien-artifact", 10 })
else
Expand Down
70 changes: 8 additions & 62 deletions bobequipment/prototypes/technology/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ data.raw["technology"]["battery-mk2-equipment"].icons = bobmods.equipment.techno
icon_size = 64,
})
bobmods.lib.tech.remove_prerequisite("battery-mk2-equipment", "low-density-structure")
bobmods.lib.tech.remove_prerequisite("battery-mk2-equipment", "power-armor")
bobmods.lib.tech.add_prerequisite("battery-mk2-equipment", "chemical-science-pack")

data:extend({
{
Expand All @@ -151,15 +153,18 @@ data:extend({
}),
order = "g-i-c",
prerequisites = {
"advanced-electronics-2",
"battery-mk2-equipment",
"production-science-pack",
},
unit = {
count = 150,
time = 30,
count = 200,
time = 45,
ingredients = {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
},
},
effects = {
Expand All @@ -180,65 +185,6 @@ data:extend({
order = "g-i-d",
prerequisites = {
"bob-battery-equipment-3",
"production-science-pack",
},
unit = {
count = 200,
time = 45,
ingredients = {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
},
},
effects = {
{
type = "unlock-recipe",
recipe = "battery-mk4-equipment",
},
},
},

{
type = "technology",
name = "bob-battery-equipment-5",
icons = bobmods.equipment.technology_icon_constant_equipment({
icon = "__bobequipment__/graphics/icons/technology/battery-mk5-equipment.png",
icon_size = 64,
}),
order = "g-i-e",
prerequisites = {
"bob-battery-equipment-4",
},
unit = {
count = 250,
time = 45,
ingredients = {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
},
},
effects = {
{
type = "unlock-recipe",
recipe = "battery-mk5-equipment",
},
},
},

{
type = "technology",
name = "bob-battery-equipment-6",
icons = bobmods.equipment.technology_icon_constant_equipment({
icon = "__bobequipment__/graphics/icons/technology/battery-mk6-equipment.png",
icon_size = 64,
}),
order = "g-i-f",
prerequisites = {
"bob-battery-equipment-5",
"utility-science-pack",
},
unit = {
Expand All @@ -255,7 +201,7 @@ data:extend({
effects = {
{
type = "unlock-recipe",
recipe = "battery-mk6-equipment",
recipe = "battery-mk4-equipment",
},
},
},
Expand Down
Loading

0 comments on commit 49d9195

Please sign in to comment.