This pull request adds handling of the case where entries in global.check_entity_placement become invalid before they are removed from the queue, and adds handlers for script_raised_built and script_raised_destroy events, so that all of MUTC's train deletion and creation are properly processed by Cargo Ships.
Latest version of Multiple Unit Train Control causes Cargo Ships to crash because MUTC deletes (and replaces) a player-built locomotive entity before Cargo Ships has a chance to process it in the next tick. See https://mods.factorio.com/mod/MultipleUnitTrainControl/discussion/5cae30b834ec86000b58234c
This pull request adds handling of the case where entries in global.check_entity_placement become invalid before they are removed from the queue, and adds handlers for script_raised_built and script_raised_destroy events, so that all of MUTC's train deletion and creation are properly processed by Cargo Ships.