From ae0686c9145cb8ceae5dd9bf2c13ac763cc5f38b Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 17 Jul 2022 23:29:50 -0700 Subject: [PATCH] ad el adamo boiler --- data-updates.lua | 5 ++++- data.lua | 5 ++++- gas-boiler/data.lua | 45 +++++++++++++++++++++++++------------------- locale/en/boiler.cfg | 13 +++++++++++++ locale/en/gas.cfg | 2 ++ locale/ru/boiler.cfg | 13 +++++++++++++ me.lua | 4 ++++ prototypes/gas.lua | 3 ++- recipe-updates.lua | 5 +++++ settings.lua | 7 +++++++ 10 files changed, 80 insertions(+), 22 deletions(-) create mode 100644 locale/en/boiler.cfg create mode 100644 locale/ru/boiler.cfg diff --git a/data-updates.lua b/data-updates.lua index 9ea9b31..0aa233b 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -1,4 +1,3 @@ --- require("gas-boiler/data-updates") require("recipe-updates") -- require("tin-matter") -- require("omni") @@ -8,5 +7,9 @@ require("map-gen-preset-updates") local util = require("data-util"); +if util.me.use_boiler() then + require("gas-boiler/data-updates") +end + -- Must be last util.create_list() diff --git a/data.lua b/data.lua index c0d7805..225370e 100644 --- a/data.lua +++ b/data.lua @@ -4,9 +4,12 @@ require("prototypes/phenol") require("prototypes/formaldehyde") require("prototypes/bakelite") require("prototypes/basic-chemical-plant") --- require("gas-boiler/data") local util = require("data-util"); +if util.me.use_boiler() then + require("gas-boiler/data") +end + -- Must be last util.create_list() diff --git a/gas-boiler/data.lua b/gas-boiler/data.lua index ea03dd1..be88224 100644 --- a/gas-boiler/data.lua +++ b/gas-boiler/data.lua @@ -1,7 +1,14 @@ require("factsheet") + +-- Added by Brevven for bzgas +-- local gd = "__gas-boiler__" +local gd = "__bzgas__/gas-boiler" + + + gf_boiler_entity = util.table.deepcopy(data.raw.boiler.boiler) gf_boiler_entity.name = "gas-boiler" -gf_boiler_entity.icon = "__gas-boiler__/graphics/icons/gas-boiler.png" +gf_boiler_entity.icon = gd.."/graphics/icons/gas-boiler.png" gf_boiler_entity.icon_size = 32 gf_boiler_entity.minable.result = "gas-boiler" gf_boiler_entity.fast_replaceable_group = "boiler" @@ -14,14 +21,14 @@ gf_boiler_entity.energy_source = { pipe_covers = pipecoverspictures(), pipe_picture = { north = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."assembling-machine-1-pipe-N.png", priority = "extra-high", width = 35, height = 18, shift = util.by_pixel(2.5, 14), hr_version = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."hr-assembling-machine-1-pipe-N.png", priority = "extra-high", width = 71, @@ -31,14 +38,14 @@ gf_boiler_entity.energy_source = { } }, east = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."assembling-machine-1-pipe-E.png", priority = "extra-high", width = 20, height = 38, shift = util.by_pixel(-25, 1), hr_version = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."hr-assembling-machine-1-pipe-E.png", priority = "extra-high", width = 42, @@ -48,14 +55,14 @@ gf_boiler_entity.energy_source = { } }, south = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."assembling-machine-1-pipe-S.png", priority = "extra-high", width = 44, height = 31, shift = util.by_pixel(0, -31.5), hr_version = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."hr-assembling-machine-1-pipe-S.png", priority = "extra-high", width = 88, @@ -65,14 +72,14 @@ gf_boiler_entity.energy_source = { } }, west = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."assembling-machine-1-pipe-W.png", priority = "extra-high", width = 19, height = 37, shift = util.by_pixel(25.5, 1.5), hr_version = { - filename = "__gas-boiler__/graphics/entity/" + filename = gd.."/graphics/entity/" .."hr-assembling-machine-1-pipe-W.png", priority = "extra-high", width = 39, @@ -115,28 +122,28 @@ gf_boiler_entity.fire_flicker_enabled = false gf_boiler_entity.fire_glow_flicker_enabled = false gf_boiler_entity.fire = {} gf_boiler_entity.fire_glow.north.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "gas-boiler-N-light.png" gf_boiler_entity.fire_glow.south.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "gas-boiler-S-light.png" gf_boiler_entity.fire_glow.east.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "gas-boiler-E-light.png" gf_boiler_entity.fire_glow.west.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "gas-boiler-W-light.png" gf_boiler_entity.fire_glow.north.hr_version.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "hr-gas-boiler-N-light.png" gf_boiler_entity.fire_glow.south.hr_version.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "hr-gas-boiler-S-light.png" gf_boiler_entity.fire_glow.east.hr_version.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "hr-gas-boiler-E-light.png" gf_boiler_entity.fire_glow.west.hr_version.filename = - "__gas-boiler__/graphics/entity/".. + gd.."/graphics/entity/".. "hr-gas-boiler-W-light.png" gf_boiler_entity.fire_glow.north.apply_runtime_tint = true gf_boiler_entity.fire_glow.south.apply_runtime_tint = true @@ -155,7 +162,7 @@ gf_boiler_entity.fire_glow.west.blend_mode = "additive-soft" gf_boiler_item = util.table.deepcopy(data.raw.item.boiler) gf_boiler_item.name = "gas-boiler" gf_boiler_item.icon_size = 32 -gf_boiler_item.icon = "__gas-boiler__/graphics/icons/gas-boiler.png" +gf_boiler_item.icon = gd.."/graphics/icons/gas-boiler.png" gf_boiler_item.order = "b[steam-power]-b[gas-boiler]" gf_boiler_item.place_result = "gas-boiler" @@ -179,4 +186,4 @@ data:extend({ add_recipe_to_tech( "fluid-handling", "gas-boiler" -) \ No newline at end of file +) diff --git a/locale/en/boiler.cfg b/locale/en/boiler.cfg new file mode 100644 index 0000000..f8f57ae --- /dev/null +++ b/locale/en/boiler.cfg @@ -0,0 +1,13 @@ +gas-boiler=Gas-fired boiler + +[entity-name] +gas-boiler=Gas-fired boiler + +[entity-description] +gas-boiler=Burns fluids. + +[mod-setting-name] +vanilla-fluid-fuel-values=Make vanilla fluids burnable + +[mod-setting-description] +vanilla-fluid-fuel-values=Fuel_value from solid-fuel proportionally applied to vanilla petroleum fluids. \ No newline at end of file diff --git a/locale/en/gas.cfg b/locale/en/gas.cfg index 9e03d81..d783207 100644 --- a/locale/en/gas.cfg +++ b/locale/en/gas.cfg @@ -38,10 +38,12 @@ bakelite=A simple, but useful plastic bzgas-recipe-bypass=Bypass recipes bzgas-list=Make a list of modified recipes bzgas-more-intermediates=Enable more intermediates +bzgas-boiler=Enable ElAdamo's fluid boiler [mod-setting-description] bzgas-recipe-bypass=Skip modifying these recipes (comma-separated list). bzgas-list=If enabled, the text command [color=orange]BZList[/color] will dump a file to the script-output directory with a full list of recipes modified.\nRecommended to turn this off after you are done configuring your other settings. +bzgas-boiler=Natural gas mod currenlty can incorporate ElAdamo's public domain fluid boiler. If that mod is updated to 1.1, this may be removed. [string-mod-setting] bzgas-more-intermediates-no=No diff --git a/locale/ru/boiler.cfg b/locale/ru/boiler.cfg new file mode 100644 index 0000000..6ce380c --- /dev/null +++ b/locale/ru/boiler.cfg @@ -0,0 +1,13 @@ +gas-boiler=Бойлер на жидком топливе + +[entity-name] +gas-boiler=Бойлер на жидком топливе + +[entity-description] +gas-boiler=Сжигает нефть и нефтепродукты для генерации пара. + +[mod-setting-name] +vanilla-fluid-fuel-values=Пропорциональность теплотворности + +[mod-setting-description] +vanilla-fluid-fuel-values=Теплотворность жидкостей пропорциональна теплотворности твердого топлива. diff --git a/me.lua b/me.lua index 941c443..9a47696 100644 --- a/me.lua +++ b/me.lua @@ -3,6 +3,10 @@ local me = {} me.name = "bzgas" me.list = {} +function me.use_boiler() + return me.get_setting("bzgas-boiler") +end + function me.use_phenol() return me.get_setting("bzgas-more-intermediates") == "phenol" end diff --git a/prototypes/gas.lua b/prototypes/gas.lua index ceed838..b1eb7a9 100644 --- a/prototypes/gas.lua +++ b/prototypes/gas.lua @@ -128,7 +128,8 @@ data:extend({ name = "gas", default_temperature = 25, heat_capacity = "0.1KJ", - fuel_value = "1KJ", + fuel_value = "1000KJ", + emissions_multiplier = 0.75, base_color = {r=0.67, g=0.87, b=0.77}, flow_color = {r=0.67, g=0.87, b=0.87}, icon = "__bzgas__/graphics/icons/gas.png", diff --git a/recipe-updates.lua b/recipe-updates.lua index 7c70d76..8d0b2e2 100644 --- a/recipe-updates.lua +++ b/recipe-updates.lua @@ -4,3 +4,8 @@ if util.me.use_phenol() then util.multiply_recipe("plastic-bar", 3) util.replace_some_ingredient("plastic-bar", "petroleum-gas", 15, "phenol", 1) end + +util.remove_ingredient("gas-boiler", "pump") +util.add_ingredient("gas-boiler", "pipe", 1) +util.add_ingredient("gas-boiler", "solder", 1) +util.add_effect("gas-extraction", {type="unlock-recipe", recipe="gas-boiler"}) diff --git a/settings.lua b/settings.lua index 860ab92..c36e9ae 100644 --- a/settings.lua +++ b/settings.lua @@ -1,3 +1,4 @@ +require("gas-boiler/settings") data:extend({ { type = "string-setting", @@ -19,4 +20,10 @@ data:extend({ default_value = "phenol", allowed_values = {"phenol", "no"}, }, + { + type = "bool-setting", + name = "bzgas-boiler", + setting_type = "startup", + default_value = true, + }, })