Page 1 of 1
Event for item-request-proxy creation
Posted: Sat Mar 22, 2025 6:11 am
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 (610.24 KiB) Viewed 608 times
Re: Event for item-request-proxy creation
Posted: Thu Jun 18, 2026 8:10 pm
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.
Re: Event for item-request-proxy creation
Posted: Thu Jun 18, 2026 8:59 pm
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
Re: Event for item-request-proxy creation
Posted: Fri Jun 19, 2026 6:18 am
by Thremtopod