Fire events on module addition and module removal.
Returns entity added to/removed from, module, and player.
Use case: Allows for interfacing with modules to create custom effects when adding or removing modules. My particular idea is allowing addition of "features" of modularity to buildings that can accept modules. Things like, a module that adds a power pole to an assembler, or a logistics box to it or something. Could be used with anything that can accept a module. The concept is very similar to an equipment grid, but more specialized since module slots are limited, and this can be used on a slightly different variety of entities.
Module events on add/remove.
-
- Long Handed Inserter
- Posts: 96
- Joined: Sun Mar 25, 2018 5:34 am
- Contact:
Re: Module events on add/remove.
Duplicate with 56963 which is a "won't implement" for the reasons stated in the thread.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Module events on add/remove.
Being the author of the original request...
A possible method i can see to implement this is to intecept all module in/output actions by using a custom gui for the entity in question. It's a lot of coding work though, and if you need modules to be placeable by bots for blueprinting it's even more coding work :/.
A possible method i can see to implement this is to intecept all module in/output actions by using a custom gui for the entity in question. It's a lot of coding work though, and if you need modules to be placeable by bots for blueprinting it's even more coding work :/.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Long Handed Inserter
- Posts: 96
- Joined: Sun Mar 25, 2018 5:34 am
- Contact:
Re: Module events on add/remove.
Could just stick an event call in the code to fire when the module enters the inventory of the structure. I mean I read it but the counterargument to the request could be used for a large number of other events that do similar stuff. More specifically the event fired for equipment grids.
Or, just don't return the player as part of the event call?
Or, just don't return the player as part of the event call?
Re: Module events on add/remove.
Items in inventories can change by loads of different thing compared to the super simpler equipment which is only ever changed by the player doing it.
If you want to get ahold of me I'm almost always on Discord.
-
- Long Handed Inserter
- Posts: 96
- Joined: Sun Mar 25, 2018 5:34 am
- Contact:
Re: Module events on add/remove.
Bots and players right?
Re: Module events on add/remove.
robots, players, inserters, loaders, mining drills, assembling machines, boilers, turrets. Anything with ah inventory that isn't a container has different automated methods of "item removed/added".Staplergun wrote:Bots and players right?
If you want to get ahold of me I'm almost always on Discord.
-
- Long Handed Inserter
- Posts: 96
- Joined: Sun Mar 25, 2018 5:34 am
- Contact:
Re: Module events on add/remove.
Cheese and rice. Fair enough.
Is module slots a type of "inventory" that other things like a mining drill can even interact with though?
Is module slots a type of "inventory" that other things like a mining drill can even interact with though?