To fix this, I did some code to get the ghost-name, and it mostly worked without any hitch. The problem is, the fact that I was relying on the circuit connections being preserved because I'm fast replacing the underlying assembling machines with chests, no longer works.
It took me some time to realize, but the 3 chests I was testing with (see bp string) were turning into 6 ghosts.. Meaning they, as part of the same fast replace group, were not getting fast replaced, but instead being built on top of each other (and not even destroying the old ghost like preserve_ghosts_and_corpses would imply)
I tried fast-replacing a normal chest ghost, and I saw that the bar was getting preserved, so it seems to be like fast replacing ghosts should be totally supported.
Edit: here's the commit of me discovering this bug. Just so you can maybe go back in the history and see the bp'ing working before I tried to modify ghosts.
Code: Select all
0eNqlVNtugzAM/ZXKz6FqKFQq0r5jD1OFApg2UkhoSHZRxb/PgbJ2K520jrwQJz7HPsdwgkJ5bK3UDrITyNLoDrKXE3Ryr4UKMS0ahAzeZIWRtEZH5QE7Bz0DqSt8h4z37N79wtc12puMuN8xQO2kkzjSDZuPXPumQEuQbIKxxgknCoWRxaMnmC84Bq3pCMHowEqoKwYflLpepsTkxL4L8VBGPibQrpS29PL6NW8MXTB1blq0YkQj9umU9KgGjhx1qKKCzFmPRHAuJ0B1WIYrYyeTKAxqqajan9FzX0roii4oauPohaLmKaiNbUQIlaZpBZVjSAt4GgI+OMRXqyDd3hrf0snzQbiFO+BiDDBovHKyVTJomAZbJsFnq9lcVMZaaqwiare06PCBqmjRw26sjGesvBqjGxf5Mh19TEjkStpRW8iSO57Okq5nSL/N4r3hSf49PPGvw1ML1T08PZeuwmdKczgkRtYUxv3NsXQYI0H5rzgVNfhH0TfSPNC+cMbZmvEdo7c4rB2dSocNYV3+Ggxeqcyh9XQTb5PtNk14Esec9/0nJct8bg==