diff --git a/data.lua b/data.lua index 76aca38..c0d7805 100644 --- a/data.lua +++ b/data.lua @@ -3,6 +3,7 @@ require("prototypes/gas-extractor") require("prototypes/phenol") require("prototypes/formaldehyde") require("prototypes/bakelite") +require("prototypes/basic-chemical-plant") -- require("gas-boiler/data") local util = require("data-util"); diff --git a/prototypes/bakelite.lua b/prototypes/bakelite.lua index 9f08a67..daee445 100644 --- a/prototypes/bakelite.lua +++ b/prototypes/bakelite.lua @@ -18,7 +18,7 @@ data:extend({ { type = "recipe", name = "bakelite", - category = "basic-chemistry", + category = "chemistry", main_product = "bakelite", enabled = "false", ingredients = { diff --git a/prototypes/basic-chemical-plant.lua b/prototypes/basic-chemical-plant.lua new file mode 100644 index 0000000..5c65686 --- /dev/null +++ b/prototypes/basic-chemical-plant.lua @@ -0,0 +1,90 @@ +local util = require("data-util"); +local futil = require("util"); + +data:extend({ + { + type = "recipe", + name = "basic-chemical-plant", + result = "basic-chemical-plant", + enabled = false, + ingredients = { + {"stone-brick", 5}, + {"iron-plate", 4}, + {"copper-plate", 4}, + {"pipe", 6}, + }, + } +}) + +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", "silica", 10) + +-- item +local plant_i = futil.table.deepcopy(data.raw.item["chemical-plant"]) +plant_i.name = "basic-chemical-plant" +plant_i.place_result = "basic-chemical-plant" +plant_i.icon = nil +plant_i.icon_size = 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}, +} + +data.raw.item["basic-chemical-plant"] = plant_i +-- end item + +-- entity +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.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.energy_source = { + type = "burner", + fuel_inventory_size = 1, + effectivity = 1, + fuel_categories = {"chemical"}, + smoke = { + { + name = "smoke", + frequency = 30, + north_position = {-0.43, -2.3}, + south_position = {0.23, -1.9}, + east_position = {0.5, -2.15}, + west_position = {-0.45, -2.0}, + starting_vertical_speed = 0.1, + starting_frame_deviation = 60, + }, + }, +} +-- NOTE: Saving 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 + +log("BZZZZZZZZZZZ") +log("") +log("") +log(serpent.dump(data.raw.item["basic-chemical-plant"])) +log("") +log("") +log(serpent.dump(data.raw["assembling-machine"]["basic-chemical-plant"])) +log("") +log("") diff --git a/prototypes/formaldehyde.lua b/prototypes/formaldehyde.lua index bb3ad14..e99826f 100644 --- a/prototypes/formaldehyde.lua +++ b/prototypes/formaldehyde.lua @@ -1,12 +1,11 @@ - local util = require("data-util"); -data:extend({ - { - type = "recipe-category", - name = "basic-chemistry", - } -}) +-- data:extend({ +-- { +-- type = "recipe-category", +-- name = "basic-chemistry", +-- } +-- }) data:extend({ { @@ -24,7 +23,7 @@ data:extend({ { type = "recipe", name = "formaldehyde", - category = "basic-chemistry", + category = "chemistry", enabled = "false", ingredients = { {type="fluid", name="gas", amount=10} @@ -42,7 +41,7 @@ data:extend({ icon_size = 256, prerequisites = {"gas-extraction"}, effects = { - -- {type = "unlock-recipe", recipe = "basic-chemical-plant"}, + {type = "unlock-recipe", recipe = "basic-chemical-plant"}, {type = "unlock-recipe", recipe = "formaldehyde"}, }, unit = {