fluid/item handler
This commit is contained in:
parent
bb10790579
commit
66c0bed896
6 changed files with 99 additions and 26 deletions
11
data.lua
11
data.lua
|
@ -91,9 +91,6 @@ if mods["space-exploration"] then
|
||||||
require('scripts/SE/data')
|
require('scripts/SE/data')
|
||||||
end
|
end
|
||||||
|
|
||||||
require('scripts/gravitation/gr_make_white_hole_recipes')
|
|
||||||
|
|
||||||
|
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "sprite",
|
type = "sprite",
|
||||||
|
@ -113,4 +110,10 @@ end
|
||||||
--overhaul
|
--overhaul
|
||||||
if settings.startup['overhaul_mode'].value == true then
|
if settings.startup['overhaul_mode'].value == true then
|
||||||
require('scripts/overhaul')
|
require('scripts/overhaul')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--white hole
|
||||||
|
require('scripts/gravitation/gr_make_white_hole_recipes')
|
||||||
|
|
||||||
|
--make item vent recipes
|
||||||
|
require('scripts/electronic/el_burner')
|
|
@ -85,6 +85,10 @@ data:extend({
|
||||||
type = 'unlock-recipe',
|
type = 'unlock-recipe',
|
||||||
recipe = 'el_burner_kerosene_recipe',
|
recipe = 'el_burner_kerosene_recipe',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type = 'unlock-recipe',
|
||||||
|
recipe = 'fu_burner_recipe',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
unit = {
|
unit = {
|
||||||
count = '150',
|
count = '150',
|
||||||
|
@ -192,10 +196,10 @@ data:extend({
|
||||||
type = 'unlock-recipe',
|
type = 'unlock-recipe',
|
||||||
recipe = 'el_purify_stone_acidic_recipe',
|
recipe = 'el_purify_stone_acidic_recipe',
|
||||||
},
|
},
|
||||||
{
|
--{
|
||||||
type = 'unlock-recipe',
|
-- type = 'unlock-recipe',
|
||||||
recipe = 'el_purify_uranium_acidic_recipe',
|
-- recipe = 'el_purify_uranium_acidic_recipe',
|
||||||
},
|
--},
|
||||||
{
|
{
|
||||||
type = 'unlock-recipe',
|
type = 'unlock-recipe',
|
||||||
recipe = 'el_dirty_water_vent_2_recipe',
|
recipe = 'el_dirty_water_vent_2_recipe',
|
||||||
|
@ -1877,14 +1881,6 @@ data:extend({
|
||||||
type = 'unlock-recipe',
|
type = 'unlock-recipe',
|
||||||
recipe = 'fu_boiler_recipe',
|
recipe = 'fu_boiler_recipe',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type = 'unlock-recipe',
|
|
||||||
recipe = 'fu_burn_oxygen_recipe',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type = 'unlock-recipe',
|
|
||||||
recipe = 'fu_burner_recipe',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type = 'unlock-recipe',
|
type = 'unlock-recipe',
|
||||||
recipe = 'fu_lithium_6_recipe',
|
recipe = 'fu_lithium_6_recipe',
|
||||||
|
|
|
@ -202,7 +202,7 @@ data:extend({
|
||||||
{type="fluid", name="el_kerosene", amount=200},
|
{type="fluid", name="el_kerosene", amount=200},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{type="fluid", name="el_desulfurized_kerosene", amount=80,temperature=40},
|
{type="fluid", name="el_desulfurized_kerosene", amount=80},
|
||||||
{type="fluid", name="el_acidic_water", amount=120},
|
{type="fluid", name="el_acidic_water", amount=120},
|
||||||
},
|
},
|
||||||
result_count = 1,
|
result_count = 1,
|
||||||
|
|
|
@ -81,9 +81,8 @@ data:extend({
|
||||||
hidden = false,
|
hidden = false,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{'el_burner_item',1},
|
{'el_burner_item',1},
|
||||||
{'pipe',60},
|
{'pipe',20},
|
||||||
{'fu_materials_KFK',25},
|
{'electronic-circuit',20}
|
||||||
{'fu_materials_TIM',15}
|
|
||||||
},
|
},
|
||||||
result = 'fu_burner_item',
|
result = 'fu_burner_item',
|
||||||
result_count = 1,
|
result_count = 1,
|
||||||
|
@ -1541,7 +1540,8 @@ data:extend({
|
||||||
category = 'fu_burner_category',
|
category = 'fu_burner_category',
|
||||||
icon = '__248k__/ressources/elements/fu_oxygen.png',
|
icon = '__248k__/ressources/elements/fu_oxygen.png',
|
||||||
icon_size = 64,
|
icon_size = 64,
|
||||||
enabled = 'false',
|
enabled = true,
|
||||||
|
hidden = true,
|
||||||
ingredients = {
|
ingredients = {
|
||||||
{type="fluid", name="fu_oxygen", amount=60},
|
{type="fluid", name="fu_oxygen", amount=60},
|
||||||
},
|
},
|
||||||
|
@ -1551,6 +1551,39 @@ data:extend({
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
subgroup = 'fu_item_subgroup_f',
|
subgroup = 'fu_item_subgroup_f',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = 'fu_burn_steam_recipe',
|
||||||
|
type = 'recipe',
|
||||||
|
category = 'fu_burner_category',
|
||||||
|
enabled = true,
|
||||||
|
hidden = true,
|
||||||
|
ingredients = {
|
||||||
|
{type="fluid", name="steam", amount=100},
|
||||||
|
},
|
||||||
|
results = {
|
||||||
|
{type="fluid", name="water", amount=100},
|
||||||
|
},
|
||||||
|
result_count = 1,
|
||||||
|
energy_required = 1,
|
||||||
|
always_show_made_in = true,
|
||||||
|
subgroup = 'fu_item_subgroup_f',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = 'fu_burn_water_recipe',
|
||||||
|
type = 'recipe',
|
||||||
|
category = 'fu_burner_category',
|
||||||
|
icon = data.raw.fluid["water"].icon,
|
||||||
|
icon_size = data.raw.fluid["water"].icon_size,
|
||||||
|
hidden = true,
|
||||||
|
ingredients = {
|
||||||
|
{type="fluid", name="water", amount=100},
|
||||||
|
},
|
||||||
|
results = {},
|
||||||
|
result_count = 1,
|
||||||
|
energy_required = 1,
|
||||||
|
always_show_made_in = true,
|
||||||
|
subgroup = 'fu_item_subgroup_f',
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
|
@ -16,8 +16,8 @@ data:extend({
|
||||||
icon_size = 64,
|
icon_size = 64,
|
||||||
place_result = 'fu_burner_entity',
|
place_result = 'fu_burner_entity',
|
||||||
stack_size = 20,
|
stack_size = 20,
|
||||||
subgroup = 'fu_item_subgroup_c',
|
subgroup = 'el_item_subgroup_c',
|
||||||
order = 'a-b',
|
order = 'a-a',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ data:extend({
|
||||||
height = 2,
|
height = 2,
|
||||||
base_level = -1,
|
base_level = -1,
|
||||||
production_type = 'input',
|
production_type = 'input',
|
||||||
--pipe_picture = assembler2pipepictures(),
|
|
||||||
pipe_covers = pipecoverspictures(),
|
pipe_covers = pipecoverspictures(),
|
||||||
|
pipe_picture = south_basic_pipe_picture,
|
||||||
pipe_connections = {
|
pipe_connections = {
|
||||||
{type = "input", position = {2, 0}},
|
{type = "input", position = {2, 0}},
|
||||||
--{type = "output", position = {-2, 0}},
|
--{type = "output", position = {-2, 0}},
|
||||||
|
@ -68,8 +68,8 @@ data:extend({
|
||||||
height = 2,
|
height = 2,
|
||||||
base_level = 1,
|
base_level = 1,
|
||||||
production_type = 'output',
|
production_type = 'output',
|
||||||
--pipe_picture = assembler2pipepictures(),
|
|
||||||
pipe_covers = pipecoverspictures(),
|
pipe_covers = pipecoverspictures(),
|
||||||
|
pipe_picture = south_basic_pipe_picture,
|
||||||
pipe_connections = {
|
pipe_connections = {
|
||||||
{type = "output", position = {-2, 0}},
|
{type = "output", position = {-2, 0}},
|
||||||
--{type = "output", position = {-2, 0}},
|
--{type = "output", position = {-2, 0}},
|
||||||
|
@ -84,7 +84,7 @@ data:extend({
|
||||||
line_length = 1,
|
line_length = 1,
|
||||||
frame_count = 1,
|
frame_count = 1,
|
||||||
animation_speed = 0.5,
|
animation_speed = 0.5,
|
||||||
shift = {0,-0.4}
|
shift = {0,-0.5}
|
||||||
},
|
},
|
||||||
map_color = {r=0, g=0, b=1, a=1},
|
map_color = {r=0, g=0, b=1, a=1},
|
||||||
working_sound =
|
working_sound =
|
||||||
|
|
41
scripts/electronic/el_burner.lua
Normal file
41
scripts/electronic/el_burner.lua
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
function make_burner_recipe(item)
|
||||||
|
local blank = {
|
||||||
|
name = 'fu_burn_oxygen_recipe',
|
||||||
|
type = 'recipe',
|
||||||
|
category = 'fu_burner_category',
|
||||||
|
icon = '__248k__/ressources/elements/fu_oxygen.png',
|
||||||
|
icon_size = 64,
|
||||||
|
enabled = true,
|
||||||
|
hidden = true,
|
||||||
|
ingredients = {
|
||||||
|
{type="item", name="blank", amount=1},
|
||||||
|
},
|
||||||
|
results = {},
|
||||||
|
result_count = 1,
|
||||||
|
energy_required = 0.1,
|
||||||
|
always_show_made_in = true,
|
||||||
|
subgroup = 'fu_item_subgroup_f',
|
||||||
|
}
|
||||||
|
blank["name"] = "fu_burn_"..item.."_recipe"
|
||||||
|
blank["ingredients"] = {
|
||||||
|
{item,1}
|
||||||
|
}
|
||||||
|
if data.raw.item[item].icon then
|
||||||
|
blank["icon"] = data.raw.item[item].icon
|
||||||
|
blank["icon_size"] = data.raw.item[item].icon_size
|
||||||
|
end
|
||||||
|
--table.insert(data.raw.recipe, base)
|
||||||
|
data:extend({blank})
|
||||||
|
end
|
||||||
|
|
||||||
|
function burner_recipe_generator()
|
||||||
|
local items = data.raw.item
|
||||||
|
for i,v in pairs(items) do
|
||||||
|
if not data.raw.item[i].name == "fi_materials_waste" then
|
||||||
|
make_burner_recipe(data.raw.item[i].name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
burner_recipe_generator()
|
Loading…
Add table
Add a link
Reference in a new issue