Open PyroFire232 opened 5 years ago
(1) is easy to fix, but I have not seen (2). Can you elaborate?
The first has been fixed, but I cannot do anything about the second without more info.
https://mods.factorio.com/mod/warptorio2/faq
Warptorio then uses LuaSurface.clone_entities from the current_planet.surface to the new_planet.surface Each new entity created this way has defines.events.on_entity_cloned raised for it. In this event you need to simply update your internal caching and duplicate everything to the new entity so the 2 are identical, but on a different surface. Cloning does not typically happen in normal play, but to test it without mods, you can use the Clone feature in /editor. All players are then teleported to the new planet.
it's similar to on_built_entity
That should not be too difficult.
Is the second still an issue?
Your mod doesn't copy over last_user from turrets when upgrading/replacing them with a higher tier entity.
Your mod seems to crash when entities are cloned, or are made invalid. (particularly shield generator)