diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bbf3e21 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[*] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85e49ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*.zip \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 11be59f..0000000 --- a/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# General makefile for factorio mods. -# -# Presumes the development work is done in a /dev// -# directory where this makefile resides. This directory must be parallel to -# the /mods/ directory where mods are installed. Run `make -# install` from dev/ to install the mod as a zip file. That zip file -# should also be ready to upload to the mod portal - -.PHONY: copy lint-changelog install - -libdir = "../bzlib" -libfiles = $(shell ls $(libdir)/*.lua | grep -o '[^/]*.lua') -pwd = $(shell pwd) -v = $(shell basename "$(pwd)")_$(shell jq -r .version info.json) - -link: - for f in $(libfiles) ; do \ - echo "using $(libdir)/$$f" ;\ - cp $(libdir)/$$f .; \ - done; - -copy: link - rm -rf ../$(v) - mkdir -p ../$(v) - cp -rf * ../$(v) - rm -f ../$(v).zip - cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*" - -install: lint-changelog copy - cp -f ../$(v).zip ../../mods/ - -lint-changelog: copy - python3 ../da-changelog-tools_0.0.14/changelog-checker.py --changelog ../$(v).zip - -zorro: - python3 ../da-changelog-tools_0.0.14/changelog-checker.py --zorro --changelog ../$(v).zip - diff --git a/README.md b/README.md index cf5db8d..0106f52 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,26 @@ +**This is an unofficial update to Factorio 2.0 and it stays until Brevven takes over again.** + +**Compatibility with Space Age is explicitly excluded until someone integrates it nicely.** + # Natural Gas +Adds natural gas to the game, extracted with drilling rigs. Adds bakelite (an early game plastic) and other intermediates. -[factorio mod page](https://mods.factorio.com/mod/bzgas) +This mod mostly impacts the early game including electronic circuit creation. With ElAdamo's gas-fired boiler (integrated, optionally), it provides an alternate power source. -Adds natural gas to the base game - -## Version History -See changelog.txt - -## Created by - -- [brevven](https://mods.factorio.com/user/brevven) (code, design, graphics) +## Credits +- Brevven ([Original mod](https://mods.factorio.com/mod/bzgas)) +- [cackling fiend](https://mods.factorio.com/user/cackling.fiend) (Update to 2.0) - [ElAdamo](https://mods.factorio.com/user/ElAdamo) (Gas-fired boiler: code, design, graphics) (code is public domain) - -## Thanks to - [Sakuro](https://github.com/sakuro) (expand options, icon tweaks) -- [Benjah-bmm27](https://commons.wikimedia.org/wiki/User:Benjah-bmm27) ([Formaldehyde icon](https://commons.wikimedia.org/wiki/File:Formaldehyde-3D-vdW.png), public domain) +- [Benjah-bmm27](https://commons.wikimedia.org/wiki/User:Benjah-bmm27) ([Formaldehyde icon](https://commons.wikimedia.org/wiki/File:Formaldehyde-3D-vdW.png), + public domain) ### Compatibility - [nihilistzsche](https://github.com/nihilistzsche) ### Localization - - [RiCZrd](https://mods.factorio.com/user/RiCZrd) (cs) - [Sakuro](https://github.com/sakuro) (ja) - [Pergamum663](https://github.com/Pergamum663) (ru) - [sunnytan53](https://github.com/sunnytan53) (zh-CN) -- [CV514](https://github.com/CV514) (ru) +- [CV514](https://github.com/CV514) (ru) \ No newline at end of file diff --git a/LICENSE b/bzgas2/LICENSE similarity index 100% rename from LICENSE rename to bzgas2/LICENSE diff --git a/bzgas2/changelog.txt b/bzgas2/changelog.txt new file mode 100644 index 0000000..db6a1b0 --- /dev/null +++ b/bzgas2/changelog.txt @@ -0,0 +1,5 @@ +--------------------------------------------------------------------------------------------------- +Version: 2.0.0 +Date: 19.10.2025 + Changes: + - Update to Factorio 2.0 \ No newline at end of file diff --git a/compatibility/248k.lua b/bzgas2/compatibility/248k.lua similarity index 70% rename from compatibility/248k.lua rename to bzgas2/compatibility/248k.lua index bdf37ea..d16aab8 100644 --- a/compatibility/248k.lua +++ b/bzgas2/compatibility/248k.lua @@ -1,17 +1,17 @@ local util = require("data-util"); -if mods["248k"] then +if mods["248k-Redux"] then data:extend({ { type = "recipe", name = "acid-gas-breakdown", icons = { - {icon = "__bzgas__/graphics/icons/gas.png", icon_size = 128}, - {icon = "__248k__/ressources/fluids/fi_acid_gas.png", icon_size = 64, scale=0.25, shift={-8,-8}}, + {icon = "__bzgas2__/graphics/icons/gas.png", icon_size = 128}, + {icon = "__248k-Redux-graphics__/ressources/fluids/fi_acid_gas.png", icon_size = 64, scale=0.25, shift={-8,-8}}, }, category = "chemistry", subgroup = "fi_item_subgroup_f", - enabled = "false", + enabled = false, energy_required = 3, ingredients = { {type="fluid", name="fi_acid_gas", amount=10}, diff --git a/compatibility/5dims.lua b/bzgas2/compatibility/5dims.lua similarity index 100% rename from compatibility/5dims.lua rename to bzgas2/compatibility/5dims.lua diff --git a/compatibility/bobe-ff.lua b/bzgas2/compatibility/bobe-ff.lua similarity index 100% rename from compatibility/bobe-ff.lua rename to bzgas2/compatibility/bobe-ff.lua diff --git a/compatibility/bobe.lua b/bzgas2/compatibility/bobe.lua similarity index 100% rename from compatibility/bobe.lua rename to bzgas2/compatibility/bobe.lua diff --git a/compatibility/crafting-efficiency.lua b/bzgas2/compatibility/crafting-efficiency.lua similarity index 100% rename from compatibility/crafting-efficiency.lua rename to bzgas2/compatibility/crafting-efficiency.lua diff --git a/compatibility/electronic-circuit.lua b/bzgas2/compatibility/electronic-circuit.lua similarity index 100% rename from compatibility/electronic-circuit.lua rename to bzgas2/compatibility/electronic-circuit.lua diff --git a/compatibility/ir2.lua b/bzgas2/compatibility/ir2.lua similarity index 100% rename from compatibility/ir2.lua rename to bzgas2/compatibility/ir2.lua diff --git a/compatibility/sciencecosttweakerm.lua b/bzgas2/compatibility/sciencecosttweakerm.lua similarity index 100% rename from compatibility/sciencecosttweakerm.lua rename to bzgas2/compatibility/sciencecosttweakerm.lua diff --git a/bzgas2/control-util.lua b/bzgas2/control-util.lua new file mode 100644 index 0000000..9000745 --- /dev/null +++ b/bzgas2/control-util.lua @@ -0,0 +1,86 @@ +local me = require("me") + +local util = {} +util.me = me + +function decode(data) + if type(data) == "string" then return data end + local str = {} + for i = 2, #data do + str[i-1] = decode(data[i]) + end + return table.concat(str, "") +end + +function util.get_list() + local p = game.item_prototypes[me.name.."-list"] + if p then + data = p.localised_description + return decode(data) + end +end + +function util.force_enable_recipe(event, recipe_name) + if game.players[event.player_index].force.recipes[recipe_name] then + game.players[event.player_index].force.recipes[recipe_name].enabled=true + end +end + + +function util.warptorio2_expansion_helper() + if script.active_mods["warptorio2_expansion"] then + function check_container_for_items(container,items) + local has_all =true + for k=1,#items do + if container.get_item_count(items[k].name) 0) then - if data.raw.recipe[recipe_name].icon then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.recipe[recipe_name].icon, - icon_size=data.raw.recipe[recipe_name].icon_size, - icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps, - }} - elseif data.raw.item[data.raw.recipe[recipe_name].main_product] then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.item[data.raw.recipe[recipe_name].main_product].icon, - icon_size=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_size, - icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_mipmaps, - }} - elseif data.raw.item[data.raw.recipe[recipe_name].result] then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.item[data.raw.recipe[recipe_name].result].icon, - icon_size=data.raw.item[data.raw.recipe[recipe_name].result].icon_size, - icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].result].icon_mipmaps, - }} - elseif data.raw.recipe[recipe_name].normal and - data.raw.item[data.raw.recipe[recipe_name].normal.result] then - data.raw.recipe[recipe_name].icons = {{ - icon=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon, - icon_size=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_size, - icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_mipmaps, - }} - end - data.raw.recipe[recipe_name].icon = nil - data.raw.recipe[recipe_name].icon_size = nil + data.raw.recipe[recipe_name].icons = {} + if data.raw.recipe[recipe_name].icon then + data.raw.recipe[recipe_name].icons = {{ + icon=data.raw.recipe[recipe_name].icon, + icon_size=data.raw.recipe[recipe_name].icon_size, + icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps, + }} + data.raw.recipe[recipe_name].icon = nil + data.raw.recipe[recipe_name].icon_size = nil + end end table.insert(data.raw.recipe[recipe_name].icons, icon) end @@ -1137,8 +1030,6 @@ function util.add_to_ingredient(recipe, ingredient, amount, options) if not should_force(options) and bypass(recipe_name) then return end if data.raw.recipe[recipe] then add_to_ingredient(data.raw.recipe[recipe], ingredient, amount) - add_to_ingredient(data.raw.recipe[recipe].normal, ingredient, amount) - add_to_ingredient(data.raw.recipe[recipe].expensive, ingredient, amount) end end @@ -1161,8 +1052,6 @@ function util.add_to_product(recipe_name, product, amount, options) if not should_force(options) and bypass(recipe_name) then return end if data.raw.recipe[recipe_name] then add_to_product(data.raw.recipe[recipe_name], product, amount) - add_to_product(data.raw.recipe[recipe_name].normal, product, amount) - add_to_product(data.raw.recipe[recipe_name].expensive, product, amount) end end @@ -1285,10 +1174,8 @@ function remove_prior_unlocks(tech, recipe) util.remove_recipe_effect(tech, recipe) if technology.prerequisites then for i, prerequisite in pairs(technology.prerequisites) do - if string.sub(prerequisite, 1, 3) ~= 'ei_' then - -- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :| - remove_prior_unlocks(prerequisite, recipe) - end + -- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :| + remove_prior_unlocks(prerequisite, recipe) end end end @@ -1330,9 +1217,7 @@ function replace_ingredients_prior_to(tech, old, new, multiplier) if technology.prerequisites then for i, prerequisite in pairs(technology.prerequisites) do -- log("BZZZ checking " .. prerequisite) -- Handy Debug :| - if string.sub(prerequisite, 1, 3) ~= 'ei_' then - replace_ingredients_prior_to(prerequisite, old, new, multiplier) - end + replace_ingredients_prior_to(prerequisite, old, new, multiplier) end end end diff --git a/data.lua b/bzgas2/data.lua similarity index 100% rename from data.lua rename to bzgas2/data.lua diff --git a/gas-boiler/changelog.txt b/bzgas2/gas-boiler/changelog.txt similarity index 100% rename from gas-boiler/changelog.txt rename to bzgas2/gas-boiler/changelog.txt diff --git a/gas-boiler/data-updates.lua b/bzgas2/gas-boiler/data-updates.lua similarity index 100% rename from gas-boiler/data-updates.lua rename to bzgas2/gas-boiler/data-updates.lua diff --git a/bzgas2/gas-boiler/data.lua b/bzgas2/gas-boiler/data.lua new file mode 100644 index 0000000..53e561b --- /dev/null +++ b/bzgas2/gas-boiler/data.lua @@ -0,0 +1,145 @@ +require("factsheet") + +-- Added by Brevven for bzgas +-- local gd = "__gas-boiler__" +local gd = "__bzgas2__/gas-boiler" + + + +gf_boiler_entity = util.table.deepcopy(data.raw.boiler.boiler) +gf_boiler_entity.name = "gas-boiler" +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" +gf_boiler_entity.energy_source = { + type = "fluid", + fluid_box = { + volume = 100, + pipe_covers = pipecoverspictures(), + pipe_picture = { + north = { + filename = gd.."/graphics/entity/" + .."hr-assembling-machine-1-pipe-N.png", + priority = "extra-high", + width = 71, + height = 38, + shift = util.by_pixel(2.25, 13.5), + scale = 0.5 + }, + east = { + filename = gd.."/graphics/entity/" + .."hr-assembling-machine-1-pipe-E.png", + priority = "extra-high", + width = 42, + height = 76, + shift = util.by_pixel(-24.5, 1), + scale = 0.5 + }, + south = { + filename = gd.."/graphics/entity/" + .."hr-assembling-machine-1-pipe-S.png", + priority = "extra-high", + width = 88, + height = 61, + shift = util.by_pixel(0, -31.25), + scale = 0.5 + }, + west = { + filename = gd.."/graphics/entity/" + .."hr-assembling-machine-1-pipe-W.png", + priority = "extra-high", + width = 39, + height = 73, + shift = util.by_pixel(25.75, 1.25), + scale = 0.5 + } + }, + pipe_connections = { + {direction = defines.direction.south, flow_direction = "input", position = {0, 0.5}}, + }, + production_type = "input", + secondary_draw_orders = { + south = 32, + north = -1, + east = -1, + west = -1, + } + }, + burns_fluid = true, + scale_fluid_usage = true, + emissions_per_minute = { pollution = 30 }, + smoke = {{ + name = "smoke", + north_position = util.by_pixel(-38, -47.5), + south_position = util.by_pixel(38.5, -32), + east_position = util.by_pixel(20, -70), + west_position = util.by_pixel(-19, -8.5), + frequency = 15, + starting_vertical_speed = 0.3, + starting_frame_deviation = 0 + }}, + light_flicker = { + color = colors.gas_fire_glow, + minimum_light_size = 0.1, + light_intensity_to_size_coefficient = 1 + } +} +gf_boiler_entity.fire_flicker_enabled = false +gf_boiler_entity.fire_glow_flicker_enabled = false +gf_boiler_entity.pictures.north.fire = nil +gf_boiler_entity.pictures.south.fire = nil +gf_boiler_entity.pictures.east.fire = nil +gf_boiler_entity.pictures.west.fire = nil +gf_boiler_entity.pictures.north.fire_glow.filename = + gd.."/graphics/entity/".. + "hr-gas-boiler-N-light.png" +gf_boiler_entity.pictures.south.fire_glow.filename = + gd.."/graphics/entity/".. + "hr-gas-boiler-S-light.png" +gf_boiler_entity.pictures.east.fire_glow.filename = + gd.."/graphics/entity/".. + "hr-gas-boiler-E-light.png" +gf_boiler_entity.pictures.west.fire_glow.filename = + gd.."/graphics/entity/".. + "hr-gas-boiler-W-light.png" +gf_boiler_entity.pictures.north.fire_glow.apply_runtime_tint = true +gf_boiler_entity.pictures.south.fire_glow.apply_runtime_tint = true +gf_boiler_entity.pictures.east.fire_glow.apply_runtime_tint = true +gf_boiler_entity.pictures.west.fire_glow.apply_runtime_tint = true +gf_boiler_entity.pictures.north.fire_glow.tint={r=1,g=0.6,b=0.6,a=0.4} +gf_boiler_entity.pictures.south.fire_glow.tint={r=1,g=0.6,b=0.6,a=0.4} +gf_boiler_entity.pictures.east.fire_glow.tint={r=1,g=0.6,b=0.6,a=0.4} +gf_boiler_entity.pictures.west.fire_glow.tint={r=1,g=0.6,b=0.6,a=0.4} +gf_boiler_entity.pictures.north.fire_glow.blend_mode = "additive-soft" +gf_boiler_entity.pictures.south.fire_glow.blend_mode = "additive-soft" +gf_boiler_entity.pictures.east.fire_glow.blend_mode = "additive-soft" +gf_boiler_entity.pictures.west.fire_glow.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 = gd.."/graphics/icons/gas-boiler.png" +gf_boiler_item.order = "b[steam-power]-b[gas-boiler]" +gf_boiler_item.place_result = "gas-boiler" + +gf_boiler_recipe = { + type = "recipe", + name = "gas-boiler", + enabled = false, + ingredients = { + { type = "item", name = "boiler", amount = 1 }, + { type = "item", name = "pump", amount = 1 }}, + results = {{ type = "item", name = "gas-boiler", amount = 1 }} +} + +data:extend({ + gf_boiler_item, + gf_boiler_recipe, + gf_boiler_entity +}) +add_recipe_to_tech( + "fluid-handling", + "gas-boiler" +) diff --git a/gas-boiler/factsheet.lua b/bzgas2/gas-boiler/factsheet.lua similarity index 94% rename from gas-boiler/factsheet.lua rename to bzgas2/gas-boiler/factsheet.lua index 37a1a60..53bfc13 100644 --- a/gas-boiler/factsheet.lua +++ b/bzgas2/gas-boiler/factsheet.lua @@ -1700,9 +1700,6 @@ end set_shift = function(shift, tab) tab.shift = shift - if tab.hr_version then - tab.hr_version.shift = shift - end return tab end @@ -1729,16 +1726,10 @@ end empty_sprite = function() return { - filename = "__core__/graphics/empty.png", - priority = "extra-high", - width = 1, - height = 1, - hr_version = { - filename = "__core__/graphics/empty.png", - priority = "extra-high", - width = 1, - height = 1, - } + filename = "__core__/graphics/empty.png", + priority = "extra-high", + width = 1, + height = 1, } end @@ -1750,209 +1741,104 @@ centrifuge_idle_layers = function(size,speed) local size = number_or_one(size) local speed = number_or_one(speed) return {{ - filename = - "__base__/graphics/entity/" - .."centrifuge/centrifuge-C.png", - priority = "extra-high", - line_length = 8, - width = 119, - height = 107, - scale = size, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - -0.5, - -26.5 - ), - hr_version = { - filename = - "__base__/graphics/entity/" - .."centrifuge/hr-centrifuge-C.png", - priority = "extra-high", - scale = size*0.5, - line_length = 8, - width = 237, - height = 214, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - -0.25, - -26.5 - ) - } + filename = + "__base__/graphics/entity/" + .."centrifuge/hr-centrifuge-C.png", + priority = "extra-high", + scale = size*0.5, + line_length = 8, + width = 237, + height = 214, + frame_count = 64, + animation_speed = speed, + shift = + util.by_pixel( + -0.25, + -26.5 + ) },{ - filename = - "__base__/graphics/entity/" - .."centrifuge/centrifuge-C-shadow.png", - draw_as_shadow = true, - priority = "extra-high", - line_length = 8, - width = 132, - height = 74, - frame_count = 64, - scale = size, - animation_speed = speed, - shift = - util.by_pixel( - 20, - -10 - ), - hr_version = { - filename = - "__base__/graphics/entity/" - .."centrifuge/hr-centrifuge-C-shadow.png", - draw_as_shadow = true, - priority = "extra-high", - scale = size*0.5, - line_length = 8, - width = 279, - height = 152, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - 16.75, - -10 - ) - } + filename = + "__base__/graphics/entity/" + .."centrifuge/hr-centrifuge-C-shadow.png", + draw_as_shadow = true, + priority = "extra-high", + scale = size*0.5, + line_length = 8, + width = 279, + height = 152, + frame_count = 64, + animation_speed = speed, + shift = + util.by_pixel( + 16.75, + -10 + ) },{ - filename = - "__base__/graphics/entity/" - .."centrifuge/centrifuge-B.png", - priority = "extra-high", - line_length = 8, - width = 78, - height = 117, - scale = size, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - 23, - 6.5 - ), - hr_version = { - filename = - "__base__/graphics/entity/" - .."centrifuge/hr-centrifuge-B.png", - priority = "extra-high", - scale = size*0.5, - line_length = 8, - width = 156, - height = 234, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - 23, - 6.5 - ) - } + filename = + "__base__/graphics/entity/" + .."centrifuge/hr-centrifuge-B.png", + priority = "extra-high", + scale = size*0.5, + line_length = 8, + width = 156, + height = 234, + frame_count = 64, + animation_speed = speed, + shift = + util.by_pixel( + 23, + 6.5 + ) },{ - filename = - "__base__/graphics/entity/" - .."centrifuge/centrifuge-B-shadow.png", - draw_as_shadow = true, - priority = "extra-high", - line_length = 8, - width = 124, - height = 74, - frame_count = 64, - scale = size, - animation_speed = speed, - shift = - util.by_pixel( - 63, - 16 - ), - hr_version = { - filename = - "__base__/graphics/entity/" - .."centrifuge/hr-centrifuge-B-shadow.png", - draw_as_shadow = true, - priority = "extra-high", - scale = size*0.5, - line_length = 8, - width = 251, - height = 149, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - 63.25, - 15.25 - ) - } + filename = + "__base__/graphics/entity/" + .."centrifuge/hr-centrifuge-B-shadow.png", + draw_as_shadow = true, + priority = "extra-high", + scale = size*0.5, + line_length = 8, + width = 251, + height = 149, + frame_count = 64, + animation_speed = speed, + shift = + util.by_pixel( + 63.25, + 15.25 + ) },{ - filename = - "__base__/graphics/entity/" - .."centrifuge/centrifuge-A.png", - priority = "extra-high", - line_length = 8, - width = 70, - height = 123, - scale = size, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - -26, - 3.5 - ), - hr_version = { - filename = - "__base__/graphics/entity/" - .."centrifuge/hr-centrifuge-A.png", - priority = "extra-high", - scale = size*0.5, - line_length = 8, - width = 139, - height = 246, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - -26.25, - 3.5 - ) - } + filename = + "__base__/graphics/entity/" + .."centrifuge/hr-centrifuge-A.png", + priority = "extra-high", + scale = size*0.5, + line_length = 8, + width = 139, + height = 246, + frame_count = 64, + animation_speed = speed, + shift = + util.by_pixel( + -26.25, + 3.5 + ) },{ - filename = - "__base__/graphics/entity/" - .."centrifuge/centrifuge-A-shadow.png", - priority = "extra-high", - draw_as_shadow = true, - line_length = 8, - width = 108, - height = 54, - frame_count = 64, - scale = size, - animation_speed = speed, - shift = - util.by_pixel( - 6, - 27 - ), - hr_version = { - filename = - "__base__/graphics/entity/" - .."centrifuge/hr-centrifuge-A-shadow.png", - priority = "extra-high", - draw_as_shadow = true, - scale = size*0.5, - line_length = 8, - width = 230, - height = 124, - frame_count = 64, - animation_speed = speed, - shift = - util.by_pixel( - 8.5, - 23.5 - ) - } + filename = + "__base__/graphics/entity/" + .."centrifuge/hr-centrifuge-A-shadow.png", + priority = "extra-high", + draw_as_shadow = true, + scale = size*0.5, + line_length = 8, + width = 230, + height = 124, + frame_count = 64, + animation_speed = speed, + shift = + util.by_pixel( + 8.5, + 23.5 + ) }} end diff --git a/gas-boiler/graphics/entity/assembling-machine-1-pipe-E.png b/bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-E.png similarity index 100% rename from gas-boiler/graphics/entity/assembling-machine-1-pipe-E.png rename to bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-E.png diff --git a/gas-boiler/graphics/entity/assembling-machine-1-pipe-N.png b/bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-N.png similarity index 100% rename from gas-boiler/graphics/entity/assembling-machine-1-pipe-N.png rename to bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-N.png diff --git a/gas-boiler/graphics/entity/assembling-machine-1-pipe-S.png b/bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-S.png similarity index 100% rename from gas-boiler/graphics/entity/assembling-machine-1-pipe-S.png rename to bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-S.png diff --git a/gas-boiler/graphics/entity/assembling-machine-1-pipe-W.png b/bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-W.png similarity index 100% rename from gas-boiler/graphics/entity/assembling-machine-1-pipe-W.png rename to bzgas2/gas-boiler/graphics/entity/assembling-machine-1-pipe-W.png diff --git a/gas-boiler/graphics/entity/gas-boiler-E-light.png b/bzgas2/gas-boiler/graphics/entity/gas-boiler-E-light.png similarity index 100% rename from gas-boiler/graphics/entity/gas-boiler-E-light.png rename to bzgas2/gas-boiler/graphics/entity/gas-boiler-E-light.png diff --git a/gas-boiler/graphics/entity/gas-boiler-N-light.png b/bzgas2/gas-boiler/graphics/entity/gas-boiler-N-light.png similarity index 100% rename from gas-boiler/graphics/entity/gas-boiler-N-light.png rename to bzgas2/gas-boiler/graphics/entity/gas-boiler-N-light.png diff --git a/gas-boiler/graphics/entity/gas-boiler-S-light.png b/bzgas2/gas-boiler/graphics/entity/gas-boiler-S-light.png similarity index 100% rename from gas-boiler/graphics/entity/gas-boiler-S-light.png rename to bzgas2/gas-boiler/graphics/entity/gas-boiler-S-light.png diff --git a/gas-boiler/graphics/entity/gas-boiler-W-light.png b/bzgas2/gas-boiler/graphics/entity/gas-boiler-W-light.png similarity index 100% rename from gas-boiler/graphics/entity/gas-boiler-W-light.png rename to bzgas2/gas-boiler/graphics/entity/gas-boiler-W-light.png diff --git a/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-E.png b/bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-E.png similarity index 100% rename from gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-E.png rename to bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-E.png diff --git a/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-N.png b/bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-N.png similarity index 100% rename from gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-N.png rename to bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-N.png diff --git a/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-S.png b/bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-S.png similarity index 100% rename from gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-S.png rename to bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-S.png diff --git a/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-W.png b/bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-W.png similarity index 100% rename from gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-W.png rename to bzgas2/gas-boiler/graphics/entity/hr-assembling-machine-1-pipe-W.png diff --git a/gas-boiler/graphics/entity/hr-gas-boiler-E-light.png b/bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-E-light.png similarity index 100% rename from gas-boiler/graphics/entity/hr-gas-boiler-E-light.png rename to bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-E-light.png diff --git a/gas-boiler/graphics/entity/hr-gas-boiler-N-light.png b/bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-N-light.png similarity index 100% rename from gas-boiler/graphics/entity/hr-gas-boiler-N-light.png rename to bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-N-light.png diff --git a/gas-boiler/graphics/entity/hr-gas-boiler-S-light.png b/bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-S-light.png similarity index 100% rename from gas-boiler/graphics/entity/hr-gas-boiler-S-light.png rename to bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-S-light.png diff --git a/gas-boiler/graphics/entity/hr-gas-boiler-W-light.png b/bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-W-light.png similarity index 100% rename from gas-boiler/graphics/entity/hr-gas-boiler-W-light.png rename to bzgas2/gas-boiler/graphics/entity/hr-gas-boiler-W-light.png diff --git a/gas-boiler/graphics/icons/gas-boiler.png b/bzgas2/gas-boiler/graphics/icons/gas-boiler.png similarity index 100% rename from gas-boiler/graphics/icons/gas-boiler.png rename to bzgas2/gas-boiler/graphics/icons/gas-boiler.png diff --git a/gas-boiler/info.json b/bzgas2/gas-boiler/info.json similarity index 100% rename from gas-boiler/info.json rename to bzgas2/gas-boiler/info.json diff --git a/gas-boiler/locale/en/base.cfg b/bzgas2/gas-boiler/locale/en/base.cfg similarity index 100% rename from gas-boiler/locale/en/base.cfg rename to bzgas2/gas-boiler/locale/en/base.cfg diff --git a/gas-boiler/locale/ru/base.cfg b/bzgas2/gas-boiler/locale/ru/base.cfg similarity index 100% rename from gas-boiler/locale/ru/base.cfg rename to bzgas2/gas-boiler/locale/ru/base.cfg diff --git a/gas-boiler/migrations/absorb_boilers.json b/bzgas2/gas-boiler/migrations/absorb_boilers.json similarity index 100% rename from gas-boiler/migrations/absorb_boilers.json rename to bzgas2/gas-boiler/migrations/absorb_boilers.json diff --git a/gas-boiler/settings.lua b/bzgas2/gas-boiler/settings.lua similarity index 100% rename from gas-boiler/settings.lua rename to bzgas2/gas-boiler/settings.lua diff --git a/gas-sim.lua b/bzgas2/gas-sim.lua similarity index 75% rename from gas-sim.lua rename to bzgas2/gas-sim.lua index e831c70..58f45dd 100644 --- a/gas-sim.lua +++ b/bzgas2/gas-sim.lua @@ -10,13 +10,13 @@ data.raw["utility-constants"]["default"].main_menu_simulations["gas-rig"] = { checkboard = false, - save = "__bzgas__/menu-simulations/gas-rig-sim.zip", length = 15*60, + save = "__bzgas2__/menu-simulations/gas-rig-sim.zip", length = 15*60, init = [[ local logo = game.surfaces.nauvis.find_entities_filtered{ name = "factorio-logo-16tiles", limit = 1}[1] - game.camera_position = {logo.position.x, logo.position.y+14} - game.camera_zoom = 0.75 + game.simulation.camera_position = {logo.position.x, logo.position.y+14} + game.simulation.camera_zoom = 0.75 game.tick_paused = false game.surfaces.nauvis.daytime = 0 ]], diff --git a/graphics/entity/gas-extractor-animated.png b/bzgas2/graphics/entity/gas-extractor-animated.png similarity index 100% rename from graphics/entity/gas-extractor-animated.png rename to bzgas2/graphics/entity/gas-extractor-animated.png diff --git a/graphics/entity/gas-extractor-base-e.png b/bzgas2/graphics/entity/gas-extractor-base-e.png similarity index 100% rename from graphics/entity/gas-extractor-base-e.png rename to bzgas2/graphics/entity/gas-extractor-base-e.png diff --git a/graphics/entity/gas-extractor-base-n.png b/bzgas2/graphics/entity/gas-extractor-base-n.png similarity index 100% rename from graphics/entity/gas-extractor-base-n.png rename to bzgas2/graphics/entity/gas-extractor-base-n.png diff --git a/graphics/entity/gas-extractor-base-s.png b/bzgas2/graphics/entity/gas-extractor-base-s.png similarity index 100% rename from graphics/entity/gas-extractor-base-s.png rename to bzgas2/graphics/entity/gas-extractor-base-s.png diff --git a/graphics/entity/gas-extractor-base-w.png b/bzgas2/graphics/entity/gas-extractor-base-w.png similarity index 100% rename from graphics/entity/gas-extractor-base-w.png rename to bzgas2/graphics/entity/gas-extractor-base-w.png diff --git a/graphics/entity/gas-extractor-shadow.png b/bzgas2/graphics/entity/gas-extractor-shadow.png similarity index 100% rename from graphics/entity/gas-extractor-shadow.png rename to bzgas2/graphics/entity/gas-extractor-shadow.png diff --git a/graphics/entity/gas-extractor.png b/bzgas2/graphics/entity/gas-extractor.png similarity index 100% rename from graphics/entity/gas-extractor.png rename to bzgas2/graphics/entity/gas-extractor.png diff --git a/graphics/entity/hr-chemical-plant.png b/bzgas2/graphics/entity/hr-chemical-plant.png similarity index 100% rename from graphics/entity/hr-chemical-plant.png rename to bzgas2/graphics/entity/hr-chemical-plant.png diff --git a/graphics/entity/ores/hr-gas-effect.png b/bzgas2/graphics/entity/ores/hr-gas-effect.png similarity index 100% rename from graphics/entity/ores/hr-gas-effect.png rename to bzgas2/graphics/entity/ores/hr-gas-effect.png diff --git a/graphics/entity/ores/hr-gas.png b/bzgas2/graphics/entity/ores/hr-gas.png similarity index 100% rename from graphics/entity/ores/hr-gas.png rename to bzgas2/graphics/entity/ores/hr-gas.png diff --git a/graphics/icons/bakelite.png b/bzgas2/graphics/icons/bakelite.png similarity index 100% rename from graphics/icons/bakelite.png rename to bzgas2/graphics/icons/bakelite.png diff --git a/graphics/icons/chemical-plant-overlay.png b/bzgas2/graphics/icons/chemical-plant-overlay.png similarity index 100% rename from graphics/icons/chemical-plant-overlay.png rename to bzgas2/graphics/icons/chemical-plant-overlay.png diff --git a/graphics/icons/formaldehyde.png b/bzgas2/graphics/icons/formaldehyde.png similarity index 100% rename from graphics/icons/formaldehyde.png rename to bzgas2/graphics/icons/formaldehyde.png diff --git a/graphics/icons/gas-extractor.png b/bzgas2/graphics/icons/gas-extractor.png similarity index 100% rename from graphics/icons/gas-extractor.png rename to bzgas2/graphics/icons/gas-extractor.png diff --git a/graphics/icons/gas.png b/bzgas2/graphics/icons/gas.png similarity index 100% rename from graphics/icons/gas.png rename to bzgas2/graphics/icons/gas.png diff --git a/graphics/icons/phenol-2.png b/bzgas2/graphics/icons/phenol-2.png similarity index 100% rename from graphics/icons/phenol-2.png rename to bzgas2/graphics/icons/phenol-2.png diff --git a/graphics/icons/phenol-3.png b/bzgas2/graphics/icons/phenol-3.png similarity index 100% rename from graphics/icons/phenol-3.png rename to bzgas2/graphics/icons/phenol-3.png diff --git a/graphics/icons/phenol-4.png b/bzgas2/graphics/icons/phenol-4.png similarity index 100% rename from graphics/icons/phenol-4.png rename to bzgas2/graphics/icons/phenol-4.png diff --git a/graphics/icons/phenol.png b/bzgas2/graphics/icons/phenol.png similarity index 100% rename from graphics/icons/phenol.png rename to bzgas2/graphics/icons/phenol.png diff --git a/graphics/icons/stacked/bakelite.png b/bzgas2/graphics/icons/stacked/bakelite.png similarity index 100% rename from graphics/icons/stacked/bakelite.png rename to bzgas2/graphics/icons/stacked/bakelite.png diff --git a/graphics/icons/stacked/phenol.png b/bzgas2/graphics/icons/stacked/phenol.png similarity index 100% rename from graphics/icons/stacked/phenol.png rename to bzgas2/graphics/icons/stacked/phenol.png diff --git a/graphics/technology/bakelite.png b/bzgas2/graphics/technology/bakelite.png similarity index 100% rename from graphics/technology/bakelite.png rename to bzgas2/graphics/technology/bakelite.png diff --git a/graphics/technology/formaldehyde.png b/bzgas2/graphics/technology/formaldehyde.png similarity index 100% rename from graphics/technology/formaldehyde.png rename to bzgas2/graphics/technology/formaldehyde.png diff --git a/graphics/technology/gas-processing.png b/bzgas2/graphics/technology/gas-processing.png similarity index 100% rename from graphics/technology/gas-processing.png rename to bzgas2/graphics/technology/gas-processing.png diff --git a/bzgas2/info.json b/bzgas2/info.json new file mode 100644 index 0000000..3555395 --- /dev/null +++ b/bzgas2/info.json @@ -0,0 +1,26 @@ +{ + "name": "bzgas", + "version": "2.0.0", + "factorio_version": "2.0", + "title": "Natural Gas", + "description": "Adds a natural gas resource, along with early game plastic.", + "author": "Brevven, cackling fiend", + "homepage": "https://discord.gg/ufvFUJtVwk", + "dependencies": [ + "base >= 2.0.0", + "? bzfoundry2 >= 2.0.0", + "? bztitanium >= 2.0.26", + "? bzlead >= 2.0.28", + "? bzzirconium >= 2.1.13", + "? bztungsten >= 0.6.0", + "? bzcarbon >= 2.0.21", + "? bztin >= 2.1.15", + "? warptorio2_expansion", + "? space-exploration >= 0.7.34", + "? aai-industry >= 0.6.13", + "? Krastorio2 >= 2.0.8", + "? deadlock-beltboxes-loaders >= 2.6.0", + "? DeadlockCrating", + "! space-age" + ] +} diff --git a/locale/cs/boiler.cfg b/bzgas2/locale/cs/boiler.cfg similarity index 100% rename from locale/cs/boiler.cfg rename to bzgas2/locale/cs/boiler.cfg diff --git a/locale/cs/gas.cfg b/bzgas2/locale/cs/gas.cfg similarity index 100% rename from locale/cs/gas.cfg rename to bzgas2/locale/cs/gas.cfg diff --git a/locale/en/boiler.cfg b/bzgas2/locale/en/boiler.cfg similarity index 100% rename from locale/en/boiler.cfg rename to bzgas2/locale/en/boiler.cfg diff --git a/locale/en/gas.cfg b/bzgas2/locale/en/gas.cfg similarity index 94% rename from locale/en/gas.cfg rename to bzgas2/locale/en/gas.cfg index 9a6df87..8ea240c 100644 --- a/locale/en/gas.cfg +++ b/bzgas2/locale/en/gas.cfg @@ -3,6 +3,9 @@ gas=Natural gas basic-chemical-plant=Basic chemical plant gas-extractor=Drilling rig +[entity-description] +wpe_broken_lab=To repair, insert 100[item=iron-plate], 100[item=iron-gear-wheel], 50[item=repair-pack] + [autoplace-control-names] gas=[fluid=gas] Natural gas diff --git a/locale/ja/boiler.cfg b/bzgas2/locale/ja/boiler.cfg similarity index 100% rename from locale/ja/boiler.cfg rename to bzgas2/locale/ja/boiler.cfg diff --git a/locale/ja/gas.cfg b/bzgas2/locale/ja/gas.cfg similarity index 100% rename from locale/ja/gas.cfg rename to bzgas2/locale/ja/gas.cfg diff --git a/locale/pl/boiler.cfg b/bzgas2/locale/pl/boiler.cfg similarity index 100% rename from locale/pl/boiler.cfg rename to bzgas2/locale/pl/boiler.cfg diff --git a/locale/pl/gas.cfg b/bzgas2/locale/pl/gas.cfg similarity index 100% rename from locale/pl/gas.cfg rename to bzgas2/locale/pl/gas.cfg diff --git a/locale/ru/boiler.cfg b/bzgas2/locale/ru/boiler.cfg similarity index 100% rename from locale/ru/boiler.cfg rename to bzgas2/locale/ru/boiler.cfg diff --git a/locale/ru/gas.cfg b/bzgas2/locale/ru/gas.cfg similarity index 100% rename from locale/ru/gas.cfg rename to bzgas2/locale/ru/gas.cfg diff --git a/locale/zh-CN/bzgas.cfg b/bzgas2/locale/zh-CN/bzgas.cfg similarity index 100% rename from locale/zh-CN/bzgas.cfg rename to bzgas2/locale/zh-CN/bzgas.cfg diff --git a/map-gen-preset-updates.lua b/bzgas2/map-gen-preset-updates.lua similarity index 100% rename from map-gen-preset-updates.lua rename to bzgas2/map-gen-preset-updates.lua diff --git a/matter.lua b/bzgas2/matter.lua similarity index 72% rename from matter.lua rename to bzgas2/matter.lua index 5e068b5..acf60cf 100644 --- a/matter.lua +++ b/bzgas2/matter.lua @@ -1,7 +1,7 @@ -- Matter recipes for Krastorio2 if mods["Krastorio2"] then local util = require("data-util"); -local matter = require("__Krastorio2__/lib/public/data-stages/matter-util") +local matter = require("__Krastorio2__/prototypes/libraries/matter") data:extend( { @@ -15,7 +15,7 @@ data:extend( icon_size = 256, }, { - icon = "__bzgas__/graphics/icons/gas.png", + icon = "__bzgas2__/graphics/icons/gas.png", icon_size = 128, scale = 1.4, } @@ -28,7 +28,7 @@ data:extend( { {"production-science-pack", 1}, {"utility-science-pack", 1}, - {"matter-tech-card", 1} + {"kr-matter-tech-card", 1} }, time = 45 } @@ -37,12 +37,11 @@ data:extend( local gas_ore_matter = { - item_name = "gas", - minimum_conversion_quantity = 100, - matter_value = 5, + material = { type = "fluid", name = "gas", amount = 100 }, + matter_count = 5, energy_required = 1, need_stabilizer = false, unlocked_by_technology = "gas-matter-processing" } -matter.createMatterRecipe(gas_ore_matter) +matter.make_recipes(gas_ore_matter) end diff --git a/me.lua b/bzgas2/me.lua similarity index 98% rename from me.lua rename to bzgas2/me.lua index 96a15cf..78bc781 100644 --- a/me.lua +++ b/bzgas2/me.lua @@ -1,6 +1,6 @@ local me = {} -me.name = "bzgas" +me.name = "bzgas2" me.list = {} me.recipes = {"bakelite", "phenol", "phenol-from-oil"} -- formaldehyde excluded intentionally for theme diff --git a/menu-simulations/gas-rig-sim.zip b/bzgas2/menu-simulations/gas-rig-sim.zip similarity index 100% rename from menu-simulations/gas-rig-sim.zip rename to bzgas2/menu-simulations/gas-rig-sim.zip diff --git a/bzgas2/modules.lua b/bzgas2/modules.lua new file mode 100644 index 0000000..818462f --- /dev/null +++ b/bzgas2/modules.lua @@ -0,0 +1,7 @@ +local util = require("data-util"); + +for i, recipe in pairs(util.me.recipes) do + if data.raw.recipe[recipe] then + data.raw.recipe[recipe].allow_productivity = true + end +end diff --git a/prototypes/bakelite.lua b/bzgas2/prototypes/bakelite.lua similarity index 79% rename from prototypes/bakelite.lua rename to bzgas2/prototypes/bakelite.lua index 345aafb..5018dd3 100644 --- a/prototypes/bakelite.lua +++ b/bzgas2/prototypes/bakelite.lua @@ -9,20 +9,20 @@ data:extend({ { type = "item", name = "bakelite", - icon = "__bzgas__/graphics/icons/bakelite.png", + icon = "__bzgas2__/graphics/icons/bakelite.png", icon_size = 128, subgroup = "raw-material", order = "g[bakelite]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, { type = "recipe", name = "bakelite", category = "chemistry", main_product = "bakelite", - enabled = "false", + enabled = false, ingredients = { - {util.me.use_phenol() and "phenol" or "coal", 1}, + {type = "item", name = util.me.use_phenol() and "phenol" or "coal", amount = 1}, {type="fluid", name="formaldehyde", amount=10} }, energy_required = 2, @@ -33,7 +33,7 @@ data:extend({ { type = "technology", name = "bakelite", - icon = "__bzgas__/graphics/technology/bakelite.png", + icon = "__bzgas2__/graphics/technology/bakelite.png", icon_size = 256, prerequisites = b_prereq, effects = { diff --git a/prototypes/basic-chemical-plant.lua b/bzgas2/prototypes/basic-chemical-plant.lua similarity index 51% rename from prototypes/basic-chemical-plant.lua rename to bzgas2/prototypes/basic-chemical-plant.lua index 80a4130..5ed79ac 100644 --- a/prototypes/basic-chemical-plant.lua +++ b/bzgas2/prototypes/basic-chemical-plant.lua @@ -5,13 +5,13 @@ data:extend({ { type = "recipe", name = "basic-chemical-plant", - result = "basic-chemical-plant", + results = {{ type = "item", name = "basic-chemical-plant", amount = 1}}, enabled = false, ingredients = { - {"stone-brick", 5}, - {"iron-plate", 4}, - {"copper-plate", 4}, - {"pipe", 6}, + {type="item", name="stone-brick", amount=5}, + {type="item", name="iron-plate", amount=4}, + {type="item", name="copper-plate", amount=4}, + {type="item", name="pipe", amount=6}, }, } }) @@ -19,7 +19,7 @@ data:extend({ util.add_ingredient("basic-chemical-plant", "lead-plate", 4) util.replace_ingredient("basic-chemical-plant", "iron-plate", "aluminum-plate") util.replace_ingredient("basic-chemical-plant", "copper-plate", "tin-plate") -util.replace_ingredient("basic-chemical-plant", "stone-brick", "sand", 10) +util.replace_ingredient("basic-chemical-plant", "stone-brick", mods["Krastorio2"] and "kr-sand" or "sand", 10) util.replace_ingredient("basic-chemical-plant", "stone-brick", "silica", 10) -- item @@ -31,7 +31,7 @@ plant_i.icon_size = nil plant_i.icon_mipmaps = nil plant_i.icons = { {icon="__base__/graphics/icons/chemical-plant.png", icon_size=64}, - {icon="__bzgas__/graphics/icons/chemical-plant-overlay.png", icon_size=64}, + {icon="__bzgas2__/graphics/icons/chemical-plant-overlay.png", icon_size=64}, } data.raw.item["basic-chemical-plant"] = plant_i @@ -45,30 +45,26 @@ end local plant_e = futil.table.deepcopy(data.raw["assembling-machine"]["chemical-plant"]) plant_e.name = "basic-chemical-plant" plant_e.minable = {mining_time = 0.5, result = "basic-chemical-plant"} -plant_e.module_specification = {module_slots = 0} -plant_e.working_visualisations = {plant_e.working_visualisations[1], plant_e.working_visualisations[2]} -- no smoke -plant_e.animation.north.layers[1].filename="__bzgas__/graphics/entity/chemical-plant.png" -plant_e.animation.north.layers[1].hr_version.filename="__bzgas__/graphics/entity/hr-chemical-plant.png" -plant_e.animation.south.layers[1].filename="__bzgas__/graphics/entity/chemical-plant.png" -plant_e.animation.south.layers[1].hr_version.filename="__bzgas__/graphics/entity/hr-chemical-plant.png" -plant_e.animation.east.layers[1].filename="__bzgas__/graphics/entity/chemical-plant.png" -plant_e.animation.east.layers[1].hr_version.filename="__bzgas__/graphics/entity/hr-chemical-plant.png" -plant_e.animation.west.layers[1].filename="__bzgas__/graphics/entity/chemical-plant.png" -plant_e.animation.west.layers[1].hr_version.filename="__bzgas__/graphics/entity/hr-chemical-plant.png" +plant_e.module_slots = 0 +plant_e.graphics_set.working_visualisations = {plant_e.graphics_set.working_visualisations[1], plant_e.graphics_set.working_visualisations[2]} -- no smoke +plant_e.graphics_set.animation.north.layers[1].filename="__bzgas2__/graphics/entity/hr-chemical-plant.png" +plant_e.graphics_set.animation.south.layers[1].filename="__bzgas2__/graphics/entity/hr-chemical-plant.png" +plant_e.graphics_set.animation.east.layers[1].filename="__bzgas2__/graphics/entity/hr-chemical-plant.png" +plant_e.graphics_set.animation.west.layers[1].filename="__bzgas2__/graphics/entity/hr-chemical-plant.png" plant_e.next_upgrade="chemical-plant" plant_e.icon = nil plant_e.icon_size = nil plant_e.icon_mipmaps = nil plant_e.icons = { {icon="__base__/graphics/icons/chemical-plant.png", icon_size=64}, - {icon="__bzgas__/graphics/icons/chemical-plant-overlay.png", icon_size=64}, + {icon="__bzgas2__/graphics/icons/chemical-plant-overlay.png", icon_size=64}, } plant_e.energy_source = { type = "burner", fuel_inventory_size = 1, effectivity = 1, - emissions_per_minute = 5, + emissions_per_minute = { pollution = 5 }, fuel_categories = {"chemical"}, smoke = { { @@ -83,15 +79,5 @@ plant_e.energy_source = { }, }, } --- NOTE: Saving alternate tint here in case this is needed. --- local ptint = {r=.7,g=0.7,b=0.9,a=1} --- plant_e.animation.north.layers[1].tint = ptint --- plant_e.animation.north.layers[1].hr_version.tint = ptint --- plant_e.animation.south.layers[1].tint = ptint --- plant_e.animation.south.layers[1].hr_version.tint = ptint --- plant_e.animation.east.layers[1].tint = ptint --- plant_e.animation.east.layers[1].hr_version.tint = ptint --- plant_e.animation.west.layers[1].tint = ptint --- plant_e.animation.west.layers[1].hr_version.tint = ptint data.raw["assembling-machine"]["basic-chemical-plant"] = plant_e -- end entity diff --git a/prototypes/formaldehyde.lua b/bzgas2/prototypes/formaldehyde.lua similarity index 84% rename from prototypes/formaldehyde.lua rename to bzgas2/prototypes/formaldehyde.lua index 0ca7700..36b0be4 100644 --- a/prototypes/formaldehyde.lua +++ b/bzgas2/prototypes/formaldehyde.lua @@ -12,11 +12,11 @@ data:extend({ type = "fluid", name = "formaldehyde", default_temperature = 25, - heat_capacity = "0.1KJ", - fuel_value = "0.5KJ", + heat_capacity = "0.1kJ", + fuel_value = "0.5kJ", base_color = {r=0.77, g=0.87, b=0.67}, flow_color = {r=0.77, g=0.87, b=0.77}, - icon = "__bzgas__/graphics/icons/formaldehyde.png", + icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128, order = "a[fluid]-f[formaldehyde]" }, @@ -25,7 +25,7 @@ data:extend({ name = "formaldehyde", category = "chemistry", subgroup = "fluid-recipes", - enabled = "false", + enabled = false, ingredients = { {type="fluid", name="gas", amount=10} }, @@ -38,7 +38,7 @@ data:extend({ { type = "technology", name = "basic-chemistry", - icon = "__bzgas__/graphics/technology/formaldehyde.png", + icon = "__bzgas2__/graphics/technology/formaldehyde.png", icon_size = 256, prerequisites = {"gas-extraction"}, effects = { diff --git a/prototypes/gas-extractor.lua b/bzgas2/prototypes/gas-extractor.lua similarity index 50% rename from prototypes/gas-extractor.lua rename to bzgas2/prototypes/gas-extractor.lua index 106b8cb..02f8b15 100644 --- a/prototypes/gas-extractor.lua +++ b/bzgas2/prototypes/gas-extractor.lua @@ -2,28 +2,40 @@ local util = require("data-util"); local futil = require("util") local ge_ingredients = { - {"iron-plate", 10}, - {"pipe", 10}, - {"stone-brick", 4}, + {type="item", name="iron-plate", amount=10}, + {type="item", name="pipe", amount=10}, + {type="item", name="stone-brick", amount=4}, } local ge_prereq = {"automation"} -if mods.bzlead then table.insert(ge_ingredients, {"lead-plate", 4}) end +if mods.bzlead then table.insert(ge_ingredients, {type="item", name="lead-plate", amount=4}) end if mods.Krastorio2 then - table.insert(ge_ingredients, {"sand", 10}) + table.insert(ge_ingredients, {type="item", name="kr-sand", amount=10}) ge_prereq = {"kr-stone-processing"} elseif mods["aai-industry"] then - table.insert(ge_ingredients, {"sand", 10}) + table.insert(ge_ingredients, {type="item", name="sand", amount=10}) ge_prereq = {"sand-processing"} elseif data.raw.item["silica"] and data.raw.technology["silica-processing"] then - table.insert(ge_ingredients, {"silica", 20}) + table.insert(ge_ingredients, {type="item", name="silica", amount=20}) ge_prereq = {"silica-processing"} end +drilling_rig_circuit_connector_definitions = circuit_connector_definitions.create_vector +( + universal_connector_template, + { + { variation = 26, main_offset = futil.by_pixel(32, -3), shadow_offset = futil.by_pixel(32, -3), show_shadow = true }, + { variation = 26, main_offset = futil.by_pixel(32, -3), shadow_offset = futil.by_pixel(32, -3), show_shadow = true }, + { variation = 26, main_offset = futil.by_pixel(32, -3), shadow_offset = futil.by_pixel(32, -3), show_shadow = true }, + { variation = 26, main_offset = futil.by_pixel(32, -3), shadow_offset = futil.by_pixel(32, -3), show_shadow = true } + } +) + + data:extend({ { type = "item", name = "gas-extractor", - icon = "__bzgas__/graphics/icons/gas-extractor.png", + icon = "__bzgas2__/graphics/icons/gas-extractor.png", icon_size = 128, subgroup = "extraction-machine", order = "b[fluids]-b[gas-extractor]", @@ -33,29 +45,29 @@ data:extend({ { type = "recipe", name = "gas-extractor", - result = "gas-extractor", + results = {{ type = "item", name = "gas-extractor", amount = 1}}, enabled = false, -- TODO change ingredients = ge_ingredients, }, { type = "technology", name = "gas-extraction", - icon = "__bzgas__/graphics/technology/gas-processing.png", + icon = "__bzgas2__/graphics/technology/gas-processing.png", icon_size = 256, - prerequisites = ge_prereq, + --prerequisites = ge_prereq, effects = { {type = "unlock-recipe", recipe = "gas-extractor"}, }, unit = { count = 10, - ingredients = mods.Krastorio2 and {{"basic-tech-card", 1}} or {{"automation-science-pack", 1}}, + ingredients = mods.Krastorio2 and {{"kr-basic-tech-card", 1}} or {{"automation-science-pack", 1}}, time = 20, }, }, { type = "mining-drill", name = "gas-extractor", - icon = "__bzgas__/graphics/icons/gas-extractor.png", + icon = "__bzgas2__/graphics/icons/gas-extractor.png", icon_size = 128, flags = {"placeable-neutral", "player-creation"}, minable = {mining_time = 0.5, result = "gas-extractor"}, @@ -70,18 +82,18 @@ data:extend({ energy_source = { type = "electric", - emissions_per_minute = 10, + emissions_per_minute = { pollution = 10 }, usage_priority = "secondary-input" }, output_fluid_box = { - base_area = 10, - base_level = 1, + volume = 1000, pipe_covers = pipecoverspictures(), pipe_connections = { { - positions = { {0, -2}, {2, 0}, {0, 2}, {-2, 0} } + direction = defines.direction.north, + positions = { {0, -1}, {1, 0}, {0, 1}, {-1, 0} } } } }, @@ -89,10 +101,7 @@ data:extend({ mining_speed = util.me.finite() and 2 or 1, resource_searching_radius = 0.49, vector_to_place_result = {0, 0}, - module_specification = - { - module_slots = 2 - }, + module_slots = 2, radius_visualisation_picture = { filename = "__base__/graphics/entity/pumpjack/pumpjack-radius-visualization.png", @@ -103,7 +112,7 @@ data:extend({ base_render_layer = "lower-object-above-shadow", base_picture = { north = { - filename = "__bzgas__/graphics/entity/gas-extractor-base-n.png", + filename = "__bzgas2__/graphics/entity/gas-extractor-base-n.png", priority = "extra-high", width = 175, height = 179, @@ -111,7 +120,7 @@ data:extend({ shift = futil.by_pixel(0, -4), }, south = { - filename = "__bzgas__/graphics/entity/gas-extractor-base-s.png", + filename = "__bzgas2__/graphics/entity/gas-extractor-base-s.png", priority = "extra-high", width = 175, height = 149, @@ -119,7 +128,7 @@ data:extend({ shift = futil.by_pixel(0, 13), }, east = { - filename = "__bzgas__/graphics/entity/gas-extractor-base-e.png", + filename = "__bzgas2__/graphics/entity/gas-extractor-base-e.png", priority = "extra-high", width = 207, height = 129, @@ -127,7 +136,7 @@ data:extend({ shift = futil.by_pixel(8, 8), }, west = { - filename = "__bzgas__/graphics/entity/gas-extractor-base-w.png", + filename = "__bzgas2__/graphics/entity/gas-extractor-base-w.png", priority = "extra-high", width = 207, height = 129, @@ -135,34 +144,38 @@ data:extend({ shift = futil.by_pixel(-8, 8), }, }, - animations = { - layers = { - { - filename = "__bzgas__/graphics/entity/gas-extractor-animated.png", - priority = "extra-high", - width = 267, - height = 604, - scale = 0.33, -- just under 1/3, for height ~200. Check why height is 604 and not 600 - frame_count = 100, - line_length = 8, - animation_speed = 0.5, - shift = futil.by_pixel(0, -60), - }, - { - stripes = futil.multiplystripes(100, {{ - filename = "__bzgas__/graphics/entity/gas-extractor-shadow.png", - width_in_frames = 1, - height_in_frames = 1, - }}), - priority = "extra-high", - width = 331, - height = 64, - draw_as_shadow = true, - frame_count = 100, - animation_speed = 0.5, - shift = futil.by_pixel(119, 8), - }, - }, + graphics_set = { + animation = { + north = { + layers = { + { + filename = "__bzgas2__/graphics/entity/gas-extractor-animated.png", + priority = "extra-high", + width = 267, + height = 604, + scale = 0.33, -- just under 1/3, for height ~200. Check why height is 604 and not 600 + frame_count = 100, + line_length = 8, + animation_speed = 0.5, + shift = futil.by_pixel(0, -60), + }, + { + stripes = futil.multiplystripes(100, { { + filename = "__bzgas2__/graphics/entity/gas-extractor-shadow.png", + width_in_frames = 1, + height_in_frames = 1, + } }), + priority = "extra-high", + width = 331, + height = 64, + draw_as_shadow = true, + frame_count = 100, + animation_speed = 0.5, + shift = futil.by_pixel(119, 8), + }, + }, + } + } }, vehicle_impact_sound = data.raw["mining-drill"]["pumpjack"].vehicle_impact_sound, open_sound = data.raw["mining-drill"]["pumpjack"].open_sound, @@ -183,8 +196,8 @@ data:extend({ }, fast_replaceable_group = "pumpjack", - -- circuit_wire_connection_points = circuit_connector_definitions["pumpjack"].points, - -- circuit_connector_sprites = circuit_connector_definitions["pumpjack"].sprites, - -- circuit_wire_max_distance = default_circuit_wire_max_distance + circuit_wire_connection_points = drilling_rig_circuit_connector_definitions.points, + circuit_connector_sprites = drilling_rig_circuit_connector_definitions.sprites, + circuit_wire_max_distance = default_circuit_wire_max_distance } }) diff --git a/prototypes/gas.lua b/bzgas2/prototypes/gas.lua similarity index 68% rename from prototypes/gas.lua rename to bzgas2/prototypes/gas.lua index 2830faf..3a9325c 100644 --- a/prototypes/gas.lua +++ b/bzgas2/prototypes/gas.lua @@ -1,9 +1,12 @@ local resource_autoplace = require('resource-autoplace'); -local noise = require('noise'); local util = require("data-util"); local futil = require("util") +data.raw.planet.nauvis.map_gen_settings.autoplace_controls["gas"] = {} +data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["gas"] = {} +resource_autoplace.initialize_patch_set("gas", true) + data:extend({ {type = "resource-category", name="gas"} }) data:extend({ { @@ -13,14 +16,10 @@ data:extend({ richness = true, order = "b-ez" }, - { - type = "noise-layer", - name = "gas" - }, { type = "resource", name = "gas", - icon = "__bzgas__/graphics/icons/gas.png", + icon = "__bzgas2__/graphics/icons/gas.png", icon_size = 128, flags = {"placeable-neutral"}, category = "gas", @@ -71,53 +70,29 @@ data:extend({ { sheet = { - filename = "__bzgas__/graphics/entity/ores/gas.png", + filename = "__bzgas2__/graphics/entity/ores/hr-gas.png", priority = "extra-high", - width = 64, - height = 64, + width = 128, + height = 128, frame_count = 4, variation_count = 1, shift = futil.by_pixel(0, -12), - scale = 0.75, - hr_version = - { - filename = "__bzgas__/graphics/entity/ores/hr-gas.png", - priority = "extra-high", - width = 128, - height = 128, - frame_count = 4, - variation_count = 1, - shift = futil.by_pixel(0, -12), - scale = 0.5*0.75, - } + scale = 0.5*0.75, } }, stages_effect = { sheet = { - filename = "__bzgas__/graphics/entity/ores/gas-effect.png", + filename = "__bzgas2__/graphics/entity/ores/hr-gas-effect.png", priority = "extra-high", - width = 64, - height = 64, + width = 128, + height = 128, frame_count = 4, variation_count = 1, - shift = futil.by_pixel(0, -12), - scale = 0.75, + shift = futil.by_pixel(0, -17), blend_mode = "normal", - hr_version = - { - filename = "__bzgas__/graphics/entity/ores/hr-gas-effect.png", - priority = "extra-high", - width = 128, - height = 128, - frame_count = 4, - variation_count = 1, - shift = futil.by_pixel(0, -17), - scale = 0.5, - blend_mode = "normal", - scale = 0.5*0.75, - } + scale = 0.5*0.75, } }, effect_animation_period = 3.5, @@ -130,12 +105,12 @@ data:extend({ type = "fluid", name = "gas", default_temperature = 25, - heat_capacity = "0.1KJ", - fuel_value = "1000KJ", - emissions_multiplier = 0.75, + heat_capacity = "0.1kJ", + fuel_value = "1000kJ", + emissions_multiplier = util.se6() and 1.1 or 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", + icon = "__bzgas2__/graphics/icons/gas.png", icon_size = 128, order = "a[fluid]-f[gas]" }, diff --git a/prototypes/k2-recipe.lua b/bzgas2/prototypes/k2-recipe.lua similarity index 66% rename from prototypes/k2-recipe.lua rename to bzgas2/prototypes/k2-recipe.lua index 6c4a1a2..53aa9a4 100644 --- a/prototypes/k2-recipe.lua +++ b/bzgas2/prototypes/k2-recipe.lua @@ -6,10 +6,10 @@ if mods.Krastorio2 then name = "gas-reforming", category = "chemistry", subgroup = "fluid-recipes", - main_product = "hydrogen", + main_product = "kr-hydrogen", icons = { - {icon = kr_fluids_icons_path.."hydrogen.png", icon_size = 64, icon_mipmaps = 4}, - {icon = "__bzgas__/graphics/icons/gas.png", icon_size = 128, scale = 0.125, shift={-8,-8}}, + {icon = "__Krastorio2Assets__/icons/fluids/hydrogen.png", icon_size = 64, icon_mipmaps = 4}, + {icon = "__bzgas2__/graphics/icons/gas.png", icon_size = 128, scale = 0.125, shift={-8,-8}}, }, enabled = false, ingredients = { @@ -18,7 +18,7 @@ if mods.Krastorio2 then }, energy_required = 3, results = { - {type="fluid", name="hydrogen", amount = 100}, + {type="fluid", name="kr-hydrogen", amount = 100}, }, }, { @@ -28,13 +28,13 @@ if mods.Krastorio2 then subgroup = "fluid-recipes", main_product = "formaldehyde", icons = { - {icon = "__bzgas__/graphics/icons/formaldehyde.png", icon_size = 128, scale = 0.125}, - {icon = kr_fluids_icons_path.."biomethanol.png", icon_size = 64, scale = 0.125, icon_mipmaps = 4, shift={-5,-5}}, + {icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128, scale = 0.125}, + {icon ="__Krastorio2Assets__/icons/fluids/biomethanol.png", icon_size = 64, scale = 0.125, icon_mipmaps = 4, shift={-5,-5}}, }, enabled = false, ingredients = { - {type="fluid", name="biomethanol", amount=50}, - {type="fluid", name="oxygen", amount=25}, + {type="fluid", name="kr-biomethanol", amount=50}, + {type="fluid", name="kr-oxygen", amount=25}, }, energy_required = 7, results = { @@ -50,9 +50,9 @@ if mods.Krastorio2 then name = "methane-reforming", category = "chemistry", subgroup = "fluid-recipes", - main_product = "hydrogen", + main_product = "kr-hydrogen", icons = { - {icon = kr_fluids_icons_path.."hydrogen.png", icon_size = 64, icon_mipmaps = 4}, + {icon ="__Krastorio2Assets__/icons/fluids/hydrogen.png", icon_size = 64, icon_mipmaps = 4}, {icon = "__space-exploration-graphics__/graphics/icons/fluid/methane-gas.png", icon_size = 64, scale = 0.25, shift={-8,-8}}, }, enabled = false, @@ -62,7 +62,7 @@ if mods.Krastorio2 then }, energy_required = 2, results = { - {type="fluid", name="hydrogen", amount = 100}, + {type="fluid", name="kr-hydrogen", amount = 100}, }, }, }) diff --git a/prototypes/phenol.lua b/bzgas2/prototypes/phenol.lua similarity index 68% rename from prototypes/phenol.lua rename to bzgas2/prototypes/phenol.lua index 6231be5..538bada 100644 --- a/prototypes/phenol.lua +++ b/bzgas2/prototypes/phenol.lua @@ -6,20 +6,20 @@ data:extend({ { type = "item", name = "phenol", - icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128, + icon = "__bzgas2__/graphics/icons/phenol.png", icon_size = 128, pictures = { - {filename = "__bzgas__/graphics/icons/phenol.png", size = 128, scale = 0.125}, - {filename = "__bzgas__/graphics/icons/phenol-2.png", size = 128, scale = 0.125}, - {filename = "__bzgas__/graphics/icons/phenol-3.png", size = 128, scale = 0.125}, - {filename = "__bzgas__/graphics/icons/phenol-4.png", size = 128, scale = 0.125}, + {filename = "__bzgas2__/graphics/icons/phenol.png", size = 128, scale = 0.25}, + {filename = "__bzgas2__/graphics/icons/phenol-2.png", size = 128, scale = 0.25}, + {filename = "__bzgas2__/graphics/icons/phenol-3.png", size = 128, scale = 0.25}, + {filename = "__bzgas2__/graphics/icons/phenol-4.png", size = 128, scale = 0.25}, }, subgroup = "raw-material", order = "g[phenol]", - stack_size = util.get_stack_size(100), + stack_size = 100, }, }) -if data.raw.item["coke"] then +if data.raw.item[mods["Krastorio2"] and "kr-coke" or "coke"] then local cat if mods.Krastorio2 then cat = "smelting" @@ -36,14 +36,14 @@ if data.raw.item["coke"] then name = "phenol", category = cat, main_product = "phenol", - enabled = "false", - icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128, - ingredients = {{"coal", 6}, {"wood", 6}}, + enabled = false, + icon = "__bzgas2__/graphics/icons/phenol.png", icon_size = 128, + ingredients = {{type="item", name="coal", amount=6}, {type="item", name="wood", amount=6}}, energy_required = 16, subgroup = "raw-material", results = { {type="item", name="phenol", amount = 6}, - {type="item", name="coke", amount = 3}, + {type="item", name="kr-coke", amount = 3}, }, } }) @@ -54,9 +54,9 @@ if data.raw.item["coke"] then name = "phenol", category = cat, main_product = "phenol", - enabled = "false", - icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128, - ingredients = {{"coal", 4}}, + enabled = false, + icon = "__bzgas2__/graphics/icons/phenol.png", icon_size = 128, + ingredients = {{type="item", name="coal", amount=4}}, energy_required = 6.4, subgroup = "raw-material", results = { @@ -83,11 +83,12 @@ if data.raw.item["coke"] then { type = "recipe", name = "phenol-from-oil", + localised_name = { "item-name.phenol" }, main_product = "phenol", category = "chemistry", - enabled = "false", + enabled = false, icons = { - {icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128}, + {icon = "__bzgas2__/graphics/icons/phenol.png", icon_size = 128}, light_oil_icon, }, ingredients = { @@ -107,9 +108,9 @@ else name = "phenol", category = "advanced-crafting", main_product = "phenol", - enabled = "false", + enabled = false, energy_required = 1, - ingredients = {{"coal", 1}}, + ingredients = {{type="item", name="coal", amount=1}}, results = { {type="item", name="phenol", amount=1}, }, diff --git a/prototypes/se-recipe.lua b/bzgas2/prototypes/se-recipe.lua similarity index 85% rename from prototypes/se-recipe.lua rename to bzgas2/prototypes/se-recipe.lua index a0a8218..c6301ee 100644 --- a/prototypes/se-recipe.lua +++ b/bzgas2/prototypes/se-recipe.lua @@ -16,7 +16,7 @@ if util.se6() then main_product = "se-methane-gas", icons = { {icon = "__space-exploration-graphics__/graphics/icons/fluid/methane-gas.png", icon_size = 64}, - {icon = "__bzgas__/graphics/icons/gas.png", icon_size = 128, scale = 0.125, shift={-8,-8}}, + {icon = "__bzgas2__/graphics/icons/gas.png", icon_size = 128, scale = 0.125, shift={-8,-8}}, }, enabled = false, ingredients = { @@ -33,7 +33,7 @@ if util.se6() then category = "chemistry", subgroup = "fluid-recipes", icons = { - {icon = "__bzgas__/graphics/icons/formaldehyde.png", icon_size = 128, scale = 0.125}, + {icon = "__bzgas2__/graphics/icons/formaldehyde.png", icon_size = 128, scale = 0.125}, {icon = "__space-exploration-graphics__/graphics/icons/fluid/methane-gas.png", icon_size = 64, scale = 0.125, shift={-8,-8}}, }, enabled = false, @@ -49,6 +49,6 @@ if util.se6() then util.add_unlock("se-space-biochemical-laboratory", "methane-pre-reforming") util.add_unlock("se-space-biochemical-laboratory", "formaldehyde-methane") if data.raw.fluid["se-methane-gas"] then - data.raw.fluid["se-methane-gas"].fuel_value = "1000KJ" + data.raw.fluid["se-methane-gas"].fuel_value = "1000kJ" end end diff --git a/recipe-updates.lua b/bzgas2/recipe-updates.lua similarity index 100% rename from recipe-updates.lua rename to bzgas2/recipe-updates.lua diff --git a/settings-util.lua b/bzgas2/settings-util.lua similarity index 100% rename from settings-util.lua rename to bzgas2/settings-util.lua diff --git a/settings.lua b/bzgas2/settings.lua similarity index 100% rename from settings.lua rename to bzgas2/settings.lua diff --git a/stacking.lua b/bzgas2/stacking.lua similarity index 61% rename from stacking.lua rename to bzgas2/stacking.lua index 45892a4..40a9c1e 100644 --- a/stacking.lua +++ b/bzgas2/stacking.lua @@ -3,9 +3,9 @@ local util = require("data-util"); if deadlock then - deadlock.add_stack("bakelite", "__bzgas__/graphics/icons/stacked/bakelite.png", "deadlock-stacking-1", 128) + deadlock.add_stack("bakelite", "__bzgas2__/graphics/icons/stacked/bakelite.png", "deadlock-stacking-1", 128) if data.raw.item["phenol"] then - deadlock.add_stack("phenol", "__bzgas__/graphics/icons/stacked/phenol.png", "deadlock-stacking-1", 128) + deadlock.add_stack("phenol", "__bzgas2__/graphics/icons/stacked/phenol.png", "deadlock-stacking-1", 128) end end diff --git a/strange-matter.lua b/bzgas2/strange-matter.lua similarity index 95% rename from strange-matter.lua rename to bzgas2/strange-matter.lua index 2318e82..2401ba5 100644 --- a/strange-matter.lua +++ b/bzgas2/strange-matter.lua @@ -1,7 +1,7 @@ local util = require("data-util"); local ore = "gas" -local ore_icon = "__bzgas__/graphics/icons/gas.png" +local ore_icon = "__bzgas2__/graphics/icons/gas.png" if mods["StrangeMatter"] then data:extend({ diff --git a/thumbnail.png b/bzgas2/thumbnail.png similarity index 100% rename from thumbnail.png rename to bzgas2/thumbnail.png diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index 032c6e0..0000000 --- a/changelog.txt +++ /dev/null @@ -1,223 +0,0 @@ ---------------------------------------------------------------------------------------------------- -Version: 0.1.12 -Date: 2023-12-24 - Features: - - Option to make gas finite in vanilla, thanks to Sakuro ---------------------------------------------------------------------------------------------------- -Version: 0.1.11 -Date: 2023-02-12 - Changes: - - Improved compatibility with bob's electronics ---------------------------------------------------------------------------------------------------- -Version: 0.1.10 -Date: 2023-02-12 - Changes: - - Crafting efficiency improvements, thanks to nihilistzsche - - Other minor compatibility improvments ---------------------------------------------------------------------------------------------------- -Version: 0.1.9 -Date: 2023-01-17 - Features: - - (Beta) Crafting efficiency compatibility - Localization: - - ru thanks to CV514 ---------------------------------------------------------------------------------------------------- -Version: 0.1.8 -Date: 2022-12-29 - Changes: - - Move several recipes into "fluid-recipes" subgroup, so they show up in standard place in GUI. - - Basic chem plant has pollution emissions ---------------------------------------------------------------------------------------------------- -Version: 0.1.7 -Date: 2022-12-24 - Localization: - - Updates to ja by Sakuro - - zh-CN by sunnytan53 ---------------------------------------------------------------------------------------------------- -Version: 0.1.6 -Date: 2022-12-08 - Fixes: - - SE/K2: Fix SE core mining balance after 0.1.4 change to finite resources. ---------------------------------------------------------------------------------------------------- -Version: 0.1.5 -Date: 2022-12-05 - Changes: - - Added a command "NaturalGasRecipes" to unlock recipes if necessary. ---------------------------------------------------------------------------------------------------- -Version: 0.1.4 -Date: 2022-12-02 - Fixes: - - Finite oil no longer produces gas when combined with some other mods - Changes: - - Add some gas to the starting area if there isn't any yet. (Can turn off in Map settings) ---------------------------------------------------------------------------------------------------- -Version: 0.1.3 -Date: 2022-10-23 - Changes: - - ElAdamo's Fuel values setting no longer requires their gas boiler to be enabled. ---------------------------------------------------------------------------------------------------- -Version: 0.1.2 -Date: 2022-09-25 - Changes: - - Space Exploration: Delivery cannon recipes for natural gas, formaldehyde, and bakelite ---------------------------------------------------------------------------------------------------- -Version: 0.1.1 -Date: 2022-09-01 - Changes: - - Fix basic chem plant icon in upgrade planner, etc - - When coke is present, alternate phenol recipe faster (15 -> 12) - - Formaldehyde from natural gas is very slightly faster (2 -> 1.8) - - Minor recipe unlock tweaks ---------------------------------------------------------------------------------------------------- -Version: 0.1.0 -Date: 2022-08-24 - Fixes: - - Attempt fix of issue when some character has no crafting categories - Changes: - - Beta release. - Localization: - - Updates to ja by Sakuro ---------------------------------------------------------------------------------------------------- -Version: 0.0.21 -Date: 2022-08-18 - Changes: - - In modded games, if sand exists, prefer sand to silica in basic chem plant recipe. This should - help avoid some strange unlock orders. - - Minor locale fixes ---------------------------------------------------------------------------------------------------- -Version: 0.0.20 -Date: 2022-08-18 - Fixes: - - Fix multiple prerequisite issue ---------------------------------------------------------------------------------------------------- -Version: 0.0.19 -Date: 2022-08-18 - Features: - - Menu simulation - Changes: - - Minor nanobot tech tree tweak ---------------------------------------------------------------------------------------------------- -Version: 0.0.18 -Date: 2022-08-17 - Changes: - - Minor, change tech name from "bakelite" to "basic plastics" - - SE: can make methane from natural gas. - - SE: can make formaldehyde from methane - - SE: methane has a fuel value - - SE + K2: methane can be reformed to hydrogen - Fixes: - - Add missing locale string ---------------------------------------------------------------------------------------------------- -Version: 0.0.17 -Date: 2022-08-11 - Localization: - - ja locale, thanks to Sakuro - - ru locale, thanks to Pergamum663 - Fixes: - - Slightly more improved compatibility, thanks to U.N.Owen ---------------------------------------------------------------------------------------------------- -Version: 0.0.16 -Date: 2022-08-09 - Fixes: - - Generically compatible with modded recipes that use electronic circuits. ---------------------------------------------------------------------------------------------------- -Version: 0.0.15 -Date: 2022-08-05 - Features: - - Some support for ScienceCostTweaker - green science ---------------------------------------------------------------------------------------------------- -Version: 0.0.14 -Date: 2022-08-04 - Fixes: - - AAI: Can use processed fuel for basic chem plant with Krastorio 2 ---------------------------------------------------------------------------------------------------- -Version: 0.0.13 -Date: 2022-08-02 - Features: - - Add a setting to enable a handcrafting-only electronic circuit recipe ---------------------------------------------------------------------------------------------------- -Version: 0.0.12 -Date: 2022-08-01 - Changes: - - Accumulator recipe makes 2 now, but requires more batteries. - - Minor, tweak a K2 recipe icon - - Tweak bakelite item icon - - If enabled, alternate phenol recipe allows productivity ---------------------------------------------------------------------------------------------------- -Version: 0.0.11 -Date: 2022-07-31 - Changes: - - Can use upgrade planner from basic chem plant to chem plant - - SE: Rebalanced core mining output - - AAI: Can use processed fuel for basic chem plant - Features: - - Some basic 248k compatibility. More to come. - Fixes: - - Will load with IR2. Probably will deadlock. Not true compatibility. ---------------------------------------------------------------------------------------------------- -Version: 0.0.10 -Date: 2022-07-28 - Fixes: - - SE/K2: Fix incorrect extreme quantity of bakelite needed. - Changes: - - Bakelite is now also created much faster in chemical plants. ---------------------------------------------------------------------------------------------------- -Version: 0.0.9 -Date: 2022-07-26 - Localization: - - cs locale thanks to RiCZrd ---------------------------------------------------------------------------------------------------- -Version: 0.0.8 -Date: 2022-07-25 - Features: - - K2: Respect finite fluids setting. ---------------------------------------------------------------------------------------------------- -Version: 0.0.7 -Date: 2022-07-25 - Changes: - - Add a new recipe for phenol (when enabled) from light oil, to help with late-game production. - - K2, without AAI: fix green circuit recipe, actually simplify this one. - Fixes: - - Gas Boiler: input arrow for gas input - - Minor typo fixes ---------------------------------------------------------------------------------------------------- -Version: 0.0.6 -Date: 2022-07-23 - Features: - - 5Dims - loose support ---------------------------------------------------------------------------------------------------- -Version: 0.0.5 -Date: 2022-07-23 - Features: - - K2: Biomethanol -> formaldehyde recipe - Fixes: - - Remove module slots from basic (burner) chem plant - - Minor fix to AAI recipe unlocks - - Map gen presets fixed ---------------------------------------------------------------------------------------------------- -Version: 0.0.4 -Date: 2022-07-22 - Features: - - Compatible with ModMash Splinter electronics ---------------------------------------------------------------------------------------------------- -Version: 0.0.3 -Date: 2022-07-22 - Features: - - Compatible with Bob's Electronics/Bob's Electronics SE KR ---------------------------------------------------------------------------------------------------- -Version: 0.0.2 -Date: 2022-07-21 - Fixes: - - Fix crash due to low res sprite - - Remove some startup logs ---------------------------------------------------------------------------------------------------- -Version: 0.0.1 -Date: 2022-07-19 - Features: - - Alpha release. Adds natural gas, bakelite, and other intermediates. - - Integrate's ElAdamo's public domain Gas-fired boiler mod. - If it's ever updated, might remove from this mod and make a dependency. - - Compatible with Krastorio 2 - - Compatible with Space Exploration - - Compatible with deadlock stacking/crating - - Compatible with many other mods diff --git a/control-util.lua b/control-util.lua deleted file mode 100644 index cd2b0f2..0000000 --- a/control-util.lua +++ /dev/null @@ -1,29 +0,0 @@ -local me = require("me") - -local util = {} -util.me = me - -function decode(data) - if type(data) == "string" then return data end - local str = {} - for i = 2, #data do - str[i-1] = decode(data[i]) - end - return table.concat(str, "") -end - -function util.get_list() - local p = game.item_prototypes[me.name.."-list"] - if p then - data = p.localised_description - return decode(data) - end -end - -function util.force_enable_recipe(event, recipe_name) - if game.players[event.player_index].force.recipes[recipe_name] then - game.players[event.player_index].force.recipes[recipe_name].enabled=true - end -end - -return util diff --git a/gas-boiler/data.lua b/gas-boiler/data.lua deleted file mode 100644 index 2018938..0000000 --- a/gas-boiler/data.lua +++ /dev/null @@ -1,190 +0,0 @@ -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 = 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" -gf_boiler_entity.energy_source = { - type = "fluid", - fluid_box = { - base_area = 1, - height = 1, - base_level = -1, - pipe_covers = pipecoverspictures(), - pipe_picture = { - north = { - 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 = gd.."/graphics/entity/" - .."hr-assembling-machine-1-pipe-N.png", - priority = "extra-high", - width = 71, - height = 38, - shift = util.by_pixel(2.25, 13.5), - scale = 0.5 - } - }, - east = { - 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 = gd.."/graphics/entity/" - .."hr-assembling-machine-1-pipe-E.png", - priority = "extra-high", - width = 42, - height = 76, - shift = util.by_pixel(-24.5, 1), - scale = 0.5 - } - }, - south = { - 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 = gd.."/graphics/entity/" - .."hr-assembling-machine-1-pipe-S.png", - priority = "extra-high", - width = 88, - height = 61, - shift = util.by_pixel(0, -31.25), - scale = 0.5 - } - }, - west = { - 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 = gd.."/graphics/entity/" - .."hr-assembling-machine-1-pipe-W.png", - priority = "extra-high", - width = 39, - height = 73, - shift = util.by_pixel(25.75, 1.25), - scale = 0.5 - } - } - }, - pipe_connections = { - {type = "input", position = {0, 1.5}}, - }, - production_type = "input", - secondary_draw_orders = { - south = 32, - north = -1, - east = -1, - west = -1, - } - }, - burns_fluid = true, - scale_fluid_usage = true, - emissions_per_minute = 30, - smoke = {{ - name = "smoke", - north_position = util.by_pixel(-38, -47.5), - south_position = util.by_pixel(38.5, -32), - east_position = util.by_pixel(20, -70), - west_position = util.by_pixel(-19, -8.5), - frequency = 15, - starting_vertical_speed = 0.3, - starting_frame_deviation = 0 - }}, - light_flicker = { - color = colors.gas_fire_glow, - minimum_light_size = 0.1, - light_intensity_to_size_coefficient = 1 - } -} -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 = - gd.."/graphics/entity/".. - "gas-boiler-N-light.png" -gf_boiler_entity.fire_glow.south.filename = - gd.."/graphics/entity/".. - "gas-boiler-S-light.png" -gf_boiler_entity.fire_glow.east.filename = - gd.."/graphics/entity/".. - "gas-boiler-E-light.png" -gf_boiler_entity.fire_glow.west.filename = - gd.."/graphics/entity/".. - "gas-boiler-W-light.png" -gf_boiler_entity.fire_glow.north.hr_version.filename = - gd.."/graphics/entity/".. - "hr-gas-boiler-N-light.png" -gf_boiler_entity.fire_glow.south.hr_version.filename = - gd.."/graphics/entity/".. - "hr-gas-boiler-S-light.png" -gf_boiler_entity.fire_glow.east.hr_version.filename = - gd.."/graphics/entity/".. - "hr-gas-boiler-E-light.png" -gf_boiler_entity.fire_glow.west.hr_version.filename = - 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 -gf_boiler_entity.fire_glow.east.apply_runtime_tint = true -gf_boiler_entity.fire_glow.west.apply_runtime_tint = true -gf_boiler_entity.fire_glow.north.tint={r=1,g=0.6,b=0.6,a=0.4} -gf_boiler_entity.fire_glow.south.tint={r=1,g=0.6,b=0.6,a=0.4} -gf_boiler_entity.fire_glow.east.tint={r=1,g=0.6,b=0.6,a=0.4} -gf_boiler_entity.fire_glow.west.tint={r=1,g=0.6,b=0.6,a=0.4} -gf_boiler_entity.fire_glow.north.blend_mode = "additive-soft" -gf_boiler_entity.fire_glow.south.blend_mode = "additive-soft" -gf_boiler_entity.fire_glow.east.blend_mode = "additive-soft" -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 = gd.."/graphics/icons/gas-boiler.png" -gf_boiler_item.order = "b[steam-power]-b[gas-boiler]" -gf_boiler_item.place_result = "gas-boiler" - -gf_boiler_recipe = { - type = "recipe", - name = "gas-boiler", - enabled = false, - ingredients = {{ - "boiler",1 - },{ - "pump",1 - }}, - result = "gas-boiler" -} - -data:extend({ - gf_boiler_item, - gf_boiler_recipe, - gf_boiler_entity -}) -add_recipe_to_tech( - "fluid-handling", - "gas-boiler" -) diff --git a/graphics/entity/chemical-plant.png b/graphics/entity/chemical-plant.png deleted file mode 100644 index cf5783a..0000000 Binary files a/graphics/entity/chemical-plant.png and /dev/null differ diff --git a/graphics/entity/ores/gas-effect.png b/graphics/entity/ores/gas-effect.png deleted file mode 100644 index 8eaeb43..0000000 Binary files a/graphics/entity/ores/gas-effect.png and /dev/null differ diff --git a/graphics/entity/ores/gas.png b/graphics/entity/ores/gas.png deleted file mode 100644 index 11444e4..0000000 Binary files a/graphics/entity/ores/gas.png and /dev/null differ diff --git a/info.json b/info.json deleted file mode 100644 index 75e529d..0000000 --- a/info.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "bzgas", - "version": "0.1.12", - "factorio_version": "1.1", - "title": "Natural Gas", - "author": "Brevven", - "contact": "", - "homepage": "", - "dependencies": [ - "base >= 1.1.0", - "? bzfoundry >= 0.2.1", - "? bztitanium >= 1.2.0", - "? bzlead >= 1.2.0", - "? bzzirconium >= 0.6.0", - "? bztungsten >= 0.6.0", - "? bzcarbon >= 0.3.0", - "? bztin", - "? space-exploration >= 0.5.100", - "? aai-industry", - "? Krastorio2", - "? deadlock-beltboxes-loaders", - "? DeadlockCrating" - ], - "description": "Adds a natural gas resource, along with early game plastic.\nIntegrates ElAdamo's gas-fired boiler.\n\nCompatible with Krastorio 2 and Space Exploration. A standalone piece of BZ Mods." -} diff --git a/modules.lua b/modules.lua deleted file mode 100644 index f73fde1..0000000 --- a/modules.lua +++ /dev/null @@ -1,15 +0,0 @@ -local util = require("data-util"); - -for i, recipe in pairs(util.me.recipes) do - if data.raw.recipe[recipe] then - for j, module in pairs(data.raw.module) do - if module.effect then - for effect_name, effect in pairs(module.effect) do - if effect_name == "productivity" and effect.bonus > 0 and module.limitation and #module.limitation > 0 then - table.insert(module.limitation, recipe) - end - end - end - end - end -end diff --git a/graphics/entity/chemical-plant.xcf b/sources/graphics/entity/chemical-plant.xcf similarity index 100% rename from graphics/entity/chemical-plant.xcf rename to sources/graphics/entity/chemical-plant.xcf diff --git a/graphics/entity/gas-extractor-base-e.xcf b/sources/graphics/entity/gas-extractor-base-e.xcf similarity index 100% rename from graphics/entity/gas-extractor-base-e.xcf rename to sources/graphics/entity/gas-extractor-base-e.xcf diff --git a/graphics/entity/gas-extractor-base-n.xcf b/sources/graphics/entity/gas-extractor-base-n.xcf similarity index 100% rename from graphics/entity/gas-extractor-base-n.xcf rename to sources/graphics/entity/gas-extractor-base-n.xcf diff --git a/graphics/entity/gas-extractor-base-s.xcf b/sources/graphics/entity/gas-extractor-base-s.xcf similarity index 100% rename from graphics/entity/gas-extractor-base-s.xcf rename to sources/graphics/entity/gas-extractor-base-s.xcf diff --git a/graphics/entity/gas-extractor-base-w.xcf b/sources/graphics/entity/gas-extractor-base-w.xcf similarity index 100% rename from graphics/entity/gas-extractor-base-w.xcf rename to sources/graphics/entity/gas-extractor-base-w.xcf diff --git a/graphics/entity/gas-extractor-shadow.xcf b/sources/graphics/entity/gas-extractor-shadow.xcf similarity index 100% rename from graphics/entity/gas-extractor-shadow.xcf rename to sources/graphics/entity/gas-extractor-shadow.xcf diff --git a/graphics/entity/gas-extractor.xcf b/sources/graphics/entity/gas-extractor.xcf similarity index 100% rename from graphics/entity/gas-extractor.xcf rename to sources/graphics/entity/gas-extractor.xcf diff --git a/graphics/entity/hr-chemical-plant.xcf b/sources/graphics/entity/hr-chemical-plant.xcf similarity index 100% rename from graphics/entity/hr-chemical-plant.xcf rename to sources/graphics/entity/hr-chemical-plant.xcf diff --git a/graphics/entity/ores/gas-effect.xcf b/sources/graphics/entity/ores/gas-effect.xcf similarity index 100% rename from graphics/entity/ores/gas-effect.xcf rename to sources/graphics/entity/ores/gas-effect.xcf diff --git a/graphics/entity/ores/gas.xcf b/sources/graphics/entity/ores/gas.xcf similarity index 100% rename from graphics/entity/ores/gas.xcf rename to sources/graphics/entity/ores/gas.xcf diff --git a/graphics/icons/chemical-plant-overlay.xcf b/sources/graphics/icons/chemical-plant-overlay.xcf similarity index 100% rename from graphics/icons/chemical-plant-overlay.xcf rename to sources/graphics/icons/chemical-plant-overlay.xcf diff --git a/graphics/icons/formaldehyde.xcf b/sources/graphics/icons/formaldehyde.xcf similarity index 100% rename from graphics/icons/formaldehyde.xcf rename to sources/graphics/icons/formaldehyde.xcf diff --git a/graphics/icons/gas-extractor.xcf b/sources/graphics/icons/gas-extractor.xcf similarity index 100% rename from graphics/icons/gas-extractor.xcf rename to sources/graphics/icons/gas-extractor.xcf diff --git a/graphics/icons/gas.xcf b/sources/graphics/icons/gas.xcf similarity index 100% rename from graphics/icons/gas.xcf rename to sources/graphics/icons/gas.xcf diff --git a/graphics/icons/stacked/bakelite.xcf b/sources/graphics/icons/stacked/bakelite.xcf similarity index 100% rename from graphics/icons/stacked/bakelite.xcf rename to sources/graphics/icons/stacked/bakelite.xcf diff --git a/graphics/icons/stacked/phenol.xcf b/sources/graphics/icons/stacked/phenol.xcf similarity index 100% rename from graphics/icons/stacked/phenol.xcf rename to sources/graphics/icons/stacked/phenol.xcf diff --git a/graphics/technology/formaldehyde.xcf b/sources/graphics/technology/formaldehyde.xcf similarity index 100% rename from graphics/technology/formaldehyde.xcf rename to sources/graphics/technology/formaldehyde.xcf diff --git a/graphics/technology/gas-processing.xcf b/sources/graphics/technology/gas-processing.xcf similarity index 100% rename from graphics/technology/gas-processing.xcf rename to sources/graphics/technology/gas-processing.xcf diff --git a/thumbnail.xcf b/sources/thumbnail.xcf similarity index 100% rename from thumbnail.xcf rename to sources/thumbnail.xcf