update, add and move prototypes

This commit is contained in:
Brevven 2022-07-16 20:13:55 -07:00
parent 91365547c0
commit fa5928faec
6 changed files with 174 additions and 4 deletions

View file

@ -1,5 +1,8 @@
require("gas")
require("gas-extractor")
require("prototypes/gas")
require("prototypes/gas-extractor")
require("prototypes/phenol")
require("prototypes/formaldehyde")
require("prototypes/bakelite")
-- require("gas-boiler/data")
local util = require("data-util");

50
prototypes/bakelite.lua Normal file
View file

@ -0,0 +1,50 @@
local util = require("data-util");
b_prereq = {"basic-chemistry"}
if data.raw.technology["foundry"] then
table.insert(b_prereq, "foundry")
end
data:extend({
{
type = "item",
name = "bakelite",
icon = "__bzgas__/graphics/icons/bakelite.png",
icon_size = 128,
subgroup = "raw-material",
order = "g[bakelite]",
stack_size = util.get_stack_size(100),
},
{
type = "recipe",
name = "bakelite",
category = "basic-chemistry",
main_product = "bakelite",
enabled = "false",
ingredients = {
{util.me.use_phenol() and "phenol" or "coal", 1},
{type="fluid", name="formaldehyde", amount=10}
},
energy_required = 6,
results = {
{type="item", name="bakelite", amount = 2},
},
},
{
type = "technology",
name = "bakelite",
icon = "__bzgas__/graphics/technology/bakelite.png",
icon_size = 256,
prerequisites = b_prereq,
effects = {
{type = "unlock-recipe", recipe = "bakelite"},
},
unit = {
count = 10,
ingredients = {{"automation-science-pack", 1}},
time = 20,
},
},
})
util.add_prerequisite("electronics", "bakelite")

View file

@ -0,0 +1,54 @@
local util = require("data-util");
data:extend({
{
type = "recipe-category",
name = "basic-chemistry",
}
})
data:extend({
{
type = "fluid",
name = "formaldehyde",
default_temperature = 25,
heat_capacity = "0.1KJ",
fuel_value = "0.5KJ",
base_color = {r=0.77, g=0.87, b=0.67},
flow_color = {r=0.77, g=0.87, b=0.77},
icon = "__bzgas__/graphics/icons/formaldehyde.png",
icon_size = 128,
order = "a[fluid]-f[formaldehyde]"
},
{
type = "recipe",
name = "formaldehyde",
category = "basic-chemistry",
enabled = "false",
ingredients = {
{type="fluid", name="gas", amount=10}
},
energy_required = 2,
results = {
{type="fluid", name="formaldehyde", amount=9}
},
},
{
type = "technology",
name = "basic-chemistry",
icon = "__bzgas__/graphics/technology/formaldehyde.png",
icon_size = 256,
prerequisites = {"gas-extraction"},
effects = {
-- {type = "unlock-recipe", recipe = "basic-chemical-plant"},
{type = "unlock-recipe", recipe = "formaldehyde"},
},
unit = {
count = 10,
ingredients = {{"automation-science-pack", 1}},
time = 20,
},
},
})

View file

@ -36,7 +36,7 @@ data:extend({
},
{
type = "technology",
name = "gas-processing",
name = "gas-extraction",
icon = "__bzgas__/graphics/technology/gas-processing.png",
icon_size = 256,
prerequisites = ge_prereq,

View file

@ -133,6 +133,6 @@ data:extend({
flow_color = {r=0.67, g=0.87, b=0.87},
icon = "__bzgas__/graphics/icons/gas.png",
icon_size = 128,
order = "a[fluid]-f[organotins]"
order = "a[fluid]-f[gas]"
},
})

63
prototypes/phenol.lua Normal file
View file

@ -0,0 +1,63 @@
local util = require("data-util");
if util.me.use_phenol() then
data:extend({
{
type = "item",
name = "phenol",
icon = "__bzgas__/graphics/icons/phenol.png",
icon_size = 128,
subgroup = "raw-material",
order = "g[phenol]",
stack_size = util.get_stack_size(100),
},
})
if data.raw.item["coke"] then
local er = mods.Krastorio2 and 10 or 6.4
local cat
if mods.Krastorio2 then
cat = "smelting"
util.add_effect("steel-processing", {type="recipe-unlock", name="phenol"})
elseif data.raw.item["foundry"] then
cat = "founding"
util.add_effect("foundry", {type="recipe-unlock", name="phenol"})
else
cat = "advanced-crafting"
util.add_effect("automation", {type="recipe-unlock", name="phenol"})
end
data:extend({
{
type = "recipe",
name = "phenol",
category = cat,
main_product = "phenol",
enabled = "false",
ingredients = {{"coal", 4}},
energy_required = er,
results = {
{type="item", name="phenol", amount = 2},
{type="item", name="coke", amount = 1},
},
}
})
else
data:extend({
{
type = "recipe",
name = "phenol",
category = "advanced-crafting",
main_product = "phenol",
enabled = "false",
energy_required = 1,
ingredients = {{"coal", 1}},
results = {
{type="item", name="phenol", amount = 1},
},
}
})
util.add_effect("automation", {type="recipe-unlock", name="phenol"})
end
end