troelsbjerre / Bottleneck

Factorio mod that tell you which assemblers are starved of ingredients
Other
26 stars 21 forks source link

Should not create multiple lights for the same entity #56

Closed mspielberg closed 5 years ago

mspielberg commented 5 years ago

Many mods do not handle on_script_revive, but this event is the way of the future. In an attempt to cover all the bases, Autobuild raises both on_script_revive and on_entity_built when it revives a ghost. Unfortunately this causes Bottleneck to create two light entities for the same entity, and loses track of one of them, so it is never updated. Bottleneck should check whether there is already an overlay for an entity before creating a new one.