An event that is raised when the module configuration of an assembler or furnace changes. Containing:
Code: Select all
event.entity --the entity which had its module inventory content changed
event.player --the player who did the changing if any (optional)
event.modules --a list of module names that are in the assembler now (this is the part i need. i don't need the actual stack. but that's an implementation detail not up to me to decide) (optional)
I'm trying to implement some special modules that do not directly affect the internals of assemblers (i.e. not speed, productivity, etc) but rather they affect certain parameters that my script considers when handling logic related to an assembler. This works by reading an assemblers inventory (currently once on initial parsing) and detecting if a module of a certain name (pattern) is inserted into the assembler. Of course i'd like to only check assemblers as rarely as possible, but currently the only way to detect if the module inventory changed after the initial setup seems to be to run through a cached list of entities in on_tick and read their inventory one-by-one.
As assembler module inventories can not be automatically changed this should not have any significant performance impact? (Beacon modules can theoretically be automated but even if they are they probably don't change that often? Personally i only need the event for assemblers, but not raising it for beacons would look odd?)