Event for item-request-proxy creation

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
ILLISIS
Inserter
Inserter
Posts: 45
Joined: Wed Feb 09, 2022 10:49 am
Contact:

Event for item-request-proxy creation

Post by ILLISIS »

Greetings
Requesting for the ability to listen for item-request-proxy creation. Currently the only way to find them is to either 1) have the item-request-proxy created at the time of the ghost and listen for on_built_entity or 2) using surface.find_entity_filtered.

My suggestion is to simply raise on_built_entity when an item-request-proxy is created
03-22-2025, 17-00-41.png
03-22-2025, 17-00-41.png (610.24 KiB) Viewed 524 times
User avatar
Thremtopod
Inserter
Inserter
Posts: 42
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Re: Event for item-request-proxy creation

Post by Thremtopod »

+1

This would especially useful for item-request-proxy entities created via the upgrade planner. There are only a few ways that an item-request-proxy can be created, and for most of them there are workarounds you can use (e.g. checking players' selected and opened). But when an item-request-proxy is created via the upgrade planner, if the entity prototype is the same, not on_marked_for_upgrade event (nor any other event) is fired for that entity.

If for whatever reason it's not feasible to have events for ever item-request-proxy creation, it would still be very useful to have an event fired for any entity that was affected by a use of the upgrade planner but that did not have an on_marked_for_upgrade event fired for it.
User avatar
Thremtopod
Inserter
Inserter
Posts: 42
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Re: Event for item-request-proxy creation

Post by Thremtopod »

Okay, I just figured out that you can get events for item-request-proxy created by:

* Adding a created_effect with a "script" trigger item to the item-request-proxy prototype
* Subscribing to the on_script_trigger_effect event and filtering by effect_id
User avatar
Thremtopod
Inserter
Inserter
Posts: 42
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Re: Event for item-request-proxy creation

Post by Thremtopod »

I made a utility mod for item-request-proxy events: https://mods.factorio.com/mod/item-request-proxy-events
Post Reply

Return to “Modding interface requests”