How do I create an 'item-request-proxy' to update existing modules?

Place to get help with not working mods / modding interface.
Post Reply
tkausl
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jun 27, 2022 7:11 pm
Contact:

How do I create an 'item-request-proxy' to update existing modules?

Post by tkausl »

I'm trying to replace existing modules in a building using a 'item-request-proxy'.

I'm creating the proxy simply with

Code: Select all

surface.create_entity({
    name="item-request-proxy",
    position=other.position,
    force=other.force,
    target=other,
    modules=items
})
Where 'other' is a valid entity and 'items' is a valid module table. When the building is empty, it gets filled correctly. When it has (a different set) of modules however, nothing really changes. Using the upgrade-planner to replace modules works the way its supposed to. Looking at both 'item-request-proxy' entities (the one created by the upgrade planner and the one created by me), they seem to have the exact same properties (apart from position and target entity of course), yet the upgrade planner 'item-request-proxy' replaces the modules while mine does not.

What am I missing?

Post Reply

Return to “Modding help”