[0.15.2] Cannot set energy drain value for the lamp entity

Bugs that are actually features.
Post Reply
User avatar
Betep3akata
Inserter
Inserter
Posts: 40
Joined: Fri Sep 30, 2016 10:31 am
Contact:

[0.15.2] Cannot set energy drain value for the lamp entity

Post by Betep3akata »

Hi,
I ran into a problem that the drain value of the electric source (50W) of the lamp entity is not the same as the actual value from the electric network statistics (13.3kW):
Image

And this actual value correlates only to the energy_usage_per_tick property of my custom prototype:
800kW => 26.5kW
400kW => 13.3kW

Code: Select all

data:extend({
    {
        type = "lamp",
        name = "UV-lamp",
...
        energy_source =
        {
            type = "electric",
            usage_priority = "secondary-input",
            buffer_capacity = "400kJ",
            input_flow_limit = "9600kW",
            drain = "0.05kW"
        },
        energy_usage_per_tick = "400kW",
...
Reproduce script (Just load attached save file):
[0. Add new instance of the lamp prototype;]
1. Add the drain property into energy_source = { ... };
2. Run Factorio and place single lamp entity, add power generation for it;
3. Check drain in the entity properties (which is equal to the drain value from the entity);
4. Check value from the electric network stats (which is different).

Thanks,
Alex
Attachments
Will-o-the-wisps_15.1.1.zip
Mod which required for save below
(666.97 KiB) Downloaded 73 times
lamp_drain_issue.zip
Save file with issue (Will-o-the-wisps mod required)
(1.73 MiB) Downloaded 70 times
uv-lamp.lua
Full code for the custom lamp entity
(2.31 KiB) Downloaded 73 times
My mods: Scorched Earth, Will-o-the-wisps
//My nickname is some kind of transliteration from Cyrillic to Latin. Betep3akata stands for WindOfSunset.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.15.2] Cannot set energy drain value for the lamp entity

Post by steinio »

Haha seems inherited from 0.14: viewtopic.php?f=25&t=44397

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts

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

Re: [0.15.2] Cannot set energy drain value for the lamp entity

Post by Rseding91 »

The lamp consumes energy_usage_per_tick * 1 / 30.0 when idle (off). That + your drain value is what it shows in the graph.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”