diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index bbf3e21..0000000 --- a/.editorconfig +++ /dev/null @@ -1,3 +0,0 @@ -[*] -indent_style = space -indent_size = 2 \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..e04c9b6 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* brevven diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 85e49ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea -*.zip \ No newline at end of file diff --git a/bztungsten2/LICENSE.md b/LICENSE.md similarity index 100% rename from bztungsten2/LICENSE.md rename to LICENSE.md diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..11be59f --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +# 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/bztungsten2/advanced-carbon-furnace.lua b/advanced-carbon-furnace.lua similarity index 74% rename from bztungsten2/advanced-carbon-furnace.lua rename to advanced-carbon-furnace.lua index d2a3094..b3b331f 100644 --- a/bztungsten2/advanced-carbon-furnace.lua +++ b/advanced-carbon-furnace.lua @@ -1,7 +1,7 @@ local futil = require("util"); -local util = require("data-util"); +local util = require("__bztungsten__.data-util"); -if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mods.Krastorio2 and not mods.bzfoundry2 then +if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mods.Krastorio2 and not mods.bzfoundry then log("Using advanced carbon furnace") data:extend({ { @@ -20,8 +20,8 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo { type = "recipe", name = "advanced-carbon-furnace", - ingredients = {{type="item", name="steel-furnace", amount=2}, {type="item", name="stone-brick", amount=5}, {type="item", name="tungsten-plate", amount=5}}, - results = {{type="item", name="advanced-carbon-furnace", amount=1}}, + ingredients = {{"steel-furnace", 2}, {"stone-brick", 5}, {"tungsten-plate", 5}}, + result = "advanced-carbon-furnace", energy_required = 6, enabled = false, }, @@ -102,9 +102,9 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo energy_source = { type = "burner", - fuel_categories = {"chemical"}, + fuel_category = "chemical", effectivity = 1, - emissions_per_minute = {["pollution"] = 4}, + emissions_per_minute = 4, fuel_inventory_size = 1, light_flicker = { @@ -130,22 +130,42 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo { filename = "__base__/graphics/entity/steel-furnace/steel-furnace.png", priority = "high", - width = 171, + width = 85, + height = 87, + frame_count = 1, + shift = futil.by_pixel(-1.5, 1.5), + tint = {a = 1, r = .55, g = .6, b = .6}, + hr_version = + { + filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace.png", + priority = "high", + width = 171, height = 174, frame_count = 1, shift = futil.by_pixel(-1.25, 2), scale = 0.5, tint = {a = 1, r = .55, g = .6, b = .6}, + } }, { filename = "__base__/graphics/entity/steel-furnace/steel-furnace-shadow.png", priority = "high", - width = 277, + width = 139, + height = 43, + frame_count = 1, + draw_as_shadow = true, + shift = futil.by_pixel(39.5, 11.5), + hr_version = + { + filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-shadow.png", + priority = "high", + width = 277, height = 85, frame_count = 1, draw_as_shadow = true, shift = futil.by_pixel(39.25, 11.25), scale = 0.5 + } } } }, @@ -161,12 +181,24 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo filename = "__base__/graphics/entity/steel-furnace/steel-furnace-fire.png", priority = "high", line_length = 8, + width = 29, + height = 40, + frame_count = 48, + direction_count = 1, + shift = futil.by_pixel(-0.5, 6), + hr_version = + { + animation_speed = 0.25, + filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-fire.png", + priority = "high", + line_length = 8, width = 57, height = 81, frame_count = 48, direction_count = 1, shift = futil.by_pixel(-0.75, 5.75), scale = 0.5 + } }, }, { @@ -193,6 +225,17 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo filename = "__base__/graphics/entity/steel-furnace/steel-furnace-working.png", priority = "high", line_length = 1, + width = 64, + height = 74, + frame_count = 1, + direction_count = 1, + shift = futil.by_pixel(0, -4), + blend_mode = "additive", + hr_version = + { + filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-working.png", + priority = "high", + line_length = 1, width = 128, height = 150, frame_count = 1, @@ -200,6 +243,7 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo shift = futil.by_pixel(0, -5), blend_mode = "additive", scale = 0.5, + } } }, { @@ -212,6 +256,18 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo filename = "__base__/graphics/entity/steel-furnace/steel-furnace-ground-light.png", priority = "high", line_length = 1, + draw_as_sprite = false, + width = 78, + height = 64, + frame_count = 1, + direction_count = 1, + shift = futil.by_pixel(0, 48), + blend_mode = "additive", + hr_version = + { + filename = "__base__/graphics/entity/steel-furnace/hr-steel-furnace-ground-light.png", + priority = "high", + line_length = 1, draw_as_sprite = false, width = 152, height = 126, @@ -220,6 +276,7 @@ if util.me.get_setting("bztungsten-advanced-carbon-furnace") == "yes" and not mo shift = futil.by_pixel(1, 48), blend_mode = "additive", scale = 0.5, + } }, }, }, diff --git a/bztungsten2/control-util.lua b/bztungsten2/control-util.lua deleted file mode 100644 index 9000745..0000000 --- a/bztungsten2/control-util.lua +++ /dev/null @@ -1,86 +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 - - -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 - 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 + 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 end table.insert(data.raw.recipe[recipe_name].icons, icon) end @@ -1035,6 +1119,8 @@ 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 @@ -1057,6 +1143,8 @@ 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 @@ -1179,8 +1267,10 @@ function remove_prior_unlocks(tech, recipe) util.remove_recipe_effect(tech, recipe) if technology.prerequisites then for i, prerequisite in pairs(technology.prerequisites) do - -- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :| - remove_prior_unlocks(prerequisite, recipe) + 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 end end end @@ -1222,7 +1312,9 @@ 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 :| - replace_ingredients_prior_to(prerequisite, old, new, multiplier) + if string.sub(prerequisite, 1, 3) ~= 'ei_' then + replace_ingredients_prior_to(prerequisite, old, new, multiplier) + end end end end diff --git a/bztungsten2/data.lua b/data.lua similarity index 100% rename from bztungsten2/data.lua rename to data.lua diff --git a/bztungsten2/graphics/entity/ores/tungsten-ore.png b/graphics/entity/ores/hr-tungsten-ore.png similarity index 100% rename from bztungsten2/graphics/entity/ores/tungsten-ore.png rename to graphics/entity/ores/hr-tungsten-ore.png diff --git a/sources/graphics/entity/ores/tungsten-ore.xcf b/graphics/entity/ores/hr-tungsten-ore.xcf similarity index 100% rename from sources/graphics/entity/ores/tungsten-ore.xcf rename to graphics/entity/ores/hr-tungsten-ore.xcf diff --git a/graphics/entity/ores/tungsten-ore.png b/graphics/entity/ores/tungsten-ore.png new file mode 100644 index 0000000..dded6bc Binary files /dev/null and b/graphics/entity/ores/tungsten-ore.png differ diff --git a/graphics/entity/ores/tungsten-ore.xcf b/graphics/entity/ores/tungsten-ore.xcf new file mode 100644 index 0000000..ee8e86b Binary files /dev/null and b/graphics/entity/ores/tungsten-ore.xcf differ diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-1.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-1.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-2.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-2.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-3.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-3.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-4.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-4.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-1.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-1.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-2.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-2.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-3.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-3.png diff --git a/bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png b/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-4.png similarity index 100% rename from bztungsten2/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png rename to graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-4.png diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png new file mode 100644 index 0000000..1b76c18 Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png new file mode 100644 index 0000000..0bf7c6b Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png new file mode 100644 index 0000000..35c156a Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png new file mode 100644 index 0000000..9f5115c Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png new file mode 100644 index 0000000..89bfee9 Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png new file mode 100644 index 0000000..7834934 Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png new file mode 100644 index 0000000..6ef2544 Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png differ diff --git a/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png new file mode 100644 index 0000000..a8aa006 Binary files /dev/null and b/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png differ diff --git a/bztungsten2/graphics/icons/cuw.png b/graphics/icons/cuw.png similarity index 100% rename from bztungsten2/graphics/icons/cuw.png rename to graphics/icons/cuw.png diff --git a/sources/graphics/icons/cuw.xcf b/graphics/icons/cuw.xcf similarity index 100% rename from sources/graphics/icons/cuw.xcf rename to graphics/icons/cuw.xcf diff --git a/bztungsten2/graphics/icons/enriched-tungsten-2.png b/graphics/icons/enriched-tungsten-2.png similarity index 100% rename from bztungsten2/graphics/icons/enriched-tungsten-2.png rename to graphics/icons/enriched-tungsten-2.png diff --git a/bztungsten2/graphics/icons/enriched-tungsten-3.png b/graphics/icons/enriched-tungsten-3.png similarity index 100% rename from bztungsten2/graphics/icons/enriched-tungsten-3.png rename to graphics/icons/enriched-tungsten-3.png diff --git a/bztungsten2/graphics/icons/enriched-tungsten-4.png b/graphics/icons/enriched-tungsten-4.png similarity index 100% rename from bztungsten2/graphics/icons/enriched-tungsten-4.png rename to graphics/icons/enriched-tungsten-4.png diff --git a/bztungsten2/graphics/icons/enriched-tungsten.png b/graphics/icons/enriched-tungsten.png similarity index 100% rename from bztungsten2/graphics/icons/enriched-tungsten.png rename to graphics/icons/enriched-tungsten.png diff --git a/sources/graphics/icons/enriched-tungsten.xcf b/graphics/icons/enriched-tungsten.xcf similarity index 100% rename from sources/graphics/icons/enriched-tungsten.xcf rename to graphics/icons/enriched-tungsten.xcf diff --git a/sources/graphics/icons/large-rocket-engine-nozzle.xcf b/graphics/icons/large-rocket-engine-nozzle.xcf similarity index 100% rename from sources/graphics/icons/large-rocket-engine-nozzle.xcf rename to graphics/icons/large-rocket-engine-nozzle.xcf diff --git a/bztungsten2/graphics/icons/molten-tungsten.png b/graphics/icons/molten-tungsten.png similarity index 100% rename from bztungsten2/graphics/icons/molten-tungsten.png rename to graphics/icons/molten-tungsten.png diff --git a/sources/graphics/icons/molten-tungsten.xcf b/graphics/icons/molten-tungsten.xcf similarity index 100% rename from sources/graphics/icons/molten-tungsten.xcf rename to graphics/icons/molten-tungsten.xcf diff --git a/bztungsten2/graphics/icons/rocket-engine-nozzle.png b/graphics/icons/rocket-engine-nozzle.png similarity index 100% rename from bztungsten2/graphics/icons/rocket-engine-nozzle.png rename to graphics/icons/rocket-engine-nozzle.png diff --git a/sources/graphics/icons/rocket-engine-nozzle.xcf b/graphics/icons/rocket-engine-nozzle.xcf similarity index 100% rename from sources/graphics/icons/rocket-engine-nozzle.xcf rename to graphics/icons/rocket-engine-nozzle.xcf diff --git a/bztungsten2/graphics/icons/stacked/cuw-stacked.png b/graphics/icons/stacked/cuw-stacked.png similarity index 100% rename from bztungsten2/graphics/icons/stacked/cuw-stacked.png rename to graphics/icons/stacked/cuw-stacked.png diff --git a/sources/graphics/icons/stacked/cuw-stacked.xcf b/graphics/icons/stacked/cuw-stacked.xcf similarity index 100% rename from sources/graphics/icons/stacked/cuw-stacked.xcf rename to graphics/icons/stacked/cuw-stacked.xcf diff --git a/bztungsten2/graphics/icons/stacked/enriched-tungsten-stacked.png b/graphics/icons/stacked/enriched-tungsten-stacked.png similarity index 100% rename from bztungsten2/graphics/icons/stacked/enriched-tungsten-stacked.png rename to graphics/icons/stacked/enriched-tungsten-stacked.png diff --git a/sources/graphics/icons/stacked/enriched-tungsten-stacked.xcf b/graphics/icons/stacked/enriched-tungsten-stacked.xcf similarity index 100% rename from sources/graphics/icons/stacked/enriched-tungsten-stacked.xcf rename to graphics/icons/stacked/enriched-tungsten-stacked.xcf diff --git a/bztungsten2/graphics/icons/stacked/rocket-engine-nozzle-stacked.png b/graphics/icons/stacked/rocket-engine-nozzle-stacked.png similarity index 100% rename from bztungsten2/graphics/icons/stacked/rocket-engine-nozzle-stacked.png rename to graphics/icons/stacked/rocket-engine-nozzle-stacked.png diff --git a/sources/graphics/icons/stacked/rocket-engine-nozzle-stacked.xcf b/graphics/icons/stacked/rocket-engine-nozzle-stacked.xcf similarity index 100% rename from sources/graphics/icons/stacked/rocket-engine-nozzle-stacked.xcf rename to graphics/icons/stacked/rocket-engine-nozzle-stacked.xcf diff --git a/bztungsten2/graphics/icons/stacked/tungsten-carbide-stacked.png b/graphics/icons/stacked/tungsten-carbide-stacked.png similarity index 100% rename from bztungsten2/graphics/icons/stacked/tungsten-carbide-stacked.png rename to graphics/icons/stacked/tungsten-carbide-stacked.png diff --git a/sources/graphics/icons/stacked/tungsten-carbide-stacked.xcf b/graphics/icons/stacked/tungsten-carbide-stacked.xcf similarity index 100% rename from sources/graphics/icons/stacked/tungsten-carbide-stacked.xcf rename to graphics/icons/stacked/tungsten-carbide-stacked.xcf diff --git a/bztungsten2/graphics/icons/stacked/tungsten-ore-stacked.png b/graphics/icons/stacked/tungsten-ore-stacked.png similarity index 100% rename from bztungsten2/graphics/icons/stacked/tungsten-ore-stacked.png rename to graphics/icons/stacked/tungsten-ore-stacked.png diff --git a/sources/graphics/icons/stacked/tungsten-ore-stacked.xcf b/graphics/icons/stacked/tungsten-ore-stacked.xcf similarity index 100% rename from sources/graphics/icons/stacked/tungsten-ore-stacked.xcf rename to graphics/icons/stacked/tungsten-ore-stacked.xcf diff --git a/bztungsten2/graphics/icons/stacked/tungsten-plate-stacked.png b/graphics/icons/stacked/tungsten-plate-stacked.png similarity index 100% rename from bztungsten2/graphics/icons/stacked/tungsten-plate-stacked.png rename to graphics/icons/stacked/tungsten-plate-stacked.png diff --git a/sources/graphics/icons/stacked/tungsten-plate-stacked.xcf b/graphics/icons/stacked/tungsten-plate-stacked.xcf similarity index 100% rename from sources/graphics/icons/stacked/tungsten-plate-stacked.xcf rename to graphics/icons/stacked/tungsten-plate-stacked.xcf diff --git a/bztungsten2/graphics/icons/tungsten-carbide.png b/graphics/icons/tungsten-carbide.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-carbide.png rename to graphics/icons/tungsten-carbide.png diff --git a/sources/graphics/icons/tungsten-carbide.xcf b/graphics/icons/tungsten-carbide.xcf similarity index 100% rename from sources/graphics/icons/tungsten-carbide.xcf rename to graphics/icons/tungsten-carbide.xcf diff --git a/bztungsten2/graphics/icons/tungsten-ingot.png b/graphics/icons/tungsten-ingot.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-ingot.png rename to graphics/icons/tungsten-ingot.png diff --git a/sources/graphics/icons/tungsten-ingot.xcf b/graphics/icons/tungsten-ingot.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ingot.xcf rename to graphics/icons/tungsten-ingot.xcf diff --git a/bztungsten2/graphics/icons/tungsten-ore-2.png b/graphics/icons/tungsten-ore-2.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-ore-2.png rename to graphics/icons/tungsten-ore-2.png diff --git a/sources/graphics/icons/tungsten-ore-2.xcf b/graphics/icons/tungsten-ore-2.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-2.xcf rename to graphics/icons/tungsten-ore-2.xcf diff --git a/bztungsten2/graphics/icons/tungsten-ore-3.png b/graphics/icons/tungsten-ore-3.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-ore-3.png rename to graphics/icons/tungsten-ore-3.png diff --git a/sources/graphics/icons/tungsten-ore-3.xcf b/graphics/icons/tungsten-ore-3.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-3.xcf rename to graphics/icons/tungsten-ore-3.xcf diff --git a/bztungsten2/graphics/icons/tungsten-ore-4.png b/graphics/icons/tungsten-ore-4.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-ore-4.png rename to graphics/icons/tungsten-ore-4.png diff --git a/sources/graphics/icons/tungsten-ore-4.xcf b/graphics/icons/tungsten-ore-4.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-4.xcf rename to graphics/icons/tungsten-ore-4.xcf diff --git a/sources/graphics/icons/tungsten-ore-n-2.xcf b/graphics/icons/tungsten-ore-n-2.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-n-2.xcf rename to graphics/icons/tungsten-ore-n-2.xcf diff --git a/sources/graphics/icons/tungsten-ore-n-3.xcf b/graphics/icons/tungsten-ore-n-3.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-n-3.xcf rename to graphics/icons/tungsten-ore-n-3.xcf diff --git a/sources/graphics/icons/tungsten-ore-n-4.xcf b/graphics/icons/tungsten-ore-n-4.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-n-4.xcf rename to graphics/icons/tungsten-ore-n-4.xcf diff --git a/sources/graphics/icons/tungsten-ore-n.xcf b/graphics/icons/tungsten-ore-n.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-n.xcf rename to graphics/icons/tungsten-ore-n.xcf diff --git a/sources/graphics/icons/tungsten-ore-stacked-new.xcf b/graphics/icons/tungsten-ore-stacked-new.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-stacked-new.xcf rename to graphics/icons/tungsten-ore-stacked-new.xcf diff --git a/sources/graphics/icons/tungsten-ore-x-2.xcf b/graphics/icons/tungsten-ore-x-2.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-x-2.xcf rename to graphics/icons/tungsten-ore-x-2.xcf diff --git a/sources/graphics/icons/tungsten-ore-x-3.xcf b/graphics/icons/tungsten-ore-x-3.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-x-3.xcf rename to graphics/icons/tungsten-ore-x-3.xcf diff --git a/sources/graphics/icons/tungsten-ore-x-4.xcf b/graphics/icons/tungsten-ore-x-4.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-x-4.xcf rename to graphics/icons/tungsten-ore-x-4.xcf diff --git a/sources/graphics/icons/tungsten-ore-x.xcf b/graphics/icons/tungsten-ore-x.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore-x.xcf rename to graphics/icons/tungsten-ore-x.xcf diff --git a/bztungsten2/graphics/icons/tungsten-ore.png b/graphics/icons/tungsten-ore.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-ore.png rename to graphics/icons/tungsten-ore.png diff --git a/sources/graphics/icons/tungsten-ore.xcf b/graphics/icons/tungsten-ore.xcf similarity index 100% rename from sources/graphics/icons/tungsten-ore.xcf rename to graphics/icons/tungsten-ore.xcf diff --git a/sources/graphics/icons/tungsten-plate-2.xcf b/graphics/icons/tungsten-plate-2.xcf similarity index 100% rename from sources/graphics/icons/tungsten-plate-2.xcf rename to graphics/icons/tungsten-plate-2.xcf diff --git a/sources/graphics/icons/tungsten-plate-new.xcf b/graphics/icons/tungsten-plate-new.xcf similarity index 100% rename from sources/graphics/icons/tungsten-plate-new.xcf rename to graphics/icons/tungsten-plate-new.xcf diff --git a/bztungsten2/graphics/icons/tungsten-plate.png b/graphics/icons/tungsten-plate.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-plate.png rename to graphics/icons/tungsten-plate.png diff --git a/sources/graphics/icons/tungsten-plate.xcf b/graphics/icons/tungsten-plate.xcf similarity index 100% rename from sources/graphics/icons/tungsten-plate.xcf rename to graphics/icons/tungsten-plate.xcf diff --git a/bztungsten2/graphics/icons/tungsten-powder.png b/graphics/icons/tungsten-powder.png similarity index 100% rename from bztungsten2/graphics/icons/tungsten-powder.png rename to graphics/icons/tungsten-powder.png diff --git a/sources/graphics/icons/tungsten-powder.xcf b/graphics/icons/tungsten-powder.xcf similarity index 100% rename from sources/graphics/icons/tungsten-powder.xcf rename to graphics/icons/tungsten-powder.xcf diff --git a/bztungsten2/graphics/technology/tungsten-processing.png b/graphics/technology/tungsten-processing.png similarity index 100% rename from bztungsten2/graphics/technology/tungsten-processing.png rename to graphics/technology/tungsten-processing.png diff --git a/sources/graphics/technology/tungsten-processing.xcf b/graphics/technology/tungsten-processing.xcf similarity index 100% rename from sources/graphics/technology/tungsten-processing.xcf rename to graphics/technology/tungsten-processing.xcf diff --git a/bztungsten2/info.json b/info.json similarity index 83% rename from bztungsten2/info.json rename to info.json index c0ebf58..dba0cb3 100644 --- a/bztungsten2/info.json +++ b/info.json @@ -1,13 +1,13 @@ { - "name": "bztungsten2", - "version": "2.0.0", - "factorio_version": "2.0", + "name": "bztungsten", + "version": "0.7.11", + "factorio_version": "1.1", "title": "Tungsten", "author": "Brevven", "contact": "", "homepage": "", "dependencies": [ - "base >= 2.0", + "base >= 1.1.0", "? space-exploration", "? Krastorio2", "? deadlock-beltboxes-loaders", diff --git a/bztungsten2/locale/de/tungsten.cfg b/locale/de/tungsten.cfg similarity index 100% rename from bztungsten2/locale/de/tungsten.cfg rename to locale/de/tungsten.cfg diff --git a/bztungsten2/locale/en/tungsten.cfg b/locale/en/tungsten.cfg similarity index 100% rename from bztungsten2/locale/en/tungsten.cfg rename to locale/en/tungsten.cfg diff --git a/bztungsten2/locale/ja/tungsten.cfg b/locale/ja/tungsten.cfg similarity index 100% rename from bztungsten2/locale/ja/tungsten.cfg rename to locale/ja/tungsten.cfg diff --git a/bztungsten2/locale/ko/tungsten.cfg b/locale/ko/tungsten.cfg similarity index 100% rename from bztungsten2/locale/ko/tungsten.cfg rename to locale/ko/tungsten.cfg diff --git a/bztungsten2/locale/pl/tungsten.cfg b/locale/pl/tungsten.cfg similarity index 100% rename from bztungsten2/locale/pl/tungsten.cfg rename to locale/pl/tungsten.cfg diff --git a/bztungsten2/locale/ru/tungsten.cfg b/locale/ru/tungsten.cfg similarity index 100% rename from bztungsten2/locale/ru/tungsten.cfg rename to locale/ru/tungsten.cfg diff --git a/bztungsten2/locale/zh-CN/bztungsten.cfg b/locale/zh-CN/bztungsten.cfg similarity index 100% rename from bztungsten2/locale/zh-CN/bztungsten.cfg rename to locale/zh-CN/bztungsten.cfg diff --git a/bztungsten2/map-gen-preset-updates.lua b/map-gen-preset-updates.lua similarity index 100% rename from bztungsten2/map-gen-preset-updates.lua rename to map-gen-preset-updates.lua diff --git a/bztungsten2/me.lua b/me.lua similarity index 98% rename from bztungsten2/me.lua rename to me.lua index ab0226c..68943e4 100644 --- a/bztungsten2/me.lua +++ b/me.lua @@ -1,6 +1,6 @@ local me = {} -me.name = "bztungsten2" +me.name = "bztungsten" me.tungsten_ore = "tungsten-ore" me.tungsten_plate = "tungsten-plate" me.tungsten_carbide_recipe = "tungsten-carbide" diff --git a/bztungsten2/menu-simulations/tungsten-nozzle-sim.zip b/menu-simulations/tungsten-nozzle-sim.zip similarity index 100% rename from bztungsten2/menu-simulations/tungsten-nozzle-sim.zip rename to menu-simulations/tungsten-nozzle-sim.zip diff --git a/modules.lua b/modules.lua new file mode 100644 index 0000000..b67161a --- /dev/null +++ b/modules.lua @@ -0,0 +1,17 @@ +-- Enable prod modules for all tungsten plate and ore recipes +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/bztungsten2/omni.lua b/omni.lua similarity index 100% rename from bztungsten2/omni.lua rename to omni.lua diff --git a/bztungsten2/settings-util.lua b/settings-util.lua similarity index 100% rename from bztungsten2/settings-util.lua rename to settings-util.lua diff --git a/bztungsten2/settings.lua b/settings.lua similarity index 92% rename from bztungsten2/settings.lua rename to settings.lua index af0caee..3eead17 100644 --- a/bztungsten2/settings.lua +++ b/settings.lua @@ -29,7 +29,7 @@ data:extend({ setting_type = "startup", default_value = "no", allowed_values = {"yes", "no"}, - hidden = not not (mods.Krastorio2 or mods.bzfoundry2), + hidden = not not (mods.Krastorio2 or mods.bzfoundry), order = "aea", }, }) @@ -40,8 +40,8 @@ if mods.Krastorio2 then type = "string-setting", name = "bztungsten-mining-fluid-k2", setting_type = "startup", - default_value = "kr-mineral-water", - allowed_values = {"kr-mineral-water", "water"}, + default_value = "mineral-water", + allowed_values = {"mineral-water", "water"}, order = "aga", }, { diff --git a/bztungsten2/strange-matter.lua b/strange-matter.lua similarity index 87% rename from bztungsten2/strange-matter.lua rename to strange-matter.lua index 095bbf4..284de8f 100644 --- a/bztungsten2/strange-matter.lua +++ b/strange-matter.lua @@ -1,8 +1,8 @@ -local util = require("__bztungsten2__.data-util"); +local util = require("__bztungsten__.data-util"); local ore = "tungsten-ore" -local ore_icon = "__bztungsten2__/graphics/icons/tungsten-ore.png" +local ore_icon = "__bztungsten__/graphics/icons/tungsten-ore.png" if mods["StrangeMatter"] then data:extend({ @@ -16,7 +16,7 @@ data:extend({ enabled = false, energy_required = 1, ingredients = {{type="fluid", name="strange-matter", amount = 2}}, - results = {{type="item", name=ore, amount=1}}, + result = ore, category = "crafting-with-fluid", subgroup = "synthesis", }, diff --git a/bztungsten2/thumbnail.png b/thumbnail.png similarity index 100% rename from bztungsten2/thumbnail.png rename to thumbnail.png diff --git a/sources/thumbnail.xcf b/thumbnail.xcf similarity index 100% rename from sources/thumbnail.xcf rename to thumbnail.xcf diff --git a/bztungsten2/tungsten-compressed.lua b/tungsten-compressed.lua similarity index 92% rename from bztungsten2/tungsten-compressed.lua rename to tungsten-compressed.lua index 2f85c13..498e84c 100644 --- a/bztungsten2/tungsten-compressed.lua +++ b/tungsten-compressed.lua @@ -24,7 +24,7 @@ if simpleCompress then tungstenRecipe.results = { {type="item", name = "tungsten-plate", amount=simpleCompress.CompressedSmeltAmount}, } - tungstenRecipe.icons = {{ icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128 }} + tungstenRecipe.icons = {{ icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128 }} tungstenRecipe.subgroup = "raw-material" tungstenRecipe.order = "d[tungsten-plate]" end diff --git a/bztungsten2/tungsten-enriched.lua b/tungsten-enriched.lua similarity index 67% rename from bztungsten2/tungsten-enriched.lua rename to tungsten-enriched.lua index 71a81a2..2c628e1 100644 --- a/bztungsten2/tungsten-enriched.lua +++ b/tungsten-enriched.lua @@ -1,5 +1,5 @@ -- Enriched Titanium for Krastorio2 -local util = require("data-util"); +local util = require("__bztungsten__.data-util"); if mods["Krastorio2"] then data:extend({ @@ -9,20 +9,20 @@ data:extend({ icon_size = 64, icon_mipmaps = 3, icon = "__bztungsten__/graphics/icons/enriched-tungsten.png", pictures = { - {filename="__bztungsten2__/graphics/icons/enriched-tungsten.png", size=64, scale=0.5}, - {filename="__bztungsten2__/graphics/icons/enriched-tungsten-2.png", size=64, scale=0.5}, - {filename="__bztungsten2__/graphics/icons/enriched-tungsten-3.png", size=64, scale=0.5}, - {filename="__bztungsten2__/graphics/icons/enriched-tungsten-4.png", size=64, scale=0.5}, + {filename="__bztungsten__/graphics/icons/enriched-tungsten.png", size=64, scale=0.25}, + {filename="__bztungsten__/graphics/icons/enriched-tungsten-2.png", size=64, scale=0.25}, + {filename="__bztungsten__/graphics/icons/enriched-tungsten-3.png", size=64, scale=0.25}, + {filename="__bztungsten__/graphics/icons/enriched-tungsten-4.png", size=64, scale=0.25}, }, subgroup = "raw-material", order = "e05-a[enriched-ores]-a1[enriched-tungsten]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", name = "enriched-tungsten", main_product = "enriched-tungsten", - icon = "__bztungsten2__/graphics/icons/enriched-tungsten.png", + icon = "__bztungsten__/graphics/icons/enriched-tungsten.png", icon_size = 64, category = "chemistry", energy_required = 3, @@ -33,14 +33,14 @@ data:extend({ subgroup = "raw-material", ingredients = { - {type = "fluid", name = "kr-ammonia", amount = 10}, + {type = "fluid", name = "ammonia", amount = 10}, {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, {type = "item", name = "tungsten-ore", amount = 9} }, results = { {type = "item", name = "enriched-tungsten", amount = 6}, - {type = "fluid", name = "kr-dirty-water", amount = 25, catalyst_amount = 25} + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} }, crafting_machine_tint = { @@ -56,8 +56,8 @@ data:extend({ name = "enriched-tungsten-plate", icons = { - { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, }, - { icon = "__bztungsten2__/graphics/icons/enriched-tungsten.png", icon_size = 64, scale=0.25, shift= {-8, -8}}, + { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, }, + { icon = "__bztungsten__/graphics/icons/enriched-tungsten.png", icon_size = 64, scale=0.25, shift= {-8, -8}}, }, category = "smelting", energy_required = 24, @@ -67,29 +67,30 @@ data:extend({ allow_productivity = true, ingredients = { - {type="item", name="enriched-tungsten", amount=15} + {"enriched-tungsten", 15} }, - results = {{type="item", name="tungsten-plate", amount=10}}, + result = "tungsten-plate", + result_count = 10, order = "b[tungsten-plate]-b[enriched-tungsten-plate]" }, { type = "recipe", name = "dirty-water-filtration-tungsten", - category = "kr-fluid-filtration", + category = "fluid-filtration", icons = { { - icon = data.raw.fluid["kr-dirty-water"].icon, - icon_size = data.raw.fluid["kr-dirty-water"].icon_size + icon = data.raw.fluid["dirty-water"].icon, + icon_size = data.raw.fluid["dirty-water"].icon_size }, { icon = data.raw.item["tungsten-ore"].icon, icon_size = data.raw.item["tungsten-ore"].icon_size, - scale = 0.20, + scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["tungsten-ore"].icon_size), shift = {0, 4} } }, - icon_size = data.raw.fluid["kr-dirty-water"].icon_size, + icon_size = data.raw.fluid["dirty-water"].icon_size, energy_required = 2, enabled = false, allow_as_intermediate = false, @@ -97,7 +98,7 @@ data:extend({ always_show_products = true, ingredients = { - {type = "fluid", name = "kr-dirty-water", amount = 100, catalyst_amount = 100}, + {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, }, results = { diff --git a/tungsten-matter.lua b/tungsten-matter.lua new file mode 100644 index 0000000..0fcd6ba --- /dev/null +++ b/tungsten-matter.lua @@ -0,0 +1,27 @@ +-- Matter recipes for Krastorio2 +if mods["Krastorio2"] then + local util = require("data-util"); + + util.k2matter({ + k2matter = { + item_name = "tungsten-ore", + matter_value = 6, + energy_required = 1, + need_stabilizer = false, + unlocked_by_technology = "tungsten-matter-processing", + }, + k2baseicon = "stone", + icon = {icon = "__bztungsten__/graphics/icons/tungsten-ore.png", icon_size = 64, scale = 1.25} + }) + + util.k2matter({ + k2matter = { + item_name = "tungsten-plate", + matter_value = 10, + energy_required = 2, + only_deconversion = true, + need_stabilizer = true, + unlocked_by_technology = "tungsten-matter-processing", + }, + }) +end diff --git a/tungsten-ore-particle.lua b/tungsten-ore-particle.lua new file mode 100644 index 0000000..283e5bb --- /dev/null +++ b/tungsten-ore-particle.lua @@ -0,0 +1,144 @@ +data:extend( +{ + { + type = "optimized-particle", + name = "tungsten-ore-particle", + flags = {"not-on-map"}, + life_time = 180, + pictures = + { + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-1.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-1.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-2.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-2.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-3.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-3.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-4.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-4.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + } + }, + shadows = + { + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-1.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-1.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-2.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-2.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-3.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-3.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + }, + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/tungsten-ore-particle-shadow-4.png", + priority = "extra-high", + width = 16, + height = 16, + frame_count = 1, + hr_version = + { + filename = "__bztungsten__/graphics/entity/tungsten-ore-particle/hr-tungsten-ore-particle-shadow-4.png", + priority = "extra-high", + width = 32, + height = 32, + frame_count = 1, + scale = 0.5 + } + } + } + } +} +) diff --git a/bztungsten2/tungsten-ore.lua b/tungsten-ore.lua similarity index 51% rename from bztungsten2/tungsten-ore.lua rename to tungsten-ore.lua index beb6632..600b912 100644 --- a/bztungsten2/tungsten-ore.lua +++ b/tungsten-ore.lua @@ -1,11 +1,7 @@ local resource_autoplace = require('resource-autoplace'); -local item_sounds = require('__base__.prototypes.item_sounds') -local util = require("data-util"); - -data.raw.planet.nauvis.map_gen_settings.autoplace_controls["tungsten-ore"] = {} -data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["tungsten-ore"] = {} -resource_autoplace.initialize_patch_set("tungsten-ore", true) +local noise = require('noise'); +local util = require("__bztungsten__.data-util"); data:extend({ { @@ -16,6 +12,10 @@ data:extend({ order = "b-e" }, { + type = "noise-layer", + name = "tungsten-ore" + }, + { type = "resource", icon_size = 64, icon_mipmaps = 3, name = "tungsten-ore", @@ -51,37 +51,45 @@ data:extend({ { sheet = { - filename = "__bztungsten2__/graphics/entity/ores/tungsten-ore.png", + filename = "__bztungsten__/graphics/entity/ores/tungsten-ore.png", priority = "extra-high", - size = 128, + size = 64, frame_count = 8, variation_count = 8, - scale = 0.5, + hr_version = + { + filename = "__bztungsten__/graphics/entity/ores/hr-tungsten-ore.png", + priority = "extra-high", + size = 128, + frame_count = 8, + variation_count = 8, + scale = 0.5 + } } }, }, { - type = "item", - name = "tungsten-ore", - icon_size = 64, icon_mipmaps = 3, - icon = "__bztungsten2__/graphics/icons/tungsten-ore.png", - pictures = { - {filename="__bztungsten2__/graphics/icons/tungsten-ore.png", size=64, scale=0.5}, - {filename="__bztungsten2__/graphics/icons/tungsten-ore-2.png", size=64, scale=0.5}, - {filename="__bztungsten2__/graphics/icons/tungsten-ore-3.png", size=64, scale=0.5}, - {filename="__bztungsten2__/graphics/icons/tungsten-ore-4.png", size=64, scale=0.5}, - }, - subgroup = "raw-resource", - order = "t-c-a", - stack_size = 50, - weight = 20 * kg, - inventory_move_sound = item_sounds.resource_inventory_move, - pick_sound = item_sounds.resource_inventory_pickup, - drop_sound = item_sounds.resource_inventory_move + type = "item", + name = "tungsten-ore", + icon_size = 64, icon_mipmaps = 3, + icon = "__bztungsten__/graphics/icons/tungsten-ore.png", + pictures = { + {filename="__bztungsten__/graphics/icons/tungsten-ore.png", size=64, scale=0.25}, + {filename="__bztungsten__/graphics/icons/tungsten-ore-2.png", size=64, scale=0.25}, + {filename="__bztungsten__/graphics/icons/tungsten-ore-3.png", size=64, scale=0.25}, + {filename="__bztungsten__/graphics/icons/tungsten-ore-4.png", size=64, scale=0.25}, + }, + subgroup = "raw-resource", + order = "t-c-a", + stack_size = util.get_stack_size(50) }, }) -- Wolframite becomes 20% richer past 1000 tiles, 60% richer past 10000 tiles. Very close to start, it's 25% richness local richness = data.raw.resource["tungsten-ore"].autoplace.richness_expression -data.raw.resource["tungsten-ore"].autoplace.richness_expression = richness .. - "* if(distance_from_nearest_point(x, y, starting_positions) < 100, 0.25, if(distance_from_nearest_point(x, y, starting_positions) < 1000, 1, if(distance_from_nearest_point(x, y, starting_positions) < 100, 1.2, 1.6)))" +data.raw.resource["tungsten-ore"].autoplace.richness_expression = + richness * noise.if_else_chain( + noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(100)), 0.25, + noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(1000)), 1, + noise.less_than(noise.distance_from(noise.var("x"), noise.var("y"), noise.var("starting_positions")), noise.to_noise_expression(10000)), 1.2, + 1.6) diff --git a/bztungsten2/tungsten-recipe-5d.lua b/tungsten-recipe-5d.lua similarity index 80% rename from bztungsten2/tungsten-recipe-5d.lua rename to tungsten-recipe-5d.lua index a79d5b6..4792ae9 100644 --- a/bztungsten2/tungsten-recipe-5d.lua +++ b/tungsten-recipe-5d.lua @@ -1,4 +1,4 @@ -local util = require("data-util"); +local util = require("__bztungsten__.data-util"); if mods["5dim_core"] then @@ -21,8 +21,9 @@ if mods["5dim_core"] then icon_size = 128, icon_mipmaps = 3, enabled = true, energy_required = 50, - ingredients = {{type="item", name="tungsten-ore", amount=85}}, - results = {{type="item", name="tungsten-plate", amount=50}}, + ingredients = {{"tungsten-ore", 85}}, + result = "tungsten-plate", + result_count = 50, } }) end @@ -36,14 +37,14 @@ if mods["5dim_core"] then name = "tungsten-dust", subgroup = "plates-dust", order = "d[tungsten-plate]", - icon = "__bztungsten2__/graphics/icons/tungsten-powder.png", + icon = "__bztungsten__/graphics/icons/tungsten-powder.png", icon_size = 64, icon_mipmaps = 3, stack_size = 200 }, { type = "recipe", name = "tungsten-plate-dust", - icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", + icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, subgroup = "plates-plates2", order = "d[tungsten-plate]", @@ -51,14 +52,14 @@ if mods["5dim_core"] then energy_required = 32/15, enabled = true, ingredients = { - {type="item", name="tungsten-dust", amount=2} + {"tungsten-dust", 2} }, - results = {{type="item", name="tungsten-plate", amount=1}}, + result = "tungsten-plate", }, { type = "recipe", name = "tungsten-dust", - icon = "__bztungsten2__/graphics/icons/tungsten-powder.png", + icon = "__bztungsten__/graphics/icons/tungsten-powder.png", icon_size = 64, icon_mipmaps = 3, category = "mashering", subgroup = "", @@ -66,7 +67,7 @@ if mods["5dim_core"] then energy_required = 3.2, enabled = true, ingredients = { - {type="item", name="tungsten-ore", amount=1} + {"tungsten-ore", 1} }, results = { {type="item", name = "tungsten-dust", amount=2}, @@ -78,12 +79,13 @@ if mods["5dim_core"] then category = "industrial-furnace", subgroup = "plates-industrial-dust", order = "ad[tungsten-plate]", - icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", + icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, enabled = true, energy_required = 50, - ingredients = {{type="item", name="tungsten-dust", amount=85}}, - results = {{type="item", name=util.me.tungsten_plate, amount=50}}, + ingredients = {{"tungsten-dust", 85}}, + result = util.me.tungsten_plate, + result_count = 50, }, { type = "recipe", @@ -91,12 +93,13 @@ if mods["5dim_core"] then category = "industrial-furnace", subgroup = "plates-industrial-ore", order = "ae[tungsten-carbide]", - icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", + icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128, icon_mipmaps = 3, enabled = true, energy_required = 500, - ingredients = {{type="item", name="tungsten-plate", amount=85}}, - results = {{type="item", name=util.me.tungsten_plate, amount=20}}, + ingredients = {{"tungsten-plate", 85}}, + result = util.me.tungsten_plate, + result_count = 20, } }) end diff --git a/bztungsten2/tungsten-recipe-final-rrr.lua b/tungsten-recipe-final-rrr.lua similarity index 89% rename from bztungsten2/tungsten-recipe-final-rrr.lua rename to tungsten-recipe-final-rrr.lua index f254194..abda16a 100644 --- a/bztungsten2/tungsten-recipe-final-rrr.lua +++ b/tungsten-recipe-final-rrr.lua @@ -1,4 +1,4 @@ -local util = require("data-util"); +local util = require("__bztungsten__.data-util"); if mods["Rich-Rocks-Requiem"] then if data.raw.recipe["rrr-stone-processing"] then diff --git a/bztungsten2/tungsten-recipe-final-stacking.lua b/tungsten-recipe-final-stacking.lua similarity index 63% rename from bztungsten2/tungsten-recipe-final-stacking.lua rename to tungsten-recipe-final-stacking.lua index 72d80d3..f4eec28 100644 --- a/bztungsten2/tungsten-recipe-final-stacking.lua +++ b/tungsten-recipe-final-stacking.lua @@ -1,20 +1,20 @@ -- Deadlock stacking recipes -local util = require("data-util"); +local util = require("__bztungsten__.data-util"); if deadlock then deadlock.add_stack("tungsten-ore", "__bztungsten__/graphics/icons/stacked/tungsten-ore-stacked.png", "deadlock-stacking-2", 64) - deadlock.add_stack("tungsten-plate", "__bztungsten2__/graphics/icons/stacked/tungsten-plate-stacked.png" , "deadlock-stacking-2", 128) - deadlock.add_stack("tungsten-carbide", "__bztungsten2__/graphics/icons/stacked/tungsten-carbide-stacked.png" , "deadlock-stacking-2", 128) - deadlock.add_stack("rocket-engine-nozzle", "__bztungsten2__/graphics/icons/stacked/rocket-engine-nozzle-stacked.png" , "deadlock-stacking-2", 128) + deadlock.add_stack("tungsten-plate", "__bztungsten__/graphics/icons/stacked/tungsten-plate-stacked.png" , "deadlock-stacking-2", 128) + deadlock.add_stack("tungsten-carbide", "__bztungsten__/graphics/icons/stacked/tungsten-carbide-stacked.png" , "deadlock-stacking-2", 128) + deadlock.add_stack("rocket-engine-nozzle", "__bztungsten__/graphics/icons/stacked/rocket-engine-nozzle-stacked.png" , "deadlock-stacking-2", 128) if mods["Krastorio2"] then - deadlock.add_stack("enriched-tungsten", "__bztungsten2__/graphics/icons/stacked/enriched-tungsten-stacked.png" , "deadlock-stacking-2", 64) + deadlock.add_stack("enriched-tungsten", "__bztungsten__/graphics/icons/stacked/enriched-tungsten-stacked.png" , "deadlock-stacking-2", 64) end if data.raw.item["tungsten-ingot"] then deadlock.add_stack("tungsten-ingot", nil, "deadlock-stacking-2", nil) end if util.me.cuw() then - deadlock.add_stack("cuw", "__bztungsten2__/graphics/icons/stacked/cuw-stacked.png" , "deadlock-stacking-2", 128) + deadlock.add_stack("cuw", "__bztungsten__/graphics/icons/stacked/cuw-stacked.png" , "deadlock-stacking-2", 128) end if data.raw.item["tungsten-powder"] then deadlock.add_stack("tungsten-powder", nil, "deadlock-stacking-2", nil) diff --git a/bztungsten2/tungsten-recipe-se.lua b/tungsten-recipe-se.lua similarity index 74% rename from bztungsten2/tungsten-recipe-se.lua rename to tungsten-recipe-se.lua index 1f2f05b..dd71b0c 100644 --- a/bztungsten2/tungsten-recipe-se.lua +++ b/tungsten-recipe-se.lua @@ -28,7 +28,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then { type = "item", name = "tungsten-ingot", - icons = {{icon = "__bztungsten2__/graphics/icons/tungsten-ingot.png", icon_size = 128}}, + icons = {{icon = "__bztungsten__/graphics/icons/tungsten-ingot.png", icon_size = 128}}, order = "b-b", stack_size = 50, subgroup = "tungsten", @@ -37,10 +37,10 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then util.me.sinter() and { type = "item", name = "tungsten-powder", - icons = {{icon = "__bztungsten2__/graphics/icons/tungsten-powder.png", icon_size = 64, icon_mipmaps = 3}}, + icons = {{icon = "__bztungsten__/graphics/icons/tungsten-powder.png", icon_size = 64, icon_mipmaps = 3}}, order = "b-a-x", subgroup = "tungsten", - stack_size = 200, + stack_size = util.get_stack_size(200), } or { type = "fluid", name = "molten-tungsten", @@ -48,7 +48,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then max_temperature = 3422, base_color = {r=255, g=160, b=60}, flow_color = {r=255, g=160, b=60}, - icons = {{icon = "__bztungsten2__/graphics/icons/molten-tungsten.png", icon_size = 128}}, + icons = {{icon = "__bztungsten__/graphics/icons/molten-tungsten.png", icon_size = 128}}, order = "a[molten]-a", pressure_to_speed_ratio = 0.4, flow_to_energy_ratio = 0.59, @@ -65,7 +65,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then }, energy_required = 60, ingredients = { - {type="item", name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24}, + {name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24}, {type = "fluid", name = "se-pyroflux", amount = 10}, }, enabled = false, @@ -82,7 +82,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then }, energy_required = 60, ingredients = { - {type="item", name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24}, + {name = mods.Krastorio2 and "enriched-tungsten" or "tungsten-ore", amount = 24}, {type = "fluid", name = "se-pyroflux", amount = 10}, }, enabled = false, @@ -94,7 +94,7 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then type = "recipe", name = "tungsten-ingot", category = "casting", - results = {{type="item", name="tungsten-ingot", amount=1}}, + results = {{"tungsten-ingot", 1}}, energy_required = 18, ingredients = { util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or @@ -109,16 +109,17 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then name = "tungsten-carbide-casting", category = "casting", icons = { - {icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", icon_size = 128}, + {icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128}, util.me.sinter() and - {icon = "__bztungsten2__/graphics/icons/tungsten-powder.png", icon_size = 64, scale = 0.25, shift = {-8, -8}} or - {icon = "__bztungsten2__/graphics/icons/molten-tungsten.png", icon_size = 128, scale = 0.125, shift = {-8, -8}}, + {icon = "__bztungsten__/graphics/icons/tungsten-powder.png", icon_size = 64, scale = 0.25, shift = {-8, -8}} or + {icon = "__bztungsten__/graphics/icons/molten-tungsten.png", icon_size = 128, scale = 0.125, shift = {-8, -8}}, }, - results = {{type="item", name="tungsten-carbide", amount=4}}, + results = {{"tungsten-carbide", 4}}, energy_required = 40, ingredients = { - data.raw.item["kr-coke"] and {type="item", name="kr-coke", amount=8} or {type="item", name="coal", amount=16}, - util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or {type = "fluid", name = "molten-tungsten", amount = 375}, + data.raw.item["coke"] and {"coke", 8} or {"coal", 16}, + util.me.sinter() and {type = "item", name = "tungsten-powder", amount = 15} or + {type = "fluid", name = "molten-tungsten", amount = 375}, }, enabled = false, always_show_made_in = true, @@ -129,15 +130,15 @@ if string.sub(mods["space-exploration"], 1, 3) >= "0.6" then category = "crafting", name = "tungsten-ingot-to-plate", icons = { - {icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128}, - {icon = "__bztungsten2__/graphics/icons/tungsten-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}}, + {icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128}, + {icon = "__bztungsten__/graphics/icons/tungsten-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}}, }, results = { - {type="item", name = "tungsten-plate", amount = 10}, + {name = "tungsten-plate", amount = 10}, }, energy_required = 5, ingredients = { - {type="item", name = "tungsten-ingot", amount = 1} + {name = "tungsten-ingot", amount = 1} }, enabled = false, always_show_made_in = true, @@ -177,15 +178,15 @@ else always_show_made_in = true, allow_as_intermediate = false, ingredients = { - {type="item", name = "enriched-tungsten", amount = 8}, - {type="item", name = "se-vulcanite-block", amount = 1}, + {name = "enriched-tungsten", amount = 8}, + {name = "se-vulcanite-block", amount = 1}, }, results = { - {type="item", name = util.me.tungsten_plate, amount = 8}, + {name = util.me.tungsten_plate, amount = 8}, }, icons = { - { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3 }, + { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3 }, { icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}}, }, }, @@ -206,15 +207,15 @@ else always_show_made_in = true, allow_as_intermediate = false, ingredients = { - {type="item", name = "tungsten-ore", amount = 16}, - {type="item", name = "se-vulcanite-block", amount = 1}, + {name = "tungsten-ore", amount = 16}, + {name = "se-vulcanite-block", amount = 1}, }, results = { - {type="item", name = util.me.tungsten_plate, amount = 12}, + {name = util.me.tungsten_plate, amount = 12}, }, icons = { - { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3,}, + { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3,}, { icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}}, }, }, @@ -224,7 +225,7 @@ else end end -if mods["aai-industry"] and not mods["Krastorio2"] and not mods.bzfoundry2 then +if mods["aai-industry"] and not mods["Krastorio2"] and not mods.bzfoundry then data:extend({ { type = "recipe", @@ -233,13 +234,22 @@ if mods["aai-industry"] and not mods["Krastorio2"] and not mods.bzfoundry2 then order = "z[tungsten-carbide]", icons = { - { icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", icon_size = 128 }, + { icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128 }, { icon = "__base__/graphics/icons/coal.png", icon_size = 64, icon_mipmaps=4, scale=0.25, shift= {-10, -10}}, }, - enabled = false, - energy_required = 50, - ingredients = {{type="item", name="tungsten-plate", amount=4}, {type="item", name="coal", amount=1}}, - results = {{type="item", name="tungsten-carbide", amount=2}}, + normal = { + enabled = false, + energy_required = 50, + ingredients = {{"tungsten-plate", 4}, {"coal", 1}}, + result = "tungsten-carbide", + result_count = 2, + }, + expensive = { + enabled = false, + energy_required = 50, + ingredients = {{"tungsten-plate", 4}, {"coal", 1}}, + result = "tungsten-carbide", + }, } }) util.add_effect(util.me.tungsten_processing, {type = "unlock-recipe", recipe= "tungsten-carbide-coal"}) diff --git a/bztungsten2/tungsten-recipe-updates.lua b/tungsten-recipe-updates.lua similarity index 94% rename from bztungsten2/tungsten-recipe-updates.lua rename to tungsten-recipe-updates.lua index e41ae62..491d081 100644 --- a/bztungsten2/tungsten-recipe-updates.lua +++ b/tungsten-recipe-updates.lua @@ -1,4 +1,4 @@ -local util = require("data-util"); +local util = require("__bztungsten__.data-util"); local cuw = "tungsten-plate" if util.me.cuw() then cuw = "cuw" end @@ -22,7 +22,7 @@ util.replace_ingredient("cannon-shell", "copper-plate", "tungsten-plate") -- Tooling util.add_prerequisite("automation-2", util.me.tungsten_processing) -if mods.bzaluminum2 or mods.bzcarbon or mods.bzgas2 then +if mods.bzaluminum or mods.bzcarbon or mods.bzgas then util.replace_ingredient("assembling-machine-2", "steel-plate", "tungsten-carbide") else util.replace_some_ingredient("assembling-machine-2", "steel-plate", 1, "tungsten-carbide", 1) @@ -30,8 +30,7 @@ end util.add_ingredient("assembling-machine-3", "tungsten-carbide", 4) util.add_ingredient("electric-furnace", "tungsten-carbide", 1) -if (not mods.MoreScience or data.raw["assembling-machine"]["basic-chemical-plant"]) -and (not (mods.omnimatter and mods.Krastorio2)) then +if not mods.MoreScience or data.raw["assembling-machine"]["basic-chemical-plant"] then util.add_ingredient("chemical-plant", "tungsten-carbide", 2) util.add_ingredient("chemical-plant", cuw, 5) end @@ -102,14 +101,13 @@ util.add_ingredient("deadlock-floor-lamp", "tungsten-plate", 2) ---- K2 if mods["Krastorio2"] then - util.set_tech_recipe("engine", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) - util.set_tech_recipe("fluid-handling", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) - util.set_tech_recipe("optics", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) - -- TODO: Fix - --util.set_tech_recipe("oil-processing", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) - util.set_tech_recipe("plastics", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) + util.set_tech_recipe("engine", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) + util.set_tech_recipe("fluid-handling", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) + util.set_tech_recipe("optics", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) + util.set_tech_recipe("oil-processing", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) + util.set_tech_recipe("plastics", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) if util.me.get_setting("bztungsten-avoid-military") == "yes" then - util.set_tech_recipe("rocketry", {{"kr-basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) + util.set_tech_recipe("rocketry", {{"basic-tech-card", 1}, {"automation-science-pack", 1}, {"logistic-science-pack", 1}}) end util.remove_prerequisite("kr-sentinel", "optics") @@ -123,7 +121,7 @@ if mods["Krastorio2"] then -- Heat related util.add_ingredient("kr-fusion-reactor", cuw, 350) util.add_ingredient("energy-control-unit", cuw, 3) - util.replace_some_ingredient("kr-advanced-furnace", "kr-rare-metals", 40, cuw, 40) + util.replace_some_ingredient("kr-advanced-furnace", "rare-metals", 40, cuw, 40) -- Other if mods.bzzirconium then @@ -146,7 +144,7 @@ if mods["Krastorio2"] then -- Tooling util.add_ingredient("kr-electric-mining-drill-mk2", "tungsten-carbide", 5) util.add_ingredient("kr-quarry-drill", "tungsten-carbide", 20) - util.replace_some_ingredient("kr-advanced-chemical-plant", "kr-rare-metals", 40, "tungsten-carbide", 20) + util.replace_some_ingredient("kr-advanced-chemical-plant", "rare-metals", 40, "tungsten-carbide", 20) end diff --git a/bztungsten2/tungsten-recipe.lua b/tungsten-recipe.lua similarity index 53% rename from bztungsten2/tungsten-recipe.lua rename to tungsten-recipe.lua index 9d38537..dec3f0c 100644 --- a/bztungsten2/tungsten-recipe.lua +++ b/tungsten-recipe.lua @@ -11,20 +11,20 @@ data:extend({ { type = "item", name = "tungsten-carbide", - icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", + icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128, subgroup = "raw-material", order = "z[tungsten-carbide]", - stack_size = 100 + stack_size = util.get_stack_size(100) }, { type = "item", name = util.me.tungsten_plate, - icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", + icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, subgroup = "raw-material", order = "b[tungsten-plate]", - stack_size = 100 + stack_size = util.get_stack_size(100) } }) end @@ -33,22 +33,46 @@ data:extend({ { type = "recipe", name = util.me.tungsten_plate, - --main_product = util.me.tungsten_plate, + main_product = util.me.tungsten_plate, category = "smelting", order = "d[tungsten-plate]", icons = (mods["Krastorio2"] and { - { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, }, - { icon = "__bztungsten2__/graphics/icons/tungsten-ore.png", icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}}, + { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128, icon_mipmaps = 3, }, + { icon = "__bztungsten__/graphics/icons/tungsten-ore.png", icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}}, } or mods.bobplates and { { icon = "__bobplates__/graphics/icons/plate/tungsten-plate.png", icon_size = 32}, } or { - { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128}, + { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128}, + }), + normal = (mods["Krastorio2"] and + { + enabled = false, + energy_required = 24, + ingredients = {{"tungsten-ore", 15}}, + result = util.me.tungsten_plate, + result_count = 5, + } or + { + enabled = false, + energy_required = 32/15, + ingredients = {{"tungsten-ore", mods.bobplates and 4 or 2}}, + result = util.me.tungsten_plate, + }), + expensive = (mods["Krastorio2"] and + { + enabled = false, + energy_required = 32, + ingredients = {{"tungsten-ore", 20}}, + result = util.me.tungsten_plate, + result_count = 5, + } or + { + enabled = false, + energy_required = 48/15, + ingredients = {{"tungsten-ore", mods.bobplates and 6 or 3}}, + result = util.me.tungsten_plate, }), - enabled = false, - energy_required = mods["Krastorio2"] and 24 or 32/15, - ingredients = {{type="item", name="tungsten-ore", amount=mods["Krastorio2"] and 15 or (mods.bobplates and 4 or 2)}}, - results = {{type="item", name=util.me.tungsten_plate, amount=mods["Krastorio2"] and 5 or 1}} }, { type = "technology", @@ -56,7 +80,7 @@ data:extend({ icons = {{ icon = mods.bobplates and "__bobplates__/graphics/icons/technology/tungsten-processing.png" - or "__bztungsten2__/graphics/technology/tungsten-processing.png", + or "__bztungsten__/graphics/technology/tungsten-processing.png", icon_size = mods.bobplates and 64 or 256, }}, effects = @@ -90,14 +114,28 @@ data:extend({ mods["TheBigFurnace"] and { type = "recipe", name = "big-tungsten-plate", - icons = { { icon = "__bztungsten2__/graphics/icons/tungsten-plate.png", icon_size = 128 }, }, + icons = { { icon = "__bztungsten__/graphics/icons/tungsten-plate.png", icon_size = 128 }, }, subgroup = "raw-material", category = "big-smelting", order = "d[tungsten-plate]", - enabled = false, - energy_required = 6, --TODO - ingredients = {{type="item", name="tungsten-ore", amount=100}}, - results = {{type="item", name = util.me.tungsten_plate, amount=50}} + normal = + { + enabled = false, + energy_required = 6, --TODO + ingredients = {{"tungsten-ore", 100}}, + results = { + {type="item", name = util.me.tungsten_plate, amount=50}, + } + }, + expensive = + { + enabled = false, + energy_required = 15, --TODO + ingredients = {{"tungsten-ore", 99}}, + results = { + {type="item", name = util.me.tungsten_plate, amount=33}, + } + } } or nil, }) @@ -136,17 +174,40 @@ data:extend({ { type = "recipe", name = util.me.tungsten_carbide_recipe, - --main_product = util.me.tungsten_carbide_recipe, + main_product = util.me.tungsten_carbide_recipe, category = (mods["Krastorio2"] and "smelting" or "smelting-carbon"), order = "z[tungsten-carbide]", icons = { mods.bobplates and { icon = "__bobplates__/graphics/icons/plate/tungsten-carbide-plate.png", icon_size = 64} - or { icon = "__bztungsten2__/graphics/icons/tungsten-carbide.png", icon_size = 128} + or { icon = "__bztungsten__/graphics/icons/tungsten-carbide.png", icon_size = 128} }, - enabled = false, - energy_required = mods["Krastorio2"] and 48 or 64/3, - ingredients = {{type="item", name="tungsten-plate", amount=mods["Krastorio2"] and 10 or 5}, mods["Krastorio2"] and {type="item", name="kr-coke", amount=5} or nil}, - results = {{type="item", name="tungsten-carbide", amount=mods["Krastorio2"] and 4 or 2}} + normal = (mods["Krastorio2"] and + { + enabled = false, + energy_required = 48, + ingredients = {{"tungsten-plate", 10}, {"coke", 5}}, + result = "tungsten-carbide", + result_count = 4, + } or { + enabled = false, + energy_required = 64/3, + ingredients = {{"tungsten-plate", 5}}, + result = "tungsten-carbide", + result_count = 2, + }), + expensive = (mods["Krastorio2"] and + { + enabled = false, + energy_required = 48, + ingredients = {{"tungsten-plate", 10}, {"coke", 5}}, + result = "tungsten-carbide", + result_count = 2, + } or { + enabled = false, + energy_required = 64/3, + ingredients = {{"tungsten-plate", 5}}, + result = "tungsten-carbide", + }), }, }) @@ -154,11 +215,11 @@ data:extend({ { type = "item", name = "rocket-engine-nozzle", - icon = "__bztungsten2__/graphics/icons/rocket-engine-nozzle.png", + icon = "__bztungsten__/graphics/icons/rocket-engine-nozzle.png", icon_size = 128, subgroup = "intermediate-product", order = "z[rocket-engine-nozzle]", - stack_size = 100 + stack_size = util.get_stack_size(100) }, { type = "recipe", @@ -167,12 +228,12 @@ data:extend({ subgroup = "intermediate-product", order = "z[rocket-engine-nozzle]", icons = { - { icon = "__bztungsten2__/graphics/icons/rocket-engine-nozzle.png", icon_size = 128} + { icon = "__bztungsten__/graphics/icons/rocket-engine-nozzle.png", icon_size = 128} }, enabled = false, energy_required = 5, - ingredients = {{type="item", name="tungsten-plate", amount=2}}, - results = {{type="item", name="rocket-engine-nozzle", amount=1}}, + ingredients = {{"tungsten-plate", 2}}, + results = {{"rocket-engine-nozzle", 1}}, } }) @@ -181,11 +242,11 @@ if util.me.cuw() then { type = "item", name = "cuw", - icon = "__bztungsten2__/graphics/icons/cuw.png", + icon = "__bztungsten__/graphics/icons/cuw.png", icon_size = 128, subgroup = "raw-material", order = "z[cuw]", - stack_size = 100, + stack_size = util.get_stack_size(100), }, { type = "recipe", @@ -195,10 +256,10 @@ if util.me.cuw() then enabled = false, energy_required = 80, ingredients = { - {type="item", name="tungsten-plate", amount=15}, - {type="item", name="copper-plate", amount=5}, + {"tungsten-plate", 15}, + {"copper-plate", 5}, }, - results = {{type="item", name="cuw", amount=20}}, + results = {{"cuw", 20}}, }, }) util.add_unlock(util.me.tungsten_processing, "cuw") @@ -218,8 +279,8 @@ data:extend({ category = "double-smelting-carbon", enabled = false, energy_required = 32/3, - ingredients = {{type="item", name="tungsten-ore", amount=5}}, - results = {{type="item", name="tungsten-carbide", amount=1}}, + ingredients = {{"tungsten-ore", 5}}, + results = {{"tungsten-carbide", 1}}, } }) util.add_effect(util.me.tungsten_processing, {type = "unlock-recipe", recipe = "double-tungsten"}) diff --git a/bztungsten2/tungsten-sim.lua b/tungsten-sim.lua similarity index 77% rename from bztungsten2/tungsten-sim.lua rename to tungsten-sim.lua index 796ab9d..2a2a27f 100644 --- a/bztungsten2/tungsten-sim.lua +++ b/tungsten-sim.lua @@ -11,13 +11,13 @@ if (not mods["bobplates"] and not mods["angelssmelting"]) then data.raw["utility-constants"]["default"].main_menu_simulations["tungsten-nozzle"] = { checkboard = false, - save = "__bztungsten2__/menu-simulations/tungsten-nozzle-sim.zip", length = 15*60, + save = "__bztungsten__/menu-simulations/tungsten-nozzle-sim.zip", length = 15*60, init = [[ local logo = game.surfaces.nauvis.find_entities_filtered{ name = "factorio-logo-11tiles", limit = 1}[1] - game.simulation.camera_position = {logo.position.x, logo.position.y+8} - game.simulation.camera_zoom = 1.5 + game.camera_position = {logo.position.x, logo.position.y+8} + game.camera_zoom = 1.5 game.tick_paused = false game.surfaces.nauvis.daytime = 1 ]],