[0.17.2] VOID energy_source doesn't work for vehicles or equipment

Bugs that are actually features.
Post Reply
Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

[0.17.2] VOID energy_source doesn't work for vehicles or equipment

Post by Avacado »

Maybe this is intentional and that is fine, but playing around with VOID and set EVERY energy source in data.raw to void:

Code: Select all

for category_name,category in pairs(data.raw) do
    for entity_name,entity in pairs(category) do
        if type(entity) == "table" and type(entity.energy_source) == "table" then
            entity.energy_source.type = "void"
        end
    end
end
Works for most things. But vehicle (cars, tanks locomotives) still demand fuel and won't run without fuel. Also equipment like exoskeletons won't work without a fusion reactor or some other electricity source.

It makes a bit of sense for vehicles, since VOID would take away their ability to get fuel bonuses.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.2] VOID energy_source doesn't work for vehicles or equipment

Post by Rseding91 »

Thanks for the report however yes they do: vehicles use "burner" for their energy source definition so your check for "has energy_source" will fail on those and never set the type to void.

You need to remove the "burner" definition and add energy_source { type = void }.
If you want to get ahold of me I'm almost always on Discord.

Avacado
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Fri Jul 22, 2016 3:17 pm
Contact:

Re: [0.17.2] VOID energy_source doesn't work for vehicles or equipment

Post by Avacado »

My mistake! Thank you for your fast reply! I'll check if that was a similar issue happening to my equipment.

Post Reply

Return to “Not a bug”