Closed Hiestaa closed 3 years ago
Thanks for the contribution, but unfortunately the entityPool only grows and never shrinks, instead there is an entityCursor that points to where the next entity should go. I am working on a solution for this and another issue though. Come join us on the official modding Discord via sgU8QfZhuB
Ha for sure, I was just pocking around please close my PR if it doesn't work. I was under the impression that the problem was caused by the entity pool not having grown yet - given that the building I attempted to copy wasn't placed yet. The error message doesn't help locating the source of the message past the name of the function tho so I wasn't able to confirm the actual line throwing the exception, you will now better if you can reproduce on some kind of development build.
Thanks for the work you're putting into it! I'll join the discord, tho I don't think I'll have a chance to spend much time contributing - that is until my factory reached type II on the Kardashev Scale 😛
Fixed in a43e4b8
Ensure entity exists before looking it up in entity pool
Beware that this change is completely untested as I don't know how to build or test the mod from source files.