update, add and move prototypes
This commit is contained in:
parent
91365547c0
commit
fa5928faec
6 changed files with 174 additions and 4 deletions
50
prototypes/bakelite.lua
Normal file
50
prototypes/bakelite.lua
Normal 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")
|
54
prototypes/formaldehyde.lua
Normal file
54
prototypes/formaldehyde.lua
Normal 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,
|
||||
},
|
||||
},
|
||||
})
|
170
prototypes/gas-extractor.lua
Normal file
170
prototypes/gas-extractor.lua
Normal file
|
@ -0,0 +1,170 @@
|
|||
local util = require("data-util");
|
||||
local futil = require("util")
|
||||
|
||||
local ge_ingredients = {
|
||||
{"iron-plate", 10},
|
||||
{"pipe", 10},
|
||||
{"stone-brick", 4},
|
||||
}
|
||||
local ge_prereq = {"automation"}
|
||||
if mods.bzlead then table.insert(ge_ingredients, {"lead-plate", 4}) end
|
||||
if mods.Krastorio2 or mods["aai-industry"] then
|
||||
table.insert(ge_ingredients, {"sand", 10})
|
||||
ge_prereq = {"sand"}
|
||||
elseif data.raw.item["silica"] and data.raw.technology["silica-processing"] then
|
||||
table.insert(ge_ingredients, {"silica", 20})
|
||||
ge_prereq = {"silica-processing"}
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
name = "gas-extractor",
|
||||
icon = "__bzgas__/graphics/icons/gas-extractor.png",
|
||||
icon_size = 128,
|
||||
subgroup = "extraction-machine",
|
||||
order = "b[fluids]-b[gas-extractor]",
|
||||
place_result = "gas-extractor",
|
||||
stack_size = 20,
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "gas-extractor",
|
||||
result = "gas-extractor",
|
||||
enabled = false, -- TODO change
|
||||
ingredients = ge_ingredients,
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
name = "gas-extraction",
|
||||
icon = "__bzgas__/graphics/technology/gas-processing.png",
|
||||
icon_size = 256,
|
||||
prerequisites = ge_prereq,
|
||||
effects = {
|
||||
{type = "unlock-recipe", recipe = "gas-extractor"},
|
||||
},
|
||||
unit = {
|
||||
count = 10,
|
||||
ingredients = {{"automation-science-pack", 1}},
|
||||
time = 20,
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "mining-drill",
|
||||
name = "gas-extractor",
|
||||
icon = "__bzgas__/graphics/icons/gas-extractor.png",
|
||||
icon_size = 128,
|
||||
flags = {"placeable-neutral", "player-creation"},
|
||||
minable = {mining_time = 0.5, result = "gas-extractor"},
|
||||
resource_categories = {"gas"},
|
||||
max_health = 200,
|
||||
corpse = "pumpjack-remnants",
|
||||
dying_explosion = "pumpjack-explosion",
|
||||
collision_box = {{ -1.2, -1.2}, {1.2, 1.2}},
|
||||
selection_box = {{ -1.5, -1.5}, {1.5, 1.5}},
|
||||
-- damaged_trigger_effect = hit_effects.entity(),
|
||||
drawing_box = {{-1.6, -2.5}, {1.5, 1.6}},
|
||||
energy_source =
|
||||
{
|
||||
type = "electric",
|
||||
emissions_per_minute = 10,
|
||||
usage_priority = "secondary-input"
|
||||
},
|
||||
output_fluid_box =
|
||||
{
|
||||
base_area = 10,
|
||||
base_level = 1,
|
||||
pipe_covers = pipecoverspictures(),
|
||||
pipe_connections =
|
||||
{
|
||||
{
|
||||
positions = { {0, -2}, {2, 0}, {0, 2}, {-2, 0} }
|
||||
}
|
||||
}
|
||||
},
|
||||
energy_usage = "90kW",
|
||||
mining_speed = 1,
|
||||
resource_searching_radius = 0.49,
|
||||
vector_to_place_result = {0, 0},
|
||||
module_specification =
|
||||
{
|
||||
module_slots = 2
|
||||
},
|
||||
radius_visualisation_picture =
|
||||
{
|
||||
filename = "__base__/graphics/entity/pumpjack/pumpjack-radius-visualization.png",
|
||||
width = 12,
|
||||
height = 12
|
||||
},
|
||||
monitor_visualization_tint = {r=78, g=173, b=255},
|
||||
base_render_layer = "lower-object-above-shadow",
|
||||
base_picture = {
|
||||
north = {
|
||||
filename = "__bzgas__/graphics/entity/gas-extractor-base-n.png",
|
||||
priority = "extra-high",
|
||||
width = 175,
|
||||
height = 179,
|
||||
scale = 0.5,
|
||||
shift = futil.by_pixel(0, -4),
|
||||
},
|
||||
south = {
|
||||
filename = "__bzgas__/graphics/entity/gas-extractor-base-s.png",
|
||||
priority = "extra-high",
|
||||
width = 175,
|
||||
height = 149,
|
||||
scale = 0.5,
|
||||
shift = futil.by_pixel(0, 13),
|
||||
},
|
||||
east = {
|
||||
filename = "__bzgas__/graphics/entity/gas-extractor-base-e.png",
|
||||
priority = "extra-high",
|
||||
width = 207,
|
||||
height = 129,
|
||||
scale = 0.5,
|
||||
shift = futil.by_pixel(8, 8),
|
||||
},
|
||||
west = {
|
||||
filename = "__bzgas__/graphics/entity/gas-extractor-base-w.png",
|
||||
priority = "extra-high",
|
||||
width = 207,
|
||||
height = 129,
|
||||
scale = 0.5,
|
||||
shift = futil.by_pixel(-8, 8),
|
||||
},
|
||||
},
|
||||
animations = {
|
||||
layers = {
|
||||
{
|
||||
filename = "__bzgas__/graphics/entity/gas-extractor.png",
|
||||
priority = "extra-high",
|
||||
width = 263,
|
||||
height = 600,
|
||||
scale = 1/3,
|
||||
shift = futil.by_pixel(0, -60),
|
||||
},
|
||||
},
|
||||
},
|
||||
vehicle_impact_sound = data.raw["mining-drill"]["pumpjack"].vehicle_impact_sound,
|
||||
open_sound = data.raw["mining-drill"]["pumpjack"].open_sound,
|
||||
close_sound = data.raw["mining-drill"]["pumpjack"].close_sound,
|
||||
working_sound =
|
||||
{
|
||||
sound =
|
||||
{
|
||||
{
|
||||
filename = "__base__/sound/pumpjack.ogg",
|
||||
volume = 0.7
|
||||
},
|
||||
},
|
||||
max_sounds_per_type = 3,
|
||||
audible_distance_modifier = 0.6,
|
||||
fade_in_ticks = 4,
|
||||
fade_out_ticks = 10
|
||||
},
|
||||
fast_replaceable_group = "pumpjack",
|
||||
|
||||
-- circuit_wire_connection_points = circuit_connector_definitions["pumpjack"].points,
|
||||
-- circuit_connector_sprites = circuit_connector_definitions["pumpjack"].sprites,
|
||||
-- circuit_wire_max_distance = default_circuit_wire_max_distance
|
||||
}
|
||||
})
|
138
prototypes/gas.lua
Normal file
138
prototypes/gas.lua
Normal file
|
@ -0,0 +1,138 @@
|
|||
local resource_autoplace = require('resource-autoplace');
|
||||
local noise = require('noise');
|
||||
|
||||
local util = require("data-util");
|
||||
local futil = require("util")
|
||||
|
||||
data:extend({ {type = "resource-category", name="gas"} })
|
||||
data:extend({
|
||||
{
|
||||
type = "autoplace-control",
|
||||
category = "resource",
|
||||
name = "gas",
|
||||
richness = true,
|
||||
order = "b-ez"
|
||||
},
|
||||
{
|
||||
type = "noise-layer",
|
||||
name = "gas"
|
||||
},
|
||||
{
|
||||
type = "resource",
|
||||
name = "gas",
|
||||
icon = "__base__/graphics/icons/crude-oil-resource.png",
|
||||
icon_size = 64, icon_mipmaps = 4,
|
||||
flags = {"placeable-neutral"},
|
||||
category = "gas",
|
||||
subgroup = "raw-resource",
|
||||
order="a-b-a",
|
||||
infinite = true,
|
||||
highlight = true,
|
||||
minimum = 60000,
|
||||
normal = 300000,
|
||||
infinite_depletion_amount = 10,
|
||||
resource_patch_search_radius = 12,
|
||||
tree_removal_probability = 0.7,
|
||||
tree_removal_max_distance = 32 * 32,
|
||||
minable =
|
||||
{
|
||||
mining_time = 1,
|
||||
results =
|
||||
{
|
||||
{
|
||||
type = "fluid",
|
||||
name = "gas",
|
||||
amount_min = 10,
|
||||
amount_max = 10,
|
||||
probability = 1
|
||||
}
|
||||
}
|
||||
},
|
||||
-- walking_sound = sounds.oil,
|
||||
collision_box = {{-1.4, -1.4}, {1.4, 1.4}},
|
||||
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
|
||||
map_color = {0.9, 0.7, 0.2},
|
||||
map_grid = false,
|
||||
autoplace = resource_autoplace.resource_autoplace_settings
|
||||
{
|
||||
name = "gas",
|
||||
order = "c-g", -- Other resources are "b"; oil won't get placed if something else is already there.
|
||||
base_density = 8.2,
|
||||
base_spots_per_km2 = 1.8,
|
||||
random_probability = 1/48,
|
||||
random_spot_size_minimum = 1,
|
||||
random_spot_size_maximum = 1, -- don't randomize spot size
|
||||
additional_richness = 220000, -- this increases the total everywhere, so base_density needs to be decreased to compensate
|
||||
has_starting_area_placement = true,
|
||||
regular_rq_factor_multiplier = 1
|
||||
},
|
||||
stage_counts = {0},
|
||||
stages =
|
||||
{
|
||||
sheet =
|
||||
{
|
||||
filename = "__bzgas__/graphics/entity/ores/gas.png",
|
||||
priority = "extra-high",
|
||||
width = 64,
|
||||
height = 64,
|
||||
frame_count = 4,
|
||||
variation_count = 1,
|
||||
shift = futil.by_pixel(0, -12),
|
||||
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,
|
||||
}
|
||||
}
|
||||
},
|
||||
stages_effect =
|
||||
{
|
||||
sheet =
|
||||
{
|
||||
filename = "__bzgas__/graphics/entity/ores/gas-effect.png",
|
||||
priority = "extra-high",
|
||||
width = 64,
|
||||
height = 64,
|
||||
frame_count = 4,
|
||||
variation_count = 1,
|
||||
shift = futil.by_pixel(0, -12),
|
||||
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",
|
||||
}
|
||||
}
|
||||
},
|
||||
effect_animation_period = 3.5,
|
||||
effect_animation_period_deviation = 1.5,
|
||||
effect_darkness_multiplier = 3.6,
|
||||
min_effect_alpha = 0.1,
|
||||
max_effect_alpha = 0.9,
|
||||
},
|
||||
{
|
||||
type = "fluid",
|
||||
name = "gas",
|
||||
default_temperature = 25,
|
||||
heat_capacity = "0.1KJ",
|
||||
fuel_value = "1KJ",
|
||||
base_color = {r=0.67, g=0.87, b=0.77},
|
||||
flow_color = {r=0.67, g=0.87, b=0.87},
|
||||
icon = "__bzgas__/graphics/icons/gas.png",
|
||||
icon_size = 128,
|
||||
order = "a[fluid]-f[gas]"
|
||||
},
|
||||
})
|
63
prototypes/phenol.lua
Normal file
63
prototypes/phenol.lua
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue