-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 6c1c898 Former-commit-id: ffdeb433944df6abe37b033c27efd8095d8a6969
- Loading branch information
Showing
7 changed files
with
91 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
local Recipe = require("stdlib/data/recipe") | ||
|
||
local function make_fluid_recipe(name, locale, icons, category, ing) | ||
Recipe { | ||
name = name, | ||
type = "recipe", | ||
localised_name = locale, | ||
hidden = true, | ||
enabled = true, | ||
flags = {"hidden"}, | ||
category = category, | ||
ingredients = { | ||
ing | ||
}, | ||
results = { | ||
{type = "fluid", name = "water", amount = 0} | ||
}, | ||
icons = icons, | ||
icon_size = 32, | ||
subgroup = "py-void" | ||
} | ||
end | ||
|
||
for _, fluid in pairs(data.raw.fluid) do | ||
local name = fluid.name .. "-pyvoid" .. (fluid.gas_temperature and "-gas" or "-fluid") | ||
|
||
local icons | ||
if fluid.icons then | ||
icons = table.deepcopy(fluid.icons) | ||
else | ||
icons = { | ||
{icon = fluid.icon, icon_size = fluid.icon_size or 32} | ||
} | ||
end | ||
icons[#icons + 1] = {icon = "__pyindustry__/graphics/icons/no.png", icon_size = 32} | ||
|
||
if (fluid.default_temperature or 15) < (fluid.gas_temperature or 999999999999) then | ||
--Make sinkhole | ||
local locale = {"", "Void ", {"fluid-name."..fluid.name}} | ||
local ing = {type = "fluid", name = fluid.name, maximum_temperature = fluid.gas_temperature, amount = 10} | ||
make_fluid_recipe(name, locale, icons, "py-runoff", ing) | ||
end | ||
|
||
if fluid.gas_temperature then | ||
--Make burner | ||
local locale = {"", "Void ", {"fluid-name."..fluid.name}} | ||
local ing = {type = "fluid", name = fluid.name, minimum_temperature = fluid.gas_temperature, amount = 10} | ||
make_fluid_recipe(name, locale, icons, "py-venting", ing) | ||
end | ||
end |