Update to 2.0

This commit is contained in:
Simon Brodtmann 2025-10-04 21:42:12 +02:00
parent 98ea14df52
commit c2b65301fb
21 changed files with 349 additions and 665 deletions

View file

@ -13,16 +13,16 @@ data:extend({
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,

View file

@ -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
@ -45,16 +45,12 @@ 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="__bzgas__/graphics/entity/hr-chemical-plant.png"
plant_e.graphics_set.animation.south.layers[1].filename="__bzgas__/graphics/entity/hr-chemical-plant.png"
plant_e.graphics_set.animation.east.layers[1].filename="__bzgas__/graphics/entity/hr-chemical-plant.png"
plant_e.graphics_set.animation.west.layers[1].filename="__bzgas__/graphics/entity/hr-chemical-plant.png"
plant_e.next_upgrade="chemical-plant"
plant_e.icon = nil
plant_e.icon_size = nil
@ -68,7 +64,7 @@ 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

View file

@ -12,8 +12,8 @@ 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",
@ -25,7 +25,7 @@ data:extend({
name = "formaldehyde",
category = "chemistry",
subgroup = "fluid-recipes",
enabled = "false",
enabled = false,
ingredients = {
{type="fluid", name="gas", amount=10}
},

View file

@ -2,24 +2,24 @@ 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
drilling_rig_circuit_connector_definitions = circuit_connector_definitions.create_vector
(
universal_connector_template,
{
@ -45,7 +45,7 @@ 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,
},
@ -54,13 +54,13 @@ data:extend({
name = "gas-extraction",
icon = "__bzgas__/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,
},
},
@ -82,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} }
}
}
},
@ -101,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",
@ -147,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 = "__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),
},
},
}
}
},
vehicle_impact_sound = data.raw["mining-drill"]["pumpjack"].vehicle_impact_sound,
open_sound = data.raw["mining-drill"]["pumpjack"].open_sound,

View file

@ -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,10 +16,6 @@ data:extend({
richness = true,
order = "b-ez"
},
{
type = "noise-layer",
name = "gas"
},
{
type = "resource",
name = "gas",
@ -71,53 +70,29 @@ data:extend({
{
sheet =
{
filename = "__bzgas__/graphics/entity/ores/gas.png",
filename = "__bzgas__/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 = "__bzgas__/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,8 +105,8 @@ data:extend({
type = "fluid",
name = "gas",
default_temperature = 25,
heat_capacity = "0.1KJ",
fuel_value = "1000KJ",
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},

View file

@ -6,9 +6,9 @@ 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 = "__Krastorio2Assets__/icons/fluids/hydrogen.png", icon_size = 64, icon_mipmaps = 4},
{icon = "__bzgas__/graphics/icons/gas.png", icon_size = 128, scale = 0.125, shift={-8,-8}},
},
enabled = false,
@ -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},
},
},
{
@ -29,12 +29,12 @@ if mods.Krastorio2 then
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 ="__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},
},
},
})

View file

@ -8,18 +8,18 @@ data:extend({
name = "phenol",
icon = "__bzgas__/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 = "__bzgas__/graphics/icons/phenol.png", size = 128, scale = 0.25},
{filename = "__bzgas__/graphics/icons/phenol-2.png", size = 128, scale = 0.25},
{filename = "__bzgas__/graphics/icons/phenol-3.png", size = 128, scale = 0.25},
{filename = "__bzgas__/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",
enabled = false,
icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128,
ingredients = {{"coal", 6}, {"wood", 6}},
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",
enabled = false,
icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128,
ingredients = {{"coal", 4}},
ingredients = {{type="item", name="coal", amount=4}},
energy_required = 6.4,
subgroup = "raw-material",
results = {
@ -83,9 +83,10 @@ 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},
light_oil_icon,
@ -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},
},

View file

@ -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