From 118b9be180b09a66fd9b506bb93ebbaec4ea0a22 Mon Sep 17 00:00:00 2001 From: Aaron Veden Date: Sat, 27 Feb 2021 14:48:43 -0800 Subject: [PATCH] see changelog --- changelog.txt | 5 +++ data-updates.lua | 13 ++++++++ locale/en/locale.cfg | 7 ++++- prototypes/Buildings.lua | 36 ++++++++++++++++++++- settings.lua | 67 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index f344cd7..7f43080 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,11 @@ --------------------------------------------------------------------------------------------------- Version: 1.0.4 Date: 07. 02. 2021 + Improvements: + - Made advanced structures module slots configurable through a mod setting + - Add resistance to hardened pipes mod for electric, poison, and laser + Tweaks: + - Increased advanced module slots to 4 Bugfixes: - Fixed research appearing to early on research screen diff --git a/data-updates.lua b/data-updates.lua index 1c6b974..2eda658 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -34,3 +34,16 @@ local constants = require("libs/Constants") -- pipe_connections = {{ position = {1, 2} }} -- } -- } + + +if mods["hardened_pipes"] then + local entity = data.raw["pipe"]["PCHP-hardened-pipe"] + entity.resistances[#entity.resistances+1] = {type="laser",percent=80} + entity.resistances[#entity.resistances+1] = {type="electric",percent=80} + entity.resistances[#entity.resistances+1] = {type="poison",percent=80} + + entity = data.raw["pipe-to-ground"]["PCHP-hardened-pipe-to-ground"] + entity.resistances[#entity.resistances+1] = {type="laser",percent=80} + entity.resistances[#entity.resistances+1] = {type="electric",percent=80} + entity.resistances[#entity.resistances+1] = {type="poison",percent=80} +end diff --git a/locale/en/locale.cfg b/locale/en/locale.cfg index e650172..247a380 100644 --- a/locale/en/locale.cfg +++ b/locale/en/locale.cfg @@ -79,7 +79,12 @@ rampant-industry-enableAdvanceChemicalPlant=Enable Advanced Chemical Plant rampant-industry-enableAdvanceElectricFurnace=Enable Advanced Electric Furnace rampant-industry-enableAdvanceFurnace=Enable Advanced Furnace rampant-industry-enableAdvanceOilRefinery=Enable Advanced Oil Refinery - +rampant-industry--advanced-lab-module-slots=Advanced Lab Module slots +rampant-industry--advanced-assembler-module-slots=Advanced Assembler Module slots +rampant-industry--advanced-refinery-module-slots=Advanced Refinery Module slots +rampant-industry--advanced-furnace-module-slots=Advanced Furnace Module slots +rampant-industry--advanced-electric-furnace-module-slots=Advanced Electric Furnace Module slots +rampant-industry--advanced-chemical-plant-module-slots=Advanced Chemical Plant Module slots [mod-setting-description] rampant-industry-airFilterCooldown=The time in ticks that will pass before pollution will be inserted into a rampant air filter diff --git a/prototypes/Buildings.lua b/prototypes/Buildings.lua index f306228..10bee5b 100644 --- a/prototypes/Buildings.lua +++ b/prototypes/Buildings.lua @@ -88,7 +88,7 @@ function buildings.enable() lab.module_specification = { - module_slots = 2, + module_slots = settings.startup["rampant-industry--advanced-lab-module-slots"].value, module_info_icon_shift = {0, 0.9} } @@ -1024,6 +1024,14 @@ function buildings.enable() steelFurnace.fast_replaceable_group = nil steelFurnace.next_upgrade = nil + steelFurnace.module_specification = + { + module_slots = settings.startup["rampant-industry--advanced-furnace-module-slots"].value, + module_info_icon_shift = {0, 0.9} + } + + steelFurnace.allowed_effects = {"speed", "productivity", "consumption", "pollution"} + steelFurnace.energy_source = { type = "burner", fuel_category = "chemical", @@ -1148,6 +1156,12 @@ function buildings.enable() refinery.fast_replaceable_group = nil refinery.next_upgrade = nil + refinery.module_specification = + { + module_slots = settings.startup["rampant-industry--advanced-refinery-module-slots"].value, + module_info_icon_shift = {0, 0.9} + } + refinery.fluid_boxes = { { production_type = "input", @@ -1347,6 +1361,13 @@ function buildings.enable() } assembler.energy_usage = "5MW" + assembler.module_specification = + { + module_slots = settings.startup["rampant-industry--advanced-assembler-module-slots"].value, + module_info_icon_shift = {0, 0.9} + } + + local item = table.deepcopy(data.raw["item"]["assembling-machine-3"]) item.name = "advanced-assembler-rampant-industry" item.icon = nil @@ -1440,6 +1461,12 @@ function buildings.enable() emissions_per_minute = 13.5 } + electricFurnace.module_specification = + { + module_slots = settings.startup["rampant-industry--advanced-electric-furnace-module-slots"].value, + module_info_icon_shift = {0, 0.9} + } + electricFurnace.energy_usage = "2511kW" local item = table.deepcopy(data.raw["item"]["electric-furnace"]) @@ -1574,6 +1601,13 @@ function buildings.enable() assembler.fast_replaceable_group = nil assembler.next_upgrade = nil + assembler.module_specification = + { + module_slots = settings.startup["rampant-industry--advanced-chemical-plant-module-slots"].value, + module_info_icon_shift = {0, 0.9} + } + + assembler.fluid_boxes = { { production_type = "input", diff --git a/settings.lua b/settings.lua index f076fa5..20edb6b 100644 --- a/settings.lua +++ b/settings.lua @@ -123,6 +123,73 @@ data:extend({ per_user = false }, + { + type = "int-setting", + name = "rampant-industry--advanced-chemical-plant-module-slots", + setting_type = 'startup', + min_value = 1, + max_value = 32, + default_value = 4, + order = "a[projectile]-a[collide]", + per_user = false + }, + + { + type = "int-setting", + name = "rampant-industry--advanced-electric-furnace-module-slots", + setting_type = 'startup', + min_value = 1, + max_value = 32, + default_value = 4, + order = "a[projectile]-a[collide]", + per_user = false + }, + + { + type = "int-setting", + name = "rampant-industry--advanced-furnace-module-slots", + setting_type = 'startup', + min_value = 1, + max_value = 32, + default_value = 4, + order = "a[projectile]-a[collide]", + per_user = false + }, + + { + type = "int-setting", + name = "rampant-industry--advanced-lab-module-slots", + setting_type = 'startup', + min_value = 1, + max_value = 32, + default_value = 4, + order = "a[projectile]-a[collide]", + per_user = false + }, + + { + type = "int-setting", + name = "rampant-industry--advanced-refinery-module-slots", + setting_type = 'startup', + min_value = 1, + max_value = 32, + default_value = 4, + order = "a[projectile]-a[collide]", + per_user = false + }, + + { + type = "int-setting", + name = "rampant-industry--advanced-assembler-module-slots", + setting_type = 'startup', + min_value = 1, + max_value = 32, + default_value = 4, + order = "a[projectile]-a[collide]", + per_user = false + } + + -- { -- type = "bool-setting", -- name = "rampant-industry-infiniteSpouts",