[2.0.76] ElectricEnergyInterface entity status is always ok

Bugs that are actually features.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 169
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[2.0.76] ElectricEnergyInterface entity status is always ok

Post by hgschmie »

I have an entity like this:

Code: Select all

--- @type data.ElectricEnergyInterfacePrototype
local power_entity = {
    -- PrototypeBase
    type = 'electric-energy-interface',
    name = 'my-thing',
    hidden = true,
    hidden_in_factoriopedia = true,

    -- ElectricEnergyInterfacePrototype
    ---@type data.ElectricEnergySource
    energy_source = {
        type = 'electric',
        usage_priority = 'secondary-input',
    },

    energy_usage = '2kW',
    gui_mode = 'none',
    picture = util.empty_sprite(),

    -- EntityWithHealthPrototype
    max_health = 1,

    -- EntityPrototype
    collision_box = { { -0.01, -0.01 }, { 0.01, 0.01 } },
    collision_mask = collision_mask_util.new_mask(),
    selection_box = { { -1, -1 }, { 1, 1 } },
    flags = {
        'placeable-off-grid',
        'not-on-map',
        'not-deconstructable',
        'hide-alt-info',
        'not-selectable-in-game',
        'not-upgradable',
        'no-automated-item-removal',
        'no-automated-item-insertion',
        'not-in-kill-statistics',
        'not-rotatable',
        'no-copy-paste',
    },
    minable = nil,
    allow_copy_paste = false,
    selectable_in_game = false,
    selection_priority = 1,
}
This entity works fine, drinks energy, all is good. Whenever I look at its status, it reports "defines.entity_status.working".

If I cut power to it, then it turns on the red triangle ("low power") or the yellow triangle ("No power"). However, any entity around it that I inspect either reports "defines.entity_status.no_power" or "defines.entity_status.low_power". Except this entity above. It always reports "working".

what am I missing? It looks like a bug to me.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 169
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.76] ElectricEnergyInterface entity status is always ok

Post by hgschmie »

(replying to my own post)

I tested this by replacing the ElectircEnergyInterface with a Lamp and that behaves as expected. But with a lamp, I can not control the energy consumption (only on/off).

So this look like a bug with ElectricEnergyInterface to me.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16650
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.76] ElectricEnergyInterface entity status is always ok

Post by Rseding91 »

Thanks for the report however we won't be changing this. The entity type is primarily a testing/hidden/cheat-like entity and functionally has zero byproducts of its update. It may consume energy, it may produce energy, it may do neither/both and also be an accumulator.

The status is correct: it's working doing what ever it was configured to do. If you'd like a different entity with a different status you can do that.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 255
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: [2.0.76] ElectricEnergyInterface entity status is always ok

Post by Osmo »

You can also assign a custom status to the entity, when it is selected/opened by a player
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 169
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.76] ElectricEnergyInterface entity status is always ok

Post by hgschmie »

Thanks for the explanation.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 169
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.76] ElectricEnergyInterface entity status is always ok

Post by hgschmie »

Osmo wrote: Thu Mar 19, 2026 9:10 pm You can also assign a custom status to the entity, when it is selected/opened by a player
Agreed. However, for a custom status (e.g. low power/no power), I would need to know that this condition exists right now and there is not a good way to find out.
Post Reply

Return to “Not a bug”