Why does refreshing a blueprint get the bulk rail loaders wrong?
Posted: Tue Sep 07, 2021 5:27 pm
I'm using the railloaders mod which does some fancy stuff with proxy entities when placing the bulk rail loaders and unloaders. The loaders and unloaders consist of multiple (hidden) entities that get placed by scrip when the proxy object gets placed. When taking a blueprint there is some code to handle the translation back to proxy objects.
All of that seems to work flawlessly when taking a blueprint.
But when I open a blueprint, click the button to refresh it and take a blueprint of the exact same structure again something goes wrong. The blueprint no longer shows the bulk rail loader or unloader but still lists it in the entity summary. The wire connections, if any, still show but end in empty space. Then when I place the blueprint the bulk rail loader or unloader gets placed but the rotation is wrong. Doesn't always happen but I think every time the entity is rotated.
So here is my question:
What is the difference between taking a new blueprint and refreshing an existing one that could cause this? Is there a different event for refreshing blueprints or something? Or does the game forget to call the same blueprints on refresh as it does when creating a new one?
All of that seems to work flawlessly when taking a blueprint.
But when I open a blueprint, click the button to refresh it and take a blueprint of the exact same structure again something goes wrong. The blueprint no longer shows the bulk rail loader or unloader but still lists it in the entity summary. The wire connections, if any, still show but end in empty space. Then when I place the blueprint the bulk rail loader or unloader gets placed but the rotation is wrong. Doesn't always happen but I think every time the entity is rotated.
So here is my question:
What is the difference between taking a new blueprint and refreshing an existing one that could cause this? Is there a different event for refreshing blueprints or something? Or does the game forget to call the same blueprints on refresh as it does when creating a new one?