Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions prototypes/items/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ITEM {
type = "item",
name = "coke",
fuel_value = "5MJ",
fuel_category = "chemical",
fuel_categories = {"chemical"},
icon = "__pycoalprocessinggraphics__/graphics/icons/coke.png",
icon_size = 32,
flags = {},
Expand Down Expand Up @@ -70,7 +70,7 @@ ITEM {
type = "item",
name = "active-carbon",
fuel_value = "15MJ",
fuel_category = "chemical",
fuel_categories = {"chemical"},
icon = "__pycoalprocessinggraphics__/graphics/icons/active-carbon.png",
icon_size = 32,
flags = {},
Expand Down Expand Up @@ -137,7 +137,7 @@ ITEM {
icon = "__pycoalprocessinggraphics__/graphics/icons/drill-head.png",
icon_size = 64,
fuel_value = "5MJ",
fuel_category = "drill",
fuel_categories = {"drill"},
flags = {},
subgroup = "py-items",
order = "g",
Expand Down Expand Up @@ -187,7 +187,7 @@ ITEM {
order = "organics",
stack_size = 100,
fuel_value = "2MJ",
fuel_category = "biomass",
fuel_categories = {"biomass"},
}

ITEM {
Expand Down Expand Up @@ -219,7 +219,7 @@ ITEM {
icon_size = 32,
flags = {},
fuel_value = "3MJ",
fuel_category = "chemical",
fuel_categories = {"chemical"},
subgroup = "py-items",
order = "coal-dust",
stack_size = 100
Expand Down Expand Up @@ -306,7 +306,7 @@ ITEM {
type = "item",
name = "fuelrod-mk01",
fuel_value = "75MJ",
fuel_category = "fuelrod",
fuel_categories = {"fuelrod"},
icon = "__pycoalprocessinggraphics__/graphics/icons/fuelrod-mk01.png",
icon_size = 32,
flags = {},
Expand Down Expand Up @@ -766,7 +766,7 @@ ITEM {
type = "item",
name = "coal-briquette",
fuel_value = "60MJ",
fuel_category = "chemical",
fuel_categories = {"chemical"},
icon = "__pycoalprocessinggraphics__/graphics/icons/coal-briquette.png",
icon_size = 32,
flags = {},
Expand Down Expand Up @@ -801,7 +801,7 @@ ITEM {
type = "item",
name = "log",
fuel_value = "4MJ",
fuel_category = "biomass",
fuel_categories = {"biomass"},
icon = "__pycoalprocessinggraphics__/graphics/icons/mip/log-01.png",
pictures =
{
Expand Down Expand Up @@ -829,7 +829,7 @@ ITEM {
subgroup = "py-items",
order = "treated-wood",
fuel_value = "4MJ",
fuel_category = "biomass",
fuel_categories = {"biomass"},
stack_size = 100
}

Expand Down Expand Up @@ -873,7 +873,7 @@ ITEM {
icon_size = 64,
flags = {},
fuel_value = "4MJ",
fuel_category = "chemical",
fuel_categories = {"chemical"},
subgroup = "py-items",
order = "caa",
stack_size = 100
Expand Down
2 changes: 1 addition & 1 deletion prototypes/recipes/fuel-canister-recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for f, fluid in pairs(data.raw.fluid) do
subgroup = "py-cans",
order = "canister-b-[full-gas-canister]",
fuel_value = "10MJ",
fuel_category = "jerry",
fuel_categories = {"jerry"},
burnt_result = "empty-fuel-canister",
stack_size = 20,
autotech_ignore = true,
Expand Down
9 changes: 4 additions & 5 deletions prototypes/updates/base-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ RECIPE("rail"):clear_ingredients():add_ingredient {type = "item", name = "stone"
RECIPE("landfill"):replace_ingredient("stone", {type = "item", name = "stone", amount = 30}):add_ingredient {type = "item", name = "gravel", amount = 30}:add_ingredient {type = "item", name = "soil", amount = 30}
RECIPE("burner-inserter"):replace_ingredient("iron-plate", {type = "item", name = "iron-plate", amount = 5})
RECIPE("burner-inserter"):replace_ingredient("iron-gear-wheel", {type = "item", name = "iron-gear-wheel", amount = 2})
ITEM("rocket-fuel"):set_fields {fuel_category = "jerry"}
ITEM("rocket-fuel"):set_fields {fuel_categories = {"jerry"}}

data.raw.item["wood"].fuel_category = "biomass"
data.raw.item["wood"].fuel_categories = {"biomass"}
data.raw.item["nuclear-fuel"].burnt_result = nil
-- add ash to burnt results for chemical fuel items
for i, item in pairs(data.raw.item) do
if item.fuel_category ~= nil and item.fuel_category == "chemical" and item.name ~= "active-carbon" then
if item.fuel_categories and table.any(item.fuel_categories, function(f) return f == "chemical" end) and item.name ~= "active-carbon" then
data.raw.item[item.name].burnt_result = "ash"
end
end
Expand All @@ -175,8 +175,7 @@ for _, entity in py.iter_prototypes("entity") do
if entity.burner or (entity.energy_source and entity.energy_source.type == "burner") then
local es = entity.burner or entity.energy_source

if ((not es.fuel_categories and (es.fuel_category or "chemical") == "chemical")
or (es.fuel_categories and table.any(es.fuel_categories, function(f) return f == "chemical" end)))
if (es.fuel_categories and table.any(es.fuel_categories, function(f) return f == "chemical" end))
and (es.burnt_inventory_size or 0) < 1
then
es.burnt_inventory_size = 1
Expand Down
8 changes: 4 additions & 4 deletions scripts/wiki/spreadsheet-pages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ local function generate_soild_fuel_spreadsheet_data(required_science)
}

for name, item in pairs(prototypes.item) do
if item.fuel_category and not item.hidden then
if item.fuel_categories and not item.hidden then
local burnt_result, burnt_result_order, burnt_result_tooltip
if item.burnt_result then
burnt_result = "[item=" .. item.burnt_result.name .. "]"
Expand All @@ -346,8 +346,8 @@ local function generate_soild_fuel_spreadsheet_data(required_science)
elem_tooltip = {type = "item", name = name}
},
["fuel-category"] = {
value = prototypes.fuel_category[item.fuel_category].localised_name,
order = item.fuel_category or ""
value = prototypes.fuel_category[item.fuel_categories[1]].localised_name,
order = item.fuel_categories[1] or ""
},
["fuel-value"] = {
value = py.format_energy(item.fuel_value, "J"),
Expand All @@ -359,7 +359,7 @@ local function generate_soild_fuel_spreadsheet_data(required_science)
elem_tooltip = burnt_result_tooltip
},
["unlocked-at"] = unlocked_at,
search_key = name .. "|" .. item.fuel_category .. "|" .. (burnt_result_order or "") .. "|" .. unlocked_at.pack
search_key = name .. "|" .. item.fuel_categories[1] .. "|" .. (burnt_result_order or "") .. "|" .. unlocked_at.pack
})
end
end
Expand Down
Loading