Skip to content

Commit

Permalink
add more items to be burnable
Browse files Browse the repository at this point in the history
rails, locomotives, cars, tanks, capsules, modules, grenades,
research-packs
  • Loading branch information
judos committed Apr 2, 2017
1 parent 1424735 commit 0bd5557
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions source/prototypes/incinerator-recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,29 @@ local burnTime = {
landfill4by4 = 250
}

local types = {"item", "gun", "armor", "ammo", "blueprint", "deconstruction-item","mining-tool"}
local types = {
"item", "rail-planner", "module",
"tool", -- research packs
"item-with-entity-data", -- cars, trains, wagon, tanks
"blueprint", "deconstruction-item", "blueprint-book",
"gun", "armor", "ammo", "mining-tool",
"capsule" -- capsules, grenades, discharge defence
}

for _,typ in pairs(types) do
for name,itemTable in pairs(data.raw[typ]) do

local time = 4
if burnTime[name] then time = burnTime[name] end

--Get the fuel value of the item.
local fuelValue
if itemTable.fuel_value then
fuelValue = tonumber(itemTable.fuel_value:sub(1,itemTable.fuel_value:len()-2))
else
fuelValue = 0
end

--If the item is a raw material and has a fuel value, dont create an incinerator recipe for it.
if itemTable.subgroup ~= "raw-material" or fuelValue == 0 then
data:extend({
Expand All @@ -39,6 +47,6 @@ for _,typ in pairs(types) do
}
})
end

end
end

0 comments on commit 0bd5557

Please sign in to comment.