Page 1 of 1

[1.1.56] emissions_per_minute on an accumulator is weird

Posted: Sun Mar 27, 2022 8:06 pm
by Honktown
Here's a simple mod to demonstrate:
accum_1.0.0.zip
(1.28 KiB) Downloaded 63 times
1) accumulator.energy_source.emissions_per_minute > 0
2) only entity is the accumulator and there is pollution present (this situation came from the mod Warptorio)
3) biters form attack groups and rush at it, even when it's indestructible (which I believe is supposed to make it an invalid target?)

The biters take 1-2 minutes to attack with game.speed at 5. (couldn't get the biters to group and attack any faster). If in control.lua, a different thing like "assembling-machine-1" is created, no attack happens, though the biters still group and make nests.

Expectation: emissions_per_minute to not apply to accumulators. Applying it would seem a performance problem, but surely no pollution activity when it has no energy and is disconnected.

Re: [1.1.56] emissions_per_minute on an accumulator is weird

Posted: Sun Mar 27, 2022 10:05 pm
by Pi-C
Honktown wrote:
Sun Mar 27, 2022 8:06 pm
3) biters form attack groups and rush at it, even when it's indestructible (which I believe is supposed to make it an invalid target?)
is_military_target should work better.

Re: [1.1.56] emissions_per_minute on an accumulator is weird

Posted: Fri Feb 24, 2023 1:15 pm
by boskid
I have no idea what exactly this bug reports is about. emissions_per_minute is set on energy source prototype and it causes pollution when entity asks for the energy from the energy source. Accumulators are not updatable so they cannot extract energy from energy source and as such they cannot pollute. I could force emissions_per_minute to be 0 the same way Inserters and Lamps are forcing this to be 0 (by overwriting energy source prototype after prototype creation) but it is not bug on its own and given modders do weird stuff i would rather assume some mods may use that for the tooltip when part of complex structure composed of multiple entities.

Re: [1.1.56] emissions_per_minute on an accumulator is weird

Posted: Mon Feb 27, 2023 10:29 pm
by Honktown
1) An accumulator with emissions on the energy source can never emit pollution yet is targeted in a pollution cloud.
2) An accumulator which is indestructible and has emissions on the energy source is targeted for pollution attack, while an indestructible assembler isn't.