Your entities reuse same instance empty_sprite
in multiple places. This screws with my "No Overhang" mod, because Factorio remembers that they were same instances, so when I process the empty_sprite
as Animation instance (because gas_flow
is Animation) it is also used for all other occurances, which crashes the game, because window_background
expects Sprite instance instead.
I see two possible solutions:
- Create a deepcopy of
empty_sprite
everytime you use it. This will disjoint them so each one will be processed without affecting anything else.
- Don't use
empty_sprite
at all. All properties which you use it for are optional, so you can just not specify them at all and game will not render anything there
I'd suggest second option since there is no need to use it at all
Related discussion on NoOverhang mod: https://mods.factorio.com/mod/NOverhang/discussion/683f5c2c3093b24ad3483acb