Line endings

This commit is contained in:
Simon Brodtmann 2025-02-13 21:09:33 +01:00
parent bf89fb4e04
commit a4411af558

View file

@ -1,37 +1,37 @@
data.raw.item["wood"].fuel_category = "wood" data.raw.item["wood"].fuel_category = "wood"
data.raw.item["lumber"].fuel_category = "wood" data.raw.item["lumber"].fuel_category = "wood"
data.raw.item["tree-seed"].fuel_category = "wood" data.raw.item["tree-seed"].fuel_category = "wood"
data.raw.item["wooden-wall"].fuel_category = "wood" data.raw.item["wooden-wall"].fuel_category = "wood"
-- Update burner inserters initial fuel -- Update burner inserters initial fuel
for _, inserter in pairs(data.raw["inserter"]) do for _, inserter in pairs(data.raw["inserter"]) do
if inserter.energy_source and inserter.energy_source.initial_fuel == "wood" then if inserter.energy_source and inserter.energy_source.initial_fuel == "wood" then
inserter.energy_source.initial_fuel = "coal" inserter.energy_source.initial_fuel = "coal"
end end
end end
-- Update energy source fuel categories for buildings that should still use wood as fuel -- Update energy source fuel categories for buildings that should still use wood as fuel
local blacklist = {} local blacklist = {}
function update_fuel_categories(t) function update_fuel_categories(t)
for _, entity in pairs(t) do for _, entity in pairs(t) do
for _, energy_source in pairs({ "energy_source", "burner" }) do for _, energy_source in pairs({ "energy_source", "burner" }) do
if entity[energy_source] if entity[energy_source]
and entity[energy_source].type == "burner" and entity[energy_source].type == "burner"
and not table.contains(blacklist, entity.name) and not table.contains(blacklist, entity.name)
and entity[energy_source].fuel_categories and entity[energy_source].fuel_categories
and table.contains(entity[energy_source].fuel_categories, "chemical") and table.contains(entity[energy_source].fuel_categories, "chemical")
then then
table.insert(entity[energy_source].fuel_categories, "wood") table.insert(entity[energy_source].fuel_categories, "wood")
end end
end end
end end
end end
-- Add more if incompatibilities arise -- Add more if incompatibilities arise
update_fuel_categories(data.raw["boiler"]) update_fuel_categories(data.raw["boiler"])
update_fuel_categories(data.raw["reactor"]) update_fuel_categories(data.raw["reactor"])
update_fuel_categories(data.raw["car"]) update_fuel_categories(data.raw["car"])
update_fuel_categories(data.raw["locomotive"]) update_fuel_categories(data.raw["locomotive"])
update_fuel_categories(data.raw["generator-equipment"]) update_fuel_categories(data.raw["generator-equipment"])