From 0c064f7a00747eda97d08f67eec0255df2e6dbd4 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 24 Jan 2025 10:47:03 +0100 Subject: [PATCH] generator-equipment uses wood as fuel --- .../content/fuel-category-updates.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lignumis/prototypes/content/fuel-category-updates.lua b/lignumis/prototypes/content/fuel-category-updates.lua index b43bacd..964f5bd 100644 --- a/lignumis/prototypes/content/fuel-category-updates.lua +++ b/lignumis/prototypes/content/fuel-category-updates.lua @@ -16,13 +16,15 @@ local blacklist = {} function update_fuel_categories(t) for _, entity in pairs(t) do - if entity.energy_source - and entity.energy_source.type == "burner" - and not table.contains(blacklist, entity.name) - and entity.energy_source.fuel_categories - and table.contains(entity.energy_source.fuel_categories, "chemical") - then - table.insert(entity.energy_source.fuel_categories, "wood") + for _, energy_source in pairs({ "energy_source", "burner" }) do + if entity[energy_source] + and entity[energy_source].type == "burner" + and not table.contains(blacklist, entity.name) + and entity[energy_source].fuel_categories + and table.contains(entity[energy_source].fuel_categories, "chemical") + then + table.insert(entity[energy_source].fuel_categories, "wood") + end end end end @@ -31,3 +33,4 @@ end update_fuel_categories(data.raw["boiler"]) update_fuel_categories(data.raw["reactor"]) update_fuel_categories(data.raw["car"]) +update_fuel_categories(data.raw["generator-equipment"])